@versori/run 0.2.31 → 0.3.0-beta.10

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 (455) hide show
  1. package/{script/deps/jsr.io/@std/fs/1.0.19 → esm/deps/jsr.io/@std/fs/1.0.20}/exists.d.ts.map +1 -1
  2. package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
  3. package/esm/src/connection/DirectConnectionFactory.d.ts +29 -0
  4. package/esm/src/connection/DirectConnectionFactory.d.ts.map +1 -0
  5. package/esm/src/connection/DirectConnectionFactory.js +82 -0
  6. package/esm/src/connection/DynamicFetchFactory.d.ts +30 -0
  7. package/esm/src/connection/DynamicFetchFactory.d.ts.map +1 -0
  8. package/esm/src/connection/DynamicFetchFactory.js +113 -0
  9. package/esm/src/connection/StaticFetchFactory.d.ts +11 -0
  10. package/esm/src/connection/StaticFetchFactory.d.ts.map +1 -0
  11. package/esm/src/connection/StaticFetchFactory.js +35 -0
  12. package/esm/src/connection/internal/CredentialHolder.d.ts +11 -0
  13. package/esm/src/connection/internal/CredentialHolder.d.ts.map +1 -0
  14. package/esm/src/connection/internal/CredentialHolder.js +66 -0
  15. package/esm/src/connection/internal/FetchBuilder.d.ts +15 -0
  16. package/esm/src/connection/internal/FetchBuilder.d.ts.map +1 -0
  17. package/esm/src/connection/internal/FetchBuilder.js +89 -0
  18. package/esm/src/connection/internal/HttpClientFactory.d.ts +14 -0
  19. package/esm/src/connection/internal/HttpClientFactory.d.ts.map +1 -0
  20. package/esm/src/connection/internal/HttpClientFactory.js +42 -0
  21. package/esm/src/connection/internal/InboundConnectionFactory.d.ts +19 -0
  22. package/esm/src/connection/internal/InboundConnectionFactory.d.ts.map +1 -0
  23. package/esm/src/connection/internal/InboundConnectionFactory.js +390 -0
  24. package/esm/src/connection/internal/OutboundConnectionFactory.d.ts +31 -0
  25. package/esm/src/connection/internal/OutboundConnectionFactory.d.ts.map +1 -0
  26. package/esm/src/connection/internal/OutboundConnectionFactory.js +447 -0
  27. package/esm/src/connection/types.d.ts +32 -0
  28. package/esm/src/connection/types.d.ts.map +1 -0
  29. package/esm/src/connection/types.js +1 -0
  30. package/esm/src/context/ActivationImpl.d.ts +18 -0
  31. package/esm/src/context/ActivationImpl.d.ts.map +1 -0
  32. package/esm/src/context/ActivationImpl.js +82 -0
  33. package/esm/src/context/AsyncWorkflow.js +1 -1
  34. package/esm/src/context/Context.d.ts +10 -13
  35. package/esm/src/context/Context.d.ts.map +1 -1
  36. package/esm/src/context/Context.js +21 -19
  37. package/esm/src/context/ContextProvider.d.ts +9 -3
  38. package/esm/src/context/ContextProvider.d.ts.map +1 -1
  39. package/esm/src/context/ContextProvider.js +31 -10
  40. package/esm/src/context/WorkflowClient.d.ts +29 -0
  41. package/esm/src/context/WorkflowClient.d.ts.map +1 -0
  42. package/esm/src/context/WorkflowClient.js +95 -0
  43. package/esm/src/dsl/http/default.d.ts.map +1 -1
  44. package/esm/src/dsl/http/default.js +2 -2
  45. package/esm/src/dsl/http/types.d.ts +9 -4
  46. package/esm/src/dsl/http/types.d.ts.map +1 -1
  47. package/esm/src/dsl/http/versori/configloader.d.ts.map +1 -1
  48. package/esm/src/dsl/http/versori/configloader.js +3 -1
  49. package/esm/src/dsl/http/versori/constants.d.ts.map +1 -1
  50. package/esm/src/dsl/http/versori/constants.js +1 -0
  51. package/esm/src/dsl/http/versori/contextcredentials.d.ts.map +1 -1
  52. package/esm/src/dsl/http/versori/proxyroundtripper.d.ts +5 -3
  53. package/esm/src/dsl/http/versori/proxyroundtripper.d.ts.map +1 -1
  54. package/esm/src/dsl/http/versori/proxyroundtripper.js +31 -8
  55. package/esm/src/dsl/http/versori/webhookmiddleware.d.ts +8 -5
  56. package/esm/src/dsl/http/versori/webhookmiddleware.d.ts.map +1 -1
  57. package/esm/src/dsl/http/versori/webhookmiddleware.js +114 -115
  58. package/esm/src/dsl/tasks/HttpTask.d.ts +8 -6
  59. package/esm/src/dsl/tasks/HttpTask.d.ts.map +1 -1
  60. package/esm/src/dsl/tasks/HttpTask.js +22 -22
  61. package/esm/src/dsl/triggers/DurableTrigger.d.ts +0 -1
  62. package/esm/src/dsl/triggers/DurableTrigger.d.ts.map +1 -1
  63. package/esm/src/internal/InternalAuth.d.ts +14 -0
  64. package/esm/src/internal/InternalAuth.d.ts.map +1 -0
  65. package/esm/src/internal/InternalAuth.js +74 -0
  66. package/esm/src/internal/constants.d.ts +20 -0
  67. package/esm/src/internal/constants.d.ts.map +1 -0
  68. package/esm/src/internal/constants.js +24 -0
  69. package/esm/src/interpreter/durable/DurableInterpreter.d.ts +14 -5
  70. package/esm/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
  71. package/esm/src/interpreter/durable/DurableInterpreter.js +22 -38
  72. package/esm/src/interpreter/durable/ObservableCompiler.d.ts +6 -3
  73. package/esm/src/interpreter/durable/ObservableCompiler.d.ts.map +1 -1
  74. package/esm/src/interpreter/durable/Queue.d.ts +24 -16
  75. package/esm/src/interpreter/durable/Queue.d.ts.map +1 -1
  76. package/esm/src/interpreter/durable/Queue.js +3 -4
  77. package/esm/src/interpreter/durable/compilers/catch.js +2 -2
  78. package/esm/src/interpreter/durable/compilers/durableworkflow.d.ts.map +1 -1
  79. package/esm/src/interpreter/durable/compilers/durableworkflow.js +29 -20
  80. package/esm/src/interpreter/durable/compilers/http.d.ts.map +1 -1
  81. package/esm/src/interpreter/durable/compilers/http.js +26 -9
  82. package/esm/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
  83. package/esm/src/interpreter/durable/compilers/schedule.js +41 -18
  84. package/esm/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
  85. package/esm/src/interpreter/durable/compilers/webhook.js +30 -33
  86. package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +4 -4
  87. package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
  88. package/esm/src/interpreter/memory/MemoryInterpreter.js +15 -25
  89. package/esm/src/interpreter/memory/ObservableCompiler.d.ts +6 -3
  90. package/esm/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
  91. package/esm/src/interpreter/memory/compilers/catch.js +2 -2
  92. package/esm/src/interpreter/memory/compilers/http.d.ts.map +1 -1
  93. package/esm/src/interpreter/memory/compilers/http.js +26 -9
  94. package/esm/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
  95. package/esm/src/interpreter/memory/compilers/schedule.js +34 -18
  96. package/esm/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
  97. package/esm/src/interpreter/memory/compilers/webhook.js +31 -34
  98. package/esm/src/kv/sdk/SDKKeyValue.d.ts.map +1 -1
  99. package/esm/src/kv/sdk/SDKKeyValue.js +7 -1
  100. package/esm/src/services/credentials/credential-v1alpha1.d.ts +4 -0
  101. package/esm/src/services/credentials/credential-v1alpha1.d.ts.map +1 -0
  102. package/esm/src/services/credentials/credential-v1alpha1.js +3 -0
  103. package/esm/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_metadata_pb.d.ts +119 -0
  104. package/esm/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_metadata_pb.d.ts.map +1 -0
  105. package/esm/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_metadata_pb.js +67 -0
  106. package/esm/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_service_pb.d.ts +245 -0
  107. package/esm/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_service_pb.d.ts.map +1 -0
  108. package/esm/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_service_pb.js +44 -0
  109. package/esm/src/services/credentials/generated/versori/credential/oauth2/v1/token_pb.d.ts +38 -0
  110. package/esm/src/services/credentials/generated/versori/credential/oauth2/v1/token_pb.d.ts.map +1 -0
  111. package/esm/src/{dsl/http → services/credentials/generated}/versori/credential/oauth2/v1/token_pb.js +1 -1
  112. package/esm/src/services/credentials/generated/versori/credential/oauth2/v1/token_service_pb.d.ts +471 -0
  113. package/esm/src/services/credentials/generated/versori/credential/oauth2/v1/token_service_pb.d.ts.map +1 -0
  114. package/esm/src/{dsl/http → services/credentials/generated}/versori/credential/oauth2/v1/token_service_pb.js +1 -1
  115. package/esm/src/services/credentials/generated/versori/credential/tokens/v1/token_pb.d.ts +38 -0
  116. package/esm/src/services/credentials/generated/versori/credential/tokens/v1/token_pb.d.ts.map +1 -0
  117. package/esm/src/{dsl/http → services/credentials/generated}/versori/credential/tokens/v1/token_pb.js +1 -1
  118. package/esm/src/services/credentials/generated/versori/credential/tokens/v1/token_service_pb.d.ts +128 -0
  119. package/esm/src/services/credentials/generated/versori/credential/tokens/v1/token_service_pb.d.ts.map +1 -0
  120. package/esm/src/{dsl/http → services/credentials/generated}/versori/credential/tokens/v1/token_service_pb.js +1 -1
  121. package/esm/src/services/credentials/generated/versori/credential/v1alpha1/common_pb.d.ts +90 -0
  122. package/esm/src/services/credentials/generated/versori/credential/v1alpha1/common_pb.d.ts.map +1 -0
  123. package/esm/src/{dsl/http → services/credentials/generated}/versori/credential/v1alpha1/common_pb.js +16 -6
  124. package/esm/src/services/credentials/generated/versori/credential/v1alpha1/credential_pb.d.ts +1468 -0
  125. package/esm/src/services/credentials/generated/versori/credential/v1alpha1/credential_pb.d.ts.map +1 -0
  126. package/esm/src/services/credentials/generated/versori/credential/v1alpha1/credential_pb.js +534 -0
  127. package/esm/src/services/credentials/generated/versori/credential/v1alpha1/credential_service_pb.d.ts +390 -0
  128. package/esm/src/services/credentials/generated/versori/credential/v1alpha1/credential_service_pb.d.ts.map +1 -0
  129. package/esm/src/{dsl/http → services/credentials/generated}/versori/credential/v1alpha1/credential_service_pb.js +1 -1
  130. package/esm/src/services/credentials/isTokenValid.d.ts +3 -0
  131. package/esm/src/services/credentials/isTokenValid.d.ts.map +1 -0
  132. package/esm/src/services/credentials/isTokenValid.js +23 -0
  133. package/esm/src/services/credentials/mod.d.ts +5 -0
  134. package/esm/src/services/credentials/mod.d.ts.map +1 -0
  135. package/esm/src/services/credentials/mod.js +4 -0
  136. package/esm/src/services/credentials/oauth1-v1.d.ts +3 -0
  137. package/esm/src/services/credentials/oauth1-v1.d.ts.map +1 -0
  138. package/esm/src/services/credentials/oauth1-v1.js +2 -0
  139. package/esm/src/services/credentials/oauth2-v1.d.ts +3 -0
  140. package/esm/src/services/credentials/oauth2-v1.d.ts.map +1 -0
  141. package/esm/src/services/credentials/oauth2-v1.js +2 -0
  142. package/esm/src/services/credentials/tokens-v1.d.ts +3 -0
  143. package/esm/src/services/credentials/tokens-v1.d.ts.map +1 -0
  144. package/esm/src/services/credentials/tokens-v1.js +2 -0
  145. package/esm/src/services/platform/PlatformApi.d.ts +7 -0
  146. package/esm/src/services/platform/PlatformApi.d.ts.map +1 -0
  147. package/esm/src/services/platform/PlatformApi.js +25 -0
  148. package/esm/src/services/platform/generated/client/client.gen.d.ts +3 -0
  149. package/esm/src/services/platform/generated/client/client.gen.d.ts.map +1 -0
  150. package/esm/src/services/platform/generated/client/client.gen.js +176 -0
  151. package/esm/src/services/platform/generated/client/index.d.ts +8 -0
  152. package/esm/src/services/platform/generated/client/index.d.ts.map +1 -0
  153. package/esm/src/services/platform/generated/client/index.js +5 -0
  154. package/esm/src/services/platform/generated/client/types.gen.d.ts +125 -0
  155. package/esm/src/services/platform/generated/client/types.gen.d.ts.map +1 -0
  156. package/esm/src/services/platform/generated/client/types.gen.js +2 -0
  157. package/esm/src/services/platform/generated/client/utils.gen.d.ts +39 -0
  158. package/esm/src/services/platform/generated/client/utils.gen.d.ts.map +1 -0
  159. package/esm/src/services/platform/generated/client/utils.gen.js +234 -0
  160. package/esm/src/services/platform/generated/client.gen.d.ts +13 -0
  161. package/esm/src/services/platform/generated/client.gen.d.ts.map +1 -0
  162. package/esm/src/services/platform/generated/client.gen.js +5 -0
  163. package/esm/src/services/platform/generated/core/auth.gen.d.ts +19 -0
  164. package/esm/src/services/platform/generated/core/auth.gen.d.ts.map +1 -0
  165. package/esm/src/services/platform/generated/core/auth.gen.js +14 -0
  166. package/esm/src/services/platform/generated/core/bodySerializer.gen.d.ts +18 -0
  167. package/esm/src/services/platform/generated/core/bodySerializer.gen.d.ts.map +1 -0
  168. package/esm/src/services/platform/generated/core/bodySerializer.gen.js +57 -0
  169. package/esm/src/services/platform/generated/core/params.gen.d.ts +34 -0
  170. package/esm/src/services/platform/generated/core/params.gen.d.ts.map +1 -0
  171. package/esm/src/services/platform/generated/core/params.gen.js +88 -0
  172. package/esm/src/services/platform/generated/core/pathSerializer.gen.d.ts +34 -0
  173. package/esm/src/services/platform/generated/core/pathSerializer.gen.d.ts.map +1 -0
  174. package/esm/src/services/platform/generated/core/pathSerializer.gen.js +114 -0
  175. package/esm/src/services/platform/generated/core/serverSentEvents.gen.d.ts +60 -0
  176. package/esm/src/services/platform/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  177. package/esm/src/services/platform/generated/core/serverSentEvents.gen.js +121 -0
  178. package/esm/src/services/platform/generated/core/types.gen.d.ts +79 -0
  179. package/esm/src/services/platform/generated/core/types.gen.d.ts.map +1 -0
  180. package/esm/src/services/platform/generated/core/types.gen.js +2 -0
  181. package/esm/src/services/platform/generated/core/utils.gen.d.ts +15 -0
  182. package/esm/src/services/platform/generated/core/utils.gen.d.ts.map +1 -0
  183. package/esm/src/services/platform/generated/core/utils.gen.js +69 -0
  184. package/esm/src/services/platform/generated/index.d.ts +3 -0
  185. package/esm/src/services/platform/generated/index.d.ts.map +1 -0
  186. package/esm/src/services/platform/generated/index.js +3 -0
  187. package/esm/src/services/platform/generated/sdk.gen.d.ts +494 -0
  188. package/esm/src/services/platform/generated/sdk.gen.d.ts.map +1 -0
  189. package/esm/src/services/platform/generated/sdk.gen.js +1908 -0
  190. package/esm/src/services/platform/generated/types.gen.d.ts +3798 -0
  191. package/esm/src/services/platform/generated/types.gen.d.ts.map +1 -0
  192. package/esm/src/services/platform/generated/types.gen.js +2 -0
  193. package/esm/src/services/platform/mod.d.ts +5 -0
  194. package/esm/src/services/platform/mod.d.ts.map +1 -0
  195. package/esm/src/services/platform/mod.js +2 -0
  196. package/package.json +4 -4
  197. package/{esm/deps/jsr.io/@std/fs/1.0.19 → script/deps/jsr.io/@std/fs/1.0.20}/exists.d.ts.map +1 -1
  198. package/script/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
  199. package/script/src/connection/DirectConnectionFactory.d.ts +29 -0
  200. package/script/src/connection/DirectConnectionFactory.d.ts.map +1 -0
  201. package/script/src/connection/DirectConnectionFactory.js +86 -0
  202. package/script/src/connection/DynamicFetchFactory.d.ts +30 -0
  203. package/script/src/connection/DynamicFetchFactory.d.ts.map +1 -0
  204. package/script/src/connection/DynamicFetchFactory.js +117 -0
  205. package/script/src/connection/StaticFetchFactory.d.ts +11 -0
  206. package/script/src/connection/StaticFetchFactory.d.ts.map +1 -0
  207. package/script/src/connection/StaticFetchFactory.js +39 -0
  208. package/script/src/connection/internal/CredentialHolder.d.ts +11 -0
  209. package/script/src/connection/internal/CredentialHolder.d.ts.map +1 -0
  210. package/script/src/connection/internal/CredentialHolder.js +71 -0
  211. package/script/src/connection/internal/FetchBuilder.d.ts +15 -0
  212. package/script/src/connection/internal/FetchBuilder.d.ts.map +1 -0
  213. package/script/src/connection/internal/FetchBuilder.js +93 -0
  214. package/script/src/connection/internal/HttpClientFactory.d.ts +14 -0
  215. package/script/src/connection/internal/HttpClientFactory.d.ts.map +1 -0
  216. package/script/src/connection/internal/HttpClientFactory.js +46 -0
  217. package/script/src/connection/internal/InboundConnectionFactory.d.ts +19 -0
  218. package/script/src/connection/internal/InboundConnectionFactory.d.ts.map +1 -0
  219. package/script/src/connection/internal/InboundConnectionFactory.js +394 -0
  220. package/script/src/connection/internal/OutboundConnectionFactory.d.ts +31 -0
  221. package/script/src/connection/internal/OutboundConnectionFactory.d.ts.map +1 -0
  222. package/script/src/connection/internal/OutboundConnectionFactory.js +454 -0
  223. package/script/src/connection/types.d.ts +32 -0
  224. package/script/src/connection/types.d.ts.map +1 -0
  225. package/script/src/connection/types.js +2 -0
  226. package/script/src/context/ActivationImpl.d.ts +18 -0
  227. package/script/src/context/ActivationImpl.d.ts.map +1 -0
  228. package/script/src/context/ActivationImpl.js +86 -0
  229. package/script/src/context/AsyncWorkflow.js +1 -1
  230. package/script/src/context/Context.d.ts +10 -13
  231. package/script/src/context/Context.d.ts.map +1 -1
  232. package/script/src/context/Context.js +21 -19
  233. package/script/src/context/ContextProvider.d.ts +9 -3
  234. package/script/src/context/ContextProvider.d.ts.map +1 -1
  235. package/script/src/context/ContextProvider.js +31 -10
  236. package/script/src/context/WorkflowClient.d.ts +29 -0
  237. package/script/src/context/WorkflowClient.d.ts.map +1 -0
  238. package/script/src/context/WorkflowClient.js +99 -0
  239. package/script/src/dsl/http/default.d.ts.map +1 -1
  240. package/script/src/dsl/http/default.js +2 -2
  241. package/script/src/dsl/http/types.d.ts +9 -4
  242. package/script/src/dsl/http/types.d.ts.map +1 -1
  243. package/script/src/dsl/http/versori/configloader.d.ts.map +1 -1
  244. package/script/src/dsl/http/versori/configloader.js +3 -1
  245. package/script/src/dsl/http/versori/constants.d.ts.map +1 -1
  246. package/script/src/dsl/http/versori/constants.js +1 -0
  247. package/script/src/dsl/http/versori/contextcredentials.d.ts.map +1 -1
  248. package/script/src/dsl/http/versori/proxyroundtripper.d.ts +5 -3
  249. package/script/src/dsl/http/versori/proxyroundtripper.d.ts.map +1 -1
  250. package/script/src/dsl/http/versori/proxyroundtripper.js +31 -8
  251. package/script/src/dsl/http/versori/webhookmiddleware.d.ts +8 -5
  252. package/script/src/dsl/http/versori/webhookmiddleware.d.ts.map +1 -1
  253. package/script/src/dsl/http/versori/webhookmiddleware.js +114 -115
  254. package/script/src/dsl/tasks/HttpTask.d.ts +8 -6
  255. package/script/src/dsl/tasks/HttpTask.d.ts.map +1 -1
  256. package/script/src/dsl/tasks/HttpTask.js +22 -22
  257. package/script/src/dsl/triggers/DurableTrigger.d.ts +0 -1
  258. package/script/src/dsl/triggers/DurableTrigger.d.ts.map +1 -1
  259. package/script/src/internal/InternalAuth.d.ts +14 -0
  260. package/script/src/internal/InternalAuth.d.ts.map +1 -0
  261. package/script/src/internal/InternalAuth.js +78 -0
  262. package/script/src/internal/constants.d.ts +20 -0
  263. package/script/src/internal/constants.d.ts.map +1 -0
  264. package/script/src/internal/constants.js +27 -0
  265. package/script/src/interpreter/durable/DurableInterpreter.d.ts +14 -5
  266. package/script/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
  267. package/script/src/interpreter/durable/DurableInterpreter.js +21 -37
  268. package/script/src/interpreter/durable/ObservableCompiler.d.ts +6 -3
  269. package/script/src/interpreter/durable/ObservableCompiler.d.ts.map +1 -1
  270. package/script/src/interpreter/durable/Queue.d.ts +24 -16
  271. package/script/src/interpreter/durable/Queue.d.ts.map +1 -1
  272. package/script/src/interpreter/durable/Queue.js +3 -4
  273. package/script/src/interpreter/durable/compilers/catch.js +2 -2
  274. package/script/src/interpreter/durable/compilers/durableworkflow.d.ts.map +1 -1
  275. package/script/src/interpreter/durable/compilers/durableworkflow.js +29 -20
  276. package/script/src/interpreter/durable/compilers/http.d.ts.map +1 -1
  277. package/script/src/interpreter/durable/compilers/http.js +26 -9
  278. package/script/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
  279. package/script/src/interpreter/durable/compilers/schedule.js +41 -18
  280. package/script/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
  281. package/script/src/interpreter/durable/compilers/webhook.js +30 -33
  282. package/script/src/interpreter/memory/MemoryInterpreter.d.ts +4 -4
  283. package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
  284. package/script/src/interpreter/memory/MemoryInterpreter.js +15 -25
  285. package/script/src/interpreter/memory/ObservableCompiler.d.ts +6 -3
  286. package/script/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
  287. package/script/src/interpreter/memory/compilers/catch.js +2 -2
  288. package/script/src/interpreter/memory/compilers/http.d.ts.map +1 -1
  289. package/script/src/interpreter/memory/compilers/http.js +26 -9
  290. package/script/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
  291. package/script/src/interpreter/memory/compilers/schedule.js +34 -18
  292. package/script/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
  293. package/script/src/interpreter/memory/compilers/webhook.js +31 -34
  294. package/script/src/kv/sdk/SDKKeyValue.d.ts.map +1 -1
  295. package/script/src/kv/sdk/SDKKeyValue.js +7 -1
  296. package/script/src/services/credentials/credential-v1alpha1.d.ts +4 -0
  297. package/script/src/services/credentials/credential-v1alpha1.d.ts.map +1 -0
  298. package/script/src/services/credentials/credential-v1alpha1.js +19 -0
  299. package/script/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_metadata_pb.d.ts +119 -0
  300. package/script/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_metadata_pb.d.ts.map +1 -0
  301. package/script/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_metadata_pb.js +70 -0
  302. package/script/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_service_pb.d.ts +245 -0
  303. package/script/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_service_pb.d.ts.map +1 -0
  304. package/script/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_service_pb.js +47 -0
  305. package/script/src/services/credentials/generated/versori/credential/oauth2/v1/token_pb.d.ts +38 -0
  306. package/script/src/services/credentials/generated/versori/credential/oauth2/v1/token_pb.d.ts.map +1 -0
  307. package/script/src/{dsl/http → services/credentials/generated}/versori/credential/oauth2/v1/token_pb.js +1 -1
  308. package/script/src/services/credentials/generated/versori/credential/oauth2/v1/token_service_pb.d.ts +471 -0
  309. package/script/src/services/credentials/generated/versori/credential/oauth2/v1/token_service_pb.d.ts.map +1 -0
  310. package/script/src/{dsl/http → services/credentials/generated}/versori/credential/oauth2/v1/token_service_pb.js +1 -1
  311. package/script/src/services/credentials/generated/versori/credential/tokens/v1/token_pb.d.ts +38 -0
  312. package/script/src/services/credentials/generated/versori/credential/tokens/v1/token_pb.d.ts.map +1 -0
  313. package/script/src/{dsl/http → services/credentials/generated}/versori/credential/tokens/v1/token_pb.js +1 -1
  314. package/script/src/services/credentials/generated/versori/credential/tokens/v1/token_service_pb.d.ts +128 -0
  315. package/script/src/services/credentials/generated/versori/credential/tokens/v1/token_service_pb.d.ts.map +1 -0
  316. package/script/src/{dsl/http → services/credentials/generated}/versori/credential/tokens/v1/token_service_pb.js +1 -1
  317. package/script/src/services/credentials/generated/versori/credential/v1alpha1/common_pb.d.ts +90 -0
  318. package/script/src/services/credentials/generated/versori/credential/v1alpha1/common_pb.d.ts.map +1 -0
  319. package/script/src/{dsl/http → services/credentials/generated}/versori/credential/v1alpha1/common_pb.js +16 -6
  320. package/script/src/services/credentials/generated/versori/credential/v1alpha1/credential_pb.d.ts +1468 -0
  321. package/script/src/services/credentials/generated/versori/credential/v1alpha1/credential_pb.d.ts.map +1 -0
  322. package/script/src/services/credentials/generated/versori/credential/v1alpha1/credential_pb.js +538 -0
  323. package/script/src/services/credentials/generated/versori/credential/v1alpha1/credential_service_pb.d.ts +390 -0
  324. package/script/src/services/credentials/generated/versori/credential/v1alpha1/credential_service_pb.d.ts.map +1 -0
  325. package/script/src/{dsl/http → services/credentials/generated}/versori/credential/v1alpha1/credential_service_pb.js +1 -1
  326. package/script/src/services/credentials/isTokenValid.d.ts +3 -0
  327. package/script/src/services/credentials/isTokenValid.d.ts.map +1 -0
  328. package/script/src/services/credentials/isTokenValid.js +26 -0
  329. package/script/src/services/credentials/mod.d.ts +5 -0
  330. package/script/src/services/credentials/mod.d.ts.map +1 -0
  331. package/script/src/services/credentials/mod.js +30 -0
  332. package/script/src/services/credentials/oauth1-v1.d.ts +3 -0
  333. package/script/src/services/credentials/oauth1-v1.d.ts.map +1 -0
  334. package/script/src/services/credentials/oauth1-v1.js +18 -0
  335. package/script/src/services/credentials/oauth2-v1.d.ts +3 -0
  336. package/script/src/services/credentials/oauth2-v1.d.ts.map +1 -0
  337. package/script/src/services/credentials/oauth2-v1.js +18 -0
  338. package/script/src/services/credentials/tokens-v1.d.ts +3 -0
  339. package/script/src/services/credentials/tokens-v1.d.ts.map +1 -0
  340. package/script/src/services/credentials/tokens-v1.js +18 -0
  341. package/script/src/services/platform/PlatformApi.d.ts +7 -0
  342. package/script/src/services/platform/PlatformApi.d.ts.map +1 -0
  343. package/script/src/services/platform/PlatformApi.js +52 -0
  344. package/script/src/services/platform/generated/client/client.gen.d.ts +3 -0
  345. package/script/src/services/platform/generated/client/client.gen.d.ts.map +1 -0
  346. package/script/src/services/platform/generated/client/client.gen.js +180 -0
  347. package/script/src/services/platform/generated/client/index.d.ts +8 -0
  348. package/script/src/services/platform/generated/client/index.d.ts.map +1 -0
  349. package/script/src/services/platform/generated/client/index.js +15 -0
  350. package/script/src/services/platform/generated/client/types.gen.d.ts +125 -0
  351. package/script/src/services/platform/generated/client/types.gen.d.ts.map +1 -0
  352. package/script/src/services/platform/generated/client/types.gen.js +3 -0
  353. package/script/src/services/platform/generated/client/utils.gen.d.ts +39 -0
  354. package/script/src/services/platform/generated/client/utils.gen.d.ts.map +1 -0
  355. package/script/src/services/platform/generated/client/utils.gen.js +245 -0
  356. package/script/src/services/platform/generated/client.gen.d.ts +13 -0
  357. package/script/src/services/platform/generated/client.gen.d.ts.map +1 -0
  358. package/script/src/services/platform/generated/client.gen.js +8 -0
  359. package/script/src/services/platform/generated/core/auth.gen.d.ts +19 -0
  360. package/script/src/services/platform/generated/core/auth.gen.d.ts.map +1 -0
  361. package/script/src/services/platform/generated/core/auth.gen.js +18 -0
  362. package/script/src/services/platform/generated/core/bodySerializer.gen.d.ts +18 -0
  363. package/script/src/services/platform/generated/core/bodySerializer.gen.d.ts.map +1 -0
  364. package/script/src/services/platform/generated/core/bodySerializer.gen.js +60 -0
  365. package/script/src/services/platform/generated/core/params.gen.d.ts +34 -0
  366. package/script/src/services/platform/generated/core/params.gen.d.ts.map +1 -0
  367. package/script/src/services/platform/generated/core/params.gen.js +92 -0
  368. package/script/src/services/platform/generated/core/pathSerializer.gen.d.ts +34 -0
  369. package/script/src/services/platform/generated/core/pathSerializer.gen.d.ts.map +1 -0
  370. package/script/src/services/platform/generated/core/pathSerializer.gen.js +123 -0
  371. package/script/src/services/platform/generated/core/serverSentEvents.gen.d.ts +60 -0
  372. package/script/src/services/platform/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  373. package/script/src/services/platform/generated/core/serverSentEvents.gen.js +125 -0
  374. package/script/src/services/platform/generated/core/types.gen.d.ts +79 -0
  375. package/script/src/services/platform/generated/core/types.gen.d.ts.map +1 -0
  376. package/script/src/services/platform/generated/core/types.gen.js +3 -0
  377. package/script/src/services/platform/generated/core/utils.gen.d.ts +15 -0
  378. package/script/src/services/platform/generated/core/utils.gen.d.ts.map +1 -0
  379. package/script/src/services/platform/generated/core/utils.gen.js +74 -0
  380. package/script/src/services/platform/generated/index.d.ts +3 -0
  381. package/script/src/services/platform/generated/index.d.ts.map +1 -0
  382. package/script/src/services/platform/generated/index.js +19 -0
  383. package/script/src/services/platform/generated/sdk.gen.d.ts +494 -0
  384. package/script/src/services/platform/generated/sdk.gen.d.ts.map +1 -0
  385. package/script/src/services/platform/generated/sdk.gen.js +1992 -0
  386. package/script/src/services/platform/generated/types.gen.d.ts +3798 -0
  387. package/script/src/services/platform/generated/types.gen.d.ts.map +1 -0
  388. package/script/src/services/platform/generated/types.gen.js +3 -0
  389. package/script/src/services/platform/mod.d.ts +5 -0
  390. package/script/src/services/platform/mod.d.ts.map +1 -0
  391. package/script/src/services/platform/mod.js +18 -0
  392. package/esm/src/dsl/http/versori/activation.d.ts +0 -13
  393. package/esm/src/dsl/http/versori/activation.d.ts.map +0 -1
  394. package/esm/src/dsl/http/versori/activation.js +0 -64
  395. package/esm/src/dsl/http/versori/credential/client.d.ts +0 -13
  396. package/esm/src/dsl/http/versori/credential/client.d.ts.map +0 -1
  397. package/esm/src/dsl/http/versori/credential/client.js +0 -35
  398. package/esm/src/dsl/http/versori/credential/credentials.d.ts +0 -98
  399. package/esm/src/dsl/http/versori/credential/credentials.d.ts.map +0 -1
  400. package/esm/src/dsl/http/versori/credential/credentials.js +0 -40
  401. package/esm/src/dsl/http/versori/credential/mod.d.ts +0 -2
  402. package/esm/src/dsl/http/versori/credential/mod.d.ts.map +0 -1
  403. package/esm/src/dsl/http/versori/credential/mod.js +0 -1
  404. package/esm/src/dsl/http/versori/credential/oauth2/v1/token_pb.d.ts +0 -13
  405. package/esm/src/dsl/http/versori/credential/oauth2/v1/token_pb.d.ts.map +0 -1
  406. package/esm/src/dsl/http/versori/credential/oauth2/v1/token_service_pb.d.ts +0 -102
  407. package/esm/src/dsl/http/versori/credential/oauth2/v1/token_service_pb.d.ts.map +0 -1
  408. package/esm/src/dsl/http/versori/credential/tokens/v1/token_pb.d.ts +0 -13
  409. package/esm/src/dsl/http/versori/credential/tokens/v1/token_pb.d.ts.map +0 -1
  410. package/esm/src/dsl/http/versori/credential/tokens/v1/token_service_pb.d.ts +0 -46
  411. package/esm/src/dsl/http/versori/credential/tokens/v1/token_service_pb.d.ts.map +0 -1
  412. package/esm/src/dsl/http/versori/credential/v1alpha1/common_pb.d.ts +0 -40
  413. package/esm/src/dsl/http/versori/credential/v1alpha1/common_pb.d.ts.map +0 -1
  414. package/esm/src/dsl/http/versori/credential/v1alpha1/credential_service_pb.d.ts +0 -129
  415. package/esm/src/dsl/http/versori/credential/v1alpha1/credential_service_pb.d.ts.map +0 -1
  416. package/esm/src/dsl/http/versori/platformapi.d.ts +0 -19
  417. package/esm/src/dsl/http/versori/platformapi.d.ts.map +0 -1
  418. package/esm/src/dsl/http/versori/platformapi.js +0 -148
  419. package/esm/src/dsl/http/versori/roundtripper.d.ts +0 -61
  420. package/esm/src/dsl/http/versori/roundtripper.d.ts.map +0 -1
  421. package/esm/src/dsl/http/versori/roundtripper.js +0 -967
  422. package/script/src/dsl/http/versori/activation.d.ts +0 -13
  423. package/script/src/dsl/http/versori/activation.d.ts.map +0 -1
  424. package/script/src/dsl/http/versori/activation.js +0 -68
  425. package/script/src/dsl/http/versori/credential/client.d.ts +0 -13
  426. package/script/src/dsl/http/versori/credential/client.d.ts.map +0 -1
  427. package/script/src/dsl/http/versori/credential/client.js +0 -39
  428. package/script/src/dsl/http/versori/credential/credentials.d.ts +0 -98
  429. package/script/src/dsl/http/versori/credential/credentials.d.ts.map +0 -1
  430. package/script/src/dsl/http/versori/credential/credentials.js +0 -46
  431. package/script/src/dsl/http/versori/credential/mod.d.ts +0 -2
  432. package/script/src/dsl/http/versori/credential/mod.d.ts.map +0 -1
  433. package/script/src/dsl/http/versori/credential/mod.js +0 -5
  434. package/script/src/dsl/http/versori/credential/oauth2/v1/token_pb.d.ts +0 -13
  435. package/script/src/dsl/http/versori/credential/oauth2/v1/token_pb.d.ts.map +0 -1
  436. package/script/src/dsl/http/versori/credential/oauth2/v1/token_service_pb.d.ts +0 -102
  437. package/script/src/dsl/http/versori/credential/oauth2/v1/token_service_pb.d.ts.map +0 -1
  438. package/script/src/dsl/http/versori/credential/tokens/v1/token_pb.d.ts +0 -13
  439. package/script/src/dsl/http/versori/credential/tokens/v1/token_pb.d.ts.map +0 -1
  440. package/script/src/dsl/http/versori/credential/tokens/v1/token_service_pb.d.ts +0 -46
  441. package/script/src/dsl/http/versori/credential/tokens/v1/token_service_pb.d.ts.map +0 -1
  442. package/script/src/dsl/http/versori/credential/v1alpha1/common_pb.d.ts +0 -40
  443. package/script/src/dsl/http/versori/credential/v1alpha1/common_pb.d.ts.map +0 -1
  444. package/script/src/dsl/http/versori/credential/v1alpha1/credential_service_pb.d.ts +0 -129
  445. package/script/src/dsl/http/versori/credential/v1alpha1/credential_service_pb.d.ts.map +0 -1
  446. package/script/src/dsl/http/versori/platformapi.d.ts +0 -19
  447. package/script/src/dsl/http/versori/platformapi.d.ts.map +0 -1
  448. package/script/src/dsl/http/versori/platformapi.js +0 -152
  449. package/script/src/dsl/http/versori/roundtripper.d.ts +0 -61
  450. package/script/src/dsl/http/versori/roundtripper.d.ts.map +0 -1
  451. package/script/src/dsl/http/versori/roundtripper.js +0 -974
  452. /package/esm/deps/jsr.io/@std/fs/{1.0.19 → 1.0.20}/exists.d.ts +0 -0
  453. /package/esm/deps/jsr.io/@std/fs/{1.0.19 → 1.0.20}/exists.js +0 -0
  454. /package/script/deps/jsr.io/@std/fs/{1.0.19 → 1.0.20}/exists.d.ts +0 -0
  455. /package/script/deps/jsr.io/@std/fs/{1.0.19 → 1.0.20}/exists.js +0 -0
