@scalar/api-client
Version:
the open source API testing client
30 lines (29 loc) • 579 B
JavaScript
const t = (a, r, d) => ({
add: (e) => r.emit("operation:add:parameter", {
type: a,
payload: {
key: e.key ?? "",
value: e.value ?? "",
isEnabled: !0
},
meta: d
}),
delete: (e) => r.emit("operation:delete:parameter", {
type: a,
index: e.index,
meta: d
}),
deleteAll: () => r.emit("operation:delete-all:parameters", {
type: a,
meta: d
}),
update: (e) => r.emit("operation:update:parameter", {
type: a,
index: e.index,
payload: e.payload,
meta: d
})
});
export {
t as createParameterHandlers
};