@gitopia/gitopiajs 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/package.json +3 -3
  2. package/dist/LICENSE +0 -21
  3. package/dist/amino/amino.d.ts +0 -1
  4. package/dist/amino/amino.js +0 -2
  5. package/dist/amino/bundle.d.ts +0 -1
  6. package/dist/amino/bundle.js +0 -41
  7. package/dist/binary.d.ts +0 -130
  8. package/dist/binary.js +0 -371
  9. package/dist/cosmos/bank/v1beta1/bank.d.ts +0 -407
  10. package/dist/cosmos/bank/v1beta1/bank.js +0 -664
  11. package/dist/cosmos/bank/v1beta1/query.d.ts +0 -1062
  12. package/dist/cosmos/bank/v1beta1/query.js +0 -1759
  13. package/dist/cosmos/bank/v1beta1/query.lcd.d.ts +0 -19
  14. package/dist/cosmos/bank/v1beta1/query.lcd.js +0 -173
  15. package/dist/cosmos/bank/v1beta1/query.rpc.Query.d.ts +0 -106
  16. package/dist/cosmos/bank/v1beta1/query.rpc.Query.js +0 -123
  17. package/dist/cosmos/base/query/v1beta1/pagination.d.ts +0 -190
  18. package/dist/cosmos/base/query/v1beta1/pagination.js +0 -204
  19. package/dist/cosmos/base/v1beta1/coin.d.ts +0 -193
  20. package/dist/cosmos/base/v1beta1/coin.js +0 -306
  21. package/dist/cosmos/bundle.d.ts +0 -2311
  22. package/dist/cosmos/bundle.js +0 -134
  23. package/dist/cosmos/client.d.ts +0 -84
  24. package/dist/cosmos/client.js +0 -65
  25. package/dist/cosmos/feegrant/v1beta1/feegrant.d.ts +0 -245
  26. package/dist/cosmos/feegrant/v1beta1/feegrant.js +0 -456
  27. package/dist/cosmos/feegrant/v1beta1/query.d.ts +0 -258
  28. package/dist/cosmos/feegrant/v1beta1/query.js +0 -487
  29. package/dist/cosmos/feegrant/v1beta1/query.lcd.d.ts +0 -11
  30. package/dist/cosmos/feegrant/v1beta1/query.lcd.js +0 -44
  31. package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.d.ts +0 -28
  32. package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.js +0 -47
  33. package/dist/cosmos/gov/v1beta1/gov.d.ts +0 -571
  34. package/dist/cosmos/gov/v1beta1/gov.js +0 -1122
  35. package/dist/cosmos/gov/v1beta1/query.d.ts +0 -636
  36. package/dist/cosmos/gov/v1beta1/query.js +0 -1264
  37. package/dist/cosmos/gov/v1beta1/query.lcd.d.ts +0 -16
  38. package/dist/cosmos/gov/v1beta1/query.lcd.js +0 -87
  39. package/dist/cosmos/gov/v1beta1/query.rpc.Query.d.ts +0 -44
  40. package/dist/cosmos/gov/v1beta1/query.rpc.Query.js +0 -92
  41. package/dist/cosmos/group/v1/query.d.ts +0 -1097
  42. package/dist/cosmos/group/v1/query.js +0 -2182
  43. package/dist/cosmos/group/v1/query.lcd.d.ts +0 -22
  44. package/dist/cosmos/group/v1/query.lcd.js +0 -158
  45. package/dist/cosmos/group/v1/query.rpc.Query.d.ts +0 -78
  46. package/dist/cosmos/group/v1/query.rpc.Query.js +0 -148
  47. package/dist/cosmos/group/v1/tx.amino.d.ts +0 -73
  48. package/dist/cosmos/group/v1/tx.amino.js +0 -77
  49. package/dist/cosmos/group/v1/tx.d.ts +0 -1198
  50. package/dist/cosmos/group/v1/tx.js +0 -2362
  51. package/dist/cosmos/group/v1/tx.registry.d.ts +0 -180
  52. package/dist/cosmos/group/v1/tx.registry.js +0 -271
  53. package/dist/cosmos/group/v1/tx.rpc.msg.d.ts +0 -51
  54. package/dist/cosmos/group/v1/tx.rpc.msg.js +0 -96
  55. package/dist/cosmos/group/v1/types.d.ts +0 -873
  56. package/dist/cosmos/group/v1/types.js +0 -1495
  57. package/dist/cosmos/msg/v1/msg.d.ts +0 -1
  58. package/dist/cosmos/msg/v1/msg.js +0 -2
  59. package/dist/cosmos/query/v1/query.d.ts +0 -1
  60. package/dist/cosmos/query/v1/query.js +0 -2
  61. package/dist/cosmos/rpc.query.d.ts +0 -59
  62. package/dist/cosmos/rpc.query.js +0 -60
  63. package/dist/cosmos/rpc.tx.d.ts +0 -10
  64. package/dist/cosmos/rpc.tx.js +0 -44
  65. package/dist/cosmos/upgrade/v1beta1/upgrade.d.ts +0 -278
  66. package/dist/cosmos/upgrade/v1beta1/upgrade.js +0 -382
  67. package/dist/cosmos_proto/bundle.d.ts +0 -32
  68. package/dist/cosmos_proto/bundle.js +0 -41
  69. package/dist/cosmos_proto/cosmos.d.ts +0 -171
  70. package/dist/cosmos_proto/cosmos.js +0 -221
  71. package/dist/esm/amino/amino.js +0 -1
  72. package/dist/esm/amino/bundle.js +0 -5
  73. package/dist/esm/binary.js +0 -366
  74. package/dist/esm/cosmos/bank/v1beta1/bank.js +0 -661
  75. package/dist/esm/cosmos/bank/v1beta1/query.js +0 -1756
  76. package/dist/esm/cosmos/bank/v1beta1/query.lcd.js +0 -169
  77. package/dist/esm/cosmos/bank/v1beta1/query.rpc.Query.js +0 -118
  78. package/dist/esm/cosmos/base/query/v1beta1/pagination.js +0 -201
  79. package/dist/esm/cosmos/base/v1beta1/coin.js +0 -303
  80. package/dist/esm/cosmos/bundle.js +0 -98
  81. package/dist/esm/cosmos/client.js +0 -27
  82. package/dist/esm/cosmos/feegrant/v1beta1/feegrant.js +0 -450
  83. package/dist/esm/cosmos/feegrant/v1beta1/query.js +0 -484
  84. package/dist/esm/cosmos/feegrant/v1beta1/query.lcd.js +0 -40
  85. package/dist/esm/cosmos/feegrant/v1beta1/query.rpc.Query.js +0 -42
  86. package/dist/esm/cosmos/gov/v1beta1/gov.js +0 -1112
  87. package/dist/esm/cosmos/gov/v1beta1/query.js +0 -1261
  88. package/dist/esm/cosmos/gov/v1beta1/query.lcd.js +0 -83
  89. package/dist/esm/cosmos/gov/v1beta1/query.rpc.Query.js +0 -87
  90. package/dist/esm/cosmos/group/v1/query.js +0 -2179
  91. package/dist/esm/cosmos/group/v1/query.lcd.js +0 -154
  92. package/dist/esm/cosmos/group/v1/query.rpc.Query.js +0 -143
  93. package/dist/esm/cosmos/group/v1/tx.amino.js +0 -74
  94. package/dist/esm/cosmos/group/v1/tx.js +0 -2354
  95. package/dist/esm/cosmos/group/v1/tx.registry.js +0 -267
  96. package/dist/esm/cosmos/group/v1/tx.rpc.msg.js +0 -92
  97. package/dist/esm/cosmos/group/v1/types.js +0 -1483
  98. package/dist/esm/cosmos/msg/v1/msg.js +0 -1
  99. package/dist/esm/cosmos/query/v1/query.js +0 -1
  100. package/dist/esm/cosmos/rpc.query.js +0 -23
  101. package/dist/esm/cosmos/rpc.tx.js +0 -7
  102. package/dist/esm/cosmos/upgrade/v1beta1/upgrade.js +0 -379
  103. package/dist/esm/cosmos_proto/bundle.js +0 -5
  104. package/dist/esm/cosmos_proto/cosmos.js +0 -216
  105. package/dist/esm/gitopia/bundle.js +0 -95
  106. package/dist/esm/gitopia/client.js +0 -32
  107. package/dist/esm/gitopia/custom-lcd-client.js +0 -50
  108. package/dist/esm/gitopia/gitopia/gitopia/attachment.js +0 -101
  109. package/dist/esm/gitopia/gitopia/gitopia/bounty.js +0 -255
  110. package/dist/esm/gitopia/gitopia/gitopia/branch.js +0 -137
  111. package/dist/esm/gitopia/gitopia/gitopia/comment.js +0 -488
  112. package/dist/esm/gitopia/gitopia/gitopia/dao.js +0 -451
  113. package/dist/esm/gitopia/gitopia/gitopia/exercised_amount.js +0 -78
  114. package/dist/esm/gitopia/gitopia/gitopia/genesis.js +0 -460
  115. package/dist/esm/gitopia/gitopia/gitopia/issue.js +0 -323
  116. package/dist/esm/gitopia/gitopia/gitopia/params.js +0 -293
  117. package/dist/esm/gitopia/gitopia/gitopia/pullRequest.js +0 -565
  118. package/dist/esm/gitopia/gitopia/gitopia/query.js +0 -7351
  119. package/dist/esm/gitopia/gitopia/gitopia/query.lcd.js +0 -452
  120. package/dist/esm/gitopia/gitopia/gitopia/query.rpc.Query.js +0 -453
  121. package/dist/esm/gitopia/gitopia/gitopia/reaction.js +0 -123
  122. package/dist/esm/gitopia/gitopia/gitopia/release.js +0 -225
  123. package/dist/esm/gitopia/gitopia/gitopia/repository.js +0 -1200
  124. package/dist/esm/gitopia/gitopia/gitopia/tag.js +0 -125
  125. package/dist/esm/gitopia/gitopia/gitopia/task.js +0 -197
  126. package/dist/esm/gitopia/gitopia/gitopia/tx.amino.js +0 -464
  127. package/dist/esm/gitopia/gitopia/gitopia/tx.js +0 -14679
  128. package/dist/esm/gitopia/gitopia/gitopia/tx.registry.js +0 -1671
  129. package/dist/esm/gitopia/gitopia/gitopia/tx.rpc.msg.js +0 -560
  130. package/dist/esm/gitopia/gitopia/gitopia/user.js +0 -340
  131. package/dist/esm/gitopia/gitopia/gitopia/whois.js +0 -146
  132. package/dist/esm/gitopia/gitopia/offchain/offchain.js +0 -144
  133. package/dist/esm/gitopia/gitopia/rewards/genesis.js +0 -82
  134. package/dist/esm/gitopia/gitopia/rewards/params.js +0 -81
  135. package/dist/esm/gitopia/gitopia/rewards/pool.js +0 -191
  136. package/dist/esm/gitopia/gitopia/rewards/query.js +0 -654
  137. package/dist/esm/gitopia/gitopia/rewards/query.lcd.js +0 -40
  138. package/dist/esm/gitopia/gitopia/rewards/query.rpc.Query.js +0 -53
  139. package/dist/esm/gitopia/gitopia/rewards/rewards.js +0 -191
  140. package/dist/esm/gitopia/gitopia/rewards/task.js +0 -176
  141. package/dist/esm/gitopia/gitopia/rewards/tx.amino.js +0 -19
  142. package/dist/esm/gitopia/gitopia/rewards/tx.js +0 -525
  143. package/dist/esm/gitopia/gitopia/rewards/tx.registry.js +0 -69
  144. package/dist/esm/gitopia/gitopia/rewards/tx.rpc.msg.js +0 -26
  145. package/dist/esm/gitopia/rpc.query.js +0 -29
  146. package/dist/esm/gitopia/rpc.tx.js +0 -13
  147. package/dist/esm/gogoproto/bundle.js +0 -5
  148. package/dist/esm/gogoproto/gogo.js +0 -1
  149. package/dist/esm/google/api/annotations.js +0 -1
  150. package/dist/esm/google/api/http.js +0 -329
  151. package/dist/esm/google/bundle.js +0 -14
  152. package/dist/esm/google/protobuf/any.js +0 -74
  153. package/dist/esm/google/protobuf/descriptor.js +0 -4848
  154. package/dist/esm/google/protobuf/duration.js +0 -71
  155. package/dist/esm/google/protobuf/timestamp.js +0 -68
  156. package/dist/esm/helpers.js +0 -129
  157. package/dist/esm/ibc/applications/transfer/v1/query.js +0 -847
  158. package/dist/esm/ibc/applications/transfer/v1/query.lcd.js +0 -70
  159. package/dist/esm/ibc/applications/transfer/v1/query.rpc.Query.js +0 -71
  160. package/dist/esm/ibc/applications/transfer/v1/transfer.js +0 -164
  161. package/dist/esm/ibc/applications/transfer/v1/tx.amino.js +0 -9
  162. package/dist/esm/ibc/applications/transfer/v1/tx.js +0 -226
  163. package/dist/esm/ibc/applications/transfer/v1/tx.registry.js +0 -33
  164. package/dist/esm/ibc/applications/transfer/v1/tx.rpc.msg.js +0 -14
  165. package/dist/esm/ibc/bundle.js +0 -44
  166. package/dist/esm/ibc/client.js +0 -29
  167. package/dist/esm/ibc/core/client/v1/client.js +0 -611
  168. package/dist/esm/ibc/rpc.query.js +0 -30
  169. package/dist/esm/ibc/rpc.tx.js +0 -14
  170. package/dist/esm/index.js +0 -19
  171. package/dist/esm/utf8.js +0 -137
  172. package/dist/esm/varint.js +0 -408
  173. package/dist/gitopia/bundle.d.ts +0 -6123
  174. package/dist/gitopia/bundle.js +0 -131
  175. package/dist/gitopia/client.d.ts +0 -492
  176. package/dist/gitopia/client.js +0 -70
  177. package/dist/gitopia/custom-lcd-client.d.ts +0 -31
  178. package/dist/gitopia/custom-lcd-client.js +0 -87
  179. package/dist/gitopia/gitopia/gitopia/attachment.d.ts +0 -39
  180. package/dist/gitopia/gitopia/gitopia/attachment.js +0 -104
  181. package/dist/gitopia/gitopia/gitopia/bounty.d.ts +0 -79
  182. package/dist/gitopia/gitopia/gitopia/bounty.js +0 -262
  183. package/dist/gitopia/gitopia/gitopia/branch.d.ts +0 -48
  184. package/dist/gitopia/gitopia/gitopia/branch.js +0 -140
  185. package/dist/gitopia/gitopia/gitopia/comment.d.ts +0 -125
  186. package/dist/gitopia/gitopia/gitopia/comment.js +0 -495
  187. package/dist/gitopia/gitopia/gitopia/dao.d.ts +0 -160
  188. package/dist/gitopia/gitopia/gitopia/dao.js +0 -454
  189. package/dist/gitopia/gitopia/gitopia/exercised_amount.d.ts +0 -34
  190. package/dist/gitopia/gitopia/gitopia/exercised_amount.js +0 -81
  191. package/dist/gitopia/gitopia/gitopia/genesis.d.ts +0 -143
  192. package/dist/gitopia/gitopia/gitopia/genesis.js +0 -463
  193. package/dist/gitopia/gitopia/gitopia/issue.d.ts +0 -88
  194. package/dist/gitopia/gitopia/gitopia/issue.js +0 -328
  195. package/dist/gitopia/gitopia/gitopia/params.d.ts +0 -115
  196. package/dist/gitopia/gitopia/gitopia/params.js +0 -296
  197. package/dist/gitopia/gitopia/gitopia/pullRequest.d.ts +0 -177
  198. package/dist/gitopia/gitopia/gitopia/pullRequest.js +0 -570
  199. package/dist/gitopia/gitopia/gitopia/query.d.ts +0 -3130
  200. package/dist/gitopia/gitopia/gitopia/query.js +0 -7355
  201. package/dist/gitopia/gitopia/gitopia/query.lcd.d.ts +0 -54
  202. package/dist/gitopia/gitopia/gitopia/query.lcd.js +0 -456
  203. package/dist/gitopia/gitopia/gitopia/query.rpc.Query.d.ts +0 -188
  204. package/dist/gitopia/gitopia/gitopia/query.rpc.Query.js +0 -458
  205. package/dist/gitopia/gitopia/gitopia/reaction.d.ts +0 -42
  206. package/dist/gitopia/gitopia/gitopia/reaction.js +0 -128
  207. package/dist/gitopia/gitopia/gitopia/release.d.ts +0 -70
  208. package/dist/gitopia/gitopia/gitopia/release.js +0 -228
  209. package/dist/gitopia/gitopia/gitopia/repository.d.ts +0 -424
  210. package/dist/gitopia/gitopia/gitopia/repository.js +0 -1207
  211. package/dist/gitopia/gitopia/gitopia/tag.d.ts +0 -45
  212. package/dist/gitopia/gitopia/gitopia/tag.js +0 -128
  213. package/dist/gitopia/gitopia/gitopia/task.d.ts +0 -64
  214. package/dist/gitopia/gitopia/gitopia/task.js +0 -204
  215. package/dist/gitopia/gitopia/gitopia/tx.amino.d.ts +0 -463
  216. package/dist/gitopia/gitopia/gitopia/tx.amino.js +0 -467
  217. package/dist/gitopia/gitopia/gitopia/tx.d.ts +0 -6246
  218. package/dist/gitopia/gitopia/gitopia/tx.js +0 -14687
  219. package/dist/gitopia/gitopia/gitopia/tx.registry.d.ts +0 -1116
  220. package/dist/gitopia/gitopia/gitopia/tx.registry.js +0 -1675
  221. package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.d.ts +0 -200
  222. package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.js +0 -564
  223. package/dist/gitopia/gitopia/gitopia/user.d.ts +0 -104
  224. package/dist/gitopia/gitopia/gitopia/user.js +0 -343
  225. package/dist/gitopia/gitopia/gitopia/whois.d.ts +0 -51
  226. package/dist/gitopia/gitopia/gitopia/whois.js +0 -151
  227. package/dist/gitopia/gitopia/offchain/offchain.d.ts +0 -74
  228. package/dist/gitopia/gitopia/offchain/offchain.js +0 -147
  229. package/dist/gitopia/gitopia/rewards/genesis.d.ts +0 -40
  230. package/dist/gitopia/gitopia/rewards/genesis.js +0 -85
  231. package/dist/gitopia/gitopia/rewards/params.d.ts +0 -37
  232. package/dist/gitopia/gitopia/rewards/params.js +0 -84
  233. package/dist/gitopia/gitopia/rewards/pool.d.ts +0 -59
  234. package/dist/gitopia/gitopia/rewards/pool.js +0 -196
  235. package/dist/gitopia/gitopia/rewards/query.d.ts +0 -294
  236. package/dist/gitopia/gitopia/rewards/query.js +0 -657
  237. package/dist/gitopia/gitopia/rewards/query.lcd.d.ts +0 -12
  238. package/dist/gitopia/gitopia/rewards/query.lcd.js +0 -44
  239. package/dist/gitopia/gitopia/rewards/query.rpc.Query.d.ts +0 -28
  240. package/dist/gitopia/gitopia/rewards/query.rpc.Query.js +0 -58
  241. package/dist/gitopia/gitopia/rewards/rewards.d.ts +0 -79
  242. package/dist/gitopia/gitopia/rewards/rewards.js +0 -194
  243. package/dist/gitopia/gitopia/rewards/task.d.ts +0 -54
  244. package/dist/gitopia/gitopia/rewards/task.js +0 -181
  245. package/dist/gitopia/gitopia/rewards/tx.amino.d.ts +0 -18
  246. package/dist/gitopia/gitopia/rewards/tx.amino.js +0 -22
  247. package/dist/gitopia/gitopia/rewards/tx.d.ts +0 -242
  248. package/dist/gitopia/gitopia/rewards/tx.js +0 -528
  249. package/dist/gitopia/gitopia/rewards/tx.registry.d.ts +0 -48
  250. package/dist/gitopia/gitopia/rewards/tx.registry.js +0 -73
  251. package/dist/gitopia/gitopia/rewards/tx.rpc.msg.d.ts +0 -19
  252. package/dist/gitopia/gitopia/rewards/tx.rpc.msg.js +0 -30
  253. package/dist/gitopia/rpc.query.d.ts +0 -117
  254. package/dist/gitopia/rpc.query.js +0 -66
  255. package/dist/gitopia/rpc.tx.d.ts +0 -16
  256. package/dist/gitopia/rpc.tx.js +0 -50
  257. package/dist/gogoproto/bundle.d.ts +0 -1
  258. package/dist/gogoproto/bundle.js +0 -41
  259. package/dist/gogoproto/gogo.d.ts +0 -1
  260. package/dist/gogoproto/gogo.js +0 -2
  261. package/dist/google/api/annotations.d.ts +0 -1
  262. package/dist/google/api/annotations.js +0 -2
  263. package/dist/google/api/http.d.ts +0 -1049
  264. package/dist/google/api/http.js +0 -332
  265. package/dist/google/bundle.d.ts +0 -525
  266. package/dist/google/bundle.js +0 -50
  267. package/dist/google/protobuf/any.d.ts +0 -358
  268. package/dist/google/protobuf/any.js +0 -77
  269. package/dist/google/protobuf/descriptor.d.ts +0 -3178
  270. package/dist/google/protobuf/descriptor.js +0 -4886
  271. package/dist/google/protobuf/duration.d.ts +0 -223
  272. package/dist/google/protobuf/duration.js +0 -74
  273. package/dist/google/protobuf/timestamp.d.ts +0 -314
  274. package/dist/google/protobuf/timestamp.js +0 -71
  275. package/dist/helpers.d.ts +0 -82
  276. package/dist/helpers.js +0 -144
  277. package/dist/ibc/applications/transfer/v1/query.d.ts +0 -479
  278. package/dist/ibc/applications/transfer/v1/query.js +0 -850
  279. package/dist/ibc/applications/transfer/v1/query.lcd.d.ts +0 -14
  280. package/dist/ibc/applications/transfer/v1/query.lcd.js +0 -74
  281. package/dist/ibc/applications/transfer/v1/query.rpc.Query.d.ts +0 -36
  282. package/dist/ibc/applications/transfer/v1/query.rpc.Query.js +0 -76
  283. package/dist/ibc/applications/transfer/v1/transfer.d.ts +0 -123
  284. package/dist/ibc/applications/transfer/v1/transfer.js +0 -167
  285. package/dist/ibc/applications/transfer/v1/tx.amino.d.ts +0 -8
  286. package/dist/ibc/applications/transfer/v1/tx.amino.js +0 -12
  287. package/dist/ibc/applications/transfer/v1/tx.d.ts +0 -132
  288. package/dist/ibc/applications/transfer/v1/tx.js +0 -229
  289. package/dist/ibc/applications/transfer/v1/tx.registry.d.ts +0 -24
  290. package/dist/ibc/applications/transfer/v1/tx.registry.js +0 -37
  291. package/dist/ibc/applications/transfer/v1/tx.rpc.msg.d.ts +0 -12
  292. package/dist/ibc/applications/transfer/v1/tx.rpc.msg.js +0 -18
  293. package/dist/ibc/bundle.d.ts +0 -450
  294. package/dist/ibc/bundle.js +0 -80
  295. package/dist/ibc/client.d.ts +0 -22
  296. package/dist/ibc/client.js +0 -67
  297. package/dist/ibc/core/client/v1/client.d.ts +0 -408
  298. package/dist/ibc/core/client/v1/client.js +0 -614
  299. package/dist/ibc/rpc.query.d.ts +0 -73
  300. package/dist/ibc/rpc.query.js +0 -67
  301. package/dist/ibc/rpc.tx.d.ts +0 -17
  302. package/dist/ibc/rpc.tx.js +0 -51
  303. package/dist/index.d.ts +0 -18
  304. package/dist/index.js +0 -35
  305. package/dist/package.json +0 -46
  306. package/dist/utf8.d.ts +0 -27
  307. package/dist/utf8.js +0 -141
  308. package/dist/varint.d.ts +0 -105
  309. package/dist/varint.js +0 -426
