TypeScript API / laikacms/json-api / decodeAtomicOperation
Variable: decodeAtomicOperation
ts
const decodeAtomicOperation: (input, options?) =>
| {
data: {
attributes?: {
[key: string]: any;
};
id?: string;
relationships?: {
[key: string]: any;
};
type: string;
};
op: "add";
}
| {
data: {
attributes?: {
[key: string]: any;
};
id: string;
relationships?: {
[key: string]: any;
};
type: string;
};
op: "update";
}
| {
op: "remove";
ref: {
id: string;
type: string;
};
};Parameters
| Parameter | Type |
|---|---|
input | unknown |
options? | ParseOptions |
Returns
| { data: { attributes?: { [key: string]: any; }; id?: string; relationships?: { [key: string]: any; }; type: string; }; op: "add"; } | { data: { attributes?: { [key: string]: any; }; id: string; relationships?: { [key: string]: any; }; type: string; }; op: "update"; } | { op: "remove"; ref: { id: string; type: string; }; }