@@ -10,6 +10,7 @@ const promises_1 = require("node:stream/promises");
10
10
  const rxjs_1 = require("rxjs");
11
11
  const webhookmiddleware_js_1 = require("../../../dsl/http/versori/webhookmiddleware.js");
12
12
  const WebhookTrigger_js_1 = require("../../../dsl/triggers/WebhookTrigger.js");
13
+ const constants_js_1 = require("../../../internal/constants.js");
13
14
  const express_xml_bodyparser_1 = __importDefault(require("express-xml-bodyparser"));
14
15
  const xml2jsDefaults = {
15
16
  explicitArray: false,
@@ -113,20 +114,19 @@ exports.webhookCompiler = {
113
114
  // endpoint for sans user because I'm not quite sure how the dynamic routing works
114
115
  ctx.webhookRouter[method](`/${trigger.id}`, (0, webhookmiddleware_js_1.createStaticWebhookMiddleware)({
115
116
  id: trigger.id,
117
+ organisationId: ctx.organisationId,
118
+ environmentId: Deno.env.get(constants_js_1.envVarEnvId) ?? '',
116
119
  connName: trigger.options.connection,
117
- credentials: ctx.roundTripperFactory.credentials(),
118
- cnxProvider: ctx.connectionProvider,
120
+ platformApi: ctx.platformApi,
121
+ cnxFactory: ctx.cnxFactory,
119
122
  cfgReader: ctx.configReader,
120
123
  log: ctx.log,
121
124
  }), async (req, res) => {
122
125
  await ctx.tracer.startActiveSpan(`webhook-${trigger.id}`, async (span) => {
123
126
  span.setAttribute('task.id', trigger.id);
124
127
  span.setAttribute('task.type', 'webhook');
125
- let executionCtx = ctx.contextProvider.create(req.body, ctxOptionsFn(req, res));
126
128
  const staticActivation = res.locals.activation;
127
- if (staticActivation) {
128
- executionCtx = executionCtx.withActivation(staticActivation);
129
- }
129
+ const executionCtx = ctx.contextProvider.create(staticActivation, req.body, ctxOptionsFn(req, res));
130
130
  span.setAttribute('execution.id', executionCtx.executionId);
131
131
  try {
132
132
  subscriber.next(executionCtx);
@@ -151,8 +151,10 @@ exports.webhookCompiler = {
151
151
  ctx.webhookRouter[method](`/${trigger.id}/users/:userId`, (0, webhookmiddleware_js_1.createUserIdDynamicWebhookMiddleware)({
152
152
  id: trigger.id,
153
153
  connName: trigger.options.connection,
154
- credentials: ctx.roundTripperFactory.credentials(),
155
- cnxProvider: ctx.connectionProvider,
154
+ organisationId: ctx.organisationId,
155
+ environmentId: Deno.env.get(constants_js_1.envVarEnvId) ?? '',
156
+ platformApi: ctx.platformApi,
157
+ cnxFactory: ctx.cnxFactory,
156
158
  cfgReader: ctx.configReader,
157
159
  log: ctx.log,
158
160
  }), async (req, res) => {
@@ -161,12 +163,11 @@ exports.webhookCompiler = {
161
163
  span.setAttribute('task.type', 'webhook');
162
164
  span.setAttribute('user.id', req.params.userId);
163
165
  const userId = req.params.userId;
164
- const activation = res.locals.activation;
165
- const activations = [activation];
166
166
  // Right now we only support a user having one activation
167
167
  // so this will need changing when we support multiple activations per user
168
168
  // as will the middleware
169
- if (!activations || activations.length === 0) {
169
+ const activation = res.locals.activation;
170
+ if (!activation) {
170
171
  res.status(404).json({
171
172
  status: 'error',
172
173
  message: `No activations found for user: ${userId}`,
@@ -176,24 +177,21 @@ exports.webhookCompiler = {
176
177
  span.end();
177
178
  return;
178
179
  }
179
- const executionCtx = ctx.contextProvider.create(req.body, ctxOptionsFn(req, res));
180
+ const executionCtx = ctx.contextProvider.create(activation, req.body, ctxOptionsFn(req, res));
180
181
  span.setAttribute('execution.id', executionCtx.executionId);
181
182
  const errors = [];
182
- activations.forEach((activation) => {
183
- const activationCtx = executionCtx.withActivation(activation);
184
- try {
185
- subscriber.next(activationCtx);
186
- }
187
- catch (error) {
188
- activationCtx.log.error('webhook execution error', {
189
- error: JSON.stringify(error),
190
- });
191
- errors.push({
192
- activationId: activation.id,
193
- error,
194
- });
195
- }
196
- });
183
+ try {
184
+ subscriber.next(executionCtx);
185
+ }
186
+ catch (error) {
187
+ executionCtx.log.error('webhook execution error', {
188
+ error: JSON.stringify(error),
189
+ });
190
+ errors.push({
191
+ activationId: activation.id,
192
+ error,
193
+ });
194
+ }
197
195
  if (isAsync) {
198
196
  if (errors.length === 0) {
199
197
  sendResponse(res, onSuccess(executionCtx));
@@ -208,9 +206,11 @@ exports.webhookCompiler = {
208
206
  // this endpoint will trigger the workflow only for the activation given by its ID
209
207
  ctx.webhookRouter[method](`/${trigger.id}/activations/:activationId`, (0, webhookmiddleware_js_1.createActIdDynamicWebhookMiddleware)({
210
208
  id: trigger.id,
209
+ organisationId: ctx.organisationId,
210
+ environmentId: Deno.env.get(constants_js_1.envVarEnvId) ?? '',
211
211
  connName: trigger.options.connection,
212
- credentials: ctx.roundTripperFactory.credentials(),
213
- cnxProvider: ctx.connectionProvider,
212
+ platformApi: ctx.platformApi,
213
+ cnxFactory: ctx.cnxFactory,
214
214
  cfgReader: ctx.configReader,
215
215
  log: ctx.log,
216
216
  }), async (req, res) => {
@@ -219,7 +219,7 @@ exports.webhookCompiler = {
219
219
  span.setAttribute('task.type', 'webhook');
220
220
  span.setAttribute('activation.id', req.params.activationId);
221
221
  const activation = res.locals.activation;
222
- const activationId = activation.id || req.params.activationId;
222
+ const activationId = activation?.id ?? req.params.activationId;
223
223
  if (!activation) {
224
224
  // TODO report back actual errors
225
225
  res.status(404).json({
@@ -231,10 +231,7 @@ exports.webhookCompiler = {
231
231
  span.end();
232
232
  return;
233
233
  }
234
- const activationCtx = ctx.contextProvider.create(req.body, {
235
- ...ctxOptionsFn(req, res),
236
- activation,
237
- });
234
+ const activationCtx = ctx.contextProvider.create(activation, req.body, ctxOptionsFn(req, res));
238
235
  span.setAttribute('execution.id', activationCtx.executionId);
239
236
  try {
240
237
  subscriber.next(activationCtx);
@@ -1 +1 @@
1
- {"version":3,"file":"SDKKeyValue.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/sdk/SDKKeyValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AAGjG,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAEzF,qBAAa,WAAY,YAAW,QAAQ;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAuB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAnD,KAAK,EAAE,mBAAmB,EAAmB,MAAM,EAAE,MAAM;IAElF,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,GAAE,UAAU,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAoBnF,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYvD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7C,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAUjD,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAY9E,OAAO,CAAC,WAAW;CAGtB"}
1
+ {"version":3,"file":"SDKKeyValue.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/sdk/SDKKeyValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AAGjG,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAEzF,qBAAa,WAAY,YAAW,QAAQ;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAuB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAnD,KAAK,EAAE,mBAAmB,EAAmB,MAAM,EAAE,MAAM;IAElF,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,GAAE,UAAU,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IA2BnF,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYvD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7C,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAUjD,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAY9E,OAAO,CAAC,WAAW;CAGtB"}
@@ -22,7 +22,13 @@ class SDKKeyValue {
22
22
  try {
23
23
  const k = this.generateKey(key instanceof Array ? key.join('/') : key);
24
24
  const entry = await KvOperationsService_js_1.KvOperationsService.getKv(this.store.id, k);
25
- return entry.value;
25
+ if (entry.value === undefined) {
26
+ if (options.throwOnNotFound) {
27
+ throw new Error('Key not found');
28
+ }
29
+ return undefined;
30
+ }
31
+ return JSON.parse(String(entry.value));
26
32
  }
27
33
  catch (error) {
28
34
  if (options.throwOnNotFound && error instanceof Error && error.message === 'Key not found') {
@@ -0,0 +1,4 @@
1
+ export * from './generated/versori/credential/v1alpha1/common_pb.js';
2
+ export * from './generated/versori/credential/v1alpha1/credential_pb.js';
3
+ export * from './generated/versori/credential/v1alpha1/credential_service_pb.js';
4
+ //# sourceMappingURL=credential-v1alpha1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-v1alpha1.d.ts","sourceRoot":"","sources":["../../../../src/src/services/credentials/credential-v1alpha1.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC;AACrE,cAAc,0DAA0D,CAAC;AACzE,cAAc,kEAAkE,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./generated/versori/credential/v1alpha1/common_pb.js"), exports);
18
+ __exportStar(require("./generated/versori/credential/v1alpha1/credential_pb.js"), exports);
19
+ __exportStar(require("./generated/versori/credential/v1alpha1/credential_service_pb.js"), exports);
@@ -0,0 +1,119 @@
1
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Message } from "@bufbuild/protobuf";
3
+ /**
4
+ * Describes the file versori/credential/oauth1/v1/authorization_metadata.proto.
5
+ */
6
+ export declare const file_versori_credential_oauth1_v1_authorization_metadata: GenFile;
7
+ /**
8
+ * AuthorizationMetadata provides the necessary information to build an authenticated request to a
9
+ * service using OAuth 1.0.
10
+ *
11
+ * @generated from message versori.credential.oauth1.v1.AuthorizationMetadata
12
+ */
13
+ export type AuthorizationMetadata = Message<"versori.credential.oauth1.v1.AuthorizationMetadata"> & {
14
+ /**
15
+ * AuthorizationParams is a URL-encoded string of parameters to be included in a request in order
16
+ * to authenticate with the service.
17
+ *
18
+ * This string should be decoded and combined with other parameters for the request as per
19
+ * [RFC-5849 §3.4.1.3](https://datatracker.ietf.org/doc/html/rfc5849#section-3.4.1.3), and signed
20
+ * as per [RFC-5849 §3.4](https://datatracker.ietf.org/doc/html/rfc5849#section-3.4).
21
+ *
22
+ * @generated from field: string authorization_params = 1;
23
+ */
24
+ authorizationParams: string;
25
+ /**
26
+ * ParameterTransmission defines how the authorization parameters should be transmitted to the
27
+ * server.
28
+ *
29
+ * @generated from field: versori.credential.oauth1.v1.AuthorizationMetadata.ParameterTransmission parameter_transmission = 3;
30
+ */
31
+ parameterTransmission: AuthorizationMetadata_ParameterTransmission;
32
+ /**
33
+ * ConsumerKey is the identifier for the OAuth1 client.
34
+ *
35
+ * @generated from field: string consumer_key = 4;
36
+ */
37
+ consumerKey: string;
38
+ /**
39
+ * ConsumerSecret is the credential for the OAuth1 client.
40
+ *
41
+ * @generated from field: string consumer_secret = 5;
42
+ */
43
+ consumerSecret: string;
44
+ /**
45
+ * OAuthToken is the token used to authenticate requests.
46
+ *
47
+ * @generated from field: string oauth_token = 6;
48
+ */
49
+ oauthToken: string;
50
+ /**
51
+ * OAuthTokenSecret is the secret used to sign requests.
52
+ *
53
+ * @generated from field: string oauth_token_secret = 7;
54
+ */
55
+ oauthTokenSecret: string;
56
+ /**
57
+ * SignatureMethod is the method used to sign authenticated requests.
58
+ *
59
+ * @generated from field: versori.credential.oauth1.v1.AuthorizationMetadata.SignatureMethod signature_method = 8;
60
+ */
61
+ signatureMethod: AuthorizationMetadata_SignatureMethod;
62
+ };
63
+ /**
64
+ * Describes the message versori.credential.oauth1.v1.AuthorizationMetadata.
65
+ * Use `create(AuthorizationMetadataSchema)` to create a new message.
66
+ */
67
+ export declare const AuthorizationMetadataSchema: GenMessage<AuthorizationMetadata>;
68
+ /**
69
+ * @generated from enum versori.credential.oauth1.v1.AuthorizationMetadata.SignatureMethod
70
+ */
71
+ export declare enum AuthorizationMetadata_SignatureMethod {
72
+ /**
73
+ * @generated from enum value: SIGNATURE_METHOD_UNKNOWN = 0;
74
+ */
75
+ UNKNOWN = 0,
76
+ /**
77
+ * @generated from enum value: SIGNATURE_METHOD_PLAINTEXT = 1;
78
+ */
79
+ PLAINTEXT = 1,
80
+ /**
81
+ * @generated from enum value: SIGNATURE_METHOD_HMAC_SHA1 = 2;
82
+ */
83
+ HMAC_SHA1 = 2,
84
+ /**
85
+ * @generated from enum value: SIGNATURE_METHOD_HMAC_SHA256 = 3;
86
+ */
87
+ HMAC_SHA256 = 3
88
+ }
89
+ /**
90
+ * Describes the enum versori.credential.oauth1.v1.AuthorizationMetadata.SignatureMethod.
91
+ */
92
+ export declare const AuthorizationMetadata_SignatureMethodSchema: GenEnum<AuthorizationMetadata_SignatureMethod>;
93
+ /**
94
+ * ParameterTransmission defines the possible values for how to transmit the authorization
95
+ * parameters to the server. See
96
+ * [RFC-5849 §3.5](https://datatracker.ietf.org/doc/html/rfc5849#section-3.5) for more
97
+ * information.
98
+ *
99
+ * @generated from enum versori.credential.oauth1.v1.AuthorizationMetadata.ParameterTransmission
100
+ */
101
+ export declare enum AuthorizationMetadata_ParameterTransmission {
102
+ /**
103
+ * @generated from enum value: AUTH_STYLE_AUTHORIZATION_HEADER = 0;
104
+ */
105
+ AUTH_STYLE_AUTHORIZATION_HEADER = 0,
106
+ /**
107
+ * @generated from enum value: AUTH_STYLE_FORM = 1;
108
+ */
109
+ AUTH_STYLE_FORM = 1,
110
+ /**
111
+ * @generated from enum value: AUTH_STYLE_QUERY = 2;
112
+ */
113
+ AUTH_STYLE_QUERY = 2
114
+ }
115
+ /**
116
+ * Describes the enum versori.credential.oauth1.v1.AuthorizationMetadata.ParameterTransmission.
117
+ */
118
+ export declare const AuthorizationMetadata_ParameterTransmissionSchema: GenEnum<AuthorizationMetadata_ParameterTransmission>;
119
+ //# sourceMappingURL=authorization_metadata_pb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization_metadata_pb.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_metadata_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGjF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,wDAAwD,EAAE,OACmuC,CAAC;AAE3yC;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,oDAAoD,CAAC,GAAG;IAClG;;;;;;;;;OASG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;;;;OAKG;IACH,qBAAqB,EAAE,2CAA2C,CAAC;IAEnE;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,eAAe,EAAE,qCAAqC,CAAC;CACxD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,qBAAqB,CACA,CAAC;AAE3E;;GAEG;AACH,oBAAY,qCAAqC;IAC/C;;OAEG;IACH,OAAO,IAAI;IAEX;;OAEG;IACH,SAAS,IAAI;IAEb;;OAEG;IACH,SAAS,IAAI;IAEb;;OAEG;IACH,WAAW,IAAI;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,2CAA2C,EAAE,OAAO,CAAC,qCAAqC,CAC7B,CAAC;AAE3E;;;;;;;GAOG;AACH,oBAAY,2CAA2C;IACrD;;OAEG;IACH,+BAA+B,IAAI;IAEnC;;OAEG;IACH,eAAe,IAAI;IAEnB;;OAEG;IACH,gBAAgB,IAAI;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,iDAAiD,EAAE,OAAO,CAAC,2CAA2C,CACzC,CAAC"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.7.0 with parameter "target=ts,import_extension=ts"
3
+ // @generated from file versori/credential/oauth1/v1/authorization_metadata.proto (package versori.credential.oauth1.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AuthorizationMetadata_ParameterTransmissionSchema = exports.AuthorizationMetadata_ParameterTransmission = exports.AuthorizationMetadata_SignatureMethodSchema = exports.AuthorizationMetadata_SignatureMethod = exports.AuthorizationMetadataSchema = exports.file_versori_credential_oauth1_v1_authorization_metadata = void 0;
7
+ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
8
+ const wkt_1 = require("@bufbuild/protobuf/wkt");
9
+ /**
10
+ * Describes the file versori/credential/oauth1/v1/authorization_metadata.proto.
11
+ */
12
+ exports.file_versori_credential_oauth1_v1_authorization_metadata = (0, codegenv2_1.fileDesc)("Cjl2ZXJzb3JpL2NyZWRlbnRpYWwvb2F1dGgxL3YxL2F1dGhvcml6YXRpb25fbWV0YWRhdGEucHJvdG8SHHZlcnNvcmkuY3JlZGVudGlhbC5vYXV0aDEudjEi3AQKFUF1dGhvcml6YXRpb25NZXRhZGF0YRIcChRhdXRob3JpemF0aW9uX3BhcmFtcxgBIAEoCRJpChZwYXJhbWV0ZXJfdHJhbnNtaXNzaW9uGAMgASgOMkkudmVyc29yaS5jcmVkZW50aWFsLm9hdXRoMS52MS5BdXRob3JpemF0aW9uTWV0YWRhdGEuUGFyYW1ldGVyVHJhbnNtaXNzaW9uEhQKDGNvbnN1bWVyX2tleRgEIAEoCRIXCg9jb25zdW1lcl9zZWNyZXQYBSABKAkSEwoLb2F1dGhfdG9rZW4YBiABKAkSGgoSb2F1dGhfdG9rZW5fc2VjcmV0GAcgASgJEl0KEHNpZ25hdHVyZV9tZXRob2QYCCABKA4yQy52ZXJzb3JpLmNyZWRlbnRpYWwub2F1dGgxLnYxLkF1dGhvcml6YXRpb25NZXRhZGF0YS5TaWduYXR1cmVNZXRob2QikQEKD1NpZ25hdHVyZU1ldGhvZBIcChhTSUdOQVRVUkVfTUVUSE9EX1VOS05PV04QABIeChpTSUdOQVRVUkVfTUVUSE9EX1BMQUlOVEVYVBABEh4KGlNJR05BVFVSRV9NRVRIT0RfSE1BQ19TSEExEAISIAocU0lHTkFUVVJFX01FVEhPRF9ITUFDX1NIQTI1NhADImcKFVBhcmFtZXRlclRyYW5zbWlzc2lvbhIjCh9BVVRIX1NUWUxFX0FVVEhPUklaQVRJT05fSEVBREVSEAASEwoPQVVUSF9TVFlMRV9GT1JNEAESFAoQQVVUSF9TVFlMRV9RVUVSWRACQvgBCiBjb20udmVyc29yaS5jcmVkZW50aWFsLm9hdXRoMS52MUIaQXV0aG9yaXphdGlvbk1ldGFkYXRhUHJvdG9QAVoldmVyc29yaS5kZXYvY3JlZGVudGlhbHMvYXBpL29hdXRoMS92MaICA1ZDT6oCHFZlcnNvcmkuQ3JlZGVudGlhbC5PYXV0aDEuVjHKAhxWZXJzb3JpXENyZWRlbnRpYWxcT2F1dGgxXFYx4gIoVmVyc29yaVxDcmVkZW50aWFsXE9hdXRoMVxWMVxHUEJNZXRhZGF0YeoCH1ZlcnNvcmk6OkNyZWRlbnRpYWw6Ok9hdXRoMTo6VjFiBnByb3RvMw", [wkt_1.file_google_protobuf_timestamp]);
13
+ /**
14
+ * Describes the message versori.credential.oauth1.v1.AuthorizationMetadata.
15
+ * Use `create(AuthorizationMetadataSchema)` to create a new message.
16
+ */
17
+ exports.AuthorizationMetadataSchema = (0, codegenv2_1.messageDesc)(exports.file_versori_credential_oauth1_v1_authorization_metadata, 0);
18
+ /**
19
+ * @generated from enum versori.credential.oauth1.v1.AuthorizationMetadata.SignatureMethod
20
+ */
21
+ var AuthorizationMetadata_SignatureMethod;
22
+ (function (AuthorizationMetadata_SignatureMethod) {
23
+ /**
24
+ * @generated from enum value: SIGNATURE_METHOD_UNKNOWN = 0;
25
+ */
26
+ AuthorizationMetadata_SignatureMethod[AuthorizationMetadata_SignatureMethod["UNKNOWN"] = 0] = "UNKNOWN";
27
+ /**
28
+ * @generated from enum value: SIGNATURE_METHOD_PLAINTEXT = 1;
29
+ */
30
+ AuthorizationMetadata_SignatureMethod[AuthorizationMetadata_SignatureMethod["PLAINTEXT"] = 1] = "PLAINTEXT";
31
+ /**
32
+ * @generated from enum value: SIGNATURE_METHOD_HMAC_SHA1 = 2;
33
+ */
34
+ AuthorizationMetadata_SignatureMethod[AuthorizationMetadata_SignatureMethod["HMAC_SHA1"] = 2] = "HMAC_SHA1";
35
+ /**
36
+ * @generated from enum value: SIGNATURE_METHOD_HMAC_SHA256 = 3;
37
+ */
38
+ AuthorizationMetadata_SignatureMethod[AuthorizationMetadata_SignatureMethod["HMAC_SHA256"] = 3] = "HMAC_SHA256";
39
+ })(AuthorizationMetadata_SignatureMethod || (exports.AuthorizationMetadata_SignatureMethod = AuthorizationMetadata_SignatureMethod = {}));
40
+ /**
41
+ * Describes the enum versori.credential.oauth1.v1.AuthorizationMetadata.SignatureMethod.
42
+ */
43
+ exports.AuthorizationMetadata_SignatureMethodSchema = (0, codegenv2_1.enumDesc)(exports.file_versori_credential_oauth1_v1_authorization_metadata, 0, 0);
44
+ /**
45
+ * ParameterTransmission defines the possible values for how to transmit the authorization
46
+ * parameters to the server. See
47
+ * [RFC-5849 §3.5](https://datatracker.ietf.org/doc/html/rfc5849#section-3.5) for more
48
+ * information.
49
+ *
50
+ * @generated from enum versori.credential.oauth1.v1.AuthorizationMetadata.ParameterTransmission
51
+ */
52
+ var AuthorizationMetadata_ParameterTransmission;
53
+ (function (AuthorizationMetadata_ParameterTransmission) {
54
+ /**
55
+ * @generated from enum value: AUTH_STYLE_AUTHORIZATION_HEADER = 0;
56
+ */
57
+ AuthorizationMetadata_ParameterTransmission[AuthorizationMetadata_ParameterTransmission["AUTH_STYLE_AUTHORIZATION_HEADER"] = 0] = "AUTH_STYLE_AUTHORIZATION_HEADER";
58
+ /**
59
+ * @generated from enum value: AUTH_STYLE_FORM = 1;
60
+ */
61
+ AuthorizationMetadata_ParameterTransmission[AuthorizationMetadata_ParameterTransmission["AUTH_STYLE_FORM"] = 1] = "AUTH_STYLE_FORM";
62
+ /**
63
+ * @generated from enum value: AUTH_STYLE_QUERY = 2;
64
+ */
65
+ AuthorizationMetadata_ParameterTransmission[AuthorizationMetadata_ParameterTransmission["AUTH_STYLE_QUERY"] = 2] = "AUTH_STYLE_QUERY";
66
+ })(AuthorizationMetadata_ParameterTransmission || (exports.AuthorizationMetadata_ParameterTransmission = AuthorizationMetadata_ParameterTransmission = {}));
67
+ /**
68
+ * Describes the enum versori.credential.oauth1.v1.AuthorizationMetadata.ParameterTransmission.
69
+ */
70
+ exports.AuthorizationMetadata_ParameterTransmissionSchema = (0, codegenv2_1.enumDesc)(exports.file_versori_credential_oauth1_v1_authorization_metadata, 0, 1);
@@ -0,0 +1,245 @@
1
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { AuthorizationMetadata } from "./authorization_metadata_pb.js";
3
+ import type { Credential } from "../../v1alpha1/credential_pb.js";
4
+ import type { Message } from "@bufbuild/protobuf";
5
+ /**
6
+ * Describes the file versori/credential/oauth1/v1/authorization_service.proto.
7
+ */
8
+ export declare const file_versori_credential_oauth1_v1_authorization_service: GenFile;
9
+ /**
10
+ * @generated from message versori.credential.oauth1.v1.GetTemporaryTokenRequest
11
+ */
12
+ export type GetTemporaryTokenRequest = Message<"versori.credential.oauth1.v1.GetTemporaryTokenRequest"> & {
13
+ /**
14
+ * CredentialID is the ID of the credential of type OAuth1Client for which the resource
15
+ * owner is authorizing access to a service.
16
+ *
17
+ * @generated from field: string credential_id = 1;
18
+ */
19
+ credentialId: string;
20
+ /**
21
+ * OauthCallback is the URL to which the service provider will redirect the resource owner to in
22
+ * order for them to authorize the request token.
23
+ *
24
+ * @generated from field: string oauth_callback = 2;
25
+ */
26
+ oauthCallback: string;
27
+ /**
28
+ * AdditionalParams is a URL-encoded string of additional parameters to be included in the
29
+ * authorization request. Only parameters which have an associated entry in the OAuth1Client's
30
+ * TempCredentialEndpoint.AdditionalParams field will be handled, other parameters will be
31
+ * ignored.
32
+ *
33
+ * @generated from field: string additional_params = 3;
34
+ */
35
+ additionalParams: string;
36
+ };
37
+ /**
38
+ * Describes the message versori.credential.oauth1.v1.GetTemporaryTokenRequest.
39
+ * Use `create(GetTemporaryTokenRequestSchema)` to create a new message.
40
+ */
41
+ export declare const GetTemporaryTokenRequestSchema: GenMessage<GetTemporaryTokenRequest>;
42
+ /**
43
+ * @generated from message versori.credential.oauth1.v1.GetTemporaryTokenResponse
44
+ */
45
+ export type GetTemporaryTokenResponse = Message<"versori.credential.oauth1.v1.GetTemporaryTokenResponse"> & {
46
+ /**
47
+ * RedirectURI is the URL to which the resource owner should be redirected in order to authorize
48
+ * the request token.
49
+ *
50
+ * @generated from field: string redirect_uri = 1;
51
+ */
52
+ redirectUri: string;
53
+ /**
54
+ * OauthTokenSecret represents the OAuth 1.0 `oauth_token_secret` field in a token response. This
55
+ * should not be returned to end-users and should be stored securely by the client in preparation
56
+ * for calling HandleAuthorizationCallback.
57
+ *
58
+ * @generated from field: string oauth_token_secret = 2;
59
+ */
60
+ oauthTokenSecret: string;
61
+ };
62
+ /**
63
+ * Describes the message versori.credential.oauth1.v1.GetTemporaryTokenResponse.
64
+ * Use `create(GetTemporaryTokenResponseSchema)` to create a new message.
65
+ */
66
+ export declare const GetTemporaryTokenResponseSchema: GenMessage<GetTemporaryTokenResponse>;
67
+ /**
68
+ * @generated from message versori.credential.oauth1.v1.HandleAuthorizationCallbackRequest
69
+ */
70
+ export type HandleAuthorizationCallbackRequest = Message<"versori.credential.oauth1.v1.HandleAuthorizationCallbackRequest"> & {
71
+ /**
72
+ * ClientCredentialID is the ID of the credential of type OAuth1Client which initiated the
73
+ * authorization request.
74
+ *
75
+ * @generated from field: string client_credential_id = 1;
76
+ */
77
+ clientCredentialId: string;
78
+ /**
79
+ * RefreshCredentialID is an optional ID for a credential of type OAuth1Token which should be
80
+ * updated with the new access token and secret returned by executing this request.
81
+ *
82
+ * If this is not provided, a new OAuth1Token credential will be created.
83
+ *
84
+ * @generated from field: string refresh_credential_id = 2;
85
+ */
86
+ refreshCredentialId: string;
87
+ /**
88
+ * OrganisationID is the ID of the organisation to which the credential should be associated.
89
+ *
90
+ * @generated from field: string organisation_id = 3;
91
+ */
92
+ organisationId: string;
93
+ /**
94
+ * OauthToken is the OAuth 1.0 `oauth_token` field in the callback request.
95
+ *
96
+ * @generated from field: string oauth_token = 4;
97
+ */
98
+ oauthToken: string;
99
+ /**
100
+ * OauthVerifier is the OAuth 1.0 `oauth_verifier` field in the callback request.
101
+ *
102
+ * @generated from field: string oauth_verifier = 5;
103
+ */
104
+ oauthVerifier: string;
105
+ /**
106
+ * OauthTokenSecret is the OAuth 1.0 `oauth_token_secret` field returned in
107
+ * GetTemporaryTokenResponse.
108
+ *
109
+ * The credentials service does not maintain state between initiating an authorization request to
110
+ * exchanging the user's authorization for an access token, if this secret is lost, the user must
111
+ * initiate a new authorization flow. In the initial implementation of OAuth 1.0 in connect-api,
112
+ * this value will be encrypted within the `state` parameter.
113
+ *
114
+ * @generated from field: string oauth_token_secret = 6;
115
+ */
116
+ oauthTokenSecret: string;
117
+ /**
118
+ * AdditionalParams is a URL-encoded string of additional parameters which were returned by the
119
+ * authorization server in the callback request.
120
+ *
121
+ * Similar to other AdditionalParams fields, only parameters which have an associated entry in the
122
+ * OAuth1Client's TokenEndpoint.AdditionalParams field will be handled, other parameters
123
+ * will be ignored.
124
+ *
125
+ * @generated from field: string additional_params = 7;
126
+ */
127
+ additionalParams: string;
128
+ /**
129
+ * DisableRedaction is a flag to disable redaction of sensitive information in the response. This
130
+ * can be useful for applications which wish to make a request to the server immediately after
131
+ * completing the authorization flow.
132
+ *
133
+ * @generated from field: bool disable_redaction = 8;
134
+ */
135
+ disableRedaction: boolean;
136
+ };
137
+ /**
138
+ * Describes the message versori.credential.oauth1.v1.HandleAuthorizationCallbackRequest.
139
+ * Use `create(HandleAuthorizationCallbackRequestSchema)` to create a new message.
140
+ */
141
+ export declare const HandleAuthorizationCallbackRequestSchema: GenMessage<HandleAuthorizationCallbackRequest>;
142
+ /**
143
+ * @generated from message versori.credential.oauth1.v1.HandleAuthorizationCallbackResponse
144
+ */
145
+ export type HandleAuthorizationCallbackResponse = Message<"versori.credential.oauth1.v1.HandleAuthorizationCallbackResponse"> & {
146
+ /**
147
+ * Credential is the credential of type OAuth1Token created (or updated) after exchanging the
148
+ * `oauth_verifier` for an `oauth_token` and `oauth_token_secret`.
149
+ *
150
+ * The Credential.Data field will be redacted by default, but can be controlled by the value of
151
+ * HandleAuthorizationCallbackRequest.DisableRedaction.
152
+ *
153
+ * @generated from field: versori.credential.v1alpha1.Credential credential = 1;
154
+ */
155
+ credential?: Credential;
156
+ /**
157
+ * AuthorizationMetadata contains the information required to build an authenticated request to
158
+ * the OAuth 1.0 protected service.
159
+ *
160
+ * This field is only set if HandleAuthorizationCallbackRequest.DisableRedaction is true.
161
+ *
162
+ * @generated from field: versori.credential.oauth1.v1.AuthorizationMetadata authorization_metadata = 2;
163
+ */
164
+ authorizationMetadata?: AuthorizationMetadata;
165
+ };
166
+ /**
167
+ * Describes the message versori.credential.oauth1.v1.HandleAuthorizationCallbackResponse.
168
+ * Use `create(HandleAuthorizationCallbackResponseSchema)` to create a new message.
169
+ */
170
+ export declare const HandleAuthorizationCallbackResponseSchema: GenMessage<HandleAuthorizationCallbackResponse>;
171
+ /**
172
+ * @generated from message versori.credential.oauth1.v1.GetAuthorizationMetadataRequest
173
+ */
174
+ export type GetAuthorizationMetadataRequest = Message<"versori.credential.oauth1.v1.GetAuthorizationMetadataRequest"> & {
175
+ /**
176
+ * CredentialID is the ID of the credential of type OAuth1Token for which the authorization
177
+ * metadata is required.
178
+ *
179
+ * @generated from field: string credential_id = 1;
180
+ */
181
+ credentialId: string;
182
+ };
183
+ /**
184
+ * Describes the message versori.credential.oauth1.v1.GetAuthorizationMetadataRequest.
185
+ * Use `create(GetAuthorizationMetadataRequestSchema)` to create a new message.
186
+ */
187
+ export declare const GetAuthorizationMetadataRequestSchema: GenMessage<GetAuthorizationMetadataRequest>;
188
+ /**
189
+ * @generated from message versori.credential.oauth1.v1.GetAuthorizationMetadataResponse
190
+ */
191
+ export type GetAuthorizationMetadataResponse = Message<"versori.credential.oauth1.v1.GetAuthorizationMetadataResponse"> & {
192
+ /**
193
+ * AuthorizationMetadata contains the information required to build an authenticated request to
194
+ * the OAuth 1.0 protected service.
195
+ *
196
+ * @generated from field: versori.credential.oauth1.v1.AuthorizationMetadata authorization_metadata = 1;
197
+ */
198
+ authorizationMetadata?: AuthorizationMetadata;
199
+ };
200
+ /**
201
+ * Describes the message versori.credential.oauth1.v1.GetAuthorizationMetadataResponse.
202
+ * Use `create(GetAuthorizationMetadataResponseSchema)` to create a new message.
203
+ */
204
+ export declare const GetAuthorizationMetadataResponseSchema: GenMessage<GetAuthorizationMetadataResponse>;
205
+ /**
206
+ * @generated from service versori.credential.oauth1.v1.AuthorizationService
207
+ */
208
+ export declare const AuthorizationService: GenService<{
209
+ /**
210
+ * GetTemporaryToken provides an unauthorized oauth_token and oauth_token_secret which can be
211
+ * used to redirect the user to the provider's authorization URL for authn/z.
212
+ *
213
+ * @generated from rpc versori.credential.oauth1.v1.AuthorizationService.GetTemporaryToken
214
+ */
215
+ getTemporaryToken: {
216
+ methodKind: "unary";
217
+ input: typeof GetTemporaryTokenRequestSchema;
218
+ output: typeof GetTemporaryTokenResponseSchema;
219
+ };
220
+ /**
221
+ * HandleAuthorizationCallback is provided a set of parameters returned to us via the
222
+ * callback_uri, where this service can exchange for an authorized oauth_token and
223
+ * oauth_token_secret.
224
+ *
225
+ * This method will persist a Credential (see refresh_credential_id whether create/update) of
226
+ * type OAuth1Token, which can be referenced in a call to GetAuthorizationMetadata, so that
227
+ * authenticated API requests can be made.
228
+ *
229
+ * @generated from rpc versori.credential.oauth1.v1.AuthorizationService.HandleAuthorizationCallback
230
+ */
231
+ handleAuthorizationCallback: {
232
+ methodKind: "unary";
233
+ input: typeof HandleAuthorizationCallbackRequestSchema;
234
+ output: typeof HandleAuthorizationCallbackResponseSchema;
235
+ };
236
+ /**
237
+ * @generated from rpc versori.credential.oauth1.v1.AuthorizationService.GetAuthorizationMetadata
238
+ */
239
+ getAuthorizationMetadata: {
240
+ methodKind: "unary";
241
+ input: typeof GetAuthorizationMetadataRequestSchema;
242
+ output: typeof GetAuthorizationMetadataResponseSchema;
243
+ };
244
+ }>;
245
+ //# sourceMappingURL=authorization_service_pb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization_service_pb.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/src/services/credentials/generated/versori/credential/oauth1/v1/authorization_service_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,uDAAuD,EAAE,OACwqE,CAAC;AAE/uE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,uDAAuD,CAAC,GAAG;IACxG;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,UAAU,CAAC,wBAAwB,CACP,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,wDAAwD,CAAC,GAAG;IAC1G;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,UAAU,CAAC,yBAAyB,CACT,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,OAAO,CAAC,iEAAiE,CAAC,GAAG;IAC5H;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;;;;;;OAOG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;;;;;OAUG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;OASG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;;OAMG;IACH,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wCAAwC,EAAE,UAAU,CAAC,kCAAkC,CAC3B,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,OAAO,CAAC,kEAAkE,CAAC,GAAG;IAC9H;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yCAAyC,EAAE,UAAU,CAAC,mCAAmC,CAC7B,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,OAAO,CAAC,8DAA8D,CAAC,GAAG;IACtH;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qCAAqC,EAAE,UAAU,CAAC,+BAA+B,CACrB,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,OAAO,CAAC,+DAA+D,CAAC,GAAG;IACxH;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sCAAsC,EAAE,UAAU,CAAC,gCAAgC,CACvB,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC;IAC5C;;;;;OAKG;IACH,iBAAiB,EAAE;QACjB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,8BAA8B,CAAC;QAC7C,MAAM,EAAE,OAAO,+BAA+B,CAAC;KAChD,CAAC;IACF;;;;;;;;;;OAUG;IACH,2BAA2B,EAAE;QAC3B,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,wCAAwC,CAAC;QACvD,MAAM,EAAE,OAAO,yCAAyC,CAAC;KAC1D,CAAC;IACF;;OAEG;IACH,wBAAwB,EAAE;QACxB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,qCAAqC,CAAC;QACpD,MAAM,EAAE,OAAO,sCAAsC,CAAC;KACvD,CAAC;CACH,CACwE,CAAC"}