@@ -1,1049 +0,0 @@
1
- import { BinaryReader, BinaryWriter } from "../../binary";
2
- /**
3
- * Defines the HTTP configuration for an API service. It contains a list of
4
- * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
5
- * to one or more HTTP REST API methods.
6
- */
7
- export interface Http {
8
- /**
9
- * A list of HTTP configuration rules that apply to individual API methods.
10
- *
11
- * **NOTE:** All service configuration rules follow "last one wins" order.
12
- */
13
- rules: HttpRule[];
14
- /**
15
- * When set to true, URL path parameters will be fully URI-decoded except in
16
- * cases of single segment matches in reserved expansion, where "%2F" will be
17
- * left encoded.
18
- *
19
- * The default behavior is to not decode RFC 6570 reserved characters in multi
20
- * segment matches.
21
- */
22
- fullyDecodeReservedExpansion: boolean;
23
- }
24
- export interface HttpProtoMsg {
25
- typeUrl: "/google.api.Http";
26
- value: Uint8Array;
27
- }
28
- /**
29
- * Defines the HTTP configuration for an API service. It contains a list of
30
- * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
31
- * to one or more HTTP REST API methods.
32
- */
33
- export interface HttpAmino {
34
- /**
35
- * A list of HTTP configuration rules that apply to individual API methods.
36
- *
37
- * **NOTE:** All service configuration rules follow "last one wins" order.
38
- */
39
- rules?: HttpRuleAmino[];
40
- /**
41
- * When set to true, URL path parameters will be fully URI-decoded except in
42
- * cases of single segment matches in reserved expansion, where "%2F" will be
43
- * left encoded.
44
- *
45
- * The default behavior is to not decode RFC 6570 reserved characters in multi
46
- * segment matches.
47
- */
48
- fully_decode_reserved_expansion?: boolean;
49
- }
50
- export interface HttpAminoMsg {
51
- type: "/google.api.Http";
52
- value: HttpAmino;
53
- }
54
- /**
55
- * Defines the HTTP configuration for an API service. It contains a list of
56
- * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
57
- * to one or more HTTP REST API methods.
58
- */
59
- export interface HttpSDKType {
60
- rules: HttpRuleSDKType[];
61
- fully_decode_reserved_expansion: boolean;
62
- }
63
- /**
64
- * gRPC Transcoding
65
- *
66
- * gRPC Transcoding is a feature for mapping between a gRPC method and one or
67
- * more HTTP REST endpoints. It allows developers to build a single API service
68
- * that supports both gRPC APIs and REST APIs. Many systems, including [Google
69
- * APIs](https://github.com/googleapis/googleapis),
70
- * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
71
- * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
72
- * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
73
- * and use it for large scale production services.
74
- *
75
- * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
76
- * how different portions of the gRPC request message are mapped to the URL
77
- * path, URL query parameters, and HTTP request body. It also controls how the
78
- * gRPC response message is mapped to the HTTP response body. `HttpRule` is
79
- * typically specified as an `google.api.http` annotation on the gRPC method.
80
- *
81
- * Each mapping specifies a URL path template and an HTTP method. The path
82
- * template may refer to one or more fields in the gRPC request message, as long
83
- * as each field is a non-repeated field with a primitive (non-message) type.
84
- * The path template controls how fields of the request message are mapped to
85
- * the URL path.
86
- *
87
- * Example:
88
- *
89
- * service Messaging {
90
- * rpc GetMessage(GetMessageRequest) returns (Message) {
91
- * option (google.api.http) = {
92
- * get: "/v1/{name=messages/*}"
93
- * };
94
- * }
95
- * }
96
- * message GetMessageRequest {
97
- * string name = 1; // Mapped to URL path.
98
- * }
99
- * message Message {
100
- * string text = 1; // The resource content.
101
- * }
102
- *
103
- * This enables an HTTP REST to gRPC mapping as below:
104
- *
105
- * - HTTP: `GET /v1/messages/123456`
106
- * - gRPC: `GetMessage(name: "messages/123456")`
107
- *
108
- * Any fields in the request message which are not bound by the path template
109
- * automatically become HTTP query parameters if there is no HTTP request body.
110
- * For example:
111
- *
112
- * service Messaging {
113
- * rpc GetMessage(GetMessageRequest) returns (Message) {
114
- * option (google.api.http) = {
115
- * get:"/v1/messages/{message_id}"
116
- * };
117
- * }
118
- * }
119
- * message GetMessageRequest {
120
- * message SubMessage {
121
- * string subfield = 1;
122
- * }
123
- * string message_id = 1; // Mapped to URL path.
124
- * int64 revision = 2; // Mapped to URL query parameter `revision`.
125
- * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
126
- * }
127
- *
128
- * This enables a HTTP JSON to RPC mapping as below:
129
- *
130
- * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
131
- * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
132
- * SubMessage(subfield: "foo"))`
133
- *
134
- * Note that fields which are mapped to URL query parameters must have a
135
- * primitive type or a repeated primitive type or a non-repeated message type.
136
- * In the case of a repeated type, the parameter can be repeated in the URL
137
- * as `...?param=A&param=B`. In the case of a message type, each field of the
138
- * message is mapped to a separate parameter, such as
139
- * `...?foo.a=A&foo.b=B&foo.c=C`.
140
- *
141
- * For HTTP methods that allow a request body, the `body` field
142
- * specifies the mapping. Consider a REST update method on the
143
- * message resource collection:
144
- *
145
- * service Messaging {
146
- * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
147
- * option (google.api.http) = {
148
- * patch: "/v1/messages/{message_id}"
149
- * body: "message"
150
- * };
151
- * }
152
- * }
153
- * message UpdateMessageRequest {
154
- * string message_id = 1; // mapped to the URL
155
- * Message message = 2; // mapped to the body
156
- * }
157
- *
158
- * The following HTTP JSON to RPC mapping is enabled, where the
159
- * representation of the JSON in the request body is determined by
160
- * protos JSON encoding:
161
- *
162
- * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
163
- * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
164
- *
165
- * The special name `*` can be used in the body mapping to define that
166
- * every field not bound by the path template should be mapped to the
167
- * request body. This enables the following alternative definition of
168
- * the update method:
169
- *
170
- * service Messaging {
171
- * rpc UpdateMessage(Message) returns (Message) {
172
- * option (google.api.http) = {
173
- * patch: "/v1/messages/{message_id}"
174
- * body: "*"
175
- * };
176
- * }
177
- * }
178
- * message Message {
179
- * string message_id = 1;
180
- * string text = 2;
181
- * }
182
- *
183
- *
184
- * The following HTTP JSON to RPC mapping is enabled:
185
- *
186
- * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
187
- * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
188
- *
189
- * Note that when using `*` in the body mapping, it is not possible to
190
- * have HTTP parameters, as all fields not bound by the path end in
191
- * the body. This makes this option more rarely used in practice when
192
- * defining REST APIs. The common usage of `*` is in custom methods
193
- * which don't use the URL at all for transferring data.
194
- *
195
- * It is possible to define multiple HTTP methods for one RPC by using
196
- * the `additional_bindings` option. Example:
197
- *
198
- * service Messaging {
199
- * rpc GetMessage(GetMessageRequest) returns (Message) {
200
- * option (google.api.http) = {
201
- * get: "/v1/messages/{message_id}"
202
- * additional_bindings {
203
- * get: "/v1/users/{user_id}/messages/{message_id}"
204
- * }
205
- * };
206
- * }
207
- * }
208
- * message GetMessageRequest {
209
- * string message_id = 1;
210
- * string user_id = 2;
211
- * }
212
- *
213
- * This enables the following two alternative HTTP JSON to RPC mappings:
214
- *
215
- * - HTTP: `GET /v1/messages/123456`
216
- * - gRPC: `GetMessage(message_id: "123456")`
217
- *
218
- * - HTTP: `GET /v1/users/me/messages/123456`
219
- * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
220
- *
221
- * Rules for HTTP mapping
222
- *
223
- * 1. Leaf request fields (recursive expansion nested messages in the request
224
- * message) are classified into three categories:
225
- * - Fields referred by the path template. They are passed via the URL path.
226
- * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
227
- * are passed via the HTTP
228
- * request body.
229
- * - All other fields are passed via the URL query parameters, and the
230
- * parameter name is the field path in the request message. A repeated
231
- * field can be represented as multiple query parameters under the same
232
- * name.
233
- * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
234
- * query parameter, all fields
235
- * are passed via URL path and HTTP request body.
236
- * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
237
- * request body, all
238
- * fields are passed via URL path and URL query parameters.
239
- *
240
- * Path template syntax
241
- *
242
- * Template = "/" Segments [ Verb ] ;
243
- * Segments = Segment { "/" Segment } ;
244
- * Segment = "*" | "**" | LITERAL | Variable ;
245
- * Variable = "{" FieldPath [ "=" Segments ] "}" ;
246
- * FieldPath = IDENT { "." IDENT } ;
247
- * Verb = ":" LITERAL ;
248
- *
249
- * The syntax `*` matches a single URL path segment. The syntax `**` matches
250
- * zero or more URL path segments, which must be the last part of the URL path
251
- * except the `Verb`.
252
- *
253
- * The syntax `Variable` matches part of the URL path as specified by its
254
- * template. A variable template must not contain other variables. If a variable
255
- * matches a single path segment, its template may be omitted, e.g. `{var}`
256
- * is equivalent to `{var=*}`.
257
- *
258
- * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
259
- * contains any reserved character, such characters should be percent-encoded
260
- * before the matching.
261
- *
262
- * If a variable contains exactly one path segment, such as `"{var}"` or
263
- * `"{var=*}"`, when such a variable is expanded into a URL path on the client
264
- * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
265
- * server side does the reverse decoding. Such variables show up in the
266
- * [Discovery
267
- * Document](https://developers.google.com/discovery/v1/reference/apis) as
268
- * `{var}`.
269
- *
270
- * If a variable contains multiple path segments, such as `"{var=foo/*}"`
271
- * or `"{var=**}"`, when such a variable is expanded into a URL path on the
272
- * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
273
- * The server side does the reverse decoding, except "%2F" and "%2f" are left
274
- * unchanged. Such variables show up in the
275
- * [Discovery
276
- * Document](https://developers.google.com/discovery/v1/reference/apis) as
277
- * `{+var}`.
278
- *
279
- * Using gRPC API Service Configuration
280
- *
281
- * gRPC API Service Configuration (service config) is a configuration language
282
- * for configuring a gRPC service to become a user-facing product. The
283
- * service config is simply the YAML representation of the `google.api.Service`
284
- * proto message.
285
- *
286
- * As an alternative to annotating your proto file, you can configure gRPC
287
- * transcoding in your service config YAML files. You do this by specifying a
288
- * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
289
- * effect as the proto annotation. This can be particularly useful if you
290
- * have a proto that is reused in multiple services. Note that any transcoding
291
- * specified in the service config will override any matching transcoding
292
- * configuration in the proto.
293
- *
294
- * The following example selects a gRPC method and applies an `HttpRule` to it:
295
- *
296
- * http:
297
- * rules:
298
- * - selector: example.v1.Messaging.GetMessage
299
- * get: /v1/messages/{message_id}/{sub.subfield}
300
- *
301
- * Special notes
302
- *
303
- * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
304
- * proto to JSON conversion must follow the [proto3
305
- * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
306
- *
307
- * While the single segment variable follows the semantics of
308
- * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
309
- * Expansion, the multi segment variable **does not** follow RFC 6570 Section
310
- * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
311
- * does not expand special characters like `?` and `#`, which would lead
312
- * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
313
- * for multi segment variables.
314
- *
315
- * The path variables **must not** refer to any repeated or mapped field,
316
- * because client libraries are not capable of handling such variable expansion.
317
- *
318
- * The path variables **must not** capture the leading "/" character. The reason
319
- * is that the most common use case "{var}" does not capture the leading "/"
320
- * character. For consistency, all path variables must share the same behavior.
321
- *
322
- * Repeated message fields must not be mapped to URL query parameters, because
323
- * no client library can support such complicated mapping.
324
- *
325
- * If an API needs to use a JSON array for request or response body, it can map
326
- * the request or response body to a repeated field. However, some gRPC
327
- * Transcoding implementations may not support this feature.
328
- */
329
- export interface HttpRule {
330
- /**
331
- * Selects a method to which this rule applies.
332
- *
333
- * Refer to [selector][google.api.DocumentationRule.selector] for syntax
334
- * details.
335
- */
336
- selector: string;
337
- /**
338
- * Maps to HTTP GET. Used for listing and getting information about
339
- * resources.
340
- */
341
- get?: string;
342
- /** Maps to HTTP PUT. Used for replacing a resource. */
343
- put?: string;
344
- /** Maps to HTTP POST. Used for creating a resource or performing an action. */
345
- post?: string;
346
- /** Maps to HTTP DELETE. Used for deleting a resource. */
347
- delete?: string;
348
- /** Maps to HTTP PATCH. Used for updating a resource. */
349
- patch?: string;
350
- /**
351
- * The custom pattern is used for specifying an HTTP method that is not
352
- * included in the `pattern` field, such as HEAD, or "*" to leave the
353
- * HTTP method unspecified for this rule. The wild-card rule is useful
354
- * for services that provide content to Web (HTML) clients.
355
- */
356
- custom?: CustomHttpPattern;
357
- /**
358
- * The name of the request field whose value is mapped to the HTTP request
359
- * body, or `*` for mapping all request fields not captured by the path
360
- * pattern to the HTTP body, or omitted for not having any HTTP request body.
361
- *
362
- * NOTE: the referred field must be present at the top-level of the request
363
- * message type.
364
- */
365
- body: string;
366
- /**
367
- * Optional. The name of the response field whose value is mapped to the HTTP
368
- * response body. When omitted, the entire response message will be used
369
- * as the HTTP response body.
370
- *
371
- * NOTE: The referred field must be present at the top-level of the response
372
- * message type.
373
- */
374
- responseBody: string;
375
- /**
376
- * Additional HTTP bindings for the selector. Nested bindings must
377
- * not contain an `additional_bindings` field themselves (that is,
378
- * the nesting may only be one level deep).
379
- */
380
- additionalBindings: HttpRule[];
381
- }
382
- export interface HttpRuleProtoMsg {
383
- typeUrl: "/google.api.HttpRule";
384
- value: Uint8Array;
385
- }
386
- /**
387
- * gRPC Transcoding
388
- *
389
- * gRPC Transcoding is a feature for mapping between a gRPC method and one or
390
- * more HTTP REST endpoints. It allows developers to build a single API service
391
- * that supports both gRPC APIs and REST APIs. Many systems, including [Google
392
- * APIs](https://github.com/googleapis/googleapis),
393
- * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
394
- * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
395
- * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
396
- * and use it for large scale production services.
397
- *
398
- * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
399
- * how different portions of the gRPC request message are mapped to the URL
400
- * path, URL query parameters, and HTTP request body. It also controls how the
401
- * gRPC response message is mapped to the HTTP response body. `HttpRule` is
402
- * typically specified as an `google.api.http` annotation on the gRPC method.
403
- *
404
- * Each mapping specifies a URL path template and an HTTP method. The path
405
- * template may refer to one or more fields in the gRPC request message, as long
406
- * as each field is a non-repeated field with a primitive (non-message) type.
407
- * The path template controls how fields of the request message are mapped to
408
- * the URL path.
409
- *
410
- * Example:
411
- *
412
- * service Messaging {
413
- * rpc GetMessage(GetMessageRequest) returns (Message) {
414
- * option (google.api.http) = {
415
- * get: "/v1/{name=messages/*}"
416
- * };
417
- * }
418
- * }
419
- * message GetMessageRequest {
420
- * string name = 1; // Mapped to URL path.
421
- * }
422
- * message Message {
423
- * string text = 1; // The resource content.
424
- * }
425
- *
426
- * This enables an HTTP REST to gRPC mapping as below:
427
- *
428
- * - HTTP: `GET /v1/messages/123456`
429
- * - gRPC: `GetMessage(name: "messages/123456")`
430
- *
431
- * Any fields in the request message which are not bound by the path template
432
- * automatically become HTTP query parameters if there is no HTTP request body.
433
- * For example:
434
- *
435
- * service Messaging {
436
- * rpc GetMessage(GetMessageRequest) returns (Message) {
437
- * option (google.api.http) = {
438
- * get:"/v1/messages/{message_id}"
439
- * };
440
- * }
441
- * }
442
- * message GetMessageRequest {
443
- * message SubMessage {
444
- * string subfield = 1;
445
- * }
446
- * string message_id = 1; // Mapped to URL path.
447
- * int64 revision = 2; // Mapped to URL query parameter `revision`.
448
- * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
449
- * }
450
- *
451
- * This enables a HTTP JSON to RPC mapping as below:
452
- *
453
- * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
454
- * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
455
- * SubMessage(subfield: "foo"))`
456
- *
457
- * Note that fields which are mapped to URL query parameters must have a
458
- * primitive type or a repeated primitive type or a non-repeated message type.
459
- * In the case of a repeated type, the parameter can be repeated in the URL
460
- * as `...?param=A&param=B`. In the case of a message type, each field of the
461
- * message is mapped to a separate parameter, such as
462
- * `...?foo.a=A&foo.b=B&foo.c=C`.
463
- *
464
- * For HTTP methods that allow a request body, the `body` field
465
- * specifies the mapping. Consider a REST update method on the
466
- * message resource collection:
467
- *
468
- * service Messaging {
469
- * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
470
- * option (google.api.http) = {
471
- * patch: "/v1/messages/{message_id}"
472
- * body: "message"
473
- * };
474
- * }
475
- * }
476
- * message UpdateMessageRequest {
477
- * string message_id = 1; // mapped to the URL
478
- * Message message = 2; // mapped to the body
479
- * }
480
- *
481
- * The following HTTP JSON to RPC mapping is enabled, where the
482
- * representation of the JSON in the request body is determined by
483
- * protos JSON encoding:
484
- *
485
- * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
486
- * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
487
- *
488
- * The special name `*` can be used in the body mapping to define that
489
- * every field not bound by the path template should be mapped to the
490
- * request body. This enables the following alternative definition of
491
- * the update method:
492
- *
493
- * service Messaging {
494
- * rpc UpdateMessage(Message) returns (Message) {
495
- * option (google.api.http) = {
496
- * patch: "/v1/messages/{message_id}"
497
- * body: "*"
498
- * };
499
- * }
500
- * }
501
- * message Message {
502
- * string message_id = 1;
503
- * string text = 2;
504
- * }
505
- *
506
- *
507
- * The following HTTP JSON to RPC mapping is enabled:
508
- *
509
- * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
510
- * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
511
- *
512
- * Note that when using `*` in the body mapping, it is not possible to
513
- * have HTTP parameters, as all fields not bound by the path end in
514
- * the body. This makes this option more rarely used in practice when
515
- * defining REST APIs. The common usage of `*` is in custom methods
516
- * which don't use the URL at all for transferring data.
517
- *
518
- * It is possible to define multiple HTTP methods for one RPC by using
519
- * the `additional_bindings` option. Example:
520
- *
521
- * service Messaging {
522
- * rpc GetMessage(GetMessageRequest) returns (Message) {
523
- * option (google.api.http) = {
524
- * get: "/v1/messages/{message_id}"
525
- * additional_bindings {
526
- * get: "/v1/users/{user_id}/messages/{message_id}"
527
- * }
528
- * };
529
- * }
530
- * }
531
- * message GetMessageRequest {
532
- * string message_id = 1;
533
- * string user_id = 2;
534
- * }
535
- *
536
- * This enables the following two alternative HTTP JSON to RPC mappings:
537
- *
538
- * - HTTP: `GET /v1/messages/123456`
539
- * - gRPC: `GetMessage(message_id: "123456")`
540
- *
541
- * - HTTP: `GET /v1/users/me/messages/123456`
542
- * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
543
- *
544
- * Rules for HTTP mapping
545
- *
546
- * 1. Leaf request fields (recursive expansion nested messages in the request
547
- * message) are classified into three categories:
548
- * - Fields referred by the path template. They are passed via the URL path.
549
- * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
550
- * are passed via the HTTP
551
- * request body.
552
- * - All other fields are passed via the URL query parameters, and the
553
- * parameter name is the field path in the request message. A repeated
554
- * field can be represented as multiple query parameters under the same
555
- * name.
556
- * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
557
- * query parameter, all fields
558
- * are passed via URL path and HTTP request body.
559
- * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
560
- * request body, all
561
- * fields are passed via URL path and URL query parameters.
562
- *
563
- * Path template syntax
564
- *
565
- * Template = "/" Segments [ Verb ] ;
566
- * Segments = Segment { "/" Segment } ;
567
- * Segment = "*" | "**" | LITERAL | Variable ;
568
- * Variable = "{" FieldPath [ "=" Segments ] "}" ;
569
- * FieldPath = IDENT { "." IDENT } ;
570
- * Verb = ":" LITERAL ;
571
- *
572
- * The syntax `*` matches a single URL path segment. The syntax `**` matches
573
- * zero or more URL path segments, which must be the last part of the URL path
574
- * except the `Verb`.
575
- *
576
- * The syntax `Variable` matches part of the URL path as specified by its
577
- * template. A variable template must not contain other variables. If a variable
578
- * matches a single path segment, its template may be omitted, e.g. `{var}`
579
- * is equivalent to `{var=*}`.
580
- *
581
- * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
582
- * contains any reserved character, such characters should be percent-encoded
583
- * before the matching.
584
- *
585
- * If a variable contains exactly one path segment, such as `"{var}"` or
586
- * `"{var=*}"`, when such a variable is expanded into a URL path on the client
587
- * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
588
- * server side does the reverse decoding. Such variables show up in the
589
- * [Discovery
590
- * Document](https://developers.google.com/discovery/v1/reference/apis) as
591
- * `{var}`.
592
- *
593
- * If a variable contains multiple path segments, such as `"{var=foo/*}"`
594
- * or `"{var=**}"`, when such a variable is expanded into a URL path on the
595
- * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
596
- * The server side does the reverse decoding, except "%2F" and "%2f" are left
597
- * unchanged. Such variables show up in the
598
- * [Discovery
599
- * Document](https://developers.google.com/discovery/v1/reference/apis) as
600
- * `{+var}`.
601
- *
602
- * Using gRPC API Service Configuration
603
- *
604
- * gRPC API Service Configuration (service config) is a configuration language
605
- * for configuring a gRPC service to become a user-facing product. The
606
- * service config is simply the YAML representation of the `google.api.Service`
607
- * proto message.
608
- *
609
- * As an alternative to annotating your proto file, you can configure gRPC
610
- * transcoding in your service config YAML files. You do this by specifying a
611
- * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
612
- * effect as the proto annotation. This can be particularly useful if you
613
- * have a proto that is reused in multiple services. Note that any transcoding
614
- * specified in the service config will override any matching transcoding
615
- * configuration in the proto.
616
- *
617
- * The following example selects a gRPC method and applies an `HttpRule` to it:
618
- *
619
- * http:
620
- * rules:
621
- * - selector: example.v1.Messaging.GetMessage
622
- * get: /v1/messages/{message_id}/{sub.subfield}
623
- *
624
- * Special notes
625
- *
626
- * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
627
- * proto to JSON conversion must follow the [proto3
628
- * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
629
- *
630
- * While the single segment variable follows the semantics of
631
- * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
632
- * Expansion, the multi segment variable **does not** follow RFC 6570 Section
633
- * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
634
- * does not expand special characters like `?` and `#`, which would lead
635
- * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
636
- * for multi segment variables.
637
- *
638
- * The path variables **must not** refer to any repeated or mapped field,
639
- * because client libraries are not capable of handling such variable expansion.
640
- *
641
- * The path variables **must not** capture the leading "/" character. The reason
642
- * is that the most common use case "{var}" does not capture the leading "/"
643
- * character. For consistency, all path variables must share the same behavior.
644
- *
645
- * Repeated message fields must not be mapped to URL query parameters, because
646
- * no client library can support such complicated mapping.
647
- *
648
- * If an API needs to use a JSON array for request or response body, it can map
649
- * the request or response body to a repeated field. However, some gRPC
650
- * Transcoding implementations may not support this feature.
651
- */
652
- export interface HttpRuleAmino {
653
- /**
654
- * Selects a method to which this rule applies.
655
- *
656
- * Refer to [selector][google.api.DocumentationRule.selector] for syntax
657
- * details.
658
- */
659
- selector?: string;
660
- /**
661
- * Maps to HTTP GET. Used for listing and getting information about
662
- * resources.
663
- */
664
- get?: string;
665
- /** Maps to HTTP PUT. Used for replacing a resource. */
666
- put?: string;
667
- /** Maps to HTTP POST. Used for creating a resource or performing an action. */
668
- post?: string;
669
- /** Maps to HTTP DELETE. Used for deleting a resource. */
670
- delete?: string;
671
- /** Maps to HTTP PATCH. Used for updating a resource. */
672
- patch?: string;
673
- /**
674
- * The custom pattern is used for specifying an HTTP method that is not
675
- * included in the `pattern` field, such as HEAD, or "*" to leave the
676
- * HTTP method unspecified for this rule. The wild-card rule is useful
677
- * for services that provide content to Web (HTML) clients.
678
- */
679
- custom?: CustomHttpPatternAmino;
680
- /**
681
- * The name of the request field whose value is mapped to the HTTP request
682
- * body, or `*` for mapping all request fields not captured by the path
683
- * pattern to the HTTP body, or omitted for not having any HTTP request body.
684
- *
685
- * NOTE: the referred field must be present at the top-level of the request
686
- * message type.
687
- */
688
- body?: string;
689
- /**
690
- * Optional. The name of the response field whose value is mapped to the HTTP
691
- * response body. When omitted, the entire response message will be used
692
- * as the HTTP response body.
693
- *
694
- * NOTE: The referred field must be present at the top-level of the response
695
- * message type.
696
- */
697
- response_body?: string;
698
- /**
699
- * Additional HTTP bindings for the selector. Nested bindings must
700
- * not contain an `additional_bindings` field themselves (that is,
701
- * the nesting may only be one level deep).
702
- */
703
- additional_bindings?: HttpRuleAmino[];
704
- }
705
- export interface HttpRuleAminoMsg {
706
- type: "/google.api.HttpRule";
707
- value: HttpRuleAmino;
708
- }
709
- /**
710
- * gRPC Transcoding
711
- *
712
- * gRPC Transcoding is a feature for mapping between a gRPC method and one or
713
- * more HTTP REST endpoints. It allows developers to build a single API service
714
- * that supports both gRPC APIs and REST APIs. Many systems, including [Google
715
- * APIs](https://github.com/googleapis/googleapis),
716
- * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
717
- * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
718
- * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
719
- * and use it for large scale production services.
720
- *
721
- * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
722
- * how different portions of the gRPC request message are mapped to the URL
723
- * path, URL query parameters, and HTTP request body. It also controls how the
724
- * gRPC response message is mapped to the HTTP response body. `HttpRule` is
725
- * typically specified as an `google.api.http` annotation on the gRPC method.
726
- *
727
- * Each mapping specifies a URL path template and an HTTP method. The path
728
- * template may refer to one or more fields in the gRPC request message, as long
729
- * as each field is a non-repeated field with a primitive (non-message) type.
730
- * The path template controls how fields of the request message are mapped to
731
- * the URL path.
732
- *
733
- * Example:
734
- *
735
- * service Messaging {
736
- * rpc GetMessage(GetMessageRequest) returns (Message) {
737
- * option (google.api.http) = {
738
- * get: "/v1/{name=messages/*}"
739
- * };
740
- * }
741
- * }
742
- * message GetMessageRequest {
743
- * string name = 1; // Mapped to URL path.
744
- * }
745
- * message Message {
746
- * string text = 1; // The resource content.
747
- * }
748
- *
749
- * This enables an HTTP REST to gRPC mapping as below:
750
- *
751
- * - HTTP: `GET /v1/messages/123456`
752
- * - gRPC: `GetMessage(name: "messages/123456")`
753
- *
754
- * Any fields in the request message which are not bound by the path template
755
- * automatically become HTTP query parameters if there is no HTTP request body.
756
- * For example:
757
- *
758
- * service Messaging {
759
- * rpc GetMessage(GetMessageRequest) returns (Message) {
760
- * option (google.api.http) = {
761
- * get:"/v1/messages/{message_id}"
762
- * };
763
- * }
764
- * }
765
- * message GetMessageRequest {
766
- * message SubMessage {
767
- * string subfield = 1;
768
- * }
769
- * string message_id = 1; // Mapped to URL path.
770
- * int64 revision = 2; // Mapped to URL query parameter `revision`.
771
- * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
772
- * }
773
- *
774
- * This enables a HTTP JSON to RPC mapping as below:
775
- *
776
- * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
777
- * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
778
- * SubMessage(subfield: "foo"))`
779
- *
780
- * Note that fields which are mapped to URL query parameters must have a
781
- * primitive type or a repeated primitive type or a non-repeated message type.
782
- * In the case of a repeated type, the parameter can be repeated in the URL
783
- * as `...?param=A&param=B`. In the case of a message type, each field of the
784
- * message is mapped to a separate parameter, such as
785
- * `...?foo.a=A&foo.b=B&foo.c=C`.
786
- *
787
- * For HTTP methods that allow a request body, the `body` field
788
- * specifies the mapping. Consider a REST update method on the
789
- * message resource collection:
790
- *
791
- * service Messaging {
792
- * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
793
- * option (google.api.http) = {
794
- * patch: "/v1/messages/{message_id}"
795
- * body: "message"
796
- * };
797
- * }
798
- * }
799
- * message UpdateMessageRequest {
800
- * string message_id = 1; // mapped to the URL
801
- * Message message = 2; // mapped to the body
802
- * }
803
- *
804
- * The following HTTP JSON to RPC mapping is enabled, where the
805
- * representation of the JSON in the request body is determined by
806
- * protos JSON encoding:
807
- *
808
- * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
809
- * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
810
- *
811
- * The special name `*` can be used in the body mapping to define that
812
- * every field not bound by the path template should be mapped to the
813
- * request body. This enables the following alternative definition of
814
- * the update method:
815
- *
816
- * service Messaging {
817
- * rpc UpdateMessage(Message) returns (Message) {
818
- * option (google.api.http) = {
819
- * patch: "/v1/messages/{message_id}"
820
- * body: "*"
821
- * };
822
- * }
823
- * }
824
- * message Message {
825
- * string message_id = 1;
826
- * string text = 2;
827
- * }
828
- *
829
- *
830
- * The following HTTP JSON to RPC mapping is enabled:
831
- *
832
- * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
833
- * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
834
- *
835
- * Note that when using `*` in the body mapping, it is not possible to
836
- * have HTTP parameters, as all fields not bound by the path end in
837
- * the body. This makes this option more rarely used in practice when
838
- * defining REST APIs. The common usage of `*` is in custom methods
839
- * which don't use the URL at all for transferring data.
840
- *
841
- * It is possible to define multiple HTTP methods for one RPC by using
842
- * the `additional_bindings` option. Example:
843
- *
844
- * service Messaging {
845
- * rpc GetMessage(GetMessageRequest) returns (Message) {
846
- * option (google.api.http) = {
847
- * get: "/v1/messages/{message_id}"
848
- * additional_bindings {
849
- * get: "/v1/users/{user_id}/messages/{message_id}"
850
- * }
851
- * };
852
- * }
853
- * }
854
- * message GetMessageRequest {
855
- * string message_id = 1;
856
- * string user_id = 2;
857
- * }
858
- *
859
- * This enables the following two alternative HTTP JSON to RPC mappings:
860
- *
861
- * - HTTP: `GET /v1/messages/123456`
862
- * - gRPC: `GetMessage(message_id: "123456")`
863
- *
864
- * - HTTP: `GET /v1/users/me/messages/123456`
865
- * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
866
- *
867
- * Rules for HTTP mapping
868
- *
869
- * 1. Leaf request fields (recursive expansion nested messages in the request
870
- * message) are classified into three categories:
871
- * - Fields referred by the path template. They are passed via the URL path.
872
- * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
873
- * are passed via the HTTP
874
- * request body.
875
- * - All other fields are passed via the URL query parameters, and the
876
- * parameter name is the field path in the request message. A repeated
877
- * field can be represented as multiple query parameters under the same
878
- * name.
879
- * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
880
- * query parameter, all fields
881
- * are passed via URL path and HTTP request body.
882
- * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
883
- * request body, all
884
- * fields are passed via URL path and URL query parameters.
885
- *
886
- * Path template syntax
887
- *
888
- * Template = "/" Segments [ Verb ] ;
889
- * Segments = Segment { "/" Segment } ;
890
- * Segment = "*" | "**" | LITERAL | Variable ;
891
- * Variable = "{" FieldPath [ "=" Segments ] "}" ;
892
- * FieldPath = IDENT { "." IDENT } ;
893
- * Verb = ":" LITERAL ;
894
- *
895
- * The syntax `*` matches a single URL path segment. The syntax `**` matches
896
- * zero or more URL path segments, which must be the last part of the URL path
897
- * except the `Verb`.
898
- *
899
- * The syntax `Variable` matches part of the URL path as specified by its
900
- * template. A variable template must not contain other variables. If a variable
901
- * matches a single path segment, its template may be omitted, e.g. `{var}`
902
- * is equivalent to `{var=*}`.
903
- *
904
- * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
905
- * contains any reserved character, such characters should be percent-encoded
906
- * before the matching.
907
- *
908
- * If a variable contains exactly one path segment, such as `"{var}"` or
909
- * `"{var=*}"`, when such a variable is expanded into a URL path on the client
910
- * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
911
- * server side does the reverse decoding. Such variables show up in the
912
- * [Discovery
913
- * Document](https://developers.google.com/discovery/v1/reference/apis) as
914
- * `{var}`.
915
- *
916
- * If a variable contains multiple path segments, such as `"{var=foo/*}"`
917
- * or `"{var=**}"`, when such a variable is expanded into a URL path on the
918
- * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
919
- * The server side does the reverse decoding, except "%2F" and "%2f" are left
920
- * unchanged. Such variables show up in the
921
- * [Discovery
922
- * Document](https://developers.google.com/discovery/v1/reference/apis) as
923
- * `{+var}`.
924
- *
925
- * Using gRPC API Service Configuration
926
- *
927
- * gRPC API Service Configuration (service config) is a configuration language
928
- * for configuring a gRPC service to become a user-facing product. The
929
- * service config is simply the YAML representation of the `google.api.Service`
930
- * proto message.
931
- *
932
- * As an alternative to annotating your proto file, you can configure gRPC
933
- * transcoding in your service config YAML files. You do this by specifying a
934
- * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
935
- * effect as the proto annotation. This can be particularly useful if you
936
- * have a proto that is reused in multiple services. Note that any transcoding
937
- * specified in the service config will override any matching transcoding
938
- * configuration in the proto.
939
- *
940
- * The following example selects a gRPC method and applies an `HttpRule` to it:
941
- *
942
- * http:
943
- * rules:
944
- * - selector: example.v1.Messaging.GetMessage
945
- * get: /v1/messages/{message_id}/{sub.subfield}
946
- *
947
- * Special notes
948
- *
949
- * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
950
- * proto to JSON conversion must follow the [proto3
951
- * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
952
- *
953
- * While the single segment variable follows the semantics of
954
- * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
955
- * Expansion, the multi segment variable **does not** follow RFC 6570 Section
956
- * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
957
- * does not expand special characters like `?` and `#`, which would lead
958
- * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
959
- * for multi segment variables.
960
- *
961
- * The path variables **must not** refer to any repeated or mapped field,
962
- * because client libraries are not capable of handling such variable expansion.
963
- *
964
- * The path variables **must not** capture the leading "/" character. The reason
965
- * is that the most common use case "{var}" does not capture the leading "/"
966
- * character. For consistency, all path variables must share the same behavior.
967
- *
968
- * Repeated message fields must not be mapped to URL query parameters, because
969
- * no client library can support such complicated mapping.
970
- *
971
- * If an API needs to use a JSON array for request or response body, it can map
972
- * the request or response body to a repeated field. However, some gRPC
973
- * Transcoding implementations may not support this feature.
974
- */
975
- export interface HttpRuleSDKType {
976
- selector: string;
977
- get?: string;
978
- put?: string;
979
- post?: string;
980
- delete?: string;
981
- patch?: string;
982
- custom?: CustomHttpPatternSDKType;
983
- body: string;
984
- response_body: string;
985
- additional_bindings: HttpRuleSDKType[];
986
- }
987
- /** A custom pattern is used for defining custom HTTP verb. */
988
- export interface CustomHttpPattern {
989
- /** The name of this custom HTTP verb. */
990
- kind: string;
991
- /** The path matched by this custom verb. */
992
- path: string;
993
- }
994
- export interface CustomHttpPatternProtoMsg {
995
- typeUrl: "/google.api.CustomHttpPattern";
996
- value: Uint8Array;
997
- }
998
- /** A custom pattern is used for defining custom HTTP verb. */
999
- export interface CustomHttpPatternAmino {
1000
- /** The name of this custom HTTP verb. */
1001
- kind?: string;
1002
- /** The path matched by this custom verb. */
1003
- path?: string;
1004
- }
1005
- export interface CustomHttpPatternAminoMsg {
1006
- type: "/google.api.CustomHttpPattern";
1007
- value: CustomHttpPatternAmino;
1008
- }
1009
- /** A custom pattern is used for defining custom HTTP verb. */
1010
- export interface CustomHttpPatternSDKType {
1011
- kind: string;
1012
- path: string;
1013
- }
1014
- export declare const Http: {
1015
- typeUrl: string;
1016
- encode(message: Http, writer?: BinaryWriter): BinaryWriter;
1017
- decode(input: BinaryReader | Uint8Array, length?: number): Http;
1018
- fromPartial(object: Partial<Http>): Http;
1019
- fromAmino(object: HttpAmino): Http;
1020
- toAmino(message: Http): HttpAmino;
1021
- fromAminoMsg(object: HttpAminoMsg): Http;
1022
- fromProtoMsg(message: HttpProtoMsg): Http;
1023
- toProto(message: Http): Uint8Array;
1024
- toProtoMsg(message: Http): HttpProtoMsg;
1025
- };
1026
- export declare const HttpRule: {
1027
- typeUrl: string;
1028
- encode(message: HttpRule, writer?: BinaryWriter): BinaryWriter;
1029
- decode(input: BinaryReader | Uint8Array, length?: number): HttpRule;
1030
- fromPartial(object: Partial<HttpRule>): HttpRule;
1031
- fromAmino(object: HttpRuleAmino): HttpRule;
1032
- toAmino(message: HttpRule): HttpRuleAmino;
1033
- fromAminoMsg(object: HttpRuleAminoMsg): HttpRule;
1034
- fromProtoMsg(message: HttpRuleProtoMsg): HttpRule;
1035
- toProto(message: HttpRule): Uint8Array;
1036
- toProtoMsg(message: HttpRule): HttpRuleProtoMsg;
1037
- };
1038
- export declare const CustomHttpPattern: {
1039
- typeUrl: string;
1040
- encode(message: CustomHttpPattern, writer?: BinaryWriter): BinaryWriter;
1041
- decode(input: BinaryReader | Uint8Array, length?: number): CustomHttpPattern;
1042
- fromPartial(object: Partial<CustomHttpPattern>): CustomHttpPattern;
1043
- fromAmino(object: CustomHttpPatternAmino): CustomHttpPattern;
1044
- toAmino(message: CustomHttpPattern): CustomHttpPatternAmino;
1045
- fromAminoMsg(object: CustomHttpPatternAminoMsg): CustomHttpPattern;
1046
- fromProtoMsg(message: CustomHttpPatternProtoMsg): CustomHttpPattern;
1047
- toProto(message: CustomHttpPattern): Uint8Array;
1048
- toProtoMsg(message: CustomHttpPattern): CustomHttpPatternProtoMsg;
1049
- };