import { EntryHash } from "@connoropolous/holochain-client"; import { AgentAddress, AgreementAddress, CommitmentAddress, EconomicEventAddress, EconomicResourceAddress, FulfillmentAddress, IntentAddress, PlanAddress, ProcessAddress, ProposedIntentAddress, ResourceSpecificationAddress, SatisfactionAddress } from "../types"; // this type name // matches the Rust side type name export interface PagingParams { // TODO: forwards pagination // first: number // after: string last?: number, before?: EntryHash } interface SearchInput { params: QueryParamType, } export type CommitmentSearchInput = SearchInput export type EconomicEventSearchInput = SearchInput export type FulfillmentSearchInput = SearchInput export type SatisfactionSearchInput = SearchInput export type ProcessSearchInput = SearchInput export type ResourceSpecificationSearchInput = SearchInput export type EconomicResourceSearchInput = SearchInput export type IntentSearchInput = SearchInput export type PlanSearchInput = SearchInput export type ProposalSearchInput = SearchInput export type AgentSearchInput = SearchInput interface CommitmentQueryParam { inputOf?: ProcessAddress, outputOf?: ProcessAddress, fulfilledBy?: FulfillmentAddress, satisfies?: SatisfactionAddress, clauseOf?: AgreementAddress, independentDemandOf?: PlanAddress, plannedWithin?: PlanAddress, inScopeOf?: AgentAddress, provider?: AgentAddress, receiver?: AgentAddress, } interface EconomicEventQueryParams { inputOf?: ProcessAddress, outputOf?: ProcessAddress, satisfies?: IntentAddress, fulfills?: CommitmentAddress, realizationOf?: AgreementAddress, affects?: EconomicResourceAddress, inScopeOf?: AgentAddress, provider?: AgentAddress, receiver?: AgentAddress, } interface FulfillmentQueryParams { fulfills?: CommitmentAddress, fulfilledBy?: EconomicEventAddress, } interface SatisfactionQueryParams { satisfies?: IntentAddress, satisfiedBy?: CommitmentAddress, } interface ProcessQueryParams { observedInputs?: EconomicEventAddress, observedOutputs?: EconomicEventAddress, unplannedEconomicEvents?: EconomicEventAddress, committedInputs?: CommitmentAddress, committedOutputs?: CommitmentAddress, intendedInputs?: IntentAddress, intendedOutputs?: IntentAddress, workingAgents?: AgentAddress, plannedWithin?: PlanAddress, inScopeOf?: AgentAddress, } interface ResourceSpecificationQueryParams { conformingResources?: EconomicResourceAddress, } interface EconomicResourceQueryParams { contains?: EconomicResourceAddress, containedIn?: EconomicResourceAddress, conformsTo?: ResourceSpecificationAddress, affectedBy?: EconomicEventAddress, primaryAccountable?: AgentAddress, } interface IntentQueryParams { inputOf?: ProcessAddress, outputOf?: ProcessAddress, satisfiedBy?: SatisfactionAddress, proposedIn?: ProposedIntentAddress, inScopeOf?: AgentAddress, provider?: AgentAddress, receiver?: AgentAddress, } interface PlanQueryParams { inScopeOf?: AgentAddress, } interface ProposalQueryParams { inScopeOf?: AgentAddress, } interface AgentQueryParams { agentType?: string, }