/** * Phase 193 client-relationship domain. * * The PRODUCT DATABASE is the only authority for "who are our clients". * `config-state.json` `clients{}` is a DERIVED MIRROR: Admin runtime * materialization reads it to decide which `sellable-client-digest-` cron * jobs exist, so it must be kept accurate, but it is never read as the answer to * a question and there is no fallback path that reads it when this route fails. * * Every call in this domain goes through the shared `apiRequest`/`AdminApiError` * transport below, so a route failure is a visible typed error rather than a * silent stale answer. */ export declare const CLIENT_RELATIONSHIPS_ROUTE = "/api/v3/sellable-agent/client-relationships"; export type ClientAccountStatusName = "ACTIVE" | "ONBOARDING" | "CHURNED" | "ARCHIVED" | "NEEDS_REVIEW"; export type ClientAccountChannelTypeName = "SHARED" | "REPLIES" | "FOLLOWUPS"; export type ClientAccountChannelDeliveryStateName = "UNVERIFIED" | "OK" | "NEEDS_CHANNEL_FIX" | "DELIVERY_FAILED"; export interface ClientAccountChannelView { id: string; type: ClientAccountChannelTypeName; slackChannelId: string; slackChannelName: string | null; deliveryState: ClientAccountChannelDeliveryStateName; lastDeliveryError: string | null; lastPostedBusinessDate: string | null; } export interface ClientAccountSenderView { id: string; name: string; } export interface ClientAccountEventView { id: string; type: string; createdAt: string; } export interface ClientAccountView { id: string; slug: string; workspaceId: string | null; displayName: string; status: ClientAccountStatusName; channels: ClientAccountChannelView[]; senders: ClientAccountSenderView[]; events: ClientAccountEventView[]; } /** * The one transport for this domain. `apiRequest` already throws * `AdminApiError` carrying the exact status for every non-2xx answer; this * unwraps the `{ok,error,result}` envelope and refuses a 200 that is not a * genuine success rather than handing back `undefined` that would read as an * empty, healthy-looking book. */ export declare function clientRelationshipsRequest(body: Record): Promise; export declare const clientRelationshipToolDefinitions: ({ name: string; description: string; inputSchema: { type: "object"; additionalProperties: boolean; properties: { channelId: { type: string; description: string; }; businessDate: { type: string; description: string; }; phase: { type: string; enum: string[]; }; outcome: { type: string; description: string; properties: { ok: { type: string; }; deliveryError: { type: string; }; }; required: string[]; }; slug?: undefined; workspaceId?: undefined; status?: undefined; note?: undefined; lightfieldOpportunityId?: undefined; lightfieldContactId?: undefined; companyName?: undefined; contactName?: undefined; owner?: undefined; committedAt?: undefined; nextTouchAt?: undefined; notes?: undefined; type?: undefined; occurredAt?: undefined; summary?: undefined; lightfieldNoteId?: undefined; evidenceRef?: undefined; statusEvidence?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: "object"; additionalProperties: boolean; properties: { slug: { type: string; description: string; }; workspaceId: { type: string; description: string; }; status: { type: string; enum: string[]; }; note: { type: string; }; channelId?: undefined; businessDate?: undefined; phase?: undefined; outcome?: undefined; lightfieldOpportunityId?: undefined; lightfieldContactId?: undefined; companyName?: undefined; contactName?: undefined; owner?: undefined; committedAt?: undefined; nextTouchAt?: undefined; notes?: undefined; type?: undefined; occurredAt?: undefined; summary?: undefined; lightfieldNoteId?: undefined; evidenceRef?: undefined; statusEvidence?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: "object"; additionalProperties: boolean; properties: { status: { type: string; enum: string[]; }; channelId?: undefined; businessDate?: undefined; phase?: undefined; outcome?: undefined; slug?: undefined; workspaceId?: undefined; note?: undefined; lightfieldOpportunityId?: undefined; lightfieldContactId?: undefined; companyName?: undefined; contactName?: undefined; owner?: undefined; committedAt?: undefined; nextTouchAt?: undefined; notes?: undefined; type?: undefined; occurredAt?: undefined; summary?: undefined; lightfieldNoteId?: undefined; evidenceRef?: undefined; statusEvidence?: undefined; }; required: never[]; }; } | { name: string; description: string; inputSchema: { type: "object"; additionalProperties: boolean; properties: { lightfieldOpportunityId: { type: string; }; lightfieldContactId: { type: string; }; companyName: { type: string; }; contactName: { type: string; }; owner: { type: string; }; committedAt: { type: string; description: string; }; nextTouchAt: { type: string; description: string; }; notes: { type: string; }; channelId?: undefined; businessDate?: undefined; phase?: undefined; outcome?: undefined; slug?: undefined; workspaceId?: undefined; status?: undefined; note?: undefined; type?: undefined; occurredAt?: undefined; summary?: undefined; lightfieldNoteId?: undefined; evidenceRef?: undefined; statusEvidence?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: "object"; additionalProperties: boolean; properties: { lightfieldOpportunityId: { type: string; }; type: { type: string; enum: string[]; }; occurredAt: { type: string; description: string; }; summary: { type: string; }; lightfieldNoteId: { type: string; }; evidenceRef: { type: string; }; channelId?: undefined; businessDate?: undefined; phase?: undefined; outcome?: undefined; slug?: undefined; workspaceId?: undefined; status?: undefined; note?: undefined; lightfieldContactId?: undefined; companyName?: undefined; contactName?: undefined; owner?: undefined; committedAt?: undefined; nextTouchAt?: undefined; notes?: undefined; statusEvidence?: undefined; }; required: string[]; }; } | { name: string; description: string; inputSchema: { type: "object"; additionalProperties: boolean; properties: { lightfieldOpportunityId: { type: string; }; status: { type: string; enum: string[]; }; statusEvidence: { type: string; }; occurredAt: { type: string; description: string; }; channelId?: undefined; businessDate?: undefined; phase?: undefined; outcome?: undefined; slug?: undefined; workspaceId?: undefined; note?: undefined; lightfieldContactId?: undefined; companyName?: undefined; contactName?: undefined; owner?: undefined; committedAt?: undefined; nextTouchAt?: undefined; notes?: undefined; type?: undefined; summary?: undefined; lightfieldNoteId?: undefined; evidenceRef?: undefined; }; required: string[]; }; })[]; export declare function adminClientChannelRecordDelivery(args: { channelId: string; businessDate: string; phase: "claim" | "record"; outcome?: { ok: boolean; deliveryError?: string; }; }): Promise; export declare function adminClientAccountSetStatus(args: { slug?: string; workspaceId?: string; status: ClientAccountStatusName; note?: string; }): Promise; export declare function adminCommittedDealList(args: { status?: string; }): Promise; export declare function adminCommittedDealUpsert(args: { lightfieldOpportunityId: string; lightfieldContactId?: string; companyName?: string; contactName: string; owner: string; committedAt: string; nextTouchAt?: string; notes?: string; }): Promise; export declare function adminCommittedDealRecordTouch(args: { lightfieldOpportunityId: string; type: string; occurredAt: string; summary: string; lightfieldNoteId?: string; evidenceRef?: string; }): Promise; export declare function adminCommittedDealSetStatus(args: { lightfieldOpportunityId: string; status: string; statusEvidence: string; occurredAt?: string; }): Promise;