v2.swagger.yaml 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110
  1. swagger: "2.0"
  2. info:
  3. title: api/v2/activity_service.proto
  4. version: version not set
  5. tags:
  6. - name: ActivityService
  7. - name: UserService
  8. - name: AuthService
  9. - name: InboxService
  10. - name: MarkdownService
  11. - name: ResourceService
  12. - name: MemoService
  13. - name: TagService
  14. - name: WebhookService
  15. - name: WorkspaceService
  16. consumes:
  17. - application/json
  18. produces:
  19. - application/json
  20. paths:
  21. /api/v2/auth/status:
  22. post:
  23. operationId: AuthService_GetAuthStatus
  24. responses:
  25. "200":
  26. description: A successful response.
  27. schema:
  28. $ref: '#/definitions/v2GetAuthStatusResponse'
  29. default:
  30. description: An unexpected error response.
  31. schema:
  32. $ref: '#/definitions/googlerpcStatus'
  33. tags:
  34. - AuthService
  35. /api/v2/inboxes:
  36. get:
  37. operationId: InboxService_ListInboxes
  38. responses:
  39. "200":
  40. description: A successful response.
  41. schema:
  42. $ref: '#/definitions/v2ListInboxesResponse'
  43. default:
  44. description: An unexpected error response.
  45. schema:
  46. $ref: '#/definitions/googlerpcStatus'
  47. parameters:
  48. - name: user
  49. description: 'Format: users/{username}'
  50. in: query
  51. required: false
  52. type: string
  53. tags:
  54. - InboxService
  55. /api/v2/markdown:
  56. post:
  57. operationId: MarkdownService_ParseMarkdown
  58. responses:
  59. "200":
  60. description: A successful response.
  61. schema:
  62. $ref: '#/definitions/v2ParseMarkdownResponse'
  63. default:
  64. description: An unexpected error response.
  65. schema:
  66. $ref: '#/definitions/googlerpcStatus'
  67. parameters:
  68. - name: body
  69. in: body
  70. required: true
  71. schema:
  72. $ref: '#/definitions/v2ParseMarkdownRequest'
  73. tags:
  74. - MarkdownService
  75. /api/v2/memos:
  76. get:
  77. summary: ListMemos lists memos with pagination and filter.
  78. operationId: MemoService_ListMemos
  79. responses:
  80. "200":
  81. description: A successful response.
  82. schema:
  83. $ref: '#/definitions/v2ListMemosResponse'
  84. default:
  85. description: An unexpected error response.
  86. schema:
  87. $ref: '#/definitions/googlerpcStatus'
  88. parameters:
  89. - name: pageSize
  90. description: The maximum number of memos to return.
  91. in: query
  92. required: false
  93. type: integer
  94. format: int32
  95. - name: pageToken
  96. description: |-
  97. A page token, received from a previous `ListMemos` call.
  98. Provide this to retrieve the subsequent page.
  99. in: query
  100. required: false
  101. type: string
  102. - name: filter
  103. description: |-
  104. Filter is used to filter memos returned in the list.
  105. Format: "creator == users/{username} && visibilities == ['PUBLIC', 'PROTECTED']"
  106. in: query
  107. required: false
  108. type: string
  109. tags:
  110. - MemoService
  111. post:
  112. summary: CreateMemo creates a memo.
  113. operationId: MemoService_CreateMemo
  114. responses:
  115. "200":
  116. description: A successful response.
  117. schema:
  118. $ref: '#/definitions/v2CreateMemoResponse'
  119. default:
  120. description: An unexpected error response.
  121. schema:
  122. $ref: '#/definitions/googlerpcStatus'
  123. parameters:
  124. - name: body
  125. in: body
  126. required: true
  127. schema:
  128. $ref: '#/definitions/v2CreateMemoRequest'
  129. tags:
  130. - MemoService
  131. /api/v2/memos/stats:
  132. get:
  133. summary: GetUserMemosStats gets stats of memos for a user.
  134. operationId: MemoService_GetUserMemosStats
  135. responses:
  136. "200":
  137. description: A successful response.
  138. schema:
  139. $ref: '#/definitions/v2GetUserMemosStatsResponse'
  140. default:
  141. description: An unexpected error response.
  142. schema:
  143. $ref: '#/definitions/googlerpcStatus'
  144. parameters:
  145. - name: name
  146. description: |-
  147. name is the name of the user to get stats for.
  148. Format: users/{username}
  149. in: query
  150. required: false
  151. type: string
  152. - name: timezone
  153. description: |-
  154. timezone location
  155. Format: uses tz identifier
  156. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  157. in: query
  158. required: false
  159. type: string
  160. - name: filter
  161. description: Same as ListMemosRequest.filter
  162. in: query
  163. required: false
  164. type: string
  165. tags:
  166. - MemoService
  167. /api/v2/memos/{id}:
  168. get:
  169. summary: GetMemo gets a memo by id.
  170. operationId: MemoService_GetMemo
  171. responses:
  172. "200":
  173. description: A successful response.
  174. schema:
  175. $ref: '#/definitions/v2GetMemoResponse'
  176. default:
  177. description: An unexpected error response.
  178. schema:
  179. $ref: '#/definitions/googlerpcStatus'
  180. parameters:
  181. - name: id
  182. in: path
  183. required: true
  184. type: integer
  185. format: int32
  186. tags:
  187. - MemoService
  188. delete:
  189. summary: DeleteMemo deletes a memo by id.
  190. operationId: MemoService_DeleteMemo
  191. responses:
  192. "200":
  193. description: A successful response.
  194. schema:
  195. $ref: '#/definitions/v2DeleteMemoResponse'
  196. default:
  197. description: An unexpected error response.
  198. schema:
  199. $ref: '#/definitions/googlerpcStatus'
  200. parameters:
  201. - name: id
  202. in: path
  203. required: true
  204. type: integer
  205. format: int32
  206. tags:
  207. - MemoService
  208. patch:
  209. summary: UpdateMemo updates a memo.
  210. operationId: MemoService_UpdateMemo
  211. responses:
  212. "200":
  213. description: A successful response.
  214. schema:
  215. $ref: '#/definitions/v2UpdateMemoResponse'
  216. default:
  217. description: An unexpected error response.
  218. schema:
  219. $ref: '#/definitions/googlerpcStatus'
  220. parameters:
  221. - name: id
  222. in: path
  223. required: true
  224. type: integer
  225. format: int32
  226. - name: body
  227. in: body
  228. required: true
  229. schema:
  230. $ref: '#/definitions/MemoServiceUpdateMemoBody'
  231. tags:
  232. - MemoService
  233. /api/v2/memos/{id}/comments:
  234. get:
  235. summary: ListMemoComments lists comments for a memo.
  236. operationId: MemoService_ListMemoComments
  237. responses:
  238. "200":
  239. description: A successful response.
  240. schema:
  241. $ref: '#/definitions/v2ListMemoCommentsResponse'
  242. default:
  243. description: An unexpected error response.
  244. schema:
  245. $ref: '#/definitions/googlerpcStatus'
  246. parameters:
  247. - name: id
  248. in: path
  249. required: true
  250. type: integer
  251. format: int32
  252. tags:
  253. - MemoService
  254. post:
  255. summary: CreateMemoComment creates a comment for a memo.
  256. operationId: MemoService_CreateMemoComment
  257. responses:
  258. "200":
  259. description: A successful response.
  260. schema:
  261. $ref: '#/definitions/v2CreateMemoCommentResponse'
  262. default:
  263. description: An unexpected error response.
  264. schema:
  265. $ref: '#/definitions/googlerpcStatus'
  266. parameters:
  267. - name: id
  268. description: id is the memo id to create comment for.
  269. in: path
  270. required: true
  271. type: integer
  272. format: int32
  273. - name: create.content
  274. in: query
  275. required: false
  276. type: string
  277. - name: create.visibility
  278. in: query
  279. required: false
  280. type: string
  281. enum:
  282. - VISIBILITY_UNSPECIFIED
  283. - PRIVATE
  284. - PROTECTED
  285. - PUBLIC
  286. default: VISIBILITY_UNSPECIFIED
  287. tags:
  288. - MemoService
  289. /api/v2/memos/{id}/relations:
  290. get:
  291. summary: ListMemoRelations lists relations for a memo.
  292. operationId: MemoService_ListMemoRelations
  293. responses:
  294. "200":
  295. description: A successful response.
  296. schema:
  297. $ref: '#/definitions/v2ListMemoRelationsResponse'
  298. default:
  299. description: An unexpected error response.
  300. schema:
  301. $ref: '#/definitions/googlerpcStatus'
  302. parameters:
  303. - name: id
  304. in: path
  305. required: true
  306. type: integer
  307. format: int32
  308. tags:
  309. - MemoService
  310. post:
  311. summary: SetMemoRelations sets relations for a memo.
  312. operationId: MemoService_SetMemoRelations
  313. responses:
  314. "200":
  315. description: A successful response.
  316. schema:
  317. $ref: '#/definitions/v2SetMemoRelationsResponse'
  318. default:
  319. description: An unexpected error response.
  320. schema:
  321. $ref: '#/definitions/googlerpcStatus'
  322. parameters:
  323. - name: id
  324. in: path
  325. required: true
  326. type: integer
  327. format: int32
  328. - name: body
  329. in: body
  330. required: true
  331. schema:
  332. $ref: '#/definitions/MemoServiceSetMemoRelationsBody'
  333. tags:
  334. - MemoService
  335. /api/v2/memos/{id}/resources:
  336. get:
  337. summary: ListMemoResources lists resources for a memo.
  338. operationId: MemoService_ListMemoResources
  339. responses:
  340. "200":
  341. description: A successful response.
  342. schema:
  343. $ref: '#/definitions/v2ListMemoResourcesResponse'
  344. default:
  345. description: An unexpected error response.
  346. schema:
  347. $ref: '#/definitions/googlerpcStatus'
  348. parameters:
  349. - name: id
  350. in: path
  351. required: true
  352. type: integer
  353. format: int32
  354. tags:
  355. - MemoService
  356. post:
  357. summary: SetMemoResources sets resources for a memo.
  358. operationId: MemoService_SetMemoResources
  359. responses:
  360. "200":
  361. description: A successful response.
  362. schema:
  363. $ref: '#/definitions/v2SetMemoResourcesResponse'
  364. default:
  365. description: An unexpected error response.
  366. schema:
  367. $ref: '#/definitions/googlerpcStatus'
  368. parameters:
  369. - name: id
  370. in: path
  371. required: true
  372. type: integer
  373. format: int32
  374. - name: body
  375. in: body
  376. required: true
  377. schema:
  378. $ref: '#/definitions/MemoServiceSetMemoResourcesBody'
  379. tags:
  380. - MemoService
  381. /api/v2/memos/{name}:
  382. get:
  383. summary: GetMemoByName gets a memo by name.
  384. operationId: MemoService_GetMemoByName
  385. responses:
  386. "200":
  387. description: A successful response.
  388. schema:
  389. $ref: '#/definitions/v2GetMemoByNameResponse'
  390. default:
  391. description: An unexpected error response.
  392. schema:
  393. $ref: '#/definitions/googlerpcStatus'
  394. parameters:
  395. - name: name
  396. in: path
  397. required: true
  398. type: string
  399. tags:
  400. - MemoService
  401. /api/v2/resources:
  402. get:
  403. operationId: ResourceService_ListResources
  404. responses:
  405. "200":
  406. description: A successful response.
  407. schema:
  408. $ref: '#/definitions/v2ListResourcesResponse'
  409. default:
  410. description: An unexpected error response.
  411. schema:
  412. $ref: '#/definitions/googlerpcStatus'
  413. tags:
  414. - ResourceService
  415. post:
  416. operationId: ResourceService_CreateResource
  417. responses:
  418. "200":
  419. description: A successful response.
  420. schema:
  421. $ref: '#/definitions/v2CreateResourceResponse'
  422. default:
  423. description: An unexpected error response.
  424. schema:
  425. $ref: '#/definitions/googlerpcStatus'
  426. parameters:
  427. - name: filename
  428. in: query
  429. required: false
  430. type: string
  431. - name: externalLink
  432. in: query
  433. required: false
  434. type: string
  435. - name: type
  436. in: query
  437. required: false
  438. type: string
  439. - name: memoId
  440. in: query
  441. required: false
  442. type: integer
  443. format: int32
  444. tags:
  445. - ResourceService
  446. /api/v2/resources/{id}:
  447. get:
  448. operationId: ResourceService_GetResource
  449. responses:
  450. "200":
  451. description: A successful response.
  452. schema:
  453. $ref: '#/definitions/v2GetResourceResponse'
  454. default:
  455. description: An unexpected error response.
  456. schema:
  457. $ref: '#/definitions/googlerpcStatus'
  458. parameters:
  459. - name: id
  460. in: path
  461. required: true
  462. type: integer
  463. format: int32
  464. tags:
  465. - ResourceService
  466. delete:
  467. operationId: ResourceService_DeleteResource
  468. responses:
  469. "200":
  470. description: A successful response.
  471. schema:
  472. $ref: '#/definitions/v2DeleteResourceResponse'
  473. default:
  474. description: An unexpected error response.
  475. schema:
  476. $ref: '#/definitions/googlerpcStatus'
  477. parameters:
  478. - name: id
  479. in: path
  480. required: true
  481. type: integer
  482. format: int32
  483. tags:
  484. - ResourceService
  485. /api/v2/resources/{name}:
  486. get:
  487. operationId: ResourceService_GetResourceByName
  488. responses:
  489. "200":
  490. description: A successful response.
  491. schema:
  492. $ref: '#/definitions/v2GetResourceByNameResponse'
  493. default:
  494. description: An unexpected error response.
  495. schema:
  496. $ref: '#/definitions/googlerpcStatus'
  497. parameters:
  498. - name: name
  499. in: path
  500. required: true
  501. type: string
  502. tags:
  503. - ResourceService
  504. /api/v2/resources/{resource.id}:
  505. patch:
  506. operationId: ResourceService_UpdateResource
  507. responses:
  508. "200":
  509. description: A successful response.
  510. schema:
  511. $ref: '#/definitions/v2UpdateResourceResponse'
  512. default:
  513. description: An unexpected error response.
  514. schema:
  515. $ref: '#/definitions/googlerpcStatus'
  516. parameters:
  517. - name: resource.id
  518. description: id is the system generated unique identifier.
  519. in: path
  520. required: true
  521. type: integer
  522. format: int32
  523. - name: resource
  524. in: body
  525. required: true
  526. schema:
  527. type: object
  528. properties:
  529. name:
  530. type: string
  531. description: name is the user provided name.
  532. createTime:
  533. type: string
  534. format: date-time
  535. filename:
  536. type: string
  537. externalLink:
  538. type: string
  539. type:
  540. type: string
  541. size:
  542. type: string
  543. format: int64
  544. memoId:
  545. type: integer
  546. format: int32
  547. tags:
  548. - ResourceService
  549. /api/v2/tags:
  550. get:
  551. operationId: TagService_ListTags
  552. responses:
  553. "200":
  554. description: A successful response.
  555. schema:
  556. $ref: '#/definitions/v2ListTagsResponse'
  557. default:
  558. description: An unexpected error response.
  559. schema:
  560. $ref: '#/definitions/googlerpcStatus'
  561. parameters:
  562. - name: user
  563. description: |-
  564. The creator of tags.
  565. Format: users/{username}
  566. in: query
  567. required: false
  568. type: string
  569. tags:
  570. - TagService
  571. delete:
  572. operationId: TagService_DeleteTag
  573. responses:
  574. "200":
  575. description: A successful response.
  576. schema:
  577. $ref: '#/definitions/v2DeleteTagResponse'
  578. default:
  579. description: An unexpected error response.
  580. schema:
  581. $ref: '#/definitions/googlerpcStatus'
  582. parameters:
  583. - name: tag.name
  584. in: query
  585. required: false
  586. type: string
  587. - name: tag.creator
  588. description: |-
  589. The creator of tags.
  590. Format: users/{username}
  591. in: query
  592. required: false
  593. type: string
  594. tags:
  595. - TagService
  596. post:
  597. operationId: TagService_UpsertTag
  598. responses:
  599. "200":
  600. description: A successful response.
  601. schema:
  602. $ref: '#/definitions/v2UpsertTagResponse'
  603. default:
  604. description: An unexpected error response.
  605. schema:
  606. $ref: '#/definitions/googlerpcStatus'
  607. parameters:
  608. - name: name
  609. in: query
  610. required: false
  611. type: string
  612. tags:
  613. - TagService
  614. /api/v2/tags/suggestion:
  615. get:
  616. operationId: TagService_GetTagSuggestions
  617. responses:
  618. "200":
  619. description: A successful response.
  620. schema:
  621. $ref: '#/definitions/v2GetTagSuggestionsResponse'
  622. default:
  623. description: An unexpected error response.
  624. schema:
  625. $ref: '#/definitions/googlerpcStatus'
  626. parameters:
  627. - name: user
  628. description: |-
  629. The creator of tags.
  630. Format: users/{username}
  631. in: query
  632. required: false
  633. type: string
  634. tags:
  635. - TagService
  636. /api/v2/tags:rename:
  637. patch:
  638. operationId: TagService_RenameTag
  639. responses:
  640. "200":
  641. description: A successful response.
  642. schema:
  643. $ref: '#/definitions/v2RenameTagResponse'
  644. default:
  645. description: An unexpected error response.
  646. schema:
  647. $ref: '#/definitions/googlerpcStatus'
  648. parameters:
  649. - name: user
  650. description: |-
  651. The creator of tags.
  652. Format: users/{username}
  653. in: query
  654. required: false
  655. type: string
  656. - name: oldName
  657. in: query
  658. required: false
  659. type: string
  660. - name: newName
  661. in: query
  662. required: false
  663. type: string
  664. tags:
  665. - TagService
  666. /api/v2/users:
  667. get:
  668. summary: ListUsers returns a list of users.
  669. operationId: UserService_ListUsers
  670. responses:
  671. "200":
  672. description: A successful response.
  673. schema:
  674. $ref: '#/definitions/v2ListUsersResponse'
  675. default:
  676. description: An unexpected error response.
  677. schema:
  678. $ref: '#/definitions/googlerpcStatus'
  679. tags:
  680. - UserService
  681. /api/v2/webhooks:
  682. get:
  683. operationId: WebhookService_ListWebhooks
  684. responses:
  685. "200":
  686. description: A successful response.
  687. schema:
  688. $ref: '#/definitions/v2ListWebhooksResponse'
  689. default:
  690. description: An unexpected error response.
  691. schema:
  692. $ref: '#/definitions/googlerpcStatus'
  693. parameters:
  694. - name: creatorId
  695. in: query
  696. required: false
  697. type: integer
  698. format: int32
  699. tags:
  700. - WebhookService
  701. post:
  702. operationId: WebhookService_CreateWebhook
  703. responses:
  704. "200":
  705. description: A successful response.
  706. schema:
  707. $ref: '#/definitions/v2CreateWebhookResponse'
  708. default:
  709. description: An unexpected error response.
  710. schema:
  711. $ref: '#/definitions/googlerpcStatus'
  712. parameters:
  713. - name: body
  714. in: body
  715. required: true
  716. schema:
  717. $ref: '#/definitions/v2CreateWebhookRequest'
  718. tags:
  719. - WebhookService
  720. /api/v2/webhooks/{id}:
  721. get:
  722. operationId: WebhookService_GetWebhook
  723. responses:
  724. "200":
  725. description: A successful response.
  726. schema:
  727. $ref: '#/definitions/v2GetWebhookResponse'
  728. default:
  729. description: An unexpected error response.
  730. schema:
  731. $ref: '#/definitions/googlerpcStatus'
  732. parameters:
  733. - name: id
  734. in: path
  735. required: true
  736. type: integer
  737. format: int32
  738. tags:
  739. - WebhookService
  740. delete:
  741. operationId: WebhookService_DeleteWebhook
  742. responses:
  743. "200":
  744. description: A successful response.
  745. schema:
  746. $ref: '#/definitions/v2DeleteWebhookResponse'
  747. default:
  748. description: An unexpected error response.
  749. schema:
  750. $ref: '#/definitions/googlerpcStatus'
  751. parameters:
  752. - name: id
  753. in: path
  754. required: true
  755. type: integer
  756. format: int32
  757. tags:
  758. - WebhookService
  759. /api/v2/webhooks/{webhook.id}:
  760. patch:
  761. operationId: WebhookService_UpdateWebhook
  762. responses:
  763. "200":
  764. description: A successful response.
  765. schema:
  766. $ref: '#/definitions/v2UpdateWebhookResponse'
  767. default:
  768. description: An unexpected error response.
  769. schema:
  770. $ref: '#/definitions/googlerpcStatus'
  771. parameters:
  772. - name: webhook.id
  773. in: path
  774. required: true
  775. type: integer
  776. format: int32
  777. - name: body
  778. in: body
  779. required: true
  780. schema:
  781. $ref: '#/definitions/WebhookServiceUpdateWebhookBody'
  782. tags:
  783. - WebhookService
  784. /api/v2/workspace/profile:
  785. get:
  786. operationId: WorkspaceService_GetWorkspaceProfile
  787. responses:
  788. "200":
  789. description: A successful response.
  790. schema:
  791. $ref: '#/definitions/v2GetWorkspaceProfileResponse'
  792. default:
  793. description: An unexpected error response.
  794. schema:
  795. $ref: '#/definitions/googlerpcStatus'
  796. tags:
  797. - WorkspaceService
  798. patch:
  799. operationId: WorkspaceService_UpdateWorkspaceProfile
  800. responses:
  801. "200":
  802. description: A successful response.
  803. schema:
  804. $ref: '#/definitions/v2UpdateWorkspaceProfileResponse'
  805. default:
  806. description: An unexpected error response.
  807. schema:
  808. $ref: '#/definitions/googlerpcStatus'
  809. parameters:
  810. - name: workspaceProfile
  811. description: System info is the updated data.
  812. in: body
  813. required: true
  814. schema:
  815. $ref: '#/definitions/v2WorkspaceProfile'
  816. tags:
  817. - WorkspaceService
  818. /api/v2/{name}:
  819. get:
  820. summary: GetUser gets a user by name.
  821. operationId: UserService_GetUser
  822. responses:
  823. "200":
  824. description: A successful response.
  825. schema:
  826. $ref: '#/definitions/v2GetUserResponse'
  827. default:
  828. description: An unexpected error response.
  829. schema:
  830. $ref: '#/definitions/googlerpcStatus'
  831. parameters:
  832. - name: name
  833. description: |-
  834. The name of the user.
  835. Format: users/{username}
  836. in: path
  837. required: true
  838. type: string
  839. pattern: users/[^/]+
  840. tags:
  841. - UserService
  842. delete:
  843. summary: DeleteUser deletes a user.
  844. operationId: UserService_DeleteUser
  845. responses:
  846. "200":
  847. description: A successful response.
  848. schema:
  849. $ref: '#/definitions/v2DeleteUserResponse'
  850. default:
  851. description: An unexpected error response.
  852. schema:
  853. $ref: '#/definitions/googlerpcStatus'
  854. parameters:
  855. - name: name
  856. description: |-
  857. The name of the user.
  858. Format: users/{username}
  859. in: path
  860. required: true
  861. type: string
  862. pattern: users/[^/]+
  863. tags:
  864. - UserService
  865. /api/v2/{name}/access_tokens:
  866. get:
  867. summary: ListUserAccessTokens returns a list of access tokens for a user.
  868. operationId: UserService_ListUserAccessTokens
  869. responses:
  870. "200":
  871. description: A successful response.
  872. schema:
  873. $ref: '#/definitions/v2ListUserAccessTokensResponse'
  874. default:
  875. description: An unexpected error response.
  876. schema:
  877. $ref: '#/definitions/googlerpcStatus'
  878. parameters:
  879. - name: name
  880. description: |-
  881. The name of the user.
  882. Format: users/{username}
  883. in: path
  884. required: true
  885. type: string
  886. pattern: users/[^/]+
  887. tags:
  888. - UserService
  889. post:
  890. summary: CreateUserAccessToken creates a new access token for a user.
  891. operationId: UserService_CreateUserAccessToken
  892. responses:
  893. "200":
  894. description: A successful response.
  895. schema:
  896. $ref: '#/definitions/v2CreateUserAccessTokenResponse'
  897. default:
  898. description: An unexpected error response.
  899. schema:
  900. $ref: '#/definitions/googlerpcStatus'
  901. parameters:
  902. - name: name
  903. description: |-
  904. The name of the user.
  905. Format: users/{username}
  906. in: path
  907. required: true
  908. type: string
  909. pattern: users/[^/]+
  910. - name: body
  911. in: body
  912. required: true
  913. schema:
  914. $ref: '#/definitions/UserServiceCreateUserAccessTokenBody'
  915. tags:
  916. - UserService
  917. /api/v2/{name}/access_tokens/{accessToken}:
  918. delete:
  919. summary: DeleteUserAccessToken deletes an access token for a user.
  920. operationId: UserService_DeleteUserAccessToken
  921. responses:
  922. "200":
  923. description: A successful response.
  924. schema:
  925. $ref: '#/definitions/v2DeleteUserAccessTokenResponse'
  926. default:
  927. description: An unexpected error response.
  928. schema:
  929. $ref: '#/definitions/googlerpcStatus'
  930. parameters:
  931. - name: name
  932. description: |-
  933. The name of the user.
  934. Format: users/{username}
  935. in: path
  936. required: true
  937. type: string
  938. pattern: users/[^/]+
  939. - name: accessToken
  940. description: access_token is the access token to delete.
  941. in: path
  942. required: true
  943. type: string
  944. tags:
  945. - UserService
  946. /api/v2/{name}/setting:
  947. get:
  948. operationId: UserService_GetUserSetting
  949. responses:
  950. "200":
  951. description: A successful response.
  952. schema:
  953. $ref: '#/definitions/v2GetUserSettingResponse'
  954. default:
  955. description: An unexpected error response.
  956. schema:
  957. $ref: '#/definitions/googlerpcStatus'
  958. parameters:
  959. - name: name
  960. description: |-
  961. The name of the user.
  962. Format: users/{username}
  963. in: path
  964. required: true
  965. type: string
  966. pattern: users/[^/]+
  967. tags:
  968. - UserService
  969. /api/v2/{setting.name}:
  970. patch:
  971. operationId: UserService_UpdateUserSetting
  972. responses:
  973. "200":
  974. description: A successful response.
  975. schema:
  976. $ref: '#/definitions/v2UpdateUserSettingResponse'
  977. default:
  978. description: An unexpected error response.
  979. schema:
  980. $ref: '#/definitions/googlerpcStatus'
  981. parameters:
  982. - name: setting.name
  983. description: |-
  984. The name of the user.
  985. Format: users/{username}
  986. in: path
  987. required: true
  988. type: string
  989. pattern: users/[^/]+/setting
  990. - name: setting
  991. in: body
  992. required: true
  993. schema:
  994. type: object
  995. properties:
  996. locale:
  997. type: string
  998. description: The preferred locale of the user.
  999. appearance:
  1000. type: string
  1001. description: The preferred appearance of the user.
  1002. memoVisibility:
  1003. type: string
  1004. description: The default visibility of the memo.
  1005. telegramUserId:
  1006. type: string
  1007. description: The telegram user id of the user.
  1008. tags:
  1009. - UserService
  1010. /api/v2/{user.name}:
  1011. patch:
  1012. summary: UpdateUser updates a user.
  1013. operationId: UserService_UpdateUser
  1014. responses:
  1015. "200":
  1016. description: A successful response.
  1017. schema:
  1018. $ref: '#/definitions/v2UpdateUserResponse'
  1019. default:
  1020. description: An unexpected error response.
  1021. schema:
  1022. $ref: '#/definitions/googlerpcStatus'
  1023. parameters:
  1024. - name: user.name
  1025. description: |-
  1026. The name of the user.
  1027. Format: users/{username}
  1028. in: path
  1029. required: true
  1030. type: string
  1031. pattern: users/[^/]+
  1032. - name: user
  1033. in: body
  1034. required: true
  1035. schema:
  1036. type: object
  1037. properties:
  1038. id:
  1039. type: integer
  1040. format: int32
  1041. role:
  1042. $ref: '#/definitions/UserRole'
  1043. username:
  1044. type: string
  1045. email:
  1046. type: string
  1047. nickname:
  1048. type: string
  1049. avatarUrl:
  1050. type: string
  1051. password:
  1052. type: string
  1053. rowStatus:
  1054. $ref: '#/definitions/apiv2RowStatus'
  1055. createTime:
  1056. type: string
  1057. format: date-time
  1058. updateTime:
  1059. type: string
  1060. format: date-time
  1061. tags:
  1062. - UserService
  1063. /v1/users:
  1064. post:
  1065. summary: CreateUser creates a new user.
  1066. operationId: UserService_CreateUser
  1067. responses:
  1068. "200":
  1069. description: A successful response.
  1070. schema:
  1071. $ref: '#/definitions/v2CreateUserResponse'
  1072. default:
  1073. description: An unexpected error response.
  1074. schema:
  1075. $ref: '#/definitions/googlerpcStatus'
  1076. parameters:
  1077. - name: user
  1078. in: body
  1079. required: true
  1080. schema:
  1081. $ref: '#/definitions/v2User'
  1082. tags:
  1083. - UserService
  1084. /v2/activities:
  1085. get:
  1086. operationId: ActivityService_GetActivity
  1087. responses:
  1088. "200":
  1089. description: A successful response.
  1090. schema:
  1091. $ref: '#/definitions/v2GetActivityResponse'
  1092. default:
  1093. description: An unexpected error response.
  1094. schema:
  1095. $ref: '#/definitions/googlerpcStatus'
  1096. parameters:
  1097. - name: id
  1098. in: query
  1099. required: false
  1100. type: integer
  1101. format: int32
  1102. tags:
  1103. - ActivityService
  1104. /v2/inboxes:
  1105. patch:
  1106. operationId: InboxService_UpdateInbox
  1107. responses:
  1108. "200":
  1109. description: A successful response.
  1110. schema:
  1111. $ref: '#/definitions/v2UpdateInboxResponse'
  1112. default:
  1113. description: An unexpected error response.
  1114. schema:
  1115. $ref: '#/definitions/googlerpcStatus'
  1116. parameters:
  1117. - name: inbox
  1118. in: body
  1119. required: true
  1120. schema:
  1121. $ref: '#/definitions/v2Inbox'
  1122. tags:
  1123. - InboxService
  1124. /v2/{name}:
  1125. delete:
  1126. operationId: InboxService_DeleteInbox
  1127. responses:
  1128. "200":
  1129. description: A successful response.
  1130. schema:
  1131. $ref: '#/definitions/v2DeleteInboxResponse'
  1132. default:
  1133. description: An unexpected error response.
  1134. schema:
  1135. $ref: '#/definitions/googlerpcStatus'
  1136. parameters:
  1137. - name: name
  1138. description: |-
  1139. The name of the inbox to delete.
  1140. Format: inboxes/{inbox}
  1141. in: path
  1142. required: true
  1143. type: string
  1144. pattern: inboxes/[^/]+
  1145. tags:
  1146. - InboxService
  1147. definitions:
  1148. MemoServiceSetMemoRelationsBody:
  1149. type: object
  1150. properties:
  1151. relations:
  1152. type: array
  1153. items:
  1154. type: object
  1155. $ref: '#/definitions/v2MemoRelation'
  1156. MemoServiceSetMemoResourcesBody:
  1157. type: object
  1158. properties:
  1159. resources:
  1160. type: array
  1161. items:
  1162. type: object
  1163. $ref: '#/definitions/v2Resource'
  1164. MemoServiceUpdateMemoBody:
  1165. type: object
  1166. properties:
  1167. memo:
  1168. $ref: '#/definitions/v2Memo'
  1169. updateMask:
  1170. type: string
  1171. TableNodeRow:
  1172. type: object
  1173. properties:
  1174. cells:
  1175. type: array
  1176. items:
  1177. type: string
  1178. UserRole:
  1179. type: string
  1180. enum:
  1181. - ROLE_UNSPECIFIED
  1182. - HOST
  1183. - ADMIN
  1184. - USER
  1185. default: ROLE_UNSPECIFIED
  1186. UserServiceCreateUserAccessTokenBody:
  1187. type: object
  1188. properties:
  1189. description:
  1190. type: string
  1191. expiresAt:
  1192. type: string
  1193. format: date-time
  1194. WebhookServiceUpdateWebhookBody:
  1195. type: object
  1196. properties:
  1197. webhook:
  1198. type: object
  1199. properties:
  1200. creatorId:
  1201. type: integer
  1202. format: int32
  1203. createdTime:
  1204. type: string
  1205. format: date-time
  1206. updatedTime:
  1207. type: string
  1208. format: date-time
  1209. rowStatus:
  1210. $ref: '#/definitions/apiv2RowStatus'
  1211. name:
  1212. type: string
  1213. url:
  1214. type: string
  1215. updateMask:
  1216. type: string
  1217. apiv2ActivityMemoCommentPayload:
  1218. type: object
  1219. properties:
  1220. memoId:
  1221. type: integer
  1222. format: int32
  1223. relatedMemoId:
  1224. type: integer
  1225. format: int32
  1226. apiv2ActivityPayload:
  1227. type: object
  1228. properties:
  1229. memoComment:
  1230. $ref: '#/definitions/apiv2ActivityMemoCommentPayload'
  1231. versionUpdate:
  1232. $ref: '#/definitions/apiv2ActivityVersionUpdatePayload'
  1233. apiv2ActivityVersionUpdatePayload:
  1234. type: object
  1235. properties:
  1236. version:
  1237. type: string
  1238. apiv2RowStatus:
  1239. type: string
  1240. enum:
  1241. - ROW_STATUS_UNSPECIFIED
  1242. - ACTIVE
  1243. - ARCHIVED
  1244. default: ROW_STATUS_UNSPECIFIED
  1245. apiv2UserSetting:
  1246. type: object
  1247. properties:
  1248. name:
  1249. type: string
  1250. title: |-
  1251. The name of the user.
  1252. Format: users/{username}
  1253. locale:
  1254. type: string
  1255. description: The preferred locale of the user.
  1256. appearance:
  1257. type: string
  1258. description: The preferred appearance of the user.
  1259. memoVisibility:
  1260. type: string
  1261. description: The default visibility of the memo.
  1262. telegramUserId:
  1263. type: string
  1264. description: The telegram user id of the user.
  1265. apiv2Webhook:
  1266. type: object
  1267. properties:
  1268. id:
  1269. type: integer
  1270. format: int32
  1271. creatorId:
  1272. type: integer
  1273. format: int32
  1274. createdTime:
  1275. type: string
  1276. format: date-time
  1277. updatedTime:
  1278. type: string
  1279. format: date-time
  1280. rowStatus:
  1281. $ref: '#/definitions/apiv2RowStatus'
  1282. name:
  1283. type: string
  1284. url:
  1285. type: string
  1286. googlerpcStatus:
  1287. type: object
  1288. properties:
  1289. code:
  1290. type: integer
  1291. format: int32
  1292. message:
  1293. type: string
  1294. details:
  1295. type: array
  1296. items:
  1297. type: object
  1298. $ref: '#/definitions/protobufAny'
  1299. protobufAny:
  1300. type: object
  1301. properties:
  1302. '@type':
  1303. type: string
  1304. additionalProperties: {}
  1305. v2Activity:
  1306. type: object
  1307. properties:
  1308. id:
  1309. type: integer
  1310. format: int32
  1311. creatorId:
  1312. type: integer
  1313. format: int32
  1314. type:
  1315. type: string
  1316. level:
  1317. type: string
  1318. createTime:
  1319. type: string
  1320. format: date-time
  1321. payload:
  1322. $ref: '#/definitions/apiv2ActivityPayload'
  1323. v2AutoLinkNode:
  1324. type: object
  1325. properties:
  1326. url:
  1327. type: string
  1328. isRawText:
  1329. type: boolean
  1330. v2BlockquoteNode:
  1331. type: object
  1332. properties:
  1333. children:
  1334. type: array
  1335. items:
  1336. type: object
  1337. $ref: '#/definitions/v2Node'
  1338. v2BoldItalicNode:
  1339. type: object
  1340. properties:
  1341. symbol:
  1342. type: string
  1343. content:
  1344. type: string
  1345. v2BoldNode:
  1346. type: object
  1347. properties:
  1348. symbol:
  1349. type: string
  1350. children:
  1351. type: array
  1352. items:
  1353. type: object
  1354. $ref: '#/definitions/v2Node'
  1355. v2CodeBlockNode:
  1356. type: object
  1357. properties:
  1358. language:
  1359. type: string
  1360. content:
  1361. type: string
  1362. v2CodeNode:
  1363. type: object
  1364. properties:
  1365. content:
  1366. type: string
  1367. v2CreateMemoCommentResponse:
  1368. type: object
  1369. properties:
  1370. memo:
  1371. $ref: '#/definitions/v2Memo'
  1372. v2CreateMemoRequest:
  1373. type: object
  1374. properties:
  1375. content:
  1376. type: string
  1377. visibility:
  1378. $ref: '#/definitions/v2Visibility'
  1379. v2CreateMemoResponse:
  1380. type: object
  1381. properties:
  1382. memo:
  1383. $ref: '#/definitions/v2Memo'
  1384. v2CreateResourceResponse:
  1385. type: object
  1386. properties:
  1387. resource:
  1388. $ref: '#/definitions/v2Resource'
  1389. v2CreateUserAccessTokenResponse:
  1390. type: object
  1391. properties:
  1392. accessToken:
  1393. $ref: '#/definitions/v2UserAccessToken'
  1394. v2CreateUserResponse:
  1395. type: object
  1396. properties:
  1397. user:
  1398. $ref: '#/definitions/v2User'
  1399. v2CreateWebhookRequest:
  1400. type: object
  1401. properties:
  1402. name:
  1403. type: string
  1404. url:
  1405. type: string
  1406. v2CreateWebhookResponse:
  1407. type: object
  1408. properties:
  1409. webhook:
  1410. $ref: '#/definitions/apiv2Webhook'
  1411. v2DeleteInboxResponse:
  1412. type: object
  1413. v2DeleteMemoResponse:
  1414. type: object
  1415. v2DeleteResourceResponse:
  1416. type: object
  1417. v2DeleteTagResponse:
  1418. type: object
  1419. v2DeleteUserAccessTokenResponse:
  1420. type: object
  1421. v2DeleteUserResponse:
  1422. type: object
  1423. v2DeleteWebhookResponse:
  1424. type: object
  1425. v2EmbeddedContentNode:
  1426. type: object
  1427. properties:
  1428. resourceName:
  1429. type: string
  1430. params:
  1431. type: string
  1432. v2EscapingCharacterNode:
  1433. type: object
  1434. properties:
  1435. symbol:
  1436. type: string
  1437. v2GetActivityResponse:
  1438. type: object
  1439. properties:
  1440. activity:
  1441. $ref: '#/definitions/v2Activity'
  1442. v2GetAuthStatusResponse:
  1443. type: object
  1444. properties:
  1445. user:
  1446. $ref: '#/definitions/v2User'
  1447. v2GetMemoByNameResponse:
  1448. type: object
  1449. properties:
  1450. memo:
  1451. $ref: '#/definitions/v2Memo'
  1452. v2GetMemoResponse:
  1453. type: object
  1454. properties:
  1455. memo:
  1456. $ref: '#/definitions/v2Memo'
  1457. v2GetResourceByNameResponse:
  1458. type: object
  1459. properties:
  1460. resource:
  1461. $ref: '#/definitions/v2Resource'
  1462. v2GetResourceResponse:
  1463. type: object
  1464. properties:
  1465. resource:
  1466. $ref: '#/definitions/v2Resource'
  1467. v2GetTagSuggestionsResponse:
  1468. type: object
  1469. properties:
  1470. tags:
  1471. type: array
  1472. items:
  1473. type: string
  1474. v2GetUserMemosStatsResponse:
  1475. type: object
  1476. properties:
  1477. stats:
  1478. type: object
  1479. additionalProperties:
  1480. type: integer
  1481. format: int32
  1482. description: |-
  1483. stats is the stats of memo creating/updating activities.
  1484. key is the year-month-day string. e.g. "2020-01-01".
  1485. v2GetUserResponse:
  1486. type: object
  1487. properties:
  1488. user:
  1489. $ref: '#/definitions/v2User'
  1490. v2GetUserSettingResponse:
  1491. type: object
  1492. properties:
  1493. setting:
  1494. $ref: '#/definitions/apiv2UserSetting'
  1495. v2GetWebhookResponse:
  1496. type: object
  1497. properties:
  1498. webhook:
  1499. $ref: '#/definitions/apiv2Webhook'
  1500. v2GetWorkspaceProfileResponse:
  1501. type: object
  1502. properties:
  1503. workspaceProfile:
  1504. $ref: '#/definitions/v2WorkspaceProfile'
  1505. v2HeadingNode:
  1506. type: object
  1507. properties:
  1508. level:
  1509. type: integer
  1510. format: int32
  1511. children:
  1512. type: array
  1513. items:
  1514. type: object
  1515. $ref: '#/definitions/v2Node'
  1516. v2HighlightNode:
  1517. type: object
  1518. properties:
  1519. content:
  1520. type: string
  1521. v2HorizontalRuleNode:
  1522. type: object
  1523. properties:
  1524. symbol:
  1525. type: string
  1526. v2ImageNode:
  1527. type: object
  1528. properties:
  1529. altText:
  1530. type: string
  1531. url:
  1532. type: string
  1533. v2Inbox:
  1534. type: object
  1535. properties:
  1536. name:
  1537. type: string
  1538. title: |-
  1539. The name of the inbox.
  1540. Format: inboxes/{id}
  1541. sender:
  1542. type: string
  1543. title: 'Format: users/{username}'
  1544. receiver:
  1545. type: string
  1546. title: 'Format: users/{username}'
  1547. status:
  1548. $ref: '#/definitions/v2InboxStatus'
  1549. createTime:
  1550. type: string
  1551. format: date-time
  1552. type:
  1553. $ref: '#/definitions/v2InboxType'
  1554. activityId:
  1555. type: integer
  1556. format: int32
  1557. v2InboxStatus:
  1558. type: string
  1559. enum:
  1560. - STATUS_UNSPECIFIED
  1561. - UNREAD
  1562. - ARCHIVED
  1563. default: STATUS_UNSPECIFIED
  1564. v2InboxType:
  1565. type: string
  1566. enum:
  1567. - TYPE_UNSPECIFIED
  1568. - TYPE_MEMO_COMMENT
  1569. - TYPE_VERSION_UPDATE
  1570. default: TYPE_UNSPECIFIED
  1571. v2ItalicNode:
  1572. type: object
  1573. properties:
  1574. symbol:
  1575. type: string
  1576. content:
  1577. type: string
  1578. v2LineBreakNode:
  1579. type: object
  1580. v2LinkNode:
  1581. type: object
  1582. properties:
  1583. text:
  1584. type: string
  1585. url:
  1586. type: string
  1587. v2ListInboxesResponse:
  1588. type: object
  1589. properties:
  1590. inboxes:
  1591. type: array
  1592. items:
  1593. type: object
  1594. $ref: '#/definitions/v2Inbox'
  1595. v2ListMemoCommentsResponse:
  1596. type: object
  1597. properties:
  1598. memos:
  1599. type: array
  1600. items:
  1601. type: object
  1602. $ref: '#/definitions/v2Memo'
  1603. v2ListMemoRelationsResponse:
  1604. type: object
  1605. properties:
  1606. relations:
  1607. type: array
  1608. items:
  1609. type: object
  1610. $ref: '#/definitions/v2MemoRelation'
  1611. v2ListMemoResourcesResponse:
  1612. type: object
  1613. properties:
  1614. resources:
  1615. type: array
  1616. items:
  1617. type: object
  1618. $ref: '#/definitions/v2Resource'
  1619. v2ListMemosResponse:
  1620. type: object
  1621. properties:
  1622. memos:
  1623. type: array
  1624. items:
  1625. type: object
  1626. $ref: '#/definitions/v2Memo'
  1627. nextPageToken:
  1628. type: string
  1629. description: |-
  1630. A token, which can be sent as `page_token` to retrieve the next page.
  1631. If this field is omitted, there are no subsequent pages.
  1632. v2ListResourcesResponse:
  1633. type: object
  1634. properties:
  1635. resources:
  1636. type: array
  1637. items:
  1638. type: object
  1639. $ref: '#/definitions/v2Resource'
  1640. v2ListTagsResponse:
  1641. type: object
  1642. properties:
  1643. tags:
  1644. type: array
  1645. items:
  1646. type: object
  1647. $ref: '#/definitions/v2Tag'
  1648. v2ListUserAccessTokensResponse:
  1649. type: object
  1650. properties:
  1651. accessTokens:
  1652. type: array
  1653. items:
  1654. type: object
  1655. $ref: '#/definitions/v2UserAccessToken'
  1656. v2ListUsersResponse:
  1657. type: object
  1658. properties:
  1659. users:
  1660. type: array
  1661. items:
  1662. type: object
  1663. $ref: '#/definitions/v2User'
  1664. v2ListWebhooksResponse:
  1665. type: object
  1666. properties:
  1667. webhooks:
  1668. type: array
  1669. items:
  1670. type: object
  1671. $ref: '#/definitions/apiv2Webhook'
  1672. v2MathBlockNode:
  1673. type: object
  1674. properties:
  1675. content:
  1676. type: string
  1677. v2MathNode:
  1678. type: object
  1679. properties:
  1680. content:
  1681. type: string
  1682. v2Memo:
  1683. type: object
  1684. properties:
  1685. id:
  1686. type: integer
  1687. format: int32
  1688. description: id is the system generated unique identifier.
  1689. name:
  1690. type: string
  1691. description: name is the user provided name.
  1692. rowStatus:
  1693. $ref: '#/definitions/apiv2RowStatus'
  1694. creator:
  1695. type: string
  1696. title: |-
  1697. The name of the creator.
  1698. Format: users/{username}
  1699. creatorId:
  1700. type: integer
  1701. format: int32
  1702. createTime:
  1703. type: string
  1704. format: date-time
  1705. updateTime:
  1706. type: string
  1707. format: date-time
  1708. displayTime:
  1709. type: string
  1710. format: date-time
  1711. content:
  1712. type: string
  1713. nodes:
  1714. type: array
  1715. items:
  1716. type: object
  1717. $ref: '#/definitions/v2Node'
  1718. visibility:
  1719. $ref: '#/definitions/v2Visibility'
  1720. pinned:
  1721. type: boolean
  1722. parentId:
  1723. type: integer
  1724. format: int32
  1725. readOnly: true
  1726. resources:
  1727. type: array
  1728. items:
  1729. type: object
  1730. $ref: '#/definitions/v2Resource'
  1731. readOnly: true
  1732. relations:
  1733. type: array
  1734. items:
  1735. type: object
  1736. $ref: '#/definitions/v2MemoRelation'
  1737. readOnly: true
  1738. v2MemoRelation:
  1739. type: object
  1740. properties:
  1741. memoId:
  1742. type: integer
  1743. format: int32
  1744. relatedMemoId:
  1745. type: integer
  1746. format: int32
  1747. type:
  1748. $ref: '#/definitions/v2MemoRelationType'
  1749. v2MemoRelationType:
  1750. type: string
  1751. enum:
  1752. - TYPE_UNSPECIFIED
  1753. - REFERENCE
  1754. - COMMENT
  1755. default: TYPE_UNSPECIFIED
  1756. v2Node:
  1757. type: object
  1758. properties:
  1759. type:
  1760. $ref: '#/definitions/v2NodeType'
  1761. lineBreakNode:
  1762. $ref: '#/definitions/v2LineBreakNode'
  1763. paragraphNode:
  1764. $ref: '#/definitions/v2ParagraphNode'
  1765. codeBlockNode:
  1766. $ref: '#/definitions/v2CodeBlockNode'
  1767. headingNode:
  1768. $ref: '#/definitions/v2HeadingNode'
  1769. horizontalRuleNode:
  1770. $ref: '#/definitions/v2HorizontalRuleNode'
  1771. blockquoteNode:
  1772. $ref: '#/definitions/v2BlockquoteNode'
  1773. orderedListNode:
  1774. $ref: '#/definitions/v2OrderedListNode'
  1775. unorderedListNode:
  1776. $ref: '#/definitions/v2UnorderedListNode'
  1777. taskListNode:
  1778. $ref: '#/definitions/v2TaskListNode'
  1779. mathBlockNode:
  1780. $ref: '#/definitions/v2MathBlockNode'
  1781. tableNode:
  1782. $ref: '#/definitions/v2TableNode'
  1783. embeddedContentNode:
  1784. $ref: '#/definitions/v2EmbeddedContentNode'
  1785. textNode:
  1786. $ref: '#/definitions/v2TextNode'
  1787. boldNode:
  1788. $ref: '#/definitions/v2BoldNode'
  1789. italicNode:
  1790. $ref: '#/definitions/v2ItalicNode'
  1791. boldItalicNode:
  1792. $ref: '#/definitions/v2BoldItalicNode'
  1793. codeNode:
  1794. $ref: '#/definitions/v2CodeNode'
  1795. imageNode:
  1796. $ref: '#/definitions/v2ImageNode'
  1797. linkNode:
  1798. $ref: '#/definitions/v2LinkNode'
  1799. autoLinkNode:
  1800. $ref: '#/definitions/v2AutoLinkNode'
  1801. tagNode:
  1802. $ref: '#/definitions/v2TagNode'
  1803. strikethroughNode:
  1804. $ref: '#/definitions/v2StrikethroughNode'
  1805. escapingCharacterNode:
  1806. $ref: '#/definitions/v2EscapingCharacterNode'
  1807. mathNode:
  1808. $ref: '#/definitions/v2MathNode'
  1809. highlightNode:
  1810. $ref: '#/definitions/v2HighlightNode'
  1811. subscriptNode:
  1812. $ref: '#/definitions/v2SubscriptNode'
  1813. superscriptNode:
  1814. $ref: '#/definitions/v2SuperscriptNode'
  1815. referencedContentNode:
  1816. $ref: '#/definitions/v2ReferencedContentNode'
  1817. v2NodeType:
  1818. type: string
  1819. enum:
  1820. - NODE_UNSPECIFIED
  1821. - LINE_BREAK
  1822. - PARAGRAPH
  1823. - CODE_BLOCK
  1824. - HEADING
  1825. - HORIZONTAL_RULE
  1826. - BLOCKQUOTE
  1827. - ORDERED_LIST
  1828. - UNORDERED_LIST
  1829. - TASK_LIST
  1830. - MATH_BLOCK
  1831. - TABLE
  1832. - EMBEDDED_CONTENT
  1833. - TEXT
  1834. - BOLD
  1835. - ITALIC
  1836. - BOLD_ITALIC
  1837. - CODE
  1838. - IMAGE
  1839. - LINK
  1840. - AUTO_LINK
  1841. - TAG
  1842. - STRIKETHROUGH
  1843. - ESCAPING_CHARACTER
  1844. - MATH
  1845. - HIGHLIGHT
  1846. - SUBSCRIPT
  1847. - SUPERSCRIPT
  1848. - REFERENCED_CONTENT
  1849. default: NODE_UNSPECIFIED
  1850. v2OrderedListNode:
  1851. type: object
  1852. properties:
  1853. number:
  1854. type: string
  1855. indent:
  1856. type: integer
  1857. format: int32
  1858. children:
  1859. type: array
  1860. items:
  1861. type: object
  1862. $ref: '#/definitions/v2Node'
  1863. v2ParagraphNode:
  1864. type: object
  1865. properties:
  1866. children:
  1867. type: array
  1868. items:
  1869. type: object
  1870. $ref: '#/definitions/v2Node'
  1871. v2ParseMarkdownRequest:
  1872. type: object
  1873. properties:
  1874. markdown:
  1875. type: string
  1876. v2ParseMarkdownResponse:
  1877. type: object
  1878. properties:
  1879. nodes:
  1880. type: array
  1881. items:
  1882. type: object
  1883. $ref: '#/definitions/v2Node'
  1884. v2ReferencedContentNode:
  1885. type: object
  1886. properties:
  1887. resourceName:
  1888. type: string
  1889. params:
  1890. type: string
  1891. v2RenameTagResponse:
  1892. type: object
  1893. properties:
  1894. tag:
  1895. $ref: '#/definitions/v2Tag'
  1896. v2Resource:
  1897. type: object
  1898. properties:
  1899. id:
  1900. type: integer
  1901. format: int32
  1902. description: id is the system generated unique identifier.
  1903. name:
  1904. type: string
  1905. description: name is the user provided name.
  1906. createTime:
  1907. type: string
  1908. format: date-time
  1909. filename:
  1910. type: string
  1911. externalLink:
  1912. type: string
  1913. type:
  1914. type: string
  1915. size:
  1916. type: string
  1917. format: int64
  1918. memoId:
  1919. type: integer
  1920. format: int32
  1921. v2SetMemoRelationsResponse:
  1922. type: object
  1923. v2SetMemoResourcesResponse:
  1924. type: object
  1925. v2StrikethroughNode:
  1926. type: object
  1927. properties:
  1928. content:
  1929. type: string
  1930. v2SubscriptNode:
  1931. type: object
  1932. properties:
  1933. content:
  1934. type: string
  1935. v2SuperscriptNode:
  1936. type: object
  1937. properties:
  1938. content:
  1939. type: string
  1940. v2TableNode:
  1941. type: object
  1942. properties:
  1943. header:
  1944. type: array
  1945. items:
  1946. type: string
  1947. delimiter:
  1948. type: array
  1949. items:
  1950. type: string
  1951. rows:
  1952. type: array
  1953. items:
  1954. type: object
  1955. $ref: '#/definitions/TableNodeRow'
  1956. v2Tag:
  1957. type: object
  1958. properties:
  1959. name:
  1960. type: string
  1961. creator:
  1962. type: string
  1963. title: |-
  1964. The creator of tags.
  1965. Format: users/{username}
  1966. v2TagNode:
  1967. type: object
  1968. properties:
  1969. content:
  1970. type: string
  1971. v2TaskListNode:
  1972. type: object
  1973. properties:
  1974. symbol:
  1975. type: string
  1976. indent:
  1977. type: integer
  1978. format: int32
  1979. complete:
  1980. type: boolean
  1981. children:
  1982. type: array
  1983. items:
  1984. type: object
  1985. $ref: '#/definitions/v2Node'
  1986. v2TextNode:
  1987. type: object
  1988. properties:
  1989. content:
  1990. type: string
  1991. v2UnorderedListNode:
  1992. type: object
  1993. properties:
  1994. symbol:
  1995. type: string
  1996. indent:
  1997. type: integer
  1998. format: int32
  1999. children:
  2000. type: array
  2001. items:
  2002. type: object
  2003. $ref: '#/definitions/v2Node'
  2004. v2UpdateInboxResponse:
  2005. type: object
  2006. properties:
  2007. inbox:
  2008. $ref: '#/definitions/v2Inbox'
  2009. v2UpdateMemoResponse:
  2010. type: object
  2011. properties:
  2012. memo:
  2013. $ref: '#/definitions/v2Memo'
  2014. v2UpdateResourceResponse:
  2015. type: object
  2016. properties:
  2017. resource:
  2018. $ref: '#/definitions/v2Resource'
  2019. v2UpdateUserResponse:
  2020. type: object
  2021. properties:
  2022. user:
  2023. $ref: '#/definitions/v2User'
  2024. v2UpdateUserSettingResponse:
  2025. type: object
  2026. properties:
  2027. setting:
  2028. $ref: '#/definitions/apiv2UserSetting'
  2029. v2UpdateWebhookResponse:
  2030. type: object
  2031. properties:
  2032. webhook:
  2033. $ref: '#/definitions/apiv2Webhook'
  2034. v2UpdateWorkspaceProfileResponse:
  2035. type: object
  2036. properties:
  2037. workspaceProfile:
  2038. $ref: '#/definitions/v2WorkspaceProfile'
  2039. v2UpsertTagResponse:
  2040. type: object
  2041. properties:
  2042. tag:
  2043. $ref: '#/definitions/v2Tag'
  2044. v2User:
  2045. type: object
  2046. properties:
  2047. name:
  2048. type: string
  2049. title: |-
  2050. The name of the user.
  2051. Format: users/{username}
  2052. id:
  2053. type: integer
  2054. format: int32
  2055. role:
  2056. $ref: '#/definitions/UserRole'
  2057. username:
  2058. type: string
  2059. email:
  2060. type: string
  2061. nickname:
  2062. type: string
  2063. avatarUrl:
  2064. type: string
  2065. password:
  2066. type: string
  2067. rowStatus:
  2068. $ref: '#/definitions/apiv2RowStatus'
  2069. createTime:
  2070. type: string
  2071. format: date-time
  2072. updateTime:
  2073. type: string
  2074. format: date-time
  2075. v2UserAccessToken:
  2076. type: object
  2077. properties:
  2078. accessToken:
  2079. type: string
  2080. description:
  2081. type: string
  2082. issuedAt:
  2083. type: string
  2084. format: date-time
  2085. expiresAt:
  2086. type: string
  2087. format: date-time
  2088. v2Visibility:
  2089. type: string
  2090. enum:
  2091. - VISIBILITY_UNSPECIFIED
  2092. - PRIVATE
  2093. - PROTECTED
  2094. - PUBLIC
  2095. default: VISIBILITY_UNSPECIFIED
  2096. v2WorkspaceProfile:
  2097. type: object
  2098. properties:
  2099. version:
  2100. type: string
  2101. mode:
  2102. type: string
  2103. allowRegistration:
  2104. type: boolean
  2105. disablePasswordLogin:
  2106. type: boolean
  2107. additionalScript:
  2108. type: string
  2109. additionalStyle:
  2110. type: string