@canton-network/core-ledger-client 0.8.0 → 0.10.0

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 (231) hide show
  1. package/dist/generated-clients/openapi-3.4.0-SNAPSHOT.d.ts +5563 -0
  2. package/dist/generated-clients/openapi-3.4.0-SNAPSHOT.d.ts.map +1 -0
  3. package/dist/generated-clients/openapi-3.4.0-SNAPSHOT.js +5 -0
  4. package/dist/index.d.ts +2 -10
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +1 -9
  7. package/dist/ledger-client.d.ts +22 -12
  8. package/dist/ledger-client.d.ts.map +1 -1
  9. package/dist/ledger-client.js +68 -24
  10. package/dist/token-standard-service.d.ts +8 -0
  11. package/dist/token-standard-service.d.ts.map +1 -1
  12. package/dist/token-standard-service.js +28 -0
  13. package/dist/txparse/parser.d.ts.map +1 -1
  14. package/dist/txparse/parser.js +7 -4
  15. package/dist/txparse/parser.test.js +2 -1
  16. package/dist/txparse/types.d.ts +9 -9
  17. package/dist/txparse/types.d.ts.map +1 -1
  18. package/package.json +5 -5
  19. package/dist/_proto/com/daml/ledger/api/v2/admin/command_inspection_service.client.d.ts +0 -58
  20. package/dist/_proto/com/daml/ledger/api/v2/admin/command_inspection_service.client.d.ts.map +0 -1
  21. package/dist/_proto/com/daml/ledger/api/v2/admin/command_inspection_service.client.js +0 -34
  22. package/dist/_proto/com/daml/ledger/api/v2/admin/command_inspection_service.d.ts +0 -232
  23. package/dist/_proto/com/daml/ledger/api/v2/admin/command_inspection_service.d.ts.map +0 -1
  24. package/dist/_proto/com/daml/ledger/api/v2/admin/command_inspection_service.js +0 -560
  25. package/dist/_proto/com/daml/ledger/api/v2/admin/identity_provider_config_service.client.d.ts +0 -144
  26. package/dist/_proto/com/daml/ledger/api/v2/admin/identity_provider_config_service.client.d.ts.map +0 -1
  27. package/dist/_proto/com/daml/ledger/api/v2/admin/identity_provider_config_service.client.js +0 -85
  28. package/dist/_proto/com/daml/ledger/api/v2/admin/identity_provider_config_service.d.ts +0 -291
  29. package/dist/_proto/com/daml/ledger/api/v2/admin/identity_provider_config_service.d.ts.map +0 -1
  30. package/dist/_proto/com/daml/ledger/api/v2/admin/identity_provider_config_service.js +0 -663
  31. package/dist/_proto/com/daml/ledger/api/v2/admin/object_meta.d.ts +0 -76
  32. package/dist/_proto/com/daml/ledger/api/v2/admin/object_meta.d.ts.map +0 -1
  33. package/dist/_proto/com/daml/ledger/api/v2/admin/object_meta.js +0 -96
  34. package/dist/_proto/com/daml/ledger/api/v2/admin/package_management_service.client.d.ts +0 -106
  35. package/dist/_proto/com/daml/ledger/api/v2/admin/package_management_service.client.d.ts.map +0 -1
  36. package/dist/_proto/com/daml/ledger/api/v2/admin/package_management_service.client.js +0 -62
  37. package/dist/_proto/com/daml/ledger/api/v2/admin/package_management_service.d.ts +0 -199
  38. package/dist/_proto/com/daml/ledger/api/v2/admin/package_management_service.d.ts.map +0 -1
  39. package/dist/_proto/com/daml/ledger/api/v2/admin/package_management_service.js +0 -427
  40. package/dist/_proto/com/daml/ledger/api/v2/admin/participant_pruning_service.client.d.ts +0 -56
  41. package/dist/_proto/com/daml/ledger/api/v2/admin/participant_pruning_service.client.d.ts.map +0 -1
  42. package/dist/_proto/com/daml/ledger/api/v2/admin/participant_pruning_service.client.js +0 -35
  43. package/dist/_proto/com/daml/ledger/api/v2/admin/participant_pruning_service.d.ts +0 -81
  44. package/dist/_proto/com/daml/ledger/api/v2/admin/participant_pruning_service.d.ts.map +0 -1
  45. package/dist/_proto/com/daml/ledger/api/v2/admin/participant_pruning_service.js +0 -135
  46. package/dist/_proto/com/daml/ledger/api/v2/admin/party_management_service.client.d.ts +0 -196
  47. package/dist/_proto/com/daml/ledger/api/v2/admin/party_management_service.client.d.ts.map +0 -1
  48. package/dist/_proto/com/daml/ledger/api/v2/admin/party_management_service.client.js +0 -113
  49. package/dist/_proto/com/daml/ledger/api/v2/admin/party_management_service.d.ts +0 -413
  50. package/dist/_proto/com/daml/ledger/api/v2/admin/party_management_service.d.ts.map +0 -1
  51. package/dist/_proto/com/daml/ledger/api/v2/admin/party_management_service.js +0 -867
  52. package/dist/_proto/com/daml/ledger/api/v2/admin/user_management_service.client.d.ts +0 -210
  53. package/dist/_proto/com/daml/ledger/api/v2/admin/user_management_service.client.d.ts.map +0 -1
  54. package/dist/_proto/com/daml/ledger/api/v2/admin/user_management_service.client.js +0 -126
  55. package/dist/_proto/com/daml/ledger/api/v2/admin/user_management_service.d.ts +0 -758
  56. package/dist/_proto/com/daml/ledger/api/v2/admin/user_management_service.d.ts.map +0 -1
  57. package/dist/_proto/com/daml/ledger/api/v2/admin/user_management_service.js +0 -1580
  58. package/dist/_proto/com/daml/ledger/api/v2/command_completion_service.client.d.ts +0 -66
  59. package/dist/_proto/com/daml/ledger/api/v2/command_completion_service.client.d.ts.map +0 -1
  60. package/dist/_proto/com/daml/ledger/api/v2/command_completion_service.client.js +0 -38
  61. package/dist/_proto/com/daml/ledger/api/v2/command_completion_service.d.ts +0 -90
  62. package/dist/_proto/com/daml/ledger/api/v2/command_completion_service.d.ts.map +0 -1
  63. package/dist/_proto/com/daml/ledger/api/v2/command_completion_service.js +0 -178
  64. package/dist/_proto/com/daml/ledger/api/v2/command_service.client.d.ts +0 -99
  65. package/dist/_proto/com/daml/ledger/api/v2/command_service.client.d.ts.map +0 -1
  66. package/dist/_proto/com/daml/ledger/api/v2/command_service.client.js +0 -61
  67. package/dist/_proto/com/daml/ledger/api/v2/command_service.d.ts +0 -210
  68. package/dist/_proto/com/daml/ledger/api/v2/command_service.d.ts.map +0 -1
  69. package/dist/_proto/com/daml/ledger/api/v2/command_service.js +0 -436
  70. package/dist/_proto/com/daml/ledger/api/v2/command_submission_service.client.d.ts +0 -80
  71. package/dist/_proto/com/daml/ledger/api/v2/command_submission_service.client.d.ts.map +0 -1
  72. package/dist/_proto/com/daml/ledger/api/v2/command_submission_service.client.js +0 -47
  73. package/dist/_proto/com/daml/ledger/api/v2/command_submission_service.d.ts +0 -91
  74. package/dist/_proto/com/daml/ledger/api/v2/command_submission_service.d.ts.map +0 -1
  75. package/dist/_proto/com/daml/ledger/api/v2/command_submission_service.js +0 -200
  76. package/dist/_proto/com/daml/ledger/api/v2/commands.d.ts +0 -491
  77. package/dist/_proto/com/daml/ledger/api/v2/commands.d.ts.map +0 -1
  78. package/dist/_proto/com/daml/ledger/api/v2/commands.js +0 -828
  79. package/dist/_proto/com/daml/ledger/api/v2/completion.d.ts +0 -149
  80. package/dist/_proto/com/daml/ledger/api/v2/completion.d.ts.map +0 -1
  81. package/dist/_proto/com/daml/ledger/api/v2/completion.js +0 -196
  82. package/dist/_proto/com/daml/ledger/api/v2/event.d.ts +0 -495
  83. package/dist/_proto/com/daml/ledger/api/v2/event.d.ts.map +0 -1
  84. package/dist/_proto/com/daml/ledger/api/v2/event.js +0 -723
  85. package/dist/_proto/com/daml/ledger/api/v2/event_query_service.client.d.ts +0 -52
  86. package/dist/_proto/com/daml/ledger/api/v2/event_query_service.client.d.ts.map +0 -1
  87. package/dist/_proto/com/daml/ledger/api/v2/event_query_service.client.js +0 -31
  88. package/dist/_proto/com/daml/ledger/api/v2/event_query_service.d.ts +0 -150
  89. package/dist/_proto/com/daml/ledger/api/v2/event_query_service.d.ts.map +0 -1
  90. package/dist/_proto/com/daml/ledger/api/v2/event_query_service.js +0 -291
  91. package/dist/_proto/com/daml/ledger/api/v2/experimental_features.d.ts +0 -96
  92. package/dist/_proto/com/daml/ledger/api/v2/experimental_features.d.ts.map +0 -1
  93. package/dist/_proto/com/daml/ledger/api/v2/experimental_features.js +0 -225
  94. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_common_data.d.ts +0 -43
  95. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_common_data.d.ts.map +0 -1
  96. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_common_data.js +0 -85
  97. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_service.client.d.ts +0 -100
  98. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_service.client.d.ts.map +0 -1
  99. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_service.client.js +0 -59
  100. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_service.d.ts +0 -877
  101. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_service.d.ts.map +0 -1
  102. package/dist/_proto/com/daml/ledger/api/v2/interactive/interactive_submission_service.js +0 -1768
  103. package/dist/_proto/com/daml/ledger/api/v2/interactive/transaction/v1/interactive_submission_data.d.ts +0 -259
  104. package/dist/_proto/com/daml/ledger/api/v2/interactive/transaction/v1/interactive_submission_data.d.ts.map +0 -1
  105. package/dist/_proto/com/daml/ledger/api/v2/interactive/transaction/v1/interactive_submission_data.js +0 -667
  106. package/dist/_proto/com/daml/ledger/api/v2/offset_checkpoint.d.ts +0 -69
  107. package/dist/_proto/com/daml/ledger/api/v2/offset_checkpoint.d.ts.map +0 -1
  108. package/dist/_proto/com/daml/ledger/api/v2/offset_checkpoint.js +0 -133
  109. package/dist/_proto/com/daml/ledger/api/v2/package_reference.d.ts +0 -41
  110. package/dist/_proto/com/daml/ledger/api/v2/package_reference.d.ts.map +0 -1
  111. package/dist/_proto/com/daml/ledger/api/v2/package_reference.js +0 -84
  112. package/dist/_proto/com/daml/ledger/api/v2/package_service.client.d.ts +0 -68
  113. package/dist/_proto/com/daml/ledger/api/v2/package_service.client.d.ts.map +0 -1
  114. package/dist/_proto/com/daml/ledger/api/v2/package_service.client.js +0 -43
  115. package/dist/_proto/com/daml/ledger/api/v2/package_service.d.ts +0 -181
  116. package/dist/_proto/com/daml/ledger/api/v2/package_service.d.ts.map +0 -1
  117. package/dist/_proto/com/daml/ledger/api/v2/package_service.js +0 -395
  118. package/dist/_proto/com/daml/ledger/api/v2/reassignment.d.ts +0 -308
  119. package/dist/_proto/com/daml/ledger/api/v2/reassignment.d.ts.map +0 -1
  120. package/dist/_proto/com/daml/ledger/api/v2/reassignment.js +0 -521
  121. package/dist/_proto/com/daml/ledger/api/v2/reassignment_commands.d.ts +0 -193
  122. package/dist/_proto/com/daml/ledger/api/v2/reassignment_commands.d.ts.map +0 -1
  123. package/dist/_proto/com/daml/ledger/api/v2/reassignment_commands.js +0 -350
  124. package/dist/_proto/com/daml/ledger/api/v2/state_service.client.d.ts +0 -91
  125. package/dist/_proto/com/daml/ledger/api/v2/state_service.client.d.ts.map +0 -1
  126. package/dist/_proto/com/daml/ledger/api/v2/state_service.client.js +0 -56
  127. package/dist/_proto/com/daml/ledger/api/v2/state_service.d.ts +0 -448
  128. package/dist/_proto/com/daml/ledger/api/v2/state_service.d.ts.map +0 -1
  129. package/dist/_proto/com/daml/ledger/api/v2/state_service.js +0 -874
  130. package/dist/_proto/com/daml/ledger/api/v2/testing/time_service.client.d.ts +0 -54
  131. package/dist/_proto/com/daml/ledger/api/v2/testing/time_service.client.d.ts.map +0 -1
  132. package/dist/_proto/com/daml/ledger/api/v2/testing/time_service.client.js +0 -34
  133. package/dist/_proto/com/daml/ledger/api/v2/testing/time_service.d.ts +0 -78
  134. package/dist/_proto/com/daml/ledger/api/v2/testing/time_service.d.ts.map +0 -1
  135. package/dist/_proto/com/daml/ledger/api/v2/testing/time_service.js +0 -168
  136. package/dist/_proto/com/daml/ledger/api/v2/topology_transaction.d.ts +0 -211
  137. package/dist/_proto/com/daml/ledger/api/v2/topology_transaction.d.ts.map +0 -1
  138. package/dist/_proto/com/daml/ledger/api/v2/topology_transaction.js +0 -447
  139. package/dist/_proto/com/daml/ledger/api/v2/trace_context.d.ts +0 -33
  140. package/dist/_proto/com/daml/ledger/api/v2/trace_context.d.ts.map +0 -1
  141. package/dist/_proto/com/daml/ledger/api/v2/trace_context.js +0 -69
  142. package/dist/_proto/com/daml/ledger/api/v2/transaction.d.ts +0 -252
  143. package/dist/_proto/com/daml/ledger/api/v2/transaction.d.ts.map +0 -1
  144. package/dist/_proto/com/daml/ledger/api/v2/transaction.js +0 -410
  145. package/dist/_proto/com/daml/ledger/api/v2/transaction_filter.d.ts +0 -453
  146. package/dist/_proto/com/daml/ledger/api/v2/transaction_filter.d.ts.map +0 -1
  147. package/dist/_proto/com/daml/ledger/api/v2/transaction_filter.js +0 -815
  148. package/dist/_proto/com/daml/ledger/api/v2/update_service.client.d.ts +0 -199
  149. package/dist/_proto/com/daml/ledger/api/v2/update_service.client.d.ts.map +0 -1
  150. package/dist/_proto/com/daml/ledger/api/v2/update_service.client.js +0 -121
  151. package/dist/_proto/com/daml/ledger/api/v2/update_service.d.ts +0 -424
  152. package/dist/_proto/com/daml/ledger/api/v2/update_service.d.ts.map +0 -1
  153. package/dist/_proto/com/daml/ledger/api/v2/update_service.js +0 -853
  154. package/dist/_proto/com/daml/ledger/api/v2/value.d.ts +0 -500
  155. package/dist/_proto/com/daml/ledger/api/v2/value.d.ts.map +0 -1
  156. package/dist/_proto/com/daml/ledger/api/v2/value.js +0 -937
  157. package/dist/_proto/com/daml/ledger/api/v2/version_service.client.d.ts +0 -40
  158. package/dist/_proto/com/daml/ledger/api/v2/version_service.client.d.ts.map +0 -1
  159. package/dist/_proto/com/daml/ledger/api/v2/version_service.client.js +0 -25
  160. package/dist/_proto/com/daml/ledger/api/v2/version_service.d.ts +0 -190
  161. package/dist/_proto/com/daml/ledger/api/v2/version_service.d.ts.map +0 -1
  162. package/dist/_proto/com/daml/ledger/api/v2/version_service.js +0 -400
  163. package/dist/_proto/com/digitalasset/canton/crypto/v30/crypto.d.ts +0 -1028
  164. package/dist/_proto/com/digitalasset/canton/crypto/v30/crypto.d.ts.map +0 -1
  165. package/dist/_proto/com/digitalasset/canton/crypto/v30/crypto.js +0 -2110
  166. package/dist/_proto/com/digitalasset/canton/protocol/v30/sequencing_parameters.d.ts +0 -30
  167. package/dist/_proto/com/digitalasset/canton/protocol/v30/sequencing_parameters.d.ts.map +0 -1
  168. package/dist/_proto/com/digitalasset/canton/protocol/v30/sequencing_parameters.js +0 -62
  169. package/dist/_proto/com/digitalasset/canton/protocol/v30/synchronizer_parameters.d.ts +0 -168
  170. package/dist/_proto/com/digitalasset/canton/protocol/v30/synchronizer_parameters.d.ts.map +0 -1
  171. package/dist/_proto/com/digitalasset/canton/protocol/v30/synchronizer_parameters.js +0 -395
  172. package/dist/_proto/com/digitalasset/canton/protocol/v30/topology.d.ts +0 -1105
  173. package/dist/_proto/com/digitalasset/canton/protocol/v30/topology.d.ts.map +0 -1
  174. package/dist/_proto/com/digitalasset/canton/protocol/v30/topology.js +0 -2294
  175. package/dist/_proto/com/digitalasset/canton/protocol/v30/traffic_control_parameters.d.ts +0 -278
  176. package/dist/_proto/com/digitalasset/canton/protocol/v30/traffic_control_parameters.d.ts.map +0 -1
  177. package/dist/_proto/com/digitalasset/canton/protocol/v30/traffic_control_parameters.js +0 -654
  178. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/common.d.ts +0 -166
  179. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/common.d.ts.map +0 -1
  180. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/common.js +0 -379
  181. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.client.d.ts +0 -199
  182. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.client.d.ts.map +0 -1
  183. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.client.js +0 -136
  184. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.d.ts +0 -1195
  185. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.d.ts.map +0 -1
  186. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js +0 -3342
  187. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_write_service.client.d.ts +0 -119
  188. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_write_service.client.d.ts.map +0 -1
  189. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_write_service.client.js +0 -76
  190. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_write_service.d.ts +0 -607
  191. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_write_service.d.ts.map +0 -1
  192. package/dist/_proto/com/digitalasset/canton/topology/admin/v30/topology_manager_write_service.js +0 -1292
  193. package/dist/_proto/google/protobuf/any.d.ts +0 -177
  194. package/dist/_proto/google/protobuf/any.d.ts.map +0 -1
  195. package/dist/_proto/google/protobuf/any.js +0 -175
  196. package/dist/_proto/google/protobuf/descriptor.d.ts +0 -1638
  197. package/dist/_proto/google/protobuf/descriptor.d.ts.map +0 -1
  198. package/dist/_proto/google/protobuf/descriptor.js +0 -2999
  199. package/dist/_proto/google/protobuf/duration.d.ts +0 -114
  200. package/dist/_proto/google/protobuf/duration.d.ts.map +0 -1
  201. package/dist/_proto/google/protobuf/duration.js +0 -113
  202. package/dist/_proto/google/protobuf/empty.d.ts +0 -33
  203. package/dist/_proto/google/protobuf/empty.d.ts.map +0 -1
  204. package/dist/_proto/google/protobuf/empty.js +0 -41
  205. package/dist/_proto/google/protobuf/field_mask.d.ts +0 -240
  206. package/dist/_proto/google/protobuf/field_mask.d.ts.map +0 -1
  207. package/dist/_proto/google/protobuf/field_mask.js +0 -95
  208. package/dist/_proto/google/protobuf/struct.d.ts +0 -187
  209. package/dist/_proto/google/protobuf/struct.d.ts.map +0 -1
  210. package/dist/_proto/google/protobuf/struct.js +0 -417
  211. package/dist/_proto/google/protobuf/timestamp.d.ts +0 -159
  212. package/dist/_proto/google/protobuf/timestamp.d.ts.map +0 -1
  213. package/dist/_proto/google/protobuf/timestamp.js +0 -157
  214. package/dist/_proto/google/rpc/code.d.ts +0 -219
  215. package/dist/_proto/google/rpc/code.d.ts.map +0 -1
  216. package/dist/_proto/google/rpc/code.js +0 -237
  217. package/dist/_proto/google/rpc/context/attribute_context.d.ts +0 -594
  218. package/dist/_proto/google/rpc/context/attribute_context.d.ts.map +0 -1
  219. package/dist/_proto/google/rpc/context/attribute_context.js +0 -1007
  220. package/dist/_proto/google/rpc/context/audit_context.d.ts +0 -62
  221. package/dist/_proto/google/rpc/context/audit_context.d.ts.map +0 -1
  222. package/dist/_proto/google/rpc/context/audit_context.js +0 -111
  223. package/dist/_proto/google/rpc/error_details.d.ts +0 -549
  224. package/dist/_proto/google/rpc/error_details.d.ts.map +0 -1
  225. package/dist/_proto/google/rpc/error_details.js +0 -918
  226. package/dist/_proto/google/rpc/status.d.ts +0 -55
  227. package/dist/_proto/google/rpc/status.d.ts.map +0 -1
  228. package/dist/_proto/google/rpc/status.js +0 -79
  229. package/dist/_proto/scalapb/scalapb.d.ts +0 -779
  230. package/dist/_proto/scalapb/scalapb.d.ts.map +0 -1
  231. package/dist/_proto/scalapb/scalapb.js +0 -1658
