MCPcopy
hub / github.com/simstudioai/sim / deleteNote

Function deleteNote

apps/sim/app/api/tools/evernote/lib/client.ts:537–558  ·  view source on GitHub ↗
(token: string, guid: string)

Source from the content-addressed store, hash-verified

535}
536
537export async function deleteNote(token: string, guid: string): Promise<number> {
538 const writer = new ThriftWriter()
539 writer.writeMessageBegin('deleteNote', 0)
540 writer.writeStringField(1, token)
541 writer.writeStringField(2, guid)
542 writer.writeFieldStop()
543
544 const reader = await callNoteStore(token, writer)
545 let usn = 0
546
547 reader.readStruct((r, fieldId, fieldType) => {
548 if (fieldId === 0 && fieldType === TYPE_I32) {
549 usn = r.readI32()
550 } else {
551 if (!checkEvernoteException(r, fieldId, fieldType)) {
552 r.skip(fieldType)
553 }
554 }
555 })
556
557 return usn
558}
559
560export async function searchNotes(
561 token: string,

Callers 1

route.tsFile · 0.90

Calls 8

writeMessageBeginMethod · 0.95
writeStringFieldMethod · 0.95
writeFieldStopMethod · 0.95
checkEvernoteExceptionFunction · 0.85
readStructMethod · 0.80
readI32Method · 0.80
skipMethod · 0.80
callNoteStoreFunction · 0.70

Tested by

no test coverage detected