Interface: IntentResult<T>
Defined in: src/intents/types.ts:37
Standard result envelope for all SAP intent domain operations.
Intent​
Return a consistent result shape from every intent function.
Capability​
Carry execution metadata (duration, steps, SAP module) alongside business data.
Example​
import type { IntentResult } from '#intents/types.js';
const result: IntentResult<string> = {
status: 'success',
data: 'PO-1000012345',
metadata: {
duration: 1234,
retryable: false,
suggestions: [],
intentName: 'createPurchaseOrder',
sapModule: 'MM',
stepsExecuted: ['navigate', 'fillVendor', 'fillMaterial', 'save'],
},
};
Type Parameters​
T​
T = void
Payload type for the data field (defaults to void).
Properties​
data?​
readonlyoptionaldata:T
Defined in: src/intents/types.ts:39
error?​
readonlyoptionalerror:object
Defined in: src/intents/types.ts:40
code​
readonlycode:string
message​
readonlymessage:string
metadata​
readonlymetadata:object
Defined in: src/intents/types.ts:41
duration​
readonlyduration:number
intentName​
readonlyintentName:string
model?​
readonlyoptionalmodel:string
retryable​
readonlyretryable:boolean
sapModule​
readonlysapModule:string
stepsExecuted​
readonlystepsExecuted:string[]
suggestions​
readonlysuggestions:string[]
tokens?​
readonlyoptionaltokens:number
status​
readonlystatus:"success"|"error"|"partial"
Defined in: src/intents/types.ts:38