@@ -1,177 +0,0 @@
1
- import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
2
- import type { IBinaryWriter } from '@protobuf-ts/runtime';
3
- import type { IBinaryReader } from '@protobuf-ts/runtime';
4
- import type { PartialMessage } from '@protobuf-ts/runtime';
5
- import type { JsonValue } from '@protobuf-ts/runtime';
6
- import type { JsonReadOptions } from '@protobuf-ts/runtime';
7
- import type { JsonWriteOptions } from '@protobuf-ts/runtime';
8
- import type { BinaryReadOptions } from '@protobuf-ts/runtime';
9
- import type { IMessageType } from '@protobuf-ts/runtime';
10
- import { MessageType } from '@protobuf-ts/runtime';
11
- /**
12
- * `Any` contains an arbitrary serialized protocol buffer message along with a
13
- * URL that describes the type of the serialized message.
14
- *
15
- * Protobuf library provides support to pack/unpack Any values in the form
16
- * of utility functions or additional generated methods of the Any type.
17
- *
18
- * Example 1: Pack and unpack a message in C++.
19
- *
20
- * Foo foo = ...;
21
- * Any any;
22
- * any.PackFrom(foo);
23
- * ...
24
- * if (any.UnpackTo(&foo)) {
25
- * ...
26
- * }
27
- *
28
- * Example 2: Pack and unpack a message in Java.
29
- *
30
- * Foo foo = ...;
31
- * Any any = Any.pack(foo);
32
- * ...
33
- * if (any.is(Foo.class)) {
34
- * foo = any.unpack(Foo.class);
35
- * }
36
- *
37
- * Example 3: Pack and unpack a message in Python.
38
- *
39
- * foo = Foo(...)
40
- * any = Any()
41
- * any.Pack(foo)
42
- * ...
43
- * if any.Is(Foo.DESCRIPTOR):
44
- * any.Unpack(foo)
45
- * ...
46
- *
47
- * Example 4: Pack and unpack a message in Go
48
- *
49
- * foo := &pb.Foo{...}
50
- * any, err := anypb.New(foo)
51
- * if err != nil {
52
- * ...
53
- * }
54
- * ...
55
- * foo := &pb.Foo{}
56
- * if err := any.UnmarshalTo(foo); err != nil {
57
- * ...
58
- * }
59
- *
60
- * The pack methods provided by protobuf library will by default use
61
- * 'type.googleapis.com/full.type.name' as the type URL and the unpack
62
- * methods only use the fully qualified type name after the last '/'
63
- * in the type URL, for example "foo.bar.com/x/y.z" will yield type
64
- * name "y.z".
65
- *
66
- *
67
- * JSON
68
- * ====
69
- * The JSON representation of an `Any` value uses the regular
70
- * representation of the deserialized, embedded message, with an
71
- * additional field `@type` which contains the type URL. Example:
72
- *
73
- * package google.profile;
74
- * message Person {
75
- * string first_name = 1;
76
- * string last_name = 2;
77
- * }
78
- *
79
- * {
80
- * "@type": "type.googleapis.com/google.profile.Person",
81
- * "firstName": <string>,
82
- * "lastName": <string>
83
- * }
84
- *
85
- * If the embedded message type is well-known and has a custom JSON
86
- * representation, that representation will be embedded adding a field
87
- * `value` which holds the custom JSON in addition to the `@type`
88
- * field. Example (for message [google.protobuf.Duration][]):
89
- *
90
- * {
91
- * "@type": "type.googleapis.com/google.protobuf.Duration",
92
- * "value": "1.212s"
93
- * }
94
- *
95
- *
96
- * @generated from protobuf message google.protobuf.Any
97
- */
98
- export interface Any {
99
- /**
100
- * A URL/resource name that uniquely identifies the type of the serialized
101
- * protocol buffer message. This string must contain at least
102
- * one "/" character. The last segment of the URL's path must represent
103
- * the fully qualified name of the type (as in
104
- * `path/google.protobuf.Duration`). The name should be in a canonical form
105
- * (e.g., leading "." is not accepted).
106
- *
107
- * In practice, teams usually precompile into the binary all types that they
108
- * expect it to use in the context of Any. However, for URLs which use the
109
- * scheme `http`, `https`, or no scheme, one can optionally set up a type
110
- * server that maps type URLs to message definitions as follows:
111
- *
112
- * * If no scheme is provided, `https` is assumed.
113
- * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
114
- * value in binary format, or produce an error.
115
- * * Applications are allowed to cache lookup results based on the
116
- * URL, or have them precompiled into a binary to avoid any
117
- * lookup. Therefore, binary compatibility needs to be preserved
118
- * on changes to types. (Use versioned type names to manage
119
- * breaking changes.)
120
- *
121
- * Note: this functionality is not currently available in the official
122
- * protobuf release, and it is not used for type URLs beginning with
123
- * type.googleapis.com.
124
- *
125
- * Schemes other than `http`, `https` (or the empty scheme) might be
126
- * used with implementation specific semantics.
127
- *
128
- *
129
- * @generated from protobuf field: string type_url = 1
130
- */
131
- typeUrl: string;
132
- /**
133
- * Must be a valid serialized protocol buffer of the above specified type.
134
- *
135
- * @generated from protobuf field: bytes value = 2
136
- */
137
- value: Uint8Array;
138
- }
139
- declare class Any$Type extends MessageType<Any> {
140
- constructor();
141
- /**
142
- * Pack the message into a new `Any`.
143
- *
144
- * Uses 'type.googleapis.com/full.type.name' as the type URL.
145
- */
146
- pack<T extends object>(message: T, type: IMessageType<T>): Any;
147
- /**
148
- * Unpack the message from the `Any`.
149
- */
150
- unpack<T extends object>(any: Any, type: IMessageType<T>, options?: Partial<BinaryReadOptions>): T;
151
- /**
152
- * Does the given `Any` contain a packed message of the given type?
153
- */
154
- contains(any: Any, type: IMessageType<any> | string): boolean;
155
- /**
156
- * Convert the message to canonical JSON value.
157
- *
158
- * You have to provide the `typeRegistry` option so that the
159
- * packed message can be converted to JSON.
160
- *
161
- * The `typeRegistry` option is also required to read
162
- * `google.protobuf.Any` from JSON format.
163
- */
164
- internalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue;
165
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any;
166
- typeNameToUrl(name: string): string;
167
- typeUrlToName(url: string): string;
168
- create(value?: PartialMessage<Any>): Any;
169
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Any): Any;
170
- internalBinaryWrite(message: Any, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
171
- }
172
- /**
173
- * @generated MessageType for protobuf message google.protobuf.Any
174
- */
175
- export declare const Any: Any$Type;
176
- export {};
177
- //# sourceMappingURL=any.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any.d.ts","sourceRoot":"","sources":["../../../../src/_proto/google/protobuf/any.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAI1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,MAAM,WAAW,GAAG;IAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,KAAK,EAAE,UAAU,CAAA;CACpB;AAED,cAAM,QAAS,SAAQ,WAAW,CAAC,GAAG,CAAC;;IAiBnC;;;;OAIG;IACH,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,GAAG;IAM9D;;OAEG;IACH,MAAM,CAAC,CAAC,SAAS,MAAM,EACnB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EACrB,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACrC,CAAC;IAWJ;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,OAAO;IAM7D;;;;;;;;OAQG;IACH,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,gBAAgB,GAAG,SAAS;IAoBjE,gBAAgB,CACZ,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,eAAe,EACxB,MAAM,CAAC,EAAE,GAAG,GACb,GAAG;IAiCN,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAOlC,MAAM,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,GAAG;IAQxC,kBAAkB,CACd,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,GAAG,GACb,GAAG;IA+BN,mBAAmB,CACf,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,kBAAkB,GAC5B,aAAa;CAgBnB;AACD;;GAEG;AACH,eAAO,MAAM,GAAG,UAAiB,CAAA"}
@@ -1,175 +0,0 @@
1
- import { WireType } from '@protobuf-ts/runtime';
2
- import { UnknownFieldHandler } from '@protobuf-ts/runtime';
3
- import { reflectionMergePartial } from '@protobuf-ts/runtime';
4
- import { isJsonObject } from '@protobuf-ts/runtime';
5
- import { typeofJsonValue } from '@protobuf-ts/runtime';
6
- import { jsonWriteOptions } from '@protobuf-ts/runtime';
7
- import { MessageType } from '@protobuf-ts/runtime';
8
- // @generated message type with reflection information, may provide speed optimized methods
9
- class Any$Type extends MessageType {
10
- constructor() {
11
- super('google.protobuf.Any', [
12
- {
13
- no: 1,
14
- name: 'type_url',
15
- kind: 'scalar',
16
- T: 9 /*ScalarType.STRING*/,
17
- },
18
- {
19
- no: 2,
20
- name: 'value',
21
- kind: 'scalar',
22
- T: 12 /*ScalarType.BYTES*/,
23
- },
24
- ]);
25
- }
26
- /**
27
- * Pack the message into a new `Any`.
28
- *
29
- * Uses 'type.googleapis.com/full.type.name' as the type URL.
30
- */
31
- pack(message, type) {
32
- return {
33
- typeUrl: this.typeNameToUrl(type.typeName),
34
- value: type.toBinary(message),
35
- };
36
- }
37
- /**
38
- * Unpack the message from the `Any`.
39
- */
40
- unpack(any, type, options) {
41
- if (!this.contains(any, type))
42
- throw new Error("Cannot unpack google.protobuf.Any with typeUrl '" +
43
- any.typeUrl +
44
- "' as " +
45
- type.typeName +
46
- '.');
47
- return type.fromBinary(any.value, options);
48
- }
49
- /**
50
- * Does the given `Any` contain a packed message of the given type?
51
- */
52
- contains(any, type) {
53
- if (!any.typeUrl.length)
54
- return false;
55
- let wants = typeof type == 'string' ? type : type.typeName;
56
- let has = this.typeUrlToName(any.typeUrl);
57
- return wants === has;
58
- }
59
- /**
60
- * Convert the message to canonical JSON value.
61
- *
62
- * You have to provide the `typeRegistry` option so that the
63
- * packed message can be converted to JSON.
64
- *
65
- * The `typeRegistry` option is also required to read
66
- * `google.protobuf.Any` from JSON format.
67
- */
68
- internalJsonWrite(any, options) {
69
- if (any.typeUrl === '')
70
- return {};
71
- let typeName = this.typeUrlToName(any.typeUrl);
72
- let opt = jsonWriteOptions(options);
73
- let type = opt.typeRegistry?.find((t) => t.typeName === typeName);
74
- if (!type)
75
- throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" +
76
- any.typeUrl +
77
- "' to JSON. The specified type " +
78
- typeName +
79
- ' is not available in the type registry.');
80
- let value = type.fromBinary(any.value, { readUnknownField: false });
81
- let json = type.internalJsonWrite(value, opt);
82
- if (typeName.startsWith('google.protobuf.') || !isJsonObject(json))
83
- json = { value: json };
84
- json['@type'] = any.typeUrl;
85
- return json;
86
- }
87
- internalJsonRead(json, options, target) {
88
- if (!isJsonObject(json))
89
- throw new globalThis.Error('Unable to parse google.protobuf.Any from JSON ' +
90
- typeofJsonValue(json) +
91
- '.');
92
- if (typeof json['@type'] != 'string' || json['@type'] == '')
93
- return this.create();
94
- let typeName = this.typeUrlToName(json['@type']);
95
- let type = options?.typeRegistry?.find((t) => t.typeName == typeName);
96
- if (!type)
97
- throw new globalThis.Error('Unable to parse google.protobuf.Any from JSON. The specified type ' +
98
- typeName +
99
- ' is not available in the type registry.');
100
- let value;
101
- if (typeName.startsWith('google.protobuf.') &&
102
- json.hasOwnProperty('value'))
103
- value = type.fromJson(json['value'], options);
104
- else {
105
- let copy = Object.assign({}, json);
106
- delete copy['@type'];
107
- value = type.fromJson(copy, options);
108
- }
109
- if (target === undefined)
110
- target = this.create();
111
- target.typeUrl = json['@type'];
112
- target.value = type.toBinary(value);
113
- return target;
114
- }
115
- typeNameToUrl(name) {
116
- if (!name.length)
117
- throw new Error('invalid type name: ' + name);
118
- return 'type.googleapis.com/' + name;
119
- }
120
- typeUrlToName(url) {
121
- if (!url.length)
122
- throw new Error('invalid type url: ' + url);
123
- let slash = url.lastIndexOf('/');
124
- let name = slash > 0 ? url.substring(slash + 1) : url;
125
- if (!name.length)
126
- throw new Error('invalid type url: ' + url);
127
- return name;
128
- }
129
- create(value) {
130
- const message = globalThis.Object.create(this.messagePrototype);
131
- message.typeUrl = '';
132
- message.value = new Uint8Array(0);
133
- if (value !== undefined)
134
- reflectionMergePartial(this, message, value);
135
- return message;
136
- }
137
- internalBinaryRead(reader, length, options, target) {
138
- let message = target ?? this.create(), end = reader.pos + length;
139
- while (reader.pos < end) {
140
- let [fieldNo, wireType] = reader.tag();
141
- switch (fieldNo) {
142
- case /* string type_url */ 1:
143
- message.typeUrl = reader.string();
144
- break;
145
- case /* bytes value */ 2:
146
- message.value = reader.bytes();
147
- break;
148
- default:
149
- let u = options.readUnknownField;
150
- if (u === 'throw')
151
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
152
- let d = reader.skip(wireType);
153
- if (u !== false)
154
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
155
- }
156
- }
157
- return message;
158
- }
159
- internalBinaryWrite(message, writer, options) {
160
- /* string type_url = 1; */
161
- if (message.typeUrl !== '')
162
- writer.tag(1, WireType.LengthDelimited).string(message.typeUrl);
163
- /* bytes value = 2; */
164
- if (message.value.length)
165
- writer.tag(2, WireType.LengthDelimited).bytes(message.value);
166
- let u = options.writeUnknownFields;
167
- if (u !== false)
168
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
169
- return writer;
170
- }
171
- }
172
- /**
173
- * @generated MessageType for protobuf message google.protobuf.Any
174
- */
175
- export const Any = new Any$Type();