Rename signature filter state field to profileState
The DocumentVersionSignatureFilter exposed a field named `state` that actually filters on the signatory's profile state, which was ambiguous next to the signature `states` field. Rename it to `profileState` (GraphQL) / `profile_state` (MCP) across the schema, spec, resolvers, console app, and n8n node for clarity. Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
@@ -40,10 +40,10 @@ export const documentLayoutQuery = graphql`
|
||||
...DocumentTitleFormFragment
|
||||
...DocumentActionsDropdown_versionFragment
|
||||
...DocumentDetailsCard_versionFragment
|
||||
signatures(first: 0 filter: { activeContract: true, state: ACTIVE }) {
|
||||
signatures(first: 0 filter: { activeContract: true, profileState: ACTIVE }) {
|
||||
totalCount
|
||||
}
|
||||
signedSignatures: signatures(first: 0 filter: { states: [SIGNED], activeContract: true, state: ACTIVE }) {
|
||||
signedSignatures: signatures(first: 0 filter: { states: [SIGNED], activeContract: true, profileState: ACTIVE }) {
|
||||
totalCount
|
||||
}
|
||||
approvalQuorums(first: 1, orderBy: { field: CREATED_AT, direction: DESC }) {
|
||||
@@ -85,10 +85,10 @@ export const documentLayoutQuery = graphql`
|
||||
...DocumentTitleFormFragment
|
||||
...DocumentActionsDropdown_versionFragment
|
||||
...DocumentDetailsCard_versionFragment
|
||||
signatures(first: 0 filter: { activeContract: true, state: ACTIVE }) {
|
||||
signatures(first: 0 filter: { activeContract: true, profileState: ACTIVE }) {
|
||||
totalCount
|
||||
}
|
||||
signedSignatures: signatures(first: 0 filter: { states: [SIGNED], activeContract: true, state: ACTIVE }) {
|
||||
signedSignatures: signatures(first: 0 filter: { states: [SIGNED], activeContract: true, profileState: ACTIVE }) {
|
||||
totalCount
|
||||
}
|
||||
approvalQuorums(first: 1, orderBy: { field: CREATED_AT, direction: DESC }) {
|
||||
|
||||
@@ -78,10 +78,10 @@ const fragment = graphql`
|
||||
}
|
||||
}
|
||||
}
|
||||
signatures(first: 0 filter: { activeContract: true, state: ACTIVE }) {
|
||||
signatures(first: 0 filter: { activeContract: true, profileState: ACTIVE }) {
|
||||
totalCount
|
||||
}
|
||||
signedSignatures: signatures(first: 0 filter: { states: [SIGNED], activeContract: true, state: ACTIVE }) {
|
||||
signedSignatures: signatures(first: 0 filter: { states: [SIGNED], activeContract: true, profileState: ACTIVE }) {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ const versionFragment = graphql`
|
||||
@argumentDefinitions(
|
||||
count: { type: "Int", defaultValue: 1000 }
|
||||
cursor: { type: "CursorKey" }
|
||||
signatureFilter: { type: "DocumentVersionSignatureFilter", defaultValue: { activeContract: true, state: ACTIVE } }
|
||||
signatureFilter: { type: "DocumentVersionSignatureFilter", defaultValue: { activeContract: true, profileState: ACTIVE } }
|
||||
) {
|
||||
...DocumentSignaturePlaceholder_versionFragment
|
||||
signatures(first: $count, after: $cursor, filter: $signatureFilter)
|
||||
@@ -104,7 +104,7 @@ export function DocumentSignatureList(props: {
|
||||
|
||||
const filter = {
|
||||
activeContract: true,
|
||||
state: "ACTIVE" as const,
|
||||
profileState: "ACTIVE" as const,
|
||||
...(selectedStates.length > 0 ? { states: selectedStates } : {}),
|
||||
};
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ export async function execute(
|
||||
const filter: IDataObject = {};
|
||||
if ((filters.states as string[])?.length) filter.states = filters.states;
|
||||
if (filters.activeContract !== undefined) filter.activeContract = filters.activeContract;
|
||||
if (filters.state) filter.state = filters.state;
|
||||
if (filters.state) filter.profileState = filters.state;
|
||||
|
||||
const hasFilter = Object.keys(filter).length > 0;
|
||||
|
||||
|
||||
@@ -22,15 +22,15 @@ type (
|
||||
DocumentVersionSignatureFilter struct {
|
||||
states DocumentVersionSignatureStates
|
||||
activeContract *bool
|
||||
state *ProfileState
|
||||
profileState *ProfileState
|
||||
}
|
||||
)
|
||||
|
||||
func NewDocumentVersionSignatureFilter(states []DocumentVersionSignatureState, activeContract *bool, state *ProfileState) *DocumentVersionSignatureFilter {
|
||||
func NewDocumentVersionSignatureFilter(states []DocumentVersionSignatureState, activeContract *bool, profileState *ProfileState) *DocumentVersionSignatureFilter {
|
||||
return &DocumentVersionSignatureFilter{
|
||||
states: DocumentVersionSignatureStates(states),
|
||||
activeContract: activeContract,
|
||||
state: state,
|
||||
profileState: profileState,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ func (f *DocumentVersionSignatureFilter) SQLArguments() pgx.StrictNamedArgs {
|
||||
return pgx.StrictNamedArgs{
|
||||
"states": f.states,
|
||||
"active_contract": f.activeContract,
|
||||
"profile_state": f.state,
|
||||
"profile_state": f.profileState,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -294,8 +294,8 @@ func (r *documentVersionResolver) Signatures(ctx context.Context, obj *types.Doc
|
||||
activeContract = filter.ActiveContract
|
||||
}
|
||||
|
||||
if filter.State != nil {
|
||||
profileState = filter.State
|
||||
if filter.ProfileState != nil {
|
||||
profileState = filter.ProfileState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ input DocumentVersionSignatureOrder {
|
||||
input DocumentVersionSignatureFilter {
|
||||
states: [DocumentVersionSignatureState!]
|
||||
activeContract: Boolean
|
||||
state: ProfileState
|
||||
profileState: ProfileState
|
||||
}
|
||||
|
||||
input DocumentVersionApprovalQuorumOrder {
|
||||
|
||||
@@ -2407,8 +2407,8 @@ func (r *Resolver) ListDocumentVersionSignaturesTool(ctx context.Context, req *m
|
||||
activeContract = input.Filter.ActiveContract
|
||||
}
|
||||
|
||||
if input.Filter.State != nil {
|
||||
profileState = input.Filter.State
|
||||
if input.Filter.ProfileState != nil {
|
||||
profileState = input.Filter.ProfileState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6376,7 +6376,7 @@ components:
|
||||
active_contract:
|
||||
type: boolean
|
||||
description: Signatory contract status
|
||||
state:
|
||||
profile_state:
|
||||
$ref: "#/components/schemas/ProfileState"
|
||||
description: Signatory profile state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user