/** * Centralized mutation key factory * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ // ============================================================================ // Mutation keys for tracking in-flight mutations // // Benefits: // - Track mutation state with useIsMutating // - Implement optimistic updates with proper rollback // - Deduplicate identical mutations // - Coordinate related mutations // ============================================================================ // ============================================================================ // Entity Mutation Keys // ============================================================================ export const appAdminGrantMutationKeys = { /** All appAdminGrant mutation keys */ all: ['mutation', 'appadmingrant'] as const, /** Create appAdminGrant mutation key */ create: () => ['mutation', 'appadmingrant', 'create'] as const, /** Update appAdminGrant mutation key */ update: (id: string | number) => ['mutation', 'appadmingrant', 'update', id] as const, /** Delete appAdminGrant mutation key */ delete: (id: string | number) => ['mutation', 'appadmingrant', '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 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: () => ['mutation', 'appclaimedinvite', 'create'] as const, /** Update appClaimedInvite mutation key */ update: (id: string | number) => ['mutation', 'appclaimedinvite', 'update', id] as const, /** Delete appClaimedInvite mutation key */ delete: (id: string | number) => ['mutation', 'appclaimedinvite', 'delete', id] as const, } as const; export const appGrantMutationKeys = { /** All appGrant mutation keys */ all: ['mutation', 'appgrant'] as const, /** Create appGrant mutation key */ create: () => ['mutation', 'appgrant', 'create'] as const, /** Update appGrant mutation key */ update: (id: string | number) => ['mutation', 'appgrant', 'update', id] as const, /** Delete appGrant mutation key */ delete: (id: string | number) => ['mutation', 'appgrant', 'delete', id] as const, } as const; export const appInviteMutationKeys = { /** All appInvite mutation keys */ all: ['mutation', 'appinvite'] as const, /** Create appInvite mutation key */ create: () => ['mutation', 'appinvite', 'create'] as const, /** Update appInvite mutation key */ update: (id: string | number) => ['mutation', 'appinvite', 'update', id] as const, /** Delete appInvite mutation key */ delete: (id: string | number) => ['mutation', 'appinvite', 'delete', id] as const, } as const; export const appMembershipMutationKeys = { /** All appMembership mutation keys */ all: ['mutation', 'appmembership'] as const, /** Create appMembership mutation key */ create: () => ['mutation', 'appmembership', 'create'] as const, /** Update appMembership mutation key */ update: (id: string | number) => ['mutation', 'appmembership', 'update', id] as const, /** Delete appMembership mutation key */ delete: (id: string | number) => ['mutation', 'appmembership', 'delete', id] as const, } as const; export const appMembershipDefaultMutationKeys = { /** All appMembershipDefault mutation keys */ all: ['mutation', 'appmembershipdefault'] as const, /** Create appMembershipDefault mutation key */ create: () => ['mutation', 'appmembershipdefault', 'create'] as const, /** Update appMembershipDefault mutation key */ update: (id: string | number) => ['mutation', 'appmembershipdefault', 'update', id] as const, /** Delete appMembershipDefault mutation key */ delete: (id: string | number) => ['mutation', 'appmembershipdefault', 'delete', id] as const, } as const; export const appOwnerGrantMutationKeys = { /** All appOwnerGrant mutation keys */ all: ['mutation', 'appownergrant'] as const, /** Create appOwnerGrant mutation key */ create: () => ['mutation', 'appownergrant', 'create'] as const, /** Update appOwnerGrant mutation key */ update: (id: string | number) => ['mutation', 'appownergrant', 'update', id] as const, /** Delete appOwnerGrant mutation key */ delete: (id: string | number) => ['mutation', 'appownergrant', 'delete', id] as const, } as const; export const membershipTypeMutationKeys = { /** All membershipType mutation keys */ all: ['mutation', 'membershiptype'] as const, /** Create membershipType mutation key */ create: () => ['mutation', 'membershiptype', 'create'] as const, /** Update membershipType mutation key */ update: (id: string | number) => ['mutation', 'membershiptype', 'update', id] as const, /** Delete membershipType mutation key */ delete: (id: string | number) => ['mutation', 'membershiptype', 'delete', id] as const, } as const; export const myPendingAppInvitesRecordMutationKeys = { /** All myPendingAppInvitesRecord mutation keys */ all: [ 'mutation', 'mypendingappinvitesrecord', ] as const, /** Create myPendingAppInvitesRecord mutation key */ create: () => ['mutation', 'mypendingappinvitesrecord', 'create'] as const, /** Update myPendingAppInvitesRecord mutation key */ update: (id: string | number) => ['mutation', 'mypendingappinvitesrecord', 'update', id] as const, /** Delete myPendingAppInvitesRecord mutation key */ delete: (id: string | number) => ['mutation', 'mypendingappinvitesrecord', 'delete', id] as const, } as const; export const myPendingOrgInvitesRecordMutationKeys = { /** All myPendingOrgInvitesRecord mutation keys */ all: [ 'mutation', 'mypendingorginvitesrecord', ] as const, /** Create myPendingOrgInvitesRecord mutation key */ create: () => ['mutation', 'mypendingorginvitesrecord', 'create'] as const, /** Update myPendingOrgInvitesRecord mutation key */ update: (id: string | number) => ['mutation', 'mypendingorginvitesrecord', 'update', id] as const, /** Delete myPendingOrgInvitesRecord mutation key */ delete: (id: string | number) => ['mutation', 'mypendingorginvitesrecord', 'delete', id] as const, } as const; export const orgAdminGrantMutationKeys = { /** All orgAdminGrant mutation keys */ all: ['mutation', 'orgadmingrant'] as const, /** Create orgAdminGrant mutation key */ create: () => ['mutation', 'orgadmingrant', 'create'] as const, /** Update orgAdminGrant mutation key */ update: (id: string | number) => ['mutation', 'orgadmingrant', 'update', id] as const, /** Delete orgAdminGrant mutation key */ delete: (id: string | number) => ['mutation', 'orgadmingrant', '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 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: () => ['mutation', 'orgchartedge', 'create'] as const, /** Update orgChartEdge mutation key */ update: (id: string | number) => ['mutation', 'orgchartedge', 'update', id] as const, /** Delete orgChartEdge mutation key */ delete: (id: string | number) => ['mutation', 'orgchartedge', 'delete', id] as const, } as const; export const orgChartEdgeGrantMutationKeys = { /** All orgChartEdgeGrant mutation keys */ all: ['mutation', 'orgchartedgegrant'] as const, /** Create orgChartEdgeGrant mutation key */ create: () => ['mutation', 'orgchartedgegrant', 'create'] as const, /** Update orgChartEdgeGrant mutation key */ update: (id: string | number) => ['mutation', 'orgchartedgegrant', 'update', id] as const, /** Delete orgChartEdgeGrant mutation key */ delete: (id: string | number) => ['mutation', 'orgchartedgegrant', 'delete', id] as const, } as const; export const orgClaimedInviteMutationKeys = { /** All orgClaimedInvite mutation keys */ all: ['mutation', 'orgclaimedinvite'] as const, /** Create orgClaimedInvite mutation key */ create: () => ['mutation', 'orgclaimedinvite', 'create'] as const, /** Update orgClaimedInvite mutation key */ update: (id: string | number) => ['mutation', 'orgclaimedinvite', 'update', id] as const, /** Delete orgClaimedInvite mutation key */ delete: (id: string | number) => ['mutation', 'orgclaimedinvite', 'delete', id] as const, } as const; export const orgGetManagersRecordMutationKeys = { /** All orgGetManagersRecord mutation keys */ all: ['mutation', 'orggetmanagersrecord'] as const, /** Create orgGetManagersRecord mutation key */ create: () => ['mutation', 'orggetmanagersrecord', 'create'] as const, /** Update orgGetManagersRecord mutation key */ update: (id: string | number) => ['mutation', 'orggetmanagersrecord', 'update', id] as const, /** Delete orgGetManagersRecord mutation key */ delete: (id: string | number) => ['mutation', 'orggetmanagersrecord', 'delete', id] as const, } as const; export const orgGetSubordinatesRecordMutationKeys = { /** All orgGetSubordinatesRecord mutation keys */ all: [ 'mutation', 'orggetsubordinatesrecord', ] as const, /** Create orgGetSubordinatesRecord mutation key */ create: () => ['mutation', 'orggetsubordinatesrecord', 'create'] as const, /** Update orgGetSubordinatesRecord mutation key */ update: (id: string | number) => ['mutation', 'orggetsubordinatesrecord', 'update', id] as const, /** Delete orgGetSubordinatesRecord mutation key */ delete: (id: string | number) => ['mutation', 'orggetsubordinatesrecord', 'delete', id] as const, } as const; export const orgGrantMutationKeys = { /** All orgGrant mutation keys */ all: ['mutation', 'orggrant'] as const, /** Create orgGrant mutation key */ create: () => ['mutation', 'orggrant', 'create'] as const, /** Update orgGrant mutation key */ update: (id: string | number) => ['mutation', 'orggrant', 'update', id] as const, /** Delete orgGrant mutation key */ delete: (id: string | number) => ['mutation', 'orggrant', 'delete', id] as const, } as const; export const orgInviteMutationKeys = { /** All orgInvite mutation keys */ all: ['mutation', 'orginvite'] as const, /** Create orgInvite mutation key */ create: () => ['mutation', 'orginvite', 'create'] as const, /** Update orgInvite mutation key */ update: (id: string | number) => ['mutation', 'orginvite', 'update', id] as const, /** Delete orgInvite mutation key */ delete: (id: string | number) => ['mutation', 'orginvite', 'delete', id] as const, } as const; export const orgMemberMutationKeys = { /** All orgMember mutation keys */ all: ['mutation', 'orgmember'] as const, /** Create orgMember mutation key */ create: () => ['mutation', 'orgmember', 'create'] as const, /** Update orgMember mutation key */ update: (id: string | number) => ['mutation', 'orgmember', 'update', id] as const, /** Delete orgMember mutation key */ delete: (id: string | number) => ['mutation', 'orgmember', 'delete', id] as const, } as const; export const orgMemberProfileMutationKeys = { /** All orgMemberProfile mutation keys */ all: ['mutation', 'orgmemberprofile'] as const, /** Create orgMemberProfile mutation key */ create: () => ['mutation', 'orgmemberprofile', 'create'] as const, /** Update orgMemberProfile mutation key */ update: (id: string | number) => ['mutation', 'orgmemberprofile', 'update', id] as const, /** Delete orgMemberProfile mutation key */ delete: (id: string | number) => ['mutation', 'orgmemberprofile', 'delete', id] as const, } as const; export const orgMembershipMutationKeys = { /** All orgMembership mutation keys */ all: ['mutation', 'orgmembership'] as const, /** Create orgMembership mutation key */ create: () => ['mutation', 'orgmembership', 'create'] as const, /** Update orgMembership mutation key */ update: (id: string | number) => ['mutation', 'orgmembership', 'update', id] as const, /** Delete orgMembership mutation key */ delete: (id: string | number) => ['mutation', 'orgmembership', 'delete', id] as const, } as const; export const orgMembershipDefaultMutationKeys = { /** All orgMembershipDefault mutation keys */ all: ['mutation', 'orgmembershipdefault'] as const, /** Create orgMembershipDefault mutation key */ create: () => ['mutation', 'orgmembershipdefault', 'create'] as const, /** Update orgMembershipDefault mutation key */ update: (id: string | number) => ['mutation', 'orgmembershipdefault', 'update', id] as const, /** Delete orgMembershipDefault mutation key */ delete: (id: string | number) => ['mutation', 'orgmembershipdefault', 'delete', id] as const, } as const; export const orgMembershipSettingMutationKeys = { /** All orgMembershipSetting mutation keys */ all: ['mutation', 'orgmembershipsetting'] as const, /** Create orgMembershipSetting mutation key */ create: () => ['mutation', 'orgmembershipsetting', 'create'] as const, /** Update orgMembershipSetting mutation key */ update: (id: string | number) => ['mutation', 'orgmembershipsetting', 'update', id] as const, /** Delete orgMembershipSetting mutation key */ delete: (id: string | number) => ['mutation', 'orgmembershipsetting', 'delete', id] as const, } as const; export const orgOwnerGrantMutationKeys = { /** All orgOwnerGrant mutation keys */ all: ['mutation', 'orgownergrant'] as const, /** Create orgOwnerGrant mutation key */ create: () => ['mutation', 'orgownergrant', 'create'] as const, /** Update orgOwnerGrant mutation key */ update: (id: string | number) => ['mutation', 'orgownergrant', 'update', id] as const, /** Delete orgOwnerGrant mutation key */ delete: (id: string | number) => ['mutation', 'orgownergrant', 'delete', id] as const, } as const; // ============================================================================ // Custom Mutation Keys // ============================================================================ export const customMutationKeys = { /** Mutation key for acceptAppInvite */ acceptAppInvite: (identifier?: string) => identifier ? (['mutation', 'acceptAppInvite', identifier] as const) : (['mutation', 'acceptAppInvite'] as const), /** Mutation key for acceptOrgInvite */ acceptOrgInvite: (identifier?: string) => identifier ? (['mutation', 'acceptOrgInvite', identifier] as const) : (['mutation', 'acceptOrgInvite'] as const), /** Mutation key for provisionAppUser */ provisionAppUser: (identifier?: string) => identifier ? (['mutation', 'provisionAppUser', identifier] as const) : (['mutation', 'provisionAppUser'] as const), /** Mutation key for provisionAppUsersBulk */ provisionAppUsersBulk: (identifier?: string) => identifier ? (['mutation', 'provisionAppUsersBulk', identifier] as const) : (['mutation', 'provisionAppUsersBulk'] as const), /** Mutation key for provisionBucket */ provisionBucket: (identifier?: string) => identifier ? (['mutation', 'provisionBucket', identifier] as const) : (['mutation', 'provisionBucket'] as const), /** Mutation key for provisionOrgUser */ provisionOrgUser: (identifier?: string) => identifier ? (['mutation', 'provisionOrgUser', identifier] as const) : (['mutation', 'provisionOrgUser'] as const), /** Mutation key for provisionOrgUsersBulk */ provisionOrgUsersBulk: (identifier?: string) => identifier ? (['mutation', 'provisionOrgUsersBulk', identifier] as const) : (['mutation', 'provisionOrgUsersBulk'] as const), /** Mutation key for submitAppInviteCode */ submitAppInviteCode: (identifier?: string) => identifier ? (['mutation', 'submitAppInviteCode', identifier] as const) : (['mutation', 'submitAppInviteCode'] as const), /** Mutation key for submitOrgInviteCode */ submitOrgInviteCode: (identifier?: string) => identifier ? (['mutation', 'submitOrgInviteCode', identifier] as const) : (['mutation', 'submitOrgInviteCode'] as const), } as const; /** // ============================================================================ // Unified Mutation Key Store // ============================================================================ * Unified mutation key store * * Use this for tracking in-flight mutations with useIsMutating. * * @example * ```ts * import { useIsMutating } from '@tanstack/react-query'; * import { mutationKeys } from './generated'; * * // Check if any user mutations are in progress * const isMutatingUser = useIsMutating({ mutationKey: mutationKeys.user.all }); * * // Check if a specific user is being updated * const isUpdating = useIsMutating({ mutationKey: mutationKeys.user.update(userId) }); * ``` */ export const mutationKeys = { appAdminGrant: appAdminGrantMutationKeys, appCapabilityDefaultCapability: appCapabilityDefaultCapabilityMutationKeys, appCapabilityDefaultGrant: appCapabilityDefaultGrantMutationKeys, appClaimedInvite: appClaimedInviteMutationKeys, appGrant: appGrantMutationKeys, appInvite: appInviteMutationKeys, appMembership: appMembershipMutationKeys, appMembershipDefault: appMembershipDefaultMutationKeys, appOwnerGrant: appOwnerGrantMutationKeys, membershipType: membershipTypeMutationKeys, myPendingAppInvitesRecord: myPendingAppInvitesRecordMutationKeys, myPendingOrgInvitesRecord: myPendingOrgInvitesRecordMutationKeys, orgAdminGrant: orgAdminGrantMutationKeys, orgCapabilityDefaultCapability: orgCapabilityDefaultCapabilityMutationKeys, orgCapabilityDefaultGrant: orgCapabilityDefaultGrantMutationKeys, orgChartEdge: orgChartEdgeMutationKeys, orgChartEdgeGrant: orgChartEdgeGrantMutationKeys, orgClaimedInvite: orgClaimedInviteMutationKeys, orgGetManagersRecord: orgGetManagersRecordMutationKeys, orgGetSubordinatesRecord: orgGetSubordinatesRecordMutationKeys, orgGrant: orgGrantMutationKeys, orgInvite: orgInviteMutationKeys, orgMember: orgMemberMutationKeys, orgMemberProfile: orgMemberProfileMutationKeys, orgMembership: orgMembershipMutationKeys, orgMembershipDefault: orgMembershipDefaultMutationKeys, orgMembershipSetting: orgMembershipSettingMutationKeys, orgOwnerGrant: orgOwnerGrantMutationKeys, custom: customMutationKeys, } as const;