apidocs.swagger.yaml 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009
  1. swagger: "2.0"
  2. info:
  3. title: api/v1/activity_service.proto
  4. version: version not set
  5. tags:
  6. - name: ActivityService
  7. - name: UserService
  8. - name: AuthService
  9. - name: IdentityProviderService
  10. - name: InboxService
  11. - name: MarkdownService
  12. - name: ResourceService
  13. - name: MemoService
  14. - name: WebhookService
  15. - name: WorkspaceService
  16. - name: WorkspaceSettingService
  17. consumes:
  18. - application/json
  19. produces:
  20. - application/json
  21. paths:
  22. /api/v1/activities/{id}:
  23. get:
  24. summary: GetActivity returns the activity with the given id.
  25. operationId: ActivityService_GetActivity
  26. responses:
  27. "200":
  28. description: A successful response.
  29. schema:
  30. $ref: '#/definitions/v1Activity'
  31. default:
  32. description: An unexpected error response.
  33. schema:
  34. $ref: '#/definitions/googlerpcStatus'
  35. parameters:
  36. - name: id
  37. description: The system-generated unique identifier for the activity.
  38. in: path
  39. required: true
  40. type: integer
  41. format: int32
  42. tags:
  43. - ActivityService
  44. /api/v1/auth/signin:
  45. post:
  46. summary: SignIn signs in the user with the given username and password.
  47. operationId: AuthService_SignIn
  48. responses:
  49. "200":
  50. description: A successful response.
  51. schema:
  52. $ref: '#/definitions/v1User'
  53. default:
  54. description: An unexpected error response.
  55. schema:
  56. $ref: '#/definitions/googlerpcStatus'
  57. parameters:
  58. - name: username
  59. description: The username to sign in with.
  60. in: query
  61. required: false
  62. type: string
  63. - name: password
  64. description: The password to sign in with.
  65. in: query
  66. required: false
  67. type: string
  68. - name: neverExpire
  69. description: Whether the session should never expire.
  70. in: query
  71. required: false
  72. type: boolean
  73. tags:
  74. - AuthService
  75. /api/v1/auth/signin/sso:
  76. post:
  77. summary: SignInWithSSO signs in the user with the given SSO code.
  78. operationId: AuthService_SignInWithSSO
  79. responses:
  80. "200":
  81. description: A successful response.
  82. schema:
  83. $ref: '#/definitions/v1User'
  84. default:
  85. description: An unexpected error response.
  86. schema:
  87. $ref: '#/definitions/googlerpcStatus'
  88. parameters:
  89. - name: idpId
  90. description: The ID of the SSO provider.
  91. in: query
  92. required: false
  93. type: integer
  94. format: int32
  95. - name: code
  96. description: The code to sign in with.
  97. in: query
  98. required: false
  99. type: string
  100. - name: redirectUri
  101. description: The redirect URI.
  102. in: query
  103. required: false
  104. type: string
  105. tags:
  106. - AuthService
  107. /api/v1/auth/signout:
  108. post:
  109. summary: SignOut signs out the user.
  110. operationId: AuthService_SignOut
  111. responses:
  112. "200":
  113. description: A successful response.
  114. schema:
  115. type: object
  116. properties: {}
  117. default:
  118. description: An unexpected error response.
  119. schema:
  120. $ref: '#/definitions/googlerpcStatus'
  121. tags:
  122. - AuthService
  123. /api/v1/auth/signup:
  124. post:
  125. summary: SignUp signs up the user with the given username and password.
  126. operationId: AuthService_SignUp
  127. responses:
  128. "200":
  129. description: A successful response.
  130. schema:
  131. $ref: '#/definitions/v1User'
  132. default:
  133. description: An unexpected error response.
  134. schema:
  135. $ref: '#/definitions/googlerpcStatus'
  136. parameters:
  137. - name: username
  138. description: The username to sign up with.
  139. in: query
  140. required: false
  141. type: string
  142. - name: password
  143. description: The password to sign up with.
  144. in: query
  145. required: false
  146. type: string
  147. tags:
  148. - AuthService
  149. /api/v1/auth/status:
  150. post:
  151. summary: GetAuthStatus returns the current auth status of the user.
  152. operationId: AuthService_GetAuthStatus
  153. responses:
  154. "200":
  155. description: A successful response.
  156. schema:
  157. $ref: '#/definitions/v1User'
  158. default:
  159. description: An unexpected error response.
  160. schema:
  161. $ref: '#/definitions/googlerpcStatus'
  162. tags:
  163. - AuthService
  164. /api/v1/identityProviders:
  165. get:
  166. summary: ListIdentityProviders lists identity providers.
  167. operationId: IdentityProviderService_ListIdentityProviders
  168. responses:
  169. "200":
  170. description: A successful response.
  171. schema:
  172. $ref: '#/definitions/v1ListIdentityProvidersResponse'
  173. default:
  174. description: An unexpected error response.
  175. schema:
  176. $ref: '#/definitions/googlerpcStatus'
  177. tags:
  178. - IdentityProviderService
  179. post:
  180. summary: CreateIdentityProvider creates an identity provider.
  181. operationId: IdentityProviderService_CreateIdentityProvider
  182. responses:
  183. "200":
  184. description: A successful response.
  185. schema:
  186. $ref: '#/definitions/apiv1IdentityProvider'
  187. default:
  188. description: An unexpected error response.
  189. schema:
  190. $ref: '#/definitions/googlerpcStatus'
  191. parameters:
  192. - name: identityProvider
  193. description: The identityProvider to create.
  194. in: body
  195. required: true
  196. schema:
  197. $ref: '#/definitions/apiv1IdentityProvider'
  198. tags:
  199. - IdentityProviderService
  200. /api/v1/inboxes:
  201. get:
  202. summary: ListInboxes lists inboxes for a user.
  203. operationId: InboxService_ListInboxes
  204. responses:
  205. "200":
  206. description: A successful response.
  207. schema:
  208. $ref: '#/definitions/v1ListInboxesResponse'
  209. default:
  210. description: An unexpected error response.
  211. schema:
  212. $ref: '#/definitions/googlerpcStatus'
  213. parameters:
  214. - name: user
  215. description: 'Format: users/{id}'
  216. in: query
  217. required: false
  218. type: string
  219. tags:
  220. - InboxService
  221. /api/v1/markdown/link:metadata:
  222. get:
  223. summary: GetLinkMetadata returns metadata for a given link.
  224. operationId: MarkdownService_GetLinkMetadata
  225. responses:
  226. "200":
  227. description: A successful response.
  228. schema:
  229. $ref: '#/definitions/v1LinkMetadata'
  230. default:
  231. description: An unexpected error response.
  232. schema:
  233. $ref: '#/definitions/googlerpcStatus'
  234. parameters:
  235. - name: link
  236. in: query
  237. required: false
  238. type: string
  239. tags:
  240. - MarkdownService
  241. /api/v1/markdown/parse:
  242. post:
  243. summary: Parses the given markdown content and returns a list of nodes.
  244. operationId: MarkdownService_ParseMarkdown
  245. responses:
  246. "200":
  247. description: A successful response.
  248. schema:
  249. $ref: '#/definitions/v1ParseMarkdownResponse'
  250. default:
  251. description: An unexpected error response.
  252. schema:
  253. $ref: '#/definitions/googlerpcStatus'
  254. parameters:
  255. - name: body
  256. in: body
  257. required: true
  258. schema:
  259. $ref: '#/definitions/v1ParseMarkdownRequest'
  260. tags:
  261. - MarkdownService
  262. /api/v1/markdown:restore:
  263. post:
  264. summary: Restores the given nodes to markdown content.
  265. operationId: MarkdownService_RestoreMarkdown
  266. responses:
  267. "200":
  268. description: A successful response.
  269. schema:
  270. $ref: '#/definitions/v1RestoreMarkdownResponse'
  271. default:
  272. description: An unexpected error response.
  273. schema:
  274. $ref: '#/definitions/googlerpcStatus'
  275. parameters:
  276. - name: body
  277. in: body
  278. required: true
  279. schema:
  280. $ref: '#/definitions/v1RestoreMarkdownRequest'
  281. tags:
  282. - MarkdownService
  283. /api/v1/memos:
  284. get:
  285. summary: ListMemos lists memos with pagination and filter.
  286. operationId: MemoService_ListMemos
  287. responses:
  288. "200":
  289. description: A successful response.
  290. schema:
  291. $ref: '#/definitions/v1ListMemosResponse'
  292. default:
  293. description: An unexpected error response.
  294. schema:
  295. $ref: '#/definitions/googlerpcStatus'
  296. parameters:
  297. - name: pageSize
  298. description: The maximum number of memos to return.
  299. in: query
  300. required: false
  301. type: integer
  302. format: int32
  303. - name: pageToken
  304. description: "A page token, received from a previous `ListMemos` call.\r\nProvide this to retrieve the subsequent page."
  305. in: query
  306. required: false
  307. type: string
  308. - name: filter
  309. description: "Filter is used to filter memos returned in the list.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\""
  310. in: query
  311. required: false
  312. type: string
  313. tags:
  314. - MemoService
  315. post:
  316. summary: CreateMemo creates a memo.
  317. operationId: MemoService_CreateMemo
  318. responses:
  319. "200":
  320. description: A successful response.
  321. schema:
  322. $ref: '#/definitions/v1Memo'
  323. default:
  324. description: An unexpected error response.
  325. schema:
  326. $ref: '#/definitions/googlerpcStatus'
  327. parameters:
  328. - name: body
  329. in: body
  330. required: true
  331. schema:
  332. $ref: '#/definitions/v1CreateMemoRequest'
  333. tags:
  334. - MemoService
  335. /api/v1/memos/stats:
  336. get:
  337. summary: GetUserMemosStats gets stats of memos for a user.
  338. operationId: MemoService_GetUserMemosStats
  339. responses:
  340. "200":
  341. description: A successful response.
  342. schema:
  343. $ref: '#/definitions/v1GetUserMemosStatsResponse'
  344. default:
  345. description: An unexpected error response.
  346. schema:
  347. $ref: '#/definitions/googlerpcStatus'
  348. parameters:
  349. - name: name
  350. description: "name is the name of the user to get stats for.\r\nFormat: users/{id}"
  351. in: query
  352. required: false
  353. type: string
  354. - name: timezone
  355. description: "timezone location\r\nFormat: uses tz identifier\r\nhttps://en.wikipedia.org/wiki/List_of_tz_database_time_zones"
  356. in: query
  357. required: false
  358. type: string
  359. - name: filter
  360. description: Same as ListMemosRequest.filter
  361. in: query
  362. required: false
  363. type: string
  364. tags:
  365. - MemoService
  366. /api/v1/memos:export:
  367. post:
  368. summary: ExportMemos exports memos.
  369. operationId: MemoService_ExportMemos
  370. responses:
  371. "200":
  372. description: A successful response.
  373. schema:
  374. $ref: '#/definitions/v1ExportMemosResponse'
  375. default:
  376. description: An unexpected error response.
  377. schema:
  378. $ref: '#/definitions/googlerpcStatus'
  379. parameters:
  380. - name: body
  381. in: body
  382. required: true
  383. schema:
  384. $ref: '#/definitions/v1ExportMemosRequest'
  385. tags:
  386. - MemoService
  387. /api/v1/memos:search:
  388. get:
  389. summary: SearchMemos searches memos.
  390. operationId: MemoService_SearchMemos
  391. responses:
  392. "200":
  393. description: A successful response.
  394. schema:
  395. $ref: '#/definitions/v1SearchMemosResponse'
  396. default:
  397. description: An unexpected error response.
  398. schema:
  399. $ref: '#/definitions/googlerpcStatus'
  400. parameters:
  401. - name: filter
  402. description: "Filter is used to filter memos returned.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\""
  403. in: query
  404. required: false
  405. type: string
  406. tags:
  407. - MemoService
  408. /api/v1/reactions/{reactionId}:
  409. delete:
  410. summary: DeleteMemoReaction deletes a reaction for a memo.
  411. operationId: MemoService_DeleteMemoReaction
  412. responses:
  413. "200":
  414. description: A successful response.
  415. schema:
  416. type: object
  417. properties: {}
  418. default:
  419. description: An unexpected error response.
  420. schema:
  421. $ref: '#/definitions/googlerpcStatus'
  422. parameters:
  423. - name: reactionId
  424. in: path
  425. required: true
  426. type: integer
  427. format: int32
  428. tags:
  429. - MemoService
  430. /api/v1/resources:
  431. get:
  432. summary: ListResources lists all resources.
  433. operationId: ResourceService_ListResources
  434. responses:
  435. "200":
  436. description: A successful response.
  437. schema:
  438. $ref: '#/definitions/v1ListResourcesResponse'
  439. default:
  440. description: An unexpected error response.
  441. schema:
  442. $ref: '#/definitions/googlerpcStatus'
  443. tags:
  444. - ResourceService
  445. post:
  446. summary: CreateResource creates a new resource.
  447. operationId: ResourceService_CreateResource
  448. responses:
  449. "200":
  450. description: A successful response.
  451. schema:
  452. $ref: '#/definitions/v1Resource'
  453. default:
  454. description: An unexpected error response.
  455. schema:
  456. $ref: '#/definitions/googlerpcStatus'
  457. parameters:
  458. - name: resource
  459. in: body
  460. required: true
  461. schema:
  462. $ref: '#/definitions/v1Resource'
  463. tags:
  464. - ResourceService
  465. /api/v1/resources:search:
  466. get:
  467. summary: SearchResources searches memos.
  468. operationId: ResourceService_SearchResources
  469. responses:
  470. "200":
  471. description: A successful response.
  472. schema:
  473. $ref: '#/definitions/v1SearchResourcesResponse'
  474. default:
  475. description: An unexpected error response.
  476. schema:
  477. $ref: '#/definitions/googlerpcStatus'
  478. parameters:
  479. - name: filter
  480. in: query
  481. required: false
  482. type: string
  483. tags:
  484. - ResourceService
  485. /api/v1/users:
  486. get:
  487. summary: ListUsers returns a list of users.
  488. operationId: UserService_ListUsers
  489. responses:
  490. "200":
  491. description: A successful response.
  492. schema:
  493. $ref: '#/definitions/v1ListUsersResponse'
  494. default:
  495. description: An unexpected error response.
  496. schema:
  497. $ref: '#/definitions/googlerpcStatus'
  498. tags:
  499. - UserService
  500. post:
  501. summary: CreateUser creates a new user.
  502. operationId: UserService_CreateUser
  503. responses:
  504. "200":
  505. description: A successful response.
  506. schema:
  507. $ref: '#/definitions/v1User'
  508. default:
  509. description: An unexpected error response.
  510. schema:
  511. $ref: '#/definitions/googlerpcStatus'
  512. parameters:
  513. - name: user
  514. in: body
  515. required: true
  516. schema:
  517. $ref: '#/definitions/v1User'
  518. tags:
  519. - UserService
  520. /api/v1/users:search:
  521. get:
  522. summary: SearchUsers searches users by filter.
  523. operationId: UserService_SearchUsers
  524. responses:
  525. "200":
  526. description: A successful response.
  527. schema:
  528. $ref: '#/definitions/v1SearchUsersResponse'
  529. default:
  530. description: An unexpected error response.
  531. schema:
  532. $ref: '#/definitions/googlerpcStatus'
  533. parameters:
  534. - name: filter
  535. description: "Filter is used to filter users returned in the list.\r\nFormat: \"username == 'frank'\""
  536. in: query
  537. required: false
  538. type: string
  539. tags:
  540. - UserService
  541. /api/v1/webhooks:
  542. get:
  543. summary: ListWebhooks returns a list of webhooks.
  544. operationId: WebhookService_ListWebhooks
  545. responses:
  546. "200":
  547. description: A successful response.
  548. schema:
  549. $ref: '#/definitions/v1ListWebhooksResponse'
  550. default:
  551. description: An unexpected error response.
  552. schema:
  553. $ref: '#/definitions/googlerpcStatus'
  554. parameters:
  555. - name: creatorId
  556. in: query
  557. required: false
  558. type: integer
  559. format: int32
  560. tags:
  561. - WebhookService
  562. post:
  563. summary: CreateWebhook creates a new webhook.
  564. operationId: WebhookService_CreateWebhook
  565. responses:
  566. "200":
  567. description: A successful response.
  568. schema:
  569. $ref: '#/definitions/v1Webhook'
  570. default:
  571. description: An unexpected error response.
  572. schema:
  573. $ref: '#/definitions/googlerpcStatus'
  574. parameters:
  575. - name: body
  576. in: body
  577. required: true
  578. schema:
  579. $ref: '#/definitions/v1CreateWebhookRequest'
  580. tags:
  581. - WebhookService
  582. /api/v1/webhooks/{id}:
  583. get:
  584. summary: GetWebhook returns a webhook by id.
  585. operationId: WebhookService_GetWebhook
  586. responses:
  587. "200":
  588. description: A successful response.
  589. schema:
  590. $ref: '#/definitions/v1Webhook'
  591. default:
  592. description: An unexpected error response.
  593. schema:
  594. $ref: '#/definitions/googlerpcStatus'
  595. parameters:
  596. - name: id
  597. in: path
  598. required: true
  599. type: integer
  600. format: int32
  601. tags:
  602. - WebhookService
  603. delete:
  604. summary: DeleteWebhook deletes a webhook by id.
  605. operationId: WebhookService_DeleteWebhook
  606. responses:
  607. "200":
  608. description: A successful response.
  609. schema:
  610. type: object
  611. properties: {}
  612. default:
  613. description: An unexpected error response.
  614. schema:
  615. $ref: '#/definitions/googlerpcStatus'
  616. parameters:
  617. - name: id
  618. in: path
  619. required: true
  620. type: integer
  621. format: int32
  622. tags:
  623. - WebhookService
  624. /api/v1/webhooks/{webhook.id}:
  625. patch:
  626. summary: UpdateWebhook updates a webhook.
  627. operationId: WebhookService_UpdateWebhook
  628. responses:
  629. "200":
  630. description: A successful response.
  631. schema:
  632. $ref: '#/definitions/v1Webhook'
  633. default:
  634. description: An unexpected error response.
  635. schema:
  636. $ref: '#/definitions/googlerpcStatus'
  637. parameters:
  638. - name: webhook.id
  639. in: path
  640. required: true
  641. type: integer
  642. format: int32
  643. - name: webhook
  644. in: body
  645. required: true
  646. schema:
  647. type: object
  648. properties:
  649. creatorId:
  650. type: integer
  651. format: int32
  652. createTime:
  653. type: string
  654. format: date-time
  655. updateTime:
  656. type: string
  657. format: date-time
  658. rowStatus:
  659. $ref: '#/definitions/v1RowStatus'
  660. name:
  661. type: string
  662. url:
  663. type: string
  664. tags:
  665. - WebhookService
  666. /api/v1/workspace/profile:
  667. get:
  668. summary: GetWorkspaceProfile returns the workspace profile.
  669. operationId: WorkspaceService_GetWorkspaceProfile
  670. responses:
  671. "200":
  672. description: A successful response.
  673. schema:
  674. $ref: '#/definitions/v1WorkspaceProfile'
  675. default:
  676. description: An unexpected error response.
  677. schema:
  678. $ref: '#/definitions/googlerpcStatus'
  679. tags:
  680. - WorkspaceService
  681. /api/v1/workspace/{name}:
  682. get:
  683. summary: GetWorkspaceSetting returns the setting by name.
  684. operationId: WorkspaceSettingService_GetWorkspaceSetting
  685. responses:
  686. "200":
  687. description: A successful response.
  688. schema:
  689. $ref: '#/definitions/apiv1WorkspaceSetting'
  690. default:
  691. description: An unexpected error response.
  692. schema:
  693. $ref: '#/definitions/googlerpcStatus'
  694. parameters:
  695. - name: name
  696. description: "The resource name of the workspace setting.\r\nFormat: settings/{setting}"
  697. in: path
  698. required: true
  699. type: string
  700. pattern: settings/[^/]+
  701. tags:
  702. - WorkspaceSettingService
  703. /api/v1/workspace/{setting.name}:
  704. patch:
  705. summary: SetWorkspaceSetting updates the setting.
  706. operationId: WorkspaceSettingService_SetWorkspaceSetting
  707. responses:
  708. "200":
  709. description: A successful response.
  710. schema:
  711. $ref: '#/definitions/apiv1WorkspaceSetting'
  712. default:
  713. description: An unexpected error response.
  714. schema:
  715. $ref: '#/definitions/googlerpcStatus'
  716. parameters:
  717. - name: setting.name
  718. description: "name is the name of the setting.\r\nFormat: settings/{setting}"
  719. in: path
  720. required: true
  721. type: string
  722. pattern: settings/[^/]+
  723. - name: setting
  724. description: setting is the setting to update.
  725. in: body
  726. required: true
  727. schema:
  728. type: object
  729. properties:
  730. generalSetting:
  731. $ref: '#/definitions/apiv1WorkspaceGeneralSetting'
  732. storageSetting:
  733. $ref: '#/definitions/apiv1WorkspaceStorageSetting'
  734. memoRelatedSetting:
  735. $ref: '#/definitions/apiv1WorkspaceMemoRelatedSetting'
  736. title: setting is the setting to update.
  737. tags:
  738. - WorkspaceSettingService
  739. /api/v1/{identityProvider.name}:
  740. patch:
  741. summary: UpdateIdentityProvider updates an identity provider.
  742. operationId: IdentityProviderService_UpdateIdentityProvider
  743. responses:
  744. "200":
  745. description: A successful response.
  746. schema:
  747. $ref: '#/definitions/apiv1IdentityProvider'
  748. default:
  749. description: An unexpected error response.
  750. schema:
  751. $ref: '#/definitions/googlerpcStatus'
  752. parameters:
  753. - name: identityProvider.name
  754. description: "The name of the identityProvider.\r\nFormat: identityProviders/{id}"
  755. in: path
  756. required: true
  757. type: string
  758. pattern: identityProviders/[^/]+
  759. - name: identityProvider
  760. description: The identityProvider to update.
  761. in: body
  762. required: true
  763. schema:
  764. type: object
  765. properties:
  766. type:
  767. $ref: '#/definitions/apiv1IdentityProviderType'
  768. title:
  769. type: string
  770. identifierFilter:
  771. type: string
  772. config:
  773. $ref: '#/definitions/apiv1IdentityProviderConfig'
  774. title: The identityProvider to update.
  775. tags:
  776. - IdentityProviderService
  777. /api/v1/{inbox.name}:
  778. patch:
  779. summary: UpdateInbox updates an inbox.
  780. operationId: InboxService_UpdateInbox
  781. responses:
  782. "200":
  783. description: A successful response.
  784. schema:
  785. $ref: '#/definitions/v1Inbox'
  786. default:
  787. description: An unexpected error response.
  788. schema:
  789. $ref: '#/definitions/googlerpcStatus'
  790. parameters:
  791. - name: inbox.name
  792. description: "The name of the inbox.\r\nFormat: inboxes/{id}"
  793. in: path
  794. required: true
  795. type: string
  796. pattern: inboxes/[^/]+
  797. - name: inbox
  798. in: body
  799. required: true
  800. schema:
  801. type: object
  802. properties:
  803. sender:
  804. type: string
  805. title: 'Format: users/{id}'
  806. receiver:
  807. type: string
  808. title: 'Format: users/{id}'
  809. status:
  810. $ref: '#/definitions/v1InboxStatus'
  811. createTime:
  812. type: string
  813. format: date-time
  814. type:
  815. $ref: '#/definitions/v1InboxType'
  816. activityId:
  817. type: integer
  818. format: int32
  819. tags:
  820. - InboxService
  821. /api/v1/{memo.name}:
  822. patch:
  823. summary: UpdateMemo updates a memo.
  824. operationId: MemoService_UpdateMemo
  825. responses:
  826. "200":
  827. description: A successful response.
  828. schema:
  829. $ref: '#/definitions/v1Memo'
  830. default:
  831. description: An unexpected error response.
  832. schema:
  833. $ref: '#/definitions/googlerpcStatus'
  834. parameters:
  835. - name: memo.name
  836. description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id."
  837. in: path
  838. required: true
  839. type: string
  840. pattern: memos/[^/]+
  841. - name: memo
  842. in: body
  843. required: true
  844. schema:
  845. type: object
  846. properties:
  847. uid:
  848. type: string
  849. description: The user defined id of the memo.
  850. rowStatus:
  851. $ref: '#/definitions/v1RowStatus'
  852. creator:
  853. type: string
  854. title: "The name of the creator.\r\nFormat: users/{id}"
  855. createTime:
  856. type: string
  857. format: date-time
  858. updateTime:
  859. type: string
  860. format: date-time
  861. displayTime:
  862. type: string
  863. format: date-time
  864. content:
  865. type: string
  866. nodes:
  867. type: array
  868. items:
  869. type: object
  870. $ref: '#/definitions/v1Node'
  871. readOnly: true
  872. visibility:
  873. $ref: '#/definitions/v1Visibility'
  874. tags:
  875. type: array
  876. items:
  877. type: string
  878. pinned:
  879. type: boolean
  880. parentId:
  881. type: integer
  882. format: int32
  883. readOnly: true
  884. resources:
  885. type: array
  886. items:
  887. type: object
  888. $ref: '#/definitions/v1Resource'
  889. readOnly: true
  890. relations:
  891. type: array
  892. items:
  893. type: object
  894. $ref: '#/definitions/v1MemoRelation'
  895. readOnly: true
  896. reactions:
  897. type: array
  898. items:
  899. type: object
  900. $ref: '#/definitions/v1Reaction'
  901. readOnly: true
  902. property:
  903. $ref: '#/definitions/v1MemoProperty'
  904. readOnly: true
  905. parent:
  906. type: string
  907. title: "The name of the parent memo.\r\nFormat: memos/{id}"
  908. readOnly: true
  909. tags:
  910. - MemoService
  911. /api/v1/{name_1}:
  912. get:
  913. summary: GetIdentityProvider gets an identity provider.
  914. operationId: IdentityProviderService_GetIdentityProvider
  915. responses:
  916. "200":
  917. description: A successful response.
  918. schema:
  919. $ref: '#/definitions/apiv1IdentityProvider'
  920. default:
  921. description: An unexpected error response.
  922. schema:
  923. $ref: '#/definitions/googlerpcStatus'
  924. parameters:
  925. - name: name_1
  926. description: "The name of the identityProvider to get.\r\nFormat: identityProviders/{id}"
  927. in: path
  928. required: true
  929. type: string
  930. pattern: identityProviders/[^/]+
  931. tags:
  932. - IdentityProviderService
  933. delete:
  934. summary: DeleteIdentityProvider deletes an identity provider.
  935. operationId: IdentityProviderService_DeleteIdentityProvider
  936. responses:
  937. "200":
  938. description: A successful response.
  939. schema:
  940. type: object
  941. properties: {}
  942. default:
  943. description: An unexpected error response.
  944. schema:
  945. $ref: '#/definitions/googlerpcStatus'
  946. parameters:
  947. - name: name_1
  948. description: "The name of the identityProvider to delete.\r\nFormat: identityProviders/{id}"
  949. in: path
  950. required: true
  951. type: string
  952. pattern: identityProviders/[^/]+
  953. tags:
  954. - IdentityProviderService
  955. /api/v1/{name_2}:
  956. get:
  957. summary: GetResource returns a resource by name.
  958. operationId: ResourceService_GetResource
  959. responses:
  960. "200":
  961. description: A successful response.
  962. schema:
  963. $ref: '#/definitions/v1Resource'
  964. default:
  965. description: An unexpected error response.
  966. schema:
  967. $ref: '#/definitions/googlerpcStatus'
  968. parameters:
  969. - name: name_2
  970. description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
  971. in: path
  972. required: true
  973. type: string
  974. pattern: resources/[^/]+
  975. tags:
  976. - ResourceService
  977. delete:
  978. summary: DeleteInbox deletes an inbox.
  979. operationId: InboxService_DeleteInbox
  980. responses:
  981. "200":
  982. description: A successful response.
  983. schema:
  984. type: object
  985. properties: {}
  986. default:
  987. description: An unexpected error response.
  988. schema:
  989. $ref: '#/definitions/googlerpcStatus'
  990. parameters:
  991. - name: name_2
  992. description: "The name of the inbox to delete.\r\nFormat: inboxes/{id}"
  993. in: path
  994. required: true
  995. type: string
  996. pattern: inboxes/[^/]+
  997. tags:
  998. - InboxService
  999. /api/v1/{name_3}:
  1000. get:
  1001. summary: GetMemo gets a memo.
  1002. operationId: MemoService_GetMemo
  1003. responses:
  1004. "200":
  1005. description: A successful response.
  1006. schema:
  1007. $ref: '#/definitions/v1Memo'
  1008. default:
  1009. description: An unexpected error response.
  1010. schema:
  1011. $ref: '#/definitions/googlerpcStatus'
  1012. parameters:
  1013. - name: name_3
  1014. description: "The name of the memo.\r\nFormat: memos/{id}"
  1015. in: path
  1016. required: true
  1017. type: string
  1018. pattern: memos/[^/]+
  1019. tags:
  1020. - MemoService
  1021. delete:
  1022. summary: DeleteResource deletes a resource by name.
  1023. operationId: ResourceService_DeleteResource
  1024. responses:
  1025. "200":
  1026. description: A successful response.
  1027. schema:
  1028. type: object
  1029. properties: {}
  1030. default:
  1031. description: An unexpected error response.
  1032. schema:
  1033. $ref: '#/definitions/googlerpcStatus'
  1034. parameters:
  1035. - name: name_3
  1036. description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
  1037. in: path
  1038. required: true
  1039. type: string
  1040. pattern: resources/[^/]+
  1041. tags:
  1042. - ResourceService
  1043. /api/v1/{name_4}:
  1044. delete:
  1045. summary: DeleteMemo deletes a memo.
  1046. operationId: MemoService_DeleteMemo
  1047. responses:
  1048. "200":
  1049. description: A successful response.
  1050. schema:
  1051. type: object
  1052. properties: {}
  1053. default:
  1054. description: An unexpected error response.
  1055. schema:
  1056. $ref: '#/definitions/googlerpcStatus'
  1057. parameters:
  1058. - name: name_4
  1059. description: "The name of the memo.\r\nFormat: memos/{id}"
  1060. in: path
  1061. required: true
  1062. type: string
  1063. pattern: memos/[^/]+
  1064. tags:
  1065. - MemoService
  1066. /api/v1/{name}:
  1067. get:
  1068. summary: GetUser gets a user by name.
  1069. operationId: UserService_GetUser
  1070. responses:
  1071. "200":
  1072. description: A successful response.
  1073. schema:
  1074. $ref: '#/definitions/v1User'
  1075. default:
  1076. description: An unexpected error response.
  1077. schema:
  1078. $ref: '#/definitions/googlerpcStatus'
  1079. parameters:
  1080. - name: name
  1081. description: "The name of the user.\r\nFormat: users/{id}"
  1082. in: path
  1083. required: true
  1084. type: string
  1085. pattern: users/[^/]+
  1086. tags:
  1087. - UserService
  1088. delete:
  1089. summary: DeleteUser deletes a user.
  1090. operationId: UserService_DeleteUser
  1091. responses:
  1092. "200":
  1093. description: A successful response.
  1094. schema:
  1095. type: object
  1096. properties: {}
  1097. default:
  1098. description: An unexpected error response.
  1099. schema:
  1100. $ref: '#/definitions/googlerpcStatus'
  1101. parameters:
  1102. - name: name
  1103. description: "The name of the user.\r\nFormat: users/{id}"
  1104. in: path
  1105. required: true
  1106. type: string
  1107. pattern: users/[^/]+
  1108. tags:
  1109. - UserService
  1110. /api/v1/{name}/access_tokens:
  1111. get:
  1112. summary: ListUserAccessTokens returns a list of access tokens for a user.
  1113. operationId: UserService_ListUserAccessTokens
  1114. responses:
  1115. "200":
  1116. description: A successful response.
  1117. schema:
  1118. $ref: '#/definitions/v1ListUserAccessTokensResponse'
  1119. default:
  1120. description: An unexpected error response.
  1121. schema:
  1122. $ref: '#/definitions/googlerpcStatus'
  1123. parameters:
  1124. - name: name
  1125. description: "The name of the user.\r\nFormat: users/{id}"
  1126. in: path
  1127. required: true
  1128. type: string
  1129. pattern: users/[^/]+
  1130. tags:
  1131. - UserService
  1132. post:
  1133. summary: CreateUserAccessToken creates a new access token for a user.
  1134. operationId: UserService_CreateUserAccessToken
  1135. responses:
  1136. "200":
  1137. description: A successful response.
  1138. schema:
  1139. $ref: '#/definitions/v1UserAccessToken'
  1140. default:
  1141. description: An unexpected error response.
  1142. schema:
  1143. $ref: '#/definitions/googlerpcStatus'
  1144. parameters:
  1145. - name: name
  1146. description: "The name of the user.\r\nFormat: users/{id}"
  1147. in: path
  1148. required: true
  1149. type: string
  1150. pattern: users/[^/]+
  1151. - name: body
  1152. in: body
  1153. required: true
  1154. schema:
  1155. $ref: '#/definitions/UserServiceCreateUserAccessTokenBody'
  1156. tags:
  1157. - UserService
  1158. /api/v1/{name}/access_tokens/{accessToken}:
  1159. delete:
  1160. summary: DeleteUserAccessToken deletes an access token for a user.
  1161. operationId: UserService_DeleteUserAccessToken
  1162. responses:
  1163. "200":
  1164. description: A successful response.
  1165. schema:
  1166. type: object
  1167. properties: {}
  1168. default:
  1169. description: An unexpected error response.
  1170. schema:
  1171. $ref: '#/definitions/googlerpcStatus'
  1172. parameters:
  1173. - name: name
  1174. description: "The name of the user.\r\nFormat: users/{id}"
  1175. in: path
  1176. required: true
  1177. type: string
  1178. pattern: users/[^/]+
  1179. - name: accessToken
  1180. description: access_token is the access token to delete.
  1181. in: path
  1182. required: true
  1183. type: string
  1184. tags:
  1185. - UserService
  1186. /api/v1/{name}/comments:
  1187. get:
  1188. summary: ListMemoComments lists comments for a memo.
  1189. operationId: MemoService_ListMemoComments
  1190. responses:
  1191. "200":
  1192. description: A successful response.
  1193. schema:
  1194. $ref: '#/definitions/v1ListMemoCommentsResponse'
  1195. default:
  1196. description: An unexpected error response.
  1197. schema:
  1198. $ref: '#/definitions/googlerpcStatus'
  1199. parameters:
  1200. - name: name
  1201. description: "The name of the memo.\r\nFormat: memos/{id}"
  1202. in: path
  1203. required: true
  1204. type: string
  1205. pattern: memos/[^/]+
  1206. tags:
  1207. - MemoService
  1208. post:
  1209. summary: CreateMemoComment creates a comment for a memo.
  1210. operationId: MemoService_CreateMemoComment
  1211. responses:
  1212. "200":
  1213. description: A successful response.
  1214. schema:
  1215. $ref: '#/definitions/v1Memo'
  1216. default:
  1217. description: An unexpected error response.
  1218. schema:
  1219. $ref: '#/definitions/googlerpcStatus'
  1220. parameters:
  1221. - name: name
  1222. description: "The name of the memo.\r\nFormat: memos/{id}"
  1223. in: path
  1224. required: true
  1225. type: string
  1226. pattern: memos/[^/]+
  1227. - name: comment
  1228. in: body
  1229. required: true
  1230. schema:
  1231. $ref: '#/definitions/v1CreateMemoRequest'
  1232. tags:
  1233. - MemoService
  1234. /api/v1/{name}/properties:
  1235. get:
  1236. summary: ListMemoProperties lists memo properties.
  1237. operationId: MemoService_ListMemoProperties
  1238. responses:
  1239. "200":
  1240. description: A successful response.
  1241. schema:
  1242. $ref: '#/definitions/v1ListMemoPropertiesResponse'
  1243. default:
  1244. description: An unexpected error response.
  1245. schema:
  1246. $ref: '#/definitions/googlerpcStatus'
  1247. parameters:
  1248. - name: name
  1249. description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to list all properties."
  1250. in: path
  1251. required: true
  1252. type: string
  1253. pattern: memos/[^/]+
  1254. tags:
  1255. - MemoService
  1256. /api/v1/{name}/properties:rebuild:
  1257. post:
  1258. summary: RebuildMemoProperty rebuilds a memo property.
  1259. operationId: MemoService_RebuildMemoProperty
  1260. responses:
  1261. "200":
  1262. description: A successful response.
  1263. schema:
  1264. type: object
  1265. properties: {}
  1266. default:
  1267. description: An unexpected error response.
  1268. schema:
  1269. $ref: '#/definitions/googlerpcStatus'
  1270. parameters:
  1271. - name: name
  1272. description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to rebuild all memos."
  1273. in: path
  1274. required: true
  1275. type: string
  1276. pattern: memos/[^/]+
  1277. - name: body
  1278. in: body
  1279. required: true
  1280. schema:
  1281. $ref: '#/definitions/MemoServiceRebuildMemoPropertyBody'
  1282. tags:
  1283. - MemoService
  1284. /api/v1/{name}/reactions:
  1285. get:
  1286. summary: ListMemoReactions lists reactions for a memo.
  1287. operationId: MemoService_ListMemoReactions
  1288. responses:
  1289. "200":
  1290. description: A successful response.
  1291. schema:
  1292. $ref: '#/definitions/v1ListMemoReactionsResponse'
  1293. default:
  1294. description: An unexpected error response.
  1295. schema:
  1296. $ref: '#/definitions/googlerpcStatus'
  1297. parameters:
  1298. - name: name
  1299. description: "The name of the memo.\r\nFormat: memos/{id}"
  1300. in: path
  1301. required: true
  1302. type: string
  1303. pattern: memos/[^/]+
  1304. tags:
  1305. - MemoService
  1306. post:
  1307. summary: UpsertMemoReaction upserts a reaction for a memo.
  1308. operationId: MemoService_UpsertMemoReaction
  1309. responses:
  1310. "200":
  1311. description: A successful response.
  1312. schema:
  1313. $ref: '#/definitions/v1Reaction'
  1314. default:
  1315. description: An unexpected error response.
  1316. schema:
  1317. $ref: '#/definitions/googlerpcStatus'
  1318. parameters:
  1319. - name: name
  1320. description: "The name of the memo.\r\nFormat: memos/{id}"
  1321. in: path
  1322. required: true
  1323. type: string
  1324. pattern: memos/[^/]+
  1325. - name: body
  1326. in: body
  1327. required: true
  1328. schema:
  1329. $ref: '#/definitions/MemoServiceUpsertMemoReactionBody'
  1330. tags:
  1331. - MemoService
  1332. /api/v1/{name}/relations:
  1333. get:
  1334. summary: ListMemoRelations lists relations for a memo.
  1335. operationId: MemoService_ListMemoRelations
  1336. responses:
  1337. "200":
  1338. description: A successful response.
  1339. schema:
  1340. $ref: '#/definitions/v1ListMemoRelationsResponse'
  1341. default:
  1342. description: An unexpected error response.
  1343. schema:
  1344. $ref: '#/definitions/googlerpcStatus'
  1345. parameters:
  1346. - name: name
  1347. description: "The name of the memo.\r\nFormat: memos/{id}"
  1348. in: path
  1349. required: true
  1350. type: string
  1351. pattern: memos/[^/]+
  1352. tags:
  1353. - MemoService
  1354. patch:
  1355. summary: SetMemoRelations sets relations for a memo.
  1356. operationId: MemoService_SetMemoRelations
  1357. responses:
  1358. "200":
  1359. description: A successful response.
  1360. schema:
  1361. type: object
  1362. properties: {}
  1363. default:
  1364. description: An unexpected error response.
  1365. schema:
  1366. $ref: '#/definitions/googlerpcStatus'
  1367. parameters:
  1368. - name: name
  1369. description: "The name of the memo.\r\nFormat: memos/{id}"
  1370. in: path
  1371. required: true
  1372. type: string
  1373. pattern: memos/[^/]+
  1374. - name: body
  1375. in: body
  1376. required: true
  1377. schema:
  1378. $ref: '#/definitions/MemoServiceSetMemoRelationsBody'
  1379. tags:
  1380. - MemoService
  1381. /api/v1/{name}/resources:
  1382. get:
  1383. summary: ListMemoResources lists resources for a memo.
  1384. operationId: MemoService_ListMemoResources
  1385. responses:
  1386. "200":
  1387. description: A successful response.
  1388. schema:
  1389. $ref: '#/definitions/v1ListMemoResourcesResponse'
  1390. default:
  1391. description: An unexpected error response.
  1392. schema:
  1393. $ref: '#/definitions/googlerpcStatus'
  1394. parameters:
  1395. - name: name
  1396. description: "The name of the memo.\r\nFormat: memos/{id}"
  1397. in: path
  1398. required: true
  1399. type: string
  1400. pattern: memos/[^/]+
  1401. tags:
  1402. - MemoService
  1403. patch:
  1404. summary: SetMemoResources sets resources for a memo.
  1405. operationId: MemoService_SetMemoResources
  1406. responses:
  1407. "200":
  1408. description: A successful response.
  1409. schema:
  1410. type: object
  1411. properties: {}
  1412. default:
  1413. description: An unexpected error response.
  1414. schema:
  1415. $ref: '#/definitions/googlerpcStatus'
  1416. parameters:
  1417. - name: name
  1418. description: "The name of the memo.\r\nFormat: memos/{id}"
  1419. in: path
  1420. required: true
  1421. type: string
  1422. pattern: memos/[^/]+
  1423. - name: body
  1424. in: body
  1425. required: true
  1426. schema:
  1427. $ref: '#/definitions/MemoServiceSetMemoResourcesBody'
  1428. tags:
  1429. - MemoService
  1430. /api/v1/{name}/setting:
  1431. get:
  1432. summary: GetUserSetting gets the setting of a user.
  1433. operationId: UserService_GetUserSetting
  1434. responses:
  1435. "200":
  1436. description: A successful response.
  1437. schema:
  1438. $ref: '#/definitions/apiv1UserSetting'
  1439. default:
  1440. description: An unexpected error response.
  1441. schema:
  1442. $ref: '#/definitions/googlerpcStatus'
  1443. parameters:
  1444. - name: name
  1445. description: "The name of the user.\r\nFormat: users/{id}"
  1446. in: path
  1447. required: true
  1448. type: string
  1449. pattern: users/[^/]+
  1450. tags:
  1451. - UserService
  1452. /api/v1/{parent}/tags:
  1453. get:
  1454. summary: ListMemoTags lists tags for a memo.
  1455. operationId: MemoService_ListMemoTags
  1456. responses:
  1457. "200":
  1458. description: A successful response.
  1459. schema:
  1460. $ref: '#/definitions/v1ListMemoTagsResponse'
  1461. default:
  1462. description: An unexpected error response.
  1463. schema:
  1464. $ref: '#/definitions/googlerpcStatus'
  1465. parameters:
  1466. - name: parent
  1467. description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to list all tags."
  1468. in: path
  1469. required: true
  1470. type: string
  1471. pattern: memos/[^/]+
  1472. - name: filter
  1473. description: "Filter is used to filter memos.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\""
  1474. in: query
  1475. required: false
  1476. type: string
  1477. tags:
  1478. - MemoService
  1479. /api/v1/{parent}/tags/{tag}:
  1480. delete:
  1481. summary: DeleteMemoTag deletes a tag for a memo.
  1482. operationId: MemoService_DeleteMemoTag
  1483. responses:
  1484. "200":
  1485. description: A successful response.
  1486. schema:
  1487. type: object
  1488. properties: {}
  1489. default:
  1490. description: An unexpected error response.
  1491. schema:
  1492. $ref: '#/definitions/googlerpcStatus'
  1493. parameters:
  1494. - name: parent
  1495. description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to delete all tags."
  1496. in: path
  1497. required: true
  1498. type: string
  1499. pattern: memos/[^/]+
  1500. - name: tag
  1501. in: path
  1502. required: true
  1503. type: string
  1504. - name: deleteRelatedMemos
  1505. in: query
  1506. required: false
  1507. type: boolean
  1508. tags:
  1509. - MemoService
  1510. /api/v1/{parent}/tags:rename:
  1511. patch:
  1512. summary: RenameMemoTag renames a tag for a memo.
  1513. operationId: MemoService_RenameMemoTag
  1514. responses:
  1515. "200":
  1516. description: A successful response.
  1517. schema:
  1518. type: object
  1519. properties: {}
  1520. default:
  1521. description: An unexpected error response.
  1522. schema:
  1523. $ref: '#/definitions/googlerpcStatus'
  1524. parameters:
  1525. - name: parent
  1526. description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to rename all tags."
  1527. in: path
  1528. required: true
  1529. type: string
  1530. pattern: memos/[^/]+
  1531. - name: body
  1532. in: body
  1533. required: true
  1534. schema:
  1535. $ref: '#/definitions/MemoServiceRenameMemoTagBody'
  1536. tags:
  1537. - MemoService
  1538. /api/v1/{resource.name}:
  1539. patch:
  1540. summary: UpdateResource updates a resource.
  1541. operationId: ResourceService_UpdateResource
  1542. responses:
  1543. "200":
  1544. description: A successful response.
  1545. schema:
  1546. $ref: '#/definitions/v1Resource'
  1547. default:
  1548. description: An unexpected error response.
  1549. schema:
  1550. $ref: '#/definitions/googlerpcStatus'
  1551. parameters:
  1552. - name: resource.name
  1553. description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
  1554. in: path
  1555. required: true
  1556. type: string
  1557. pattern: resources/[^/]+
  1558. - name: resource
  1559. in: body
  1560. required: true
  1561. schema:
  1562. type: object
  1563. properties:
  1564. uid:
  1565. type: string
  1566. description: The user defined id of the resource.
  1567. createTime:
  1568. type: string
  1569. format: date-time
  1570. readOnly: true
  1571. filename:
  1572. type: string
  1573. content:
  1574. type: string
  1575. format: byte
  1576. externalLink:
  1577. type: string
  1578. type:
  1579. type: string
  1580. size:
  1581. type: string
  1582. format: int64
  1583. memo:
  1584. type: string
  1585. title: "The related memo.\r\nFormat: memos/{id}"
  1586. tags:
  1587. - ResourceService
  1588. /api/v1/{setting.name}:
  1589. patch:
  1590. summary: UpdateUserSetting updates the setting of a user.
  1591. operationId: UserService_UpdateUserSetting
  1592. responses:
  1593. "200":
  1594. description: A successful response.
  1595. schema:
  1596. $ref: '#/definitions/apiv1UserSetting'
  1597. default:
  1598. description: An unexpected error response.
  1599. schema:
  1600. $ref: '#/definitions/googlerpcStatus'
  1601. parameters:
  1602. - name: setting.name
  1603. description: "The name of the user.\r\nFormat: users/{id}"
  1604. in: path
  1605. required: true
  1606. type: string
  1607. pattern: users/[^/]+/setting
  1608. - name: setting
  1609. in: body
  1610. required: true
  1611. schema:
  1612. type: object
  1613. properties:
  1614. locale:
  1615. type: string
  1616. description: The preferred locale of the user.
  1617. appearance:
  1618. type: string
  1619. description: The preferred appearance of the user.
  1620. memoVisibility:
  1621. type: string
  1622. description: The default visibility of the memo.
  1623. tags:
  1624. - UserService
  1625. /api/v1/{user.name}:
  1626. patch:
  1627. summary: UpdateUser updates a user.
  1628. operationId: UserService_UpdateUser
  1629. responses:
  1630. "200":
  1631. description: A successful response.
  1632. schema:
  1633. $ref: '#/definitions/v1User'
  1634. default:
  1635. description: An unexpected error response.
  1636. schema:
  1637. $ref: '#/definitions/googlerpcStatus'
  1638. parameters:
  1639. - name: user.name
  1640. description: "The name of the user.\r\nFormat: users/{id}"
  1641. in: path
  1642. required: true
  1643. type: string
  1644. pattern: users/[^/]+
  1645. - name: user
  1646. in: body
  1647. required: true
  1648. schema:
  1649. type: object
  1650. properties:
  1651. id:
  1652. type: integer
  1653. format: int32
  1654. description: The system generated uid of the user.
  1655. role:
  1656. $ref: '#/definitions/UserRole'
  1657. username:
  1658. type: string
  1659. email:
  1660. type: string
  1661. nickname:
  1662. type: string
  1663. avatarUrl:
  1664. type: string
  1665. description:
  1666. type: string
  1667. password:
  1668. type: string
  1669. rowStatus:
  1670. $ref: '#/definitions/v1RowStatus'
  1671. createTime:
  1672. type: string
  1673. format: date-time
  1674. updateTime:
  1675. type: string
  1676. format: date-time
  1677. tags:
  1678. - UserService
  1679. /file/{name}/avatar:
  1680. get:
  1681. summary: GetUserAvatarBinary gets the avatar of a user.
  1682. operationId: UserService_GetUserAvatarBinary
  1683. responses:
  1684. "200":
  1685. description: A successful response.
  1686. schema:
  1687. $ref: '#/definitions/apiHttpBody'
  1688. default:
  1689. description: An unexpected error response.
  1690. schema:
  1691. $ref: '#/definitions/googlerpcStatus'
  1692. parameters:
  1693. - name: name
  1694. description: "The name of the user.\r\nFormat: users/{id}"
  1695. in: path
  1696. required: true
  1697. type: string
  1698. pattern: users/[^/]+
  1699. - name: httpBody.contentType
  1700. description: The HTTP Content-Type header value specifying the content type of the body.
  1701. in: query
  1702. required: false
  1703. type: string
  1704. - name: httpBody.data
  1705. description: The HTTP request/response body as raw binary.
  1706. in: query
  1707. required: false
  1708. type: string
  1709. format: byte
  1710. tags:
  1711. - UserService
  1712. /file/{name}/{filename}:
  1713. get:
  1714. summary: GetResourceBinary returns a resource binary by name.
  1715. operationId: ResourceService_GetResourceBinary
  1716. responses:
  1717. "200":
  1718. description: A successful response.
  1719. schema:
  1720. $ref: '#/definitions/apiHttpBody'
  1721. default:
  1722. description: An unexpected error response.
  1723. schema:
  1724. $ref: '#/definitions/googlerpcStatus'
  1725. parameters:
  1726. - name: name
  1727. description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
  1728. in: path
  1729. required: true
  1730. type: string
  1731. pattern: resources/[^/]+
  1732. - name: filename
  1733. description: The filename of the resource. Mainly used for downloading.
  1734. in: path
  1735. required: true
  1736. type: string
  1737. tags:
  1738. - ResourceService
  1739. definitions:
  1740. MemoServiceRebuildMemoPropertyBody:
  1741. type: object
  1742. MemoServiceRenameMemoTagBody:
  1743. type: object
  1744. properties:
  1745. oldTag:
  1746. type: string
  1747. newTag:
  1748. type: string
  1749. MemoServiceSetMemoRelationsBody:
  1750. type: object
  1751. properties:
  1752. relations:
  1753. type: array
  1754. items:
  1755. type: object
  1756. $ref: '#/definitions/v1MemoRelation'
  1757. MemoServiceSetMemoResourcesBody:
  1758. type: object
  1759. properties:
  1760. resources:
  1761. type: array
  1762. items:
  1763. type: object
  1764. $ref: '#/definitions/v1Resource'
  1765. MemoServiceUpsertMemoReactionBody:
  1766. type: object
  1767. properties:
  1768. reaction:
  1769. $ref: '#/definitions/v1Reaction'
  1770. TableNodeRow:
  1771. type: object
  1772. properties:
  1773. cells:
  1774. type: array
  1775. items:
  1776. type: string
  1777. UserRole:
  1778. type: string
  1779. enum:
  1780. - ROLE_UNSPECIFIED
  1781. - HOST
  1782. - ADMIN
  1783. - USER
  1784. default: ROLE_UNSPECIFIED
  1785. UserServiceCreateUserAccessTokenBody:
  1786. type: object
  1787. properties:
  1788. description:
  1789. type: string
  1790. expiresAt:
  1791. type: string
  1792. format: date-time
  1793. WorkspaceStorageSettingS3Config:
  1794. type: object
  1795. properties:
  1796. accessKeyId:
  1797. type: string
  1798. accessKeySecret:
  1799. type: string
  1800. endpoint:
  1801. type: string
  1802. region:
  1803. type: string
  1804. bucket:
  1805. type: string
  1806. title: 'Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/'
  1807. apiHttpBody:
  1808. type: object
  1809. properties:
  1810. contentType:
  1811. type: string
  1812. description: The HTTP Content-Type header value specifying the content type of the body.
  1813. data:
  1814. type: string
  1815. format: byte
  1816. description: The HTTP request/response body as raw binary.
  1817. extensions:
  1818. type: array
  1819. items:
  1820. type: object
  1821. $ref: '#/definitions/protobufAny'
  1822. description: |-
  1823. Application specific response metadata. Must be set in the first response
  1824. for streaming APIs.
  1825. description: |-
  1826. Message that represents an arbitrary HTTP body. It should only be used for
  1827. payload formats that can't be represented as JSON, such as raw binary or
  1828. an HTML page.
  1829. This message can be used both in streaming and non-streaming API methods in
  1830. the request as well as the response.
  1831. It can be used as a top-level request field, which is convenient if one
  1832. wants to extract parameters from either the URL or HTTP template into the
  1833. request fields and also want access to the raw HTTP body.
  1834. Example:
  1835. message GetResourceRequest {
  1836. // A unique request id.
  1837. string request_id = 1;
  1838. // The raw HTTP body is bound to this field.
  1839. google.api.HttpBody http_body = 2;
  1840. }
  1841. service ResourceService {
  1842. rpc GetResource(GetResourceRequest)
  1843. returns (google.api.HttpBody);
  1844. rpc UpdateResource(google.api.HttpBody)
  1845. returns (google.protobuf.Empty);
  1846. }
  1847. Example with streaming methods:
  1848. service CaldavService {
  1849. rpc GetCalendar(stream google.api.HttpBody)
  1850. returns (stream google.api.HttpBody);
  1851. rpc UpdateCalendar(stream google.api.HttpBody)
  1852. returns (stream google.api.HttpBody);
  1853. }
  1854. Use of this type only changes how the request and response bodies are
  1855. handled, all other features will continue to work unchanged.
  1856. apiv1ActivityMemoCommentPayload:
  1857. type: object
  1858. properties:
  1859. memoId:
  1860. type: integer
  1861. format: int32
  1862. description: The memo id of comment.
  1863. relatedMemoId:
  1864. type: integer
  1865. format: int32
  1866. description: The memo id of related memo.
  1867. description: ActivityMemoCommentPayload represents the payload of a memo comment activity.
  1868. apiv1ActivityPayload:
  1869. type: object
  1870. properties:
  1871. memoComment:
  1872. $ref: '#/definitions/apiv1ActivityMemoCommentPayload'
  1873. versionUpdate:
  1874. $ref: '#/definitions/apiv1ActivityVersionUpdatePayload'
  1875. apiv1ActivityVersionUpdatePayload:
  1876. type: object
  1877. properties:
  1878. version:
  1879. type: string
  1880. description: The updated version of memos.
  1881. apiv1FieldMapping:
  1882. type: object
  1883. properties:
  1884. identifier:
  1885. type: string
  1886. displayName:
  1887. type: string
  1888. email:
  1889. type: string
  1890. apiv1IdentityProvider:
  1891. type: object
  1892. properties:
  1893. name:
  1894. type: string
  1895. title: "The name of the identityProvider.\r\nFormat: identityProviders/{id}"
  1896. type:
  1897. $ref: '#/definitions/apiv1IdentityProviderType'
  1898. title:
  1899. type: string
  1900. identifierFilter:
  1901. type: string
  1902. config:
  1903. $ref: '#/definitions/apiv1IdentityProviderConfig'
  1904. apiv1IdentityProviderConfig:
  1905. type: object
  1906. properties:
  1907. oauth2Config:
  1908. $ref: '#/definitions/apiv1OAuth2Config'
  1909. apiv1IdentityProviderType:
  1910. type: string
  1911. enum:
  1912. - TYPE_UNSPECIFIED
  1913. - OAUTH2
  1914. default: TYPE_UNSPECIFIED
  1915. apiv1OAuth2Config:
  1916. type: object
  1917. properties:
  1918. clientId:
  1919. type: string
  1920. clientSecret:
  1921. type: string
  1922. authUrl:
  1923. type: string
  1924. tokenUrl:
  1925. type: string
  1926. userInfoUrl:
  1927. type: string
  1928. scopes:
  1929. type: array
  1930. items:
  1931. type: string
  1932. fieldMapping:
  1933. $ref: '#/definitions/apiv1FieldMapping'
  1934. apiv1UserSetting:
  1935. type: object
  1936. properties:
  1937. name:
  1938. type: string
  1939. title: "The name of the user.\r\nFormat: users/{id}"
  1940. locale:
  1941. type: string
  1942. description: The preferred locale of the user.
  1943. appearance:
  1944. type: string
  1945. description: The preferred appearance of the user.
  1946. memoVisibility:
  1947. type: string
  1948. description: The default visibility of the memo.
  1949. apiv1WorkspaceCustomProfile:
  1950. type: object
  1951. properties:
  1952. title:
  1953. type: string
  1954. description:
  1955. type: string
  1956. logoUrl:
  1957. type: string
  1958. locale:
  1959. type: string
  1960. appearance:
  1961. type: string
  1962. apiv1WorkspaceGeneralSetting:
  1963. type: object
  1964. properties:
  1965. additionalScript:
  1966. type: string
  1967. description: additional_script is the additional script.
  1968. additionalStyle:
  1969. type: string
  1970. description: additional_style is the additional style.
  1971. customProfile:
  1972. $ref: '#/definitions/apiv1WorkspaceCustomProfile'
  1973. description: custom_profile is the custom profile.
  1974. apiv1WorkspaceMemoRelatedSetting:
  1975. type: object
  1976. properties:
  1977. disallowPublicVisible:
  1978. type: boolean
  1979. description: disallow_public_share disallows set memo as public visible.
  1980. displayWithUpdateTime:
  1981. type: boolean
  1982. description: display_with_update_time orders and displays memo with update time.
  1983. contentLengthLimit:
  1984. type: integer
  1985. format: int32
  1986. description: content_length_limit is the limit of content length. Unit is byte.
  1987. enableAutoCompact:
  1988. type: boolean
  1989. description: enable_auto_compact enables auto compact for large content.
  1990. enableDoubleClickEdit:
  1991. type: boolean
  1992. description: enable_double_click_edit enables editing on double click.
  1993. enableLinkPreview:
  1994. type: boolean
  1995. description: enable_link_preview enables links preview.
  1996. apiv1WorkspaceSetting:
  1997. type: object
  1998. properties:
  1999. name:
  2000. type: string
  2001. title: "name is the name of the setting.\r\nFormat: settings/{setting}"
  2002. generalSetting:
  2003. $ref: '#/definitions/apiv1WorkspaceGeneralSetting'
  2004. storageSetting:
  2005. $ref: '#/definitions/apiv1WorkspaceStorageSetting'
  2006. memoRelatedSetting:
  2007. $ref: '#/definitions/apiv1WorkspaceMemoRelatedSetting'
  2008. apiv1WorkspaceStorageSetting:
  2009. type: object
  2010. properties:
  2011. storageType:
  2012. $ref: '#/definitions/apiv1WorkspaceStorageSettingStorageType'
  2013. description: storage_type is the storage type.
  2014. filepathTemplate:
  2015. type: string
  2016. title: "The template of file path.\r\ne.g. assets/{timestamp}_{filename}"
  2017. uploadSizeLimitMb:
  2018. type: string
  2019. format: int64
  2020. description: The max upload size in megabytes.
  2021. s3Config:
  2022. $ref: '#/definitions/WorkspaceStorageSettingS3Config'
  2023. description: The S3 config.
  2024. apiv1WorkspaceStorageSettingStorageType:
  2025. type: string
  2026. enum:
  2027. - STORAGE_TYPE_UNSPECIFIED
  2028. - DATABASE
  2029. - LOCAL
  2030. - S3
  2031. default: STORAGE_TYPE_UNSPECIFIED
  2032. description: |2-
  2033. - DATABASE: DATABASE is the database storage type.
  2034. - LOCAL: LOCAL is the local storage type.
  2035. - S3: S3 is the S3 storage type.
  2036. googlerpcStatus:
  2037. type: object
  2038. properties:
  2039. code:
  2040. type: integer
  2041. format: int32
  2042. message:
  2043. type: string
  2044. details:
  2045. type: array
  2046. items:
  2047. type: object
  2048. $ref: '#/definitions/protobufAny'
  2049. protobufAny:
  2050. type: object
  2051. properties:
  2052. '@type':
  2053. type: string
  2054. description: |-
  2055. A URL/resource name that uniquely identifies the type of the serialized
  2056. protocol buffer message. This string must contain at least
  2057. one "/" character. The last segment of the URL's path must represent
  2058. the fully qualified name of the type (as in
  2059. `path/google.protobuf.Duration`). The name should be in a canonical form
  2060. (e.g., leading "." is not accepted).
  2061. In practice, teams usually precompile into the binary all types that they
  2062. expect it to use in the context of Any. However, for URLs which use the
  2063. scheme `http`, `https`, or no scheme, one can optionally set up a type
  2064. server that maps type URLs to message definitions as follows:
  2065. * If no scheme is provided, `https` is assumed.
  2066. * An HTTP GET on the URL must yield a [google.protobuf.Type][]
  2067. value in binary format, or produce an error.
  2068. * Applications are allowed to cache lookup results based on the
  2069. URL, or have them precompiled into a binary to avoid any
  2070. lookup. Therefore, binary compatibility needs to be preserved
  2071. on changes to types. (Use versioned type names to manage
  2072. breaking changes.)
  2073. Note: this functionality is not currently available in the official
  2074. protobuf release, and it is not used for type URLs beginning with
  2075. type.googleapis.com. As of May 2023, there are no widely used type server
  2076. implementations and no plans to implement one.
  2077. Schemes other than `http`, `https` (or the empty scheme) might be
  2078. used with implementation specific semantics.
  2079. additionalProperties: {}
  2080. description: |-
  2081. `Any` contains an arbitrary serialized protocol buffer message along with a
  2082. URL that describes the type of the serialized message.
  2083. Protobuf library provides support to pack/unpack Any values in the form
  2084. of utility functions or additional generated methods of the Any type.
  2085. Example 1: Pack and unpack a message in C++.
  2086. Foo foo = ...;
  2087. Any any;
  2088. any.PackFrom(foo);
  2089. ...
  2090. if (any.UnpackTo(&foo)) {
  2091. ...
  2092. }
  2093. Example 2: Pack and unpack a message in Java.
  2094. Foo foo = ...;
  2095. Any any = Any.pack(foo);
  2096. ...
  2097. if (any.is(Foo.class)) {
  2098. foo = any.unpack(Foo.class);
  2099. }
  2100. // or ...
  2101. if (any.isSameTypeAs(Foo.getDefaultInstance())) {
  2102. foo = any.unpack(Foo.getDefaultInstance());
  2103. }
  2104. Example 3: Pack and unpack a message in Python.
  2105. foo = Foo(...)
  2106. any = Any()
  2107. any.Pack(foo)
  2108. ...
  2109. if any.Is(Foo.DESCRIPTOR):
  2110. any.Unpack(foo)
  2111. ...
  2112. Example 4: Pack and unpack a message in Go
  2113. foo := &pb.Foo{...}
  2114. any, err := anypb.New(foo)
  2115. if err != nil {
  2116. ...
  2117. }
  2118. ...
  2119. foo := &pb.Foo{}
  2120. if err := any.UnmarshalTo(foo); err != nil {
  2121. ...
  2122. }
  2123. The pack methods provided by protobuf library will by default use
  2124. 'type.googleapis.com/full.type.name' as the type URL and the unpack
  2125. methods only use the fully qualified type name after the last '/'
  2126. in the type URL, for example "foo.bar.com/x/y.z" will yield type
  2127. name "y.z".
  2128. JSON
  2129. ====
  2130. The JSON representation of an `Any` value uses the regular
  2131. representation of the deserialized, embedded message, with an
  2132. additional field `@type` which contains the type URL. Example:
  2133. package google.profile;
  2134. message Person {
  2135. string first_name = 1;
  2136. string last_name = 2;
  2137. }
  2138. {
  2139. "@type": "type.googleapis.com/google.profile.Person",
  2140. "firstName": <string>,
  2141. "lastName": <string>
  2142. }
  2143. If the embedded message type is well-known and has a custom JSON
  2144. representation, that representation will be embedded adding a field
  2145. `value` which holds the custom JSON in addition to the `@type`
  2146. field. Example (for message [google.protobuf.Duration][]):
  2147. {
  2148. "@type": "type.googleapis.com/google.protobuf.Duration",
  2149. "value": "1.212s"
  2150. }
  2151. v1Activity:
  2152. type: object
  2153. properties:
  2154. id:
  2155. type: integer
  2156. format: int32
  2157. description: The system-generated unique identifier for the activity.
  2158. creatorId:
  2159. type: integer
  2160. format: int32
  2161. description: The system-generated unique identifier for the user who created the activity.
  2162. type:
  2163. type: string
  2164. description: The type of the activity.
  2165. level:
  2166. type: string
  2167. description: The level of the activity.
  2168. createTime:
  2169. type: string
  2170. format: date-time
  2171. description: The create time of the activity.
  2172. readOnly: true
  2173. payload:
  2174. $ref: '#/definitions/apiv1ActivityPayload'
  2175. description: The payload of the activity.
  2176. v1AutoLinkNode:
  2177. type: object
  2178. properties:
  2179. url:
  2180. type: string
  2181. isRawText:
  2182. type: boolean
  2183. v1BlockquoteNode:
  2184. type: object
  2185. properties:
  2186. children:
  2187. type: array
  2188. items:
  2189. type: object
  2190. $ref: '#/definitions/v1Node'
  2191. v1BoldItalicNode:
  2192. type: object
  2193. properties:
  2194. symbol:
  2195. type: string
  2196. content:
  2197. type: string
  2198. v1BoldNode:
  2199. type: object
  2200. properties:
  2201. symbol:
  2202. type: string
  2203. children:
  2204. type: array
  2205. items:
  2206. type: object
  2207. $ref: '#/definitions/v1Node'
  2208. v1CodeBlockNode:
  2209. type: object
  2210. properties:
  2211. language:
  2212. type: string
  2213. content:
  2214. type: string
  2215. v1CodeNode:
  2216. type: object
  2217. properties:
  2218. content:
  2219. type: string
  2220. v1CreateMemoRequest:
  2221. type: object
  2222. properties:
  2223. content:
  2224. type: string
  2225. visibility:
  2226. $ref: '#/definitions/v1Visibility'
  2227. v1CreateWebhookRequest:
  2228. type: object
  2229. properties:
  2230. name:
  2231. type: string
  2232. url:
  2233. type: string
  2234. v1EmbeddedContentNode:
  2235. type: object
  2236. properties:
  2237. resourceName:
  2238. type: string
  2239. params:
  2240. type: string
  2241. v1EscapingCharacterNode:
  2242. type: object
  2243. properties:
  2244. symbol:
  2245. type: string
  2246. v1ExportMemosRequest:
  2247. type: object
  2248. properties:
  2249. filter:
  2250. type: string
  2251. title: Same as ListMemosRequest.filter
  2252. v1ExportMemosResponse:
  2253. type: object
  2254. properties:
  2255. content:
  2256. type: string
  2257. format: byte
  2258. v1GetUserMemosStatsResponse:
  2259. type: object
  2260. properties:
  2261. stats:
  2262. type: object
  2263. additionalProperties:
  2264. type: integer
  2265. format: int32
  2266. description: "stats is the stats of memo creating/updating activities.\r\nkey is the year-month-day string. e.g. \"2020-01-01\"."
  2267. v1HeadingNode:
  2268. type: object
  2269. properties:
  2270. level:
  2271. type: integer
  2272. format: int32
  2273. children:
  2274. type: array
  2275. items:
  2276. type: object
  2277. $ref: '#/definitions/v1Node'
  2278. v1HighlightNode:
  2279. type: object
  2280. properties:
  2281. content:
  2282. type: string
  2283. v1HorizontalRuleNode:
  2284. type: object
  2285. properties:
  2286. symbol:
  2287. type: string
  2288. v1ImageNode:
  2289. type: object
  2290. properties:
  2291. altText:
  2292. type: string
  2293. url:
  2294. type: string
  2295. v1Inbox:
  2296. type: object
  2297. properties:
  2298. name:
  2299. type: string
  2300. title: "The name of the inbox.\r\nFormat: inboxes/{id}"
  2301. sender:
  2302. type: string
  2303. title: 'Format: users/{id}'
  2304. receiver:
  2305. type: string
  2306. title: 'Format: users/{id}'
  2307. status:
  2308. $ref: '#/definitions/v1InboxStatus'
  2309. createTime:
  2310. type: string
  2311. format: date-time
  2312. type:
  2313. $ref: '#/definitions/v1InboxType'
  2314. activityId:
  2315. type: integer
  2316. format: int32
  2317. v1InboxStatus:
  2318. type: string
  2319. enum:
  2320. - STATUS_UNSPECIFIED
  2321. - UNREAD
  2322. - ARCHIVED
  2323. default: STATUS_UNSPECIFIED
  2324. v1InboxType:
  2325. type: string
  2326. enum:
  2327. - TYPE_UNSPECIFIED
  2328. - MEMO_COMMENT
  2329. - VERSION_UPDATE
  2330. default: TYPE_UNSPECIFIED
  2331. v1ItalicNode:
  2332. type: object
  2333. properties:
  2334. symbol:
  2335. type: string
  2336. content:
  2337. type: string
  2338. v1LineBreakNode:
  2339. type: object
  2340. v1LinkMetadata:
  2341. type: object
  2342. properties:
  2343. title:
  2344. type: string
  2345. description:
  2346. type: string
  2347. image:
  2348. type: string
  2349. v1LinkNode:
  2350. type: object
  2351. properties:
  2352. text:
  2353. type: string
  2354. url:
  2355. type: string
  2356. v1ListIdentityProvidersResponse:
  2357. type: object
  2358. properties:
  2359. identityProviders:
  2360. type: array
  2361. items:
  2362. type: object
  2363. $ref: '#/definitions/apiv1IdentityProvider'
  2364. v1ListInboxesResponse:
  2365. type: object
  2366. properties:
  2367. inboxes:
  2368. type: array
  2369. items:
  2370. type: object
  2371. $ref: '#/definitions/v1Inbox'
  2372. v1ListMemoCommentsResponse:
  2373. type: object
  2374. properties:
  2375. memos:
  2376. type: array
  2377. items:
  2378. type: object
  2379. $ref: '#/definitions/v1Memo'
  2380. v1ListMemoPropertiesResponse:
  2381. type: object
  2382. properties:
  2383. properties:
  2384. type: array
  2385. items:
  2386. type: object
  2387. $ref: '#/definitions/v1MemoProperty'
  2388. v1ListMemoReactionsResponse:
  2389. type: object
  2390. properties:
  2391. reactions:
  2392. type: array
  2393. items:
  2394. type: object
  2395. $ref: '#/definitions/v1Reaction'
  2396. v1ListMemoRelationsResponse:
  2397. type: object
  2398. properties:
  2399. relations:
  2400. type: array
  2401. items:
  2402. type: object
  2403. $ref: '#/definitions/v1MemoRelation'
  2404. v1ListMemoResourcesResponse:
  2405. type: object
  2406. properties:
  2407. resources:
  2408. type: array
  2409. items:
  2410. type: object
  2411. $ref: '#/definitions/v1Resource'
  2412. v1ListMemoTagsResponse:
  2413. type: object
  2414. properties:
  2415. tagAmounts:
  2416. type: object
  2417. additionalProperties:
  2418. type: integer
  2419. format: int32
  2420. description: "tag_amounts is the amount of tags.\r\nkey is the tag name. e.g. \"tag1\".\r\nvalue is the amount of the tag."
  2421. v1ListMemosResponse:
  2422. type: object
  2423. properties:
  2424. memos:
  2425. type: array
  2426. items:
  2427. type: object
  2428. $ref: '#/definitions/v1Memo'
  2429. nextPageToken:
  2430. type: string
  2431. description: "A token, which can be sent as `page_token` to retrieve the next page.\r\nIf this field is omitted, there are no subsequent pages."
  2432. v1ListResourcesResponse:
  2433. type: object
  2434. properties:
  2435. resources:
  2436. type: array
  2437. items:
  2438. type: object
  2439. $ref: '#/definitions/v1Resource'
  2440. v1ListUserAccessTokensResponse:
  2441. type: object
  2442. properties:
  2443. accessTokens:
  2444. type: array
  2445. items:
  2446. type: object
  2447. $ref: '#/definitions/v1UserAccessToken'
  2448. v1ListUsersResponse:
  2449. type: object
  2450. properties:
  2451. users:
  2452. type: array
  2453. items:
  2454. type: object
  2455. $ref: '#/definitions/v1User'
  2456. v1ListWebhooksResponse:
  2457. type: object
  2458. properties:
  2459. webhooks:
  2460. type: array
  2461. items:
  2462. type: object
  2463. $ref: '#/definitions/v1Webhook'
  2464. v1MathBlockNode:
  2465. type: object
  2466. properties:
  2467. content:
  2468. type: string
  2469. v1MathNode:
  2470. type: object
  2471. properties:
  2472. content:
  2473. type: string
  2474. v1Memo:
  2475. type: object
  2476. properties:
  2477. name:
  2478. type: string
  2479. description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id."
  2480. uid:
  2481. type: string
  2482. description: The user defined id of the memo.
  2483. rowStatus:
  2484. $ref: '#/definitions/v1RowStatus'
  2485. creator:
  2486. type: string
  2487. title: "The name of the creator.\r\nFormat: users/{id}"
  2488. createTime:
  2489. type: string
  2490. format: date-time
  2491. updateTime:
  2492. type: string
  2493. format: date-time
  2494. displayTime:
  2495. type: string
  2496. format: date-time
  2497. content:
  2498. type: string
  2499. nodes:
  2500. type: array
  2501. items:
  2502. type: object
  2503. $ref: '#/definitions/v1Node'
  2504. readOnly: true
  2505. visibility:
  2506. $ref: '#/definitions/v1Visibility'
  2507. tags:
  2508. type: array
  2509. items:
  2510. type: string
  2511. pinned:
  2512. type: boolean
  2513. parentId:
  2514. type: integer
  2515. format: int32
  2516. readOnly: true
  2517. resources:
  2518. type: array
  2519. items:
  2520. type: object
  2521. $ref: '#/definitions/v1Resource'
  2522. readOnly: true
  2523. relations:
  2524. type: array
  2525. items:
  2526. type: object
  2527. $ref: '#/definitions/v1MemoRelation'
  2528. readOnly: true
  2529. reactions:
  2530. type: array
  2531. items:
  2532. type: object
  2533. $ref: '#/definitions/v1Reaction'
  2534. readOnly: true
  2535. property:
  2536. $ref: '#/definitions/v1MemoProperty'
  2537. readOnly: true
  2538. parent:
  2539. type: string
  2540. title: "The name of the parent memo.\r\nFormat: memos/{id}"
  2541. readOnly: true
  2542. v1MemoProperty:
  2543. type: object
  2544. properties:
  2545. tags:
  2546. type: array
  2547. items:
  2548. type: string
  2549. hasLink:
  2550. type: boolean
  2551. hasTaskList:
  2552. type: boolean
  2553. hasCode:
  2554. type: boolean
  2555. hasIncompleteTasks:
  2556. type: boolean
  2557. v1MemoRelation:
  2558. type: object
  2559. properties:
  2560. memo:
  2561. type: string
  2562. title: "The name of memo.\r\nFormat: \"memos/{uid}\""
  2563. relatedMemo:
  2564. type: string
  2565. title: "The name of related memo.\r\nFormat: \"memos/{uid}\""
  2566. type:
  2567. $ref: '#/definitions/v1MemoRelationType'
  2568. v1MemoRelationType:
  2569. type: string
  2570. enum:
  2571. - TYPE_UNSPECIFIED
  2572. - REFERENCE
  2573. - COMMENT
  2574. default: TYPE_UNSPECIFIED
  2575. v1Node:
  2576. type: object
  2577. properties:
  2578. type:
  2579. $ref: '#/definitions/v1NodeType'
  2580. lineBreakNode:
  2581. $ref: '#/definitions/v1LineBreakNode'
  2582. paragraphNode:
  2583. $ref: '#/definitions/v1ParagraphNode'
  2584. codeBlockNode:
  2585. $ref: '#/definitions/v1CodeBlockNode'
  2586. headingNode:
  2587. $ref: '#/definitions/v1HeadingNode'
  2588. horizontalRuleNode:
  2589. $ref: '#/definitions/v1HorizontalRuleNode'
  2590. blockquoteNode:
  2591. $ref: '#/definitions/v1BlockquoteNode'
  2592. orderedListNode:
  2593. $ref: '#/definitions/v1OrderedListNode'
  2594. unorderedListNode:
  2595. $ref: '#/definitions/v1UnorderedListNode'
  2596. taskListNode:
  2597. $ref: '#/definitions/v1TaskListNode'
  2598. mathBlockNode:
  2599. $ref: '#/definitions/v1MathBlockNode'
  2600. tableNode:
  2601. $ref: '#/definitions/v1TableNode'
  2602. embeddedContentNode:
  2603. $ref: '#/definitions/v1EmbeddedContentNode'
  2604. textNode:
  2605. $ref: '#/definitions/v1TextNode'
  2606. boldNode:
  2607. $ref: '#/definitions/v1BoldNode'
  2608. italicNode:
  2609. $ref: '#/definitions/v1ItalicNode'
  2610. boldItalicNode:
  2611. $ref: '#/definitions/v1BoldItalicNode'
  2612. codeNode:
  2613. $ref: '#/definitions/v1CodeNode'
  2614. imageNode:
  2615. $ref: '#/definitions/v1ImageNode'
  2616. linkNode:
  2617. $ref: '#/definitions/v1LinkNode'
  2618. autoLinkNode:
  2619. $ref: '#/definitions/v1AutoLinkNode'
  2620. tagNode:
  2621. $ref: '#/definitions/v1TagNode'
  2622. strikethroughNode:
  2623. $ref: '#/definitions/v1StrikethroughNode'
  2624. escapingCharacterNode:
  2625. $ref: '#/definitions/v1EscapingCharacterNode'
  2626. mathNode:
  2627. $ref: '#/definitions/v1MathNode'
  2628. highlightNode:
  2629. $ref: '#/definitions/v1HighlightNode'
  2630. subscriptNode:
  2631. $ref: '#/definitions/v1SubscriptNode'
  2632. superscriptNode:
  2633. $ref: '#/definitions/v1SuperscriptNode'
  2634. referencedContentNode:
  2635. $ref: '#/definitions/v1ReferencedContentNode'
  2636. spoilerNode:
  2637. $ref: '#/definitions/v1SpoilerNode'
  2638. v1NodeType:
  2639. type: string
  2640. enum:
  2641. - NODE_UNSPECIFIED
  2642. - LINE_BREAK
  2643. - PARAGRAPH
  2644. - CODE_BLOCK
  2645. - HEADING
  2646. - HORIZONTAL_RULE
  2647. - BLOCKQUOTE
  2648. - ORDERED_LIST
  2649. - UNORDERED_LIST
  2650. - TASK_LIST
  2651. - MATH_BLOCK
  2652. - TABLE
  2653. - EMBEDDED_CONTENT
  2654. - TEXT
  2655. - BOLD
  2656. - ITALIC
  2657. - BOLD_ITALIC
  2658. - CODE
  2659. - IMAGE
  2660. - LINK
  2661. - AUTO_LINK
  2662. - TAG
  2663. - STRIKETHROUGH
  2664. - ESCAPING_CHARACTER
  2665. - MATH
  2666. - HIGHLIGHT
  2667. - SUBSCRIPT
  2668. - SUPERSCRIPT
  2669. - REFERENCED_CONTENT
  2670. - SPOILER
  2671. default: NODE_UNSPECIFIED
  2672. v1OrderedListNode:
  2673. type: object
  2674. properties:
  2675. number:
  2676. type: string
  2677. indent:
  2678. type: integer
  2679. format: int32
  2680. children:
  2681. type: array
  2682. items:
  2683. type: object
  2684. $ref: '#/definitions/v1Node'
  2685. v1ParagraphNode:
  2686. type: object
  2687. properties:
  2688. children:
  2689. type: array
  2690. items:
  2691. type: object
  2692. $ref: '#/definitions/v1Node'
  2693. v1ParseMarkdownRequest:
  2694. type: object
  2695. properties:
  2696. markdown:
  2697. type: string
  2698. v1ParseMarkdownResponse:
  2699. type: object
  2700. properties:
  2701. nodes:
  2702. type: array
  2703. items:
  2704. type: object
  2705. $ref: '#/definitions/v1Node'
  2706. v1Reaction:
  2707. type: object
  2708. properties:
  2709. id:
  2710. type: integer
  2711. format: int32
  2712. creator:
  2713. type: string
  2714. title: "The name of the creator.\r\nFormat: users/{id}"
  2715. contentId:
  2716. type: string
  2717. reactionType:
  2718. $ref: '#/definitions/v1ReactionType'
  2719. v1ReactionType:
  2720. type: string
  2721. enum:
  2722. - TYPE_UNSPECIFIED
  2723. - THUMBS_UP
  2724. - THUMBS_DOWN
  2725. - HEART
  2726. - FIRE
  2727. - CLAPPING_HANDS
  2728. - LAUGH
  2729. - OK_HAND
  2730. - ROCKET
  2731. - EYES
  2732. - THINKING_FACE
  2733. - CLOWN_FACE
  2734. - QUESTION_MARK
  2735. default: TYPE_UNSPECIFIED
  2736. v1ReferencedContentNode:
  2737. type: object
  2738. properties:
  2739. resourceName:
  2740. type: string
  2741. params:
  2742. type: string
  2743. v1Resource:
  2744. type: object
  2745. properties:
  2746. name:
  2747. type: string
  2748. description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
  2749. uid:
  2750. type: string
  2751. description: The user defined id of the resource.
  2752. createTime:
  2753. type: string
  2754. format: date-time
  2755. readOnly: true
  2756. filename:
  2757. type: string
  2758. content:
  2759. type: string
  2760. format: byte
  2761. externalLink:
  2762. type: string
  2763. type:
  2764. type: string
  2765. size:
  2766. type: string
  2767. format: int64
  2768. memo:
  2769. type: string
  2770. title: "The related memo.\r\nFormat: memos/{id}"
  2771. v1RestoreMarkdownRequest:
  2772. type: object
  2773. properties:
  2774. nodes:
  2775. type: array
  2776. items:
  2777. type: object
  2778. $ref: '#/definitions/v1Node'
  2779. v1RestoreMarkdownResponse:
  2780. type: object
  2781. properties:
  2782. markdown:
  2783. type: string
  2784. v1RowStatus:
  2785. type: string
  2786. enum:
  2787. - ROW_STATUS_UNSPECIFIED
  2788. - ACTIVE
  2789. - ARCHIVED
  2790. default: ROW_STATUS_UNSPECIFIED
  2791. v1SearchMemosResponse:
  2792. type: object
  2793. properties:
  2794. memos:
  2795. type: array
  2796. items:
  2797. type: object
  2798. $ref: '#/definitions/v1Memo'
  2799. v1SearchResourcesResponse:
  2800. type: object
  2801. properties:
  2802. resources:
  2803. type: array
  2804. items:
  2805. type: object
  2806. $ref: '#/definitions/v1Resource'
  2807. v1SearchUsersResponse:
  2808. type: object
  2809. properties:
  2810. users:
  2811. type: array
  2812. items:
  2813. type: object
  2814. $ref: '#/definitions/v1User'
  2815. v1SpoilerNode:
  2816. type: object
  2817. properties:
  2818. content:
  2819. type: string
  2820. v1StrikethroughNode:
  2821. type: object
  2822. properties:
  2823. content:
  2824. type: string
  2825. v1SubscriptNode:
  2826. type: object
  2827. properties:
  2828. content:
  2829. type: string
  2830. v1SuperscriptNode:
  2831. type: object
  2832. properties:
  2833. content:
  2834. type: string
  2835. v1TableNode:
  2836. type: object
  2837. properties:
  2838. header:
  2839. type: array
  2840. items:
  2841. type: string
  2842. delimiter:
  2843. type: array
  2844. items:
  2845. type: string
  2846. rows:
  2847. type: array
  2848. items:
  2849. type: object
  2850. $ref: '#/definitions/TableNodeRow'
  2851. v1TagNode:
  2852. type: object
  2853. properties:
  2854. content:
  2855. type: string
  2856. v1TaskListNode:
  2857. type: object
  2858. properties:
  2859. symbol:
  2860. type: string
  2861. indent:
  2862. type: integer
  2863. format: int32
  2864. complete:
  2865. type: boolean
  2866. children:
  2867. type: array
  2868. items:
  2869. type: object
  2870. $ref: '#/definitions/v1Node'
  2871. v1TextNode:
  2872. type: object
  2873. properties:
  2874. content:
  2875. type: string
  2876. v1UnorderedListNode:
  2877. type: object
  2878. properties:
  2879. symbol:
  2880. type: string
  2881. indent:
  2882. type: integer
  2883. format: int32
  2884. children:
  2885. type: array
  2886. items:
  2887. type: object
  2888. $ref: '#/definitions/v1Node'
  2889. v1User:
  2890. type: object
  2891. properties:
  2892. name:
  2893. type: string
  2894. title: "The name of the user.\r\nFormat: users/{id}"
  2895. id:
  2896. type: integer
  2897. format: int32
  2898. description: The system generated uid of the user.
  2899. role:
  2900. $ref: '#/definitions/UserRole'
  2901. username:
  2902. type: string
  2903. email:
  2904. type: string
  2905. nickname:
  2906. type: string
  2907. avatarUrl:
  2908. type: string
  2909. description:
  2910. type: string
  2911. password:
  2912. type: string
  2913. rowStatus:
  2914. $ref: '#/definitions/v1RowStatus'
  2915. createTime:
  2916. type: string
  2917. format: date-time
  2918. updateTime:
  2919. type: string
  2920. format: date-time
  2921. v1UserAccessToken:
  2922. type: object
  2923. properties:
  2924. accessToken:
  2925. type: string
  2926. description:
  2927. type: string
  2928. issuedAt:
  2929. type: string
  2930. format: date-time
  2931. expiresAt:
  2932. type: string
  2933. format: date-time
  2934. v1Visibility:
  2935. type: string
  2936. enum:
  2937. - VISIBILITY_UNSPECIFIED
  2938. - PRIVATE
  2939. - PROTECTED
  2940. - PUBLIC
  2941. default: VISIBILITY_UNSPECIFIED
  2942. v1Webhook:
  2943. type: object
  2944. properties:
  2945. id:
  2946. type: integer
  2947. format: int32
  2948. creatorId:
  2949. type: integer
  2950. format: int32
  2951. createTime:
  2952. type: string
  2953. format: date-time
  2954. updateTime:
  2955. type: string
  2956. format: date-time
  2957. rowStatus:
  2958. $ref: '#/definitions/v1RowStatus'
  2959. name:
  2960. type: string
  2961. url:
  2962. type: string
  2963. v1WorkspaceProfile:
  2964. type: object
  2965. properties:
  2966. owner:
  2967. type: string
  2968. title: "The name of instance owner.\r\nFormat: \"users/{id}\""
  2969. version:
  2970. type: string
  2971. title: version is the current version of instance
  2972. mode:
  2973. type: string
  2974. description: mode is the instance mode (e.g. "prod", "dev" or "demo").
  2975. public:
  2976. type: boolean
  2977. description: public is a flag that the instance is open for other users.