@dfns/sdk 0.2.3-rc.1 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/baseAuthApi.d.ts +113 -0
  2. package/baseAuthApi.js +97 -0
  3. package/codegen/Assets/AssetsClient.d.ts +13 -0
  4. package/codegen/Assets/AssetsClient.js +93 -0
  5. package/codegen/Assets/DelegatedAssetsClient.d.ts +16 -0
  6. package/codegen/Assets/DelegatedAssetsClient.js +124 -0
  7. package/codegen/Assets/index.d.ts +3 -0
  8. package/codegen/Assets/index.js +19 -0
  9. package/codegen/Assets/types.d.ts +37 -0
  10. package/codegen/Assets/types.js +2 -0
  11. package/codegen/Auth/AuthClient.d.ts +50 -0
  12. package/codegen/Auth/AuthClient.js +518 -0
  13. package/codegen/Auth/DelegatedAuthClient.d.ts +78 -0
  14. package/codegen/Auth/DelegatedAuthClient.js +936 -0
  15. package/codegen/Auth/index.d.ts +3 -0
  16. package/codegen/Auth/index.js +19 -0
  17. package/codegen/Auth/types.d.ts +177 -0
  18. package/codegen/Auth/types.js +2 -0
  19. package/codegen/Blockchains/BlockchainsClient.d.ts +7 -0
  20. package/codegen/Blockchains/BlockchainsClient.js +23 -0
  21. package/codegen/Blockchains/DelegatedBlockchainsClient.d.ts +7 -0
  22. package/codegen/Blockchains/DelegatedBlockchainsClient.js +23 -0
  23. package/codegen/Blockchains/index.d.ts +3 -0
  24. package/codegen/Blockchains/index.js +19 -0
  25. package/codegen/Blockchains/types.d.ts +6 -0
  26. package/codegen/Blockchains/types.js +2 -0
  27. package/codegen/Callbacks/CallbacksClient.d.ts +12 -0
  28. package/codegen/Callbacks/CallbacksClient.js +78 -0
  29. package/codegen/Callbacks/DelegatedCallbacksClient.d.ts +15 -0
  30. package/codegen/Callbacks/DelegatedCallbacksClient.js +110 -0
  31. package/codegen/Callbacks/index.d.ts +3 -0
  32. package/codegen/Callbacks/index.js +19 -0
  33. package/codegen/Callbacks/{types.ts → types.d.ts} +18 -26
  34. package/codegen/Callbacks/types.js +2 -0
  35. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +11 -0
  36. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +61 -0
  37. package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +9 -0
  38. package/codegen/PolicyExecution/PolicyExecutionClient.js +45 -0
  39. package/codegen/PolicyExecution/index.d.ts +3 -0
  40. package/codegen/PolicyExecution/index.js +19 -0
  41. package/codegen/PolicyExecution/types.d.ts +18 -0
  42. package/codegen/PolicyExecution/types.js +2 -0
  43. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +25 -0
  44. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +240 -0
  45. package/codegen/PolicyManagement/PolicyManagementClient.d.ts +18 -0
  46. package/codegen/PolicyManagement/PolicyManagementClient.js +146 -0
  47. package/codegen/PolicyManagement/index.d.ts +3 -0
  48. package/codegen/PolicyManagement/index.js +19 -0
  49. package/codegen/PolicyManagement/{types.ts → types.d.ts} +40 -56
  50. package/codegen/PolicyManagement/types.js +2 -0
  51. package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +21 -0
  52. package/codegen/PublicKeys/DelegatedPublicKeysClient.js +189 -0
  53. package/codegen/PublicKeys/PublicKeysClient.d.ts +16 -0
  54. package/codegen/PublicKeys/PublicKeysClient.js +128 -0
  55. package/codegen/PublicKeys/index.d.ts +3 -0
  56. package/codegen/PublicKeys/index.js +19 -0
  57. package/codegen/PublicKeys/types.d.ts +51 -0
  58. package/codegen/PublicKeys/types.js +2 -0
  59. package/codegen/Signers/DelegatedSignersClient.d.ts +7 -0
  60. package/codegen/Signers/DelegatedSignersClient.js +22 -0
  61. package/codegen/Signers/SignersClient.d.ts +7 -0
  62. package/codegen/Signers/SignersClient.js +22 -0
  63. package/codegen/Signers/index.d.ts +3 -0
  64. package/codegen/Signers/index.js +19 -0
  65. package/codegen/Signers/types.d.ts +2 -0
  66. package/codegen/Signers/types.js +2 -0
  67. package/codegen/Wallets/DelegatedWalletsClient.d.ts +32 -0
  68. package/codegen/Wallets/DelegatedWalletsClient.js +325 -0
  69. package/codegen/Wallets/WalletsClient.d.ts +24 -0
  70. package/codegen/Wallets/WalletsClient.js +219 -0
  71. package/codegen/Wallets/index.d.ts +3 -0
  72. package/codegen/Wallets/index.js +19 -0
  73. package/codegen/Wallets/types.d.ts +101 -0
  74. package/codegen/Wallets/types.js +2 -0
  75. package/codegen/datamodel/ApiKeys/errors.d.ts +6 -0
  76. package/codegen/datamodel/ApiKeys/errors.js +15 -0
  77. package/codegen/datamodel/ApiKeys/index.d.ts +3 -0
  78. package/codegen/datamodel/ApiKeys/index.js +19 -0
  79. package/codegen/datamodel/ApiKeys/responses.d.ts +25 -0
  80. package/codegen/datamodel/ApiKeys/responses.js +2 -0
  81. package/codegen/datamodel/ApiKeys/types.d.ts +32 -0
  82. package/codegen/datamodel/ApiKeys/types.js +11 -0
  83. package/codegen/datamodel/Assets/errors.d.ts +11 -0
  84. package/codegen/datamodel/Assets/errors.js +17 -0
  85. package/codegen/datamodel/Assets/index.d.ts +3 -0
  86. package/codegen/datamodel/Assets/index.js +19 -0
  87. package/codegen/datamodel/Assets/responses.d.ts +47 -0
  88. package/codegen/datamodel/Assets/responses.js +2 -0
  89. package/codegen/datamodel/Assets/types.d.ts +225 -0
  90. package/codegen/datamodel/Assets/types.js +75 -0
  91. package/codegen/datamodel/Auth/errors.js +1 -0
  92. package/codegen/datamodel/Auth/index.d.ts +2 -0
  93. package/codegen/datamodel/Auth/index.js +18 -0
  94. package/codegen/datamodel/Auth/responses.d.ts +358 -0
  95. package/codegen/datamodel/Auth/responses.js +2 -0
  96. package/codegen/datamodel/Auth/types.d.ts +615 -0
  97. package/codegen/datamodel/Auth/types.js +127 -0
  98. package/codegen/datamodel/BlockchainIndexing/errors.js +1 -0
  99. package/codegen/datamodel/BlockchainIndexing/index.d.ts +1 -0
  100. package/codegen/datamodel/BlockchainIndexing/index.js +17 -0
  101. package/codegen/datamodel/BlockchainIndexing/{responses.ts → responses.d.ts} +5 -10
  102. package/codegen/datamodel/BlockchainIndexing/responses.js +2 -0
  103. package/codegen/datamodel/BlockchainIndexing/types.js +1 -0
  104. package/codegen/datamodel/Blockchains/errors.js +1 -0
  105. package/codegen/datamodel/Blockchains/index.d.ts +2 -0
  106. package/codegen/datamodel/Blockchains/index.js +18 -0
  107. package/codegen/datamodel/Blockchains/responses.d.ts +12 -0
  108. package/codegen/datamodel/Blockchains/responses.js +2 -0
  109. package/codegen/datamodel/Blockchains/types.d.ts +270 -0
  110. package/codegen/datamodel/Blockchains/types.js +53 -0
  111. package/codegen/datamodel/Callbacks/errors.js +1 -0
  112. package/codegen/datamodel/Callbacks/index.d.ts +2 -0
  113. package/codegen/datamodel/Callbacks/index.js +18 -0
  114. package/codegen/datamodel/Callbacks/responses.d.ts +36 -0
  115. package/codegen/datamodel/Callbacks/responses.js +2 -0
  116. package/codegen/datamodel/Callbacks/types.d.ts +43 -0
  117. package/codegen/datamodel/Callbacks/types.js +39 -0
  118. package/codegen/datamodel/Foundations/errors.d.ts +131 -0
  119. package/codegen/datamodel/Foundations/errors.js +182 -0
  120. package/codegen/datamodel/Foundations/index.d.ts +2 -0
  121. package/codegen/datamodel/Foundations/index.js +18 -0
  122. package/codegen/datamodel/Foundations/responses.js +1 -0
  123. package/codegen/datamodel/Foundations/types.d.ts +9759 -0
  124. package/codegen/datamodel/Foundations/types.js +57755 -0
  125. package/codegen/datamodel/Orgs/errors.js +1 -0
  126. package/codegen/datamodel/Orgs/index.d.ts +2 -0
  127. package/codegen/datamodel/Orgs/index.js +18 -0
  128. package/codegen/datamodel/Orgs/responses.d.ts +45 -0
  129. package/codegen/datamodel/Orgs/responses.js +2 -0
  130. package/codegen/datamodel/Orgs/types.d.ts +240 -0
  131. package/codegen/datamodel/Orgs/types.js +39 -0
  132. package/codegen/datamodel/Permissions/errors.js +1 -0
  133. package/codegen/datamodel/Permissions/index.d.ts +2 -0
  134. package/codegen/datamodel/Permissions/index.js +18 -0
  135. package/codegen/datamodel/Permissions/responses.d.ts +75 -0
  136. package/codegen/datamodel/Permissions/responses.js +2 -0
  137. package/codegen/datamodel/Permissions/types.d.ts +93 -0
  138. package/codegen/datamodel/Permissions/types.js +43 -0
  139. package/codegen/datamodel/PolicyExecution/errors.d.ts +11 -0
  140. package/codegen/datamodel/PolicyExecution/errors.js +17 -0
  141. package/codegen/datamodel/PolicyExecution/index.d.ts +3 -0
  142. package/codegen/datamodel/PolicyExecution/index.js +19 -0
  143. package/codegen/datamodel/PolicyExecution/responses.d.ts +19 -0
  144. package/codegen/datamodel/PolicyExecution/responses.js +2 -0
  145. package/codegen/datamodel/PolicyExecution/types.d.ts +60 -0
  146. package/codegen/datamodel/PolicyExecution/types.js +17 -0
  147. package/codegen/datamodel/PolicyManagement/errors.js +1 -0
  148. package/codegen/datamodel/PolicyManagement/index.d.ts +2 -0
  149. package/codegen/datamodel/PolicyManagement/index.js +18 -0
  150. package/codegen/datamodel/PolicyManagement/responses.d.ts +83 -0
  151. package/codegen/datamodel/PolicyManagement/responses.js +2 -0
  152. package/codegen/datamodel/PolicyManagement/types.d.ts +391 -0
  153. package/codegen/datamodel/PolicyManagement/types.js +95 -0
  154. package/codegen/datamodel/PublicKeys/errors.js +1 -0
  155. package/codegen/datamodel/PublicKeys/index.d.ts +2 -0
  156. package/codegen/datamodel/PublicKeys/index.js +18 -0
  157. package/codegen/datamodel/PublicKeys/responses.d.ts +56 -0
  158. package/codegen/datamodel/PublicKeys/responses.js +2 -0
  159. package/codegen/datamodel/PublicKeys/types.d.ts +223 -0
  160. package/codegen/datamodel/PublicKeys/types.js +59 -0
  161. package/codegen/datamodel/Signers/errors.js +1 -0
  162. package/codegen/datamodel/Signers/index.d.ts +2 -0
  163. package/codegen/datamodel/Signers/index.js +18 -0
  164. package/codegen/datamodel/Signers/responses.d.ts +27 -0
  165. package/codegen/datamodel/Signers/responses.js +2 -0
  166. package/codegen/datamodel/Signers/types.d.ts +21 -0
  167. package/codegen/datamodel/Signers/types.js +2 -0
  168. package/codegen/datamodel/Wallets/errors.js +1 -0
  169. package/codegen/datamodel/Wallets/index.d.ts +2 -0
  170. package/codegen/datamodel/Wallets/index.js +18 -0
  171. package/codegen/datamodel/Wallets/responses.d.ts +92 -0
  172. package/codegen/datamodel/Wallets/responses.js +2 -0
  173. package/codegen/datamodel/Wallets/types.d.ts +677 -0
  174. package/codegen/datamodel/Wallets/types.js +251 -0
  175. package/dfnsApiClient.d.ts +39 -0
  176. package/dfnsApiClient.js +63 -0
  177. package/dfnsAuthenticator.d.ts +17 -0
  178. package/dfnsAuthenticator.js +29 -0
  179. package/dfnsDelegatedApiClient.d.ts +38 -0
  180. package/dfnsDelegatedApiClient.js +63 -0
  181. package/dfnsError.d.ts +5 -0
  182. package/dfnsError.js +11 -0
  183. package/generated/permissions/client.d.ts +14 -0
  184. package/generated/permissions/client.js +104 -0
  185. package/generated/permissions/delegatedClient.d.ts +20 -0
  186. package/generated/permissions/delegatedClient.js +180 -0
  187. package/generated/permissions/index.d.ts +3 -0
  188. package/generated/permissions/index.js +19 -0
  189. package/generated/permissions/types.d.ts +225 -0
  190. package/generated/permissions/types.js +2 -0
  191. package/generated/policies/client.d.ts +13 -0
  192. package/generated/policies/client.js +92 -0
  193. package/generated/policies/delegatedClient.d.ts +18 -0
  194. package/generated/policies/delegatedClient.js +153 -0
  195. package/generated/policies/index.d.ts +3 -0
  196. package/generated/policies/index.js +19 -0
  197. package/generated/policies/{types.ts → types.d.ts} +409 -39
  198. package/generated/policies/types.js +2 -0
  199. package/generated/signers/client.d.ts +7 -0
  200. package/generated/signers/client.js +22 -0
  201. package/generated/signers/delegatedClient.d.ts +7 -0
  202. package/generated/signers/delegatedClient.js +22 -0
  203. package/generated/signers/index.d.ts +3 -0
  204. package/generated/signers/index.js +19 -0
  205. package/generated/signers/{types.ts → types.d.ts} +0 -1
  206. package/generated/signers/types.js +2 -0
  207. package/generated/wallets/client.d.ts +25 -0
  208. package/generated/wallets/client.js +228 -0
  209. package/generated/wallets/delegatedClient.d.ts +34 -0
  210. package/generated/wallets/delegatedClient.js +349 -0
  211. package/generated/wallets/index.d.ts +3 -0
  212. package/generated/wallets/index.js +19 -0
  213. package/generated/wallets/{types.ts → types.d.ts} +68 -109
  214. package/generated/wallets/types.js +2 -0
  215. package/generated/webhooks/client.d.ts +14 -0
  216. package/generated/webhooks/client.js +103 -0
  217. package/generated/webhooks/delegatedClient.d.ts +19 -0
  218. package/generated/webhooks/delegatedClient.js +164 -0
  219. package/generated/webhooks/index.d.ts +3 -0
  220. package/generated/webhooks/index.js +19 -0
  221. package/generated/webhooks/{types.ts → types.d.ts} +16 -34
  222. package/generated/webhooks/types.js +2 -0
  223. package/index.d.ts +7 -0
  224. package/index.js +23 -0
  225. package/package.json +8 -1
  226. package/signer.d.ts +52 -0
  227. package/signer.js +2 -0
  228. package/store.d.ts +79 -0
  229. package/store.js +2 -0
  230. package/types/policies.d.ts +1 -0
  231. package/types/policies.js +17 -0
  232. package/types/signers.d.ts +1 -0
  233. package/types/signers.js +17 -0
  234. package/types/wallets.d.ts +1 -0
  235. package/types/wallets.js +17 -0
  236. package/types/webhooks.d.ts +1 -0
  237. package/types/webhooks.js +17 -0
  238. package/utils/base64.d.ts +3 -0
  239. package/utils/base64.js +20 -0
  240. package/utils/fetch.d.ts +12 -0
  241. package/utils/fetch.js +94 -0
  242. package/utils/index.d.ts +4 -0
  243. package/utils/index.js +20 -0
  244. package/utils/nonce.d.ts +1 -0
  245. package/utils/nonce.js +12 -0
  246. package/utils/url.d.ts +4 -0
  247. package/utils/url.js +16 -0
  248. package/baseAuthApi.ts +0 -236
  249. package/codegen/Assets/AssetsClient.ts +0 -137
  250. package/codegen/Assets/DelegatedAssetsClient.ts +0 -201
  251. package/codegen/Assets/index.ts +0 -3
  252. package/codegen/Assets/types.ts +0 -45
  253. package/codegen/Auth/AuthClient.ts +0 -729
  254. package/codegen/Auth/DelegatedAuthClient.ts +0 -1508
  255. package/codegen/Auth/index.ts +0 -3
  256. package/codegen/Auth/types.ts +0 -262
  257. package/codegen/Blockchains/BlockchainsClient.ts +0 -25
  258. package/codegen/Blockchains/DelegatedBlockchainsClient.ts +0 -25
  259. package/codegen/Blockchains/index.ts +0 -3
  260. package/codegen/Blockchains/types.ts +0 -8
  261. package/codegen/Callbacks/CallbacksClient.ts +0 -107
  262. package/codegen/Callbacks/DelegatedCallbacksClient.ts +0 -172
  263. package/codegen/Callbacks/index.ts +0 -3
  264. package/codegen/Permissions/DelegatedPermissionsClient.ts +0 -468
  265. package/codegen/Permissions/PermissionsClient.ts +0 -223
  266. package/codegen/Permissions/index.ts +0 -3
  267. package/codegen/Permissions/types.ts +0 -82
  268. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.ts +0 -99
  269. package/codegen/PolicyExecution/PolicyExecutionClient.ts +0 -63
  270. package/codegen/PolicyExecution/index.ts +0 -3
  271. package/codegen/PolicyExecution/types.ts +0 -24
  272. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.ts +0 -384
  273. package/codegen/PolicyManagement/PolicyManagementClient.ts +0 -205
  274. package/codegen/PolicyManagement/index.ts +0 -3
  275. package/codegen/PublicKeys/DelegatedPublicKeysClient.ts +0 -299
  276. package/codegen/PublicKeys/PublicKeysClient.ts +0 -179
  277. package/codegen/PublicKeys/index.ts +0 -3
  278. package/codegen/PublicKeys/types.ts +0 -68
  279. package/codegen/Signers/DelegatedSignersClient.ts +0 -22
  280. package/codegen/Signers/SignersClient.ts +0 -22
  281. package/codegen/Signers/index.ts +0 -3
  282. package/codegen/Signers/types.ts +0 -3
  283. package/codegen/Wallets/DelegatedWalletsClient.ts +0 -511
  284. package/codegen/Wallets/WalletsClient.ts +0 -310
  285. package/codegen/Wallets/index.ts +0 -3
  286. package/codegen/Wallets/types.ts +0 -137
  287. package/codegen/datamodel/ApiKeys/errors.ts +0 -9
  288. package/codegen/datamodel/ApiKeys/index.ts +0 -3
  289. package/codegen/datamodel/ApiKeys/responses.ts +0 -68
  290. package/codegen/datamodel/ApiKeys/types.ts +0 -81
  291. package/codegen/datamodel/Assets/errors.ts +0 -24
  292. package/codegen/datamodel/Assets/index.ts +0 -3
  293. package/codegen/datamodel/Assets/responses.ts +0 -146
  294. package/codegen/datamodel/Assets/types.ts +0 -417
  295. package/codegen/datamodel/Auth/index.ts +0 -2
  296. package/codegen/datamodel/Auth/responses.ts +0 -1110
  297. package/codegen/datamodel/Auth/types.ts +0 -1404
  298. package/codegen/datamodel/BlockchainIndexing/index.ts +0 -1
  299. package/codegen/datamodel/Blockchains/index.ts +0 -2
  300. package/codegen/datamodel/Blockchains/responses.ts +0 -41
  301. package/codegen/datamodel/Blockchains/types.ts +0 -695
  302. package/codegen/datamodel/Callbacks/index.ts +0 -2
  303. package/codegen/datamodel/Callbacks/responses.ts +0 -110
  304. package/codegen/datamodel/Callbacks/types.ts +0 -100
  305. package/codegen/datamodel/Foundations/errors.ts +0 -299
  306. package/codegen/datamodel/Foundations/index.ts +0 -2
  307. package/codegen/datamodel/Foundations/types.ts +0 -57921
  308. package/codegen/datamodel/Orgs/index.ts +0 -2
  309. package/codegen/datamodel/Orgs/responses.ts +0 -104
  310. package/codegen/datamodel/Orgs/types.ts +0 -322
  311. package/codegen/datamodel/Permissions/index.ts +0 -2
  312. package/codegen/datamodel/Permissions/responses.ts +0 -258
  313. package/codegen/datamodel/Permissions/types.ts +0 -221
  314. package/codegen/datamodel/PolicyExecution/errors.ts +0 -24
  315. package/codegen/datamodel/PolicyExecution/index.ts +0 -3
  316. package/codegen/datamodel/PolicyExecution/responses.ts +0 -59
  317. package/codegen/datamodel/PolicyExecution/types.ts +0 -122
  318. package/codegen/datamodel/PolicyManagement/index.ts +0 -2
  319. package/codegen/datamodel/PolicyManagement/responses.ts +0 -255
  320. package/codegen/datamodel/PolicyManagement/types.ts +0 -711
  321. package/codegen/datamodel/PublicKeys/index.ts +0 -2
  322. package/codegen/datamodel/PublicKeys/responses.ts +0 -190
  323. package/codegen/datamodel/PublicKeys/types.ts +0 -558
  324. package/codegen/datamodel/Signers/index.ts +0 -2
  325. package/codegen/datamodel/Signers/responses.ts +0 -64
  326. package/codegen/datamodel/Signers/types.ts +0 -31
  327. package/codegen/datamodel/Wallets/errors.ts +0 -0
  328. package/codegen/datamodel/Wallets/index.ts +0 -2
  329. package/codegen/datamodel/Wallets/responses.ts +0 -318
  330. package/codegen/datamodel/Wallets/types.ts +0 -1268
  331. package/dfnsApiClient.ts +0 -76
  332. package/dfnsAuthenticator.ts +0 -59
  333. package/dfnsDelegatedApiClient.ts +0 -75
  334. package/dfnsError.ts +0 -5
  335. package/generated/permissions/client.ts +0 -125
  336. package/generated/permissions/delegatedClient.ts +0 -266
  337. package/generated/permissions/index.ts +0 -3
  338. package/generated/permissions/types.ts +0 -202
  339. package/generated/policies/client.ts +0 -110
  340. package/generated/policies/delegatedClient.ts +0 -223
  341. package/generated/policies/index.ts +0 -3
  342. package/generated/signers/client.ts +0 -22
  343. package/generated/signers/delegatedClient.ts +0 -23
  344. package/generated/signers/index.ts +0 -3
  345. package/generated/wallets/client.ts +0 -282
  346. package/generated/wallets/delegatedClient.ts +0 -507
  347. package/generated/wallets/index.ts +0 -3
  348. package/generated/webhooks/client.ts +0 -124
  349. package/generated/webhooks/delegatedClient.ts +0 -237
  350. package/generated/webhooks/index.ts +0 -3
  351. package/index.ts +0 -7
  352. package/project.json +0 -14
  353. package/signer.ts +0 -60
  354. package/store.ts +0 -99
  355. package/tsconfig.json +0 -7
  356. package/typedoc.json +0 -21
  357. package/types/policies.ts +0 -1
  358. package/types/signers.ts +0 -1
  359. package/types/wallets.ts +0 -1
  360. package/types/webhooks.ts +0 -1
  361. package/utils/base64.ts +0 -19
  362. package/utils/fetch.ts +0 -130
  363. package/utils/index.ts +0 -4
  364. package/utils/nonce.ts +0 -12
  365. package/utils/url.ts +0 -19
  366. /package/{README.md → codegen/datamodel/Auth/errors.d.ts} +0 -0
  367. /package/codegen/datamodel/{Auth/errors.ts → BlockchainIndexing/errors.d.ts} +0 -0
  368. /package/codegen/datamodel/BlockchainIndexing/{errors.ts → types.d.ts} +0 -0
  369. /package/codegen/datamodel/{BlockchainIndexing/types.ts → Blockchains/errors.d.ts} +0 -0
  370. /package/codegen/datamodel/{Blockchains/errors.ts → Callbacks/errors.d.ts} +0 -0
  371. /package/codegen/datamodel/{Callbacks/errors.ts → Foundations/responses.d.ts} +0 -0
  372. /package/codegen/datamodel/{Foundations/responses.ts → Orgs/errors.d.ts} +0 -0
  373. /package/codegen/datamodel/{Orgs/errors.ts → Permissions/errors.d.ts} +0 -0
  374. /package/codegen/datamodel/{Permissions/errors.ts → PolicyManagement/errors.d.ts} +0 -0
  375. /package/codegen/datamodel/{PolicyManagement/errors.ts → PublicKeys/errors.d.ts} +0 -0
  376. /package/codegen/datamodel/{PublicKeys/errors.ts → Signers/errors.d.ts} +0 -0
  377. /package/codegen/datamodel/{Signers/errors.ts → Wallets/errors.d.ts} +0 -0
@@ -0,0 +1,936 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DelegatedAuthClient = void 0;
4
+ const baseAuthApi_1 = require("../../baseAuthApi");
5
+ const fetch_1 = require("../../utils/fetch");
6
+ const url_1 = require("../../utils/url");
7
+ class DelegatedAuthClient {
8
+ constructor(apiOptions) {
9
+ this.apiOptions = apiOptions;
10
+ }
11
+ async createDelegatedUserRegistrationInit(request) {
12
+ const path = (0, url_1.buildPathAndQuery)('/auth/registration/delegated', {
13
+ path: {},
14
+ query: {},
15
+ });
16
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
17
+ userActionHttpMethod: 'POST',
18
+ userActionHttpPath: path,
19
+ userActionPayload: JSON.stringify(request.body),
20
+ userActionServerKind: 'Api',
21
+ }, this.apiOptions);
22
+ return challenge;
23
+ }
24
+ async createDelegatedUserRegistrationComplete(request, signedChallenge) {
25
+ const path = (0, url_1.buildPathAndQuery)('/auth/registration/delegated', {
26
+ path: {},
27
+ query: {},
28
+ });
29
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
30
+ const response = await (0, fetch_1.simpleFetch)(path, {
31
+ method: 'POST',
32
+ body: request.body,
33
+ headers: { 'x-dfns-useraction': userAction },
34
+ apiOptions: this.apiOptions,
35
+ });
36
+ return response.json();
37
+ }
38
+ async createUserRegistration(request) {
39
+ const path = (0, url_1.buildPathAndQuery)('/auth/registration', {
40
+ path: {},
41
+ query: {},
42
+ });
43
+ const response = await (0, fetch_1.simpleFetch)(path, {
44
+ method: 'POST',
45
+ body: request.body,
46
+ apiOptions: this.apiOptions,
47
+ });
48
+ return response.json();
49
+ }
50
+ async createDelegatedUserLoginInit(request) {
51
+ const path = (0, url_1.buildPathAndQuery)('/auth/login/delegated', {
52
+ path: {},
53
+ query: {},
54
+ });
55
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
56
+ userActionHttpMethod: 'POST',
57
+ userActionHttpPath: path,
58
+ userActionPayload: JSON.stringify(request.body),
59
+ userActionServerKind: 'Api',
60
+ }, this.apiOptions);
61
+ return challenge;
62
+ }
63
+ async createDelegatedUserLoginComplete(request, signedChallenge) {
64
+ const path = (0, url_1.buildPathAndQuery)('/auth/login/delegated', {
65
+ path: {},
66
+ query: {},
67
+ });
68
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
69
+ const response = await (0, fetch_1.simpleFetch)(path, {
70
+ method: 'POST',
71
+ body: request.body,
72
+ headers: { 'x-dfns-useraction': userAction },
73
+ apiOptions: this.apiOptions,
74
+ });
75
+ return response.json();
76
+ }
77
+ async createUserActionSignatureChallenge(request) {
78
+ const path = (0, url_1.buildPathAndQuery)('/auth/action/init', {
79
+ path: {},
80
+ query: {},
81
+ });
82
+ const response = await (0, fetch_1.simpleFetch)(path, {
83
+ method: 'POST',
84
+ body: request.body,
85
+ apiOptions: this.apiOptions,
86
+ });
87
+ return response.json();
88
+ }
89
+ async createUserActionSignature(request) {
90
+ const path = (0, url_1.buildPathAndQuery)('/auth/action', {
91
+ path: {},
92
+ query: {},
93
+ });
94
+ const response = await (0, fetch_1.simpleFetch)(path, {
95
+ method: 'POST',
96
+ body: request.body,
97
+ apiOptions: this.apiOptions,
98
+ });
99
+ return response.json();
100
+ }
101
+ async createUserCredentialChallenge(request) {
102
+ const path = (0, url_1.buildPathAndQuery)('/auth/credentials/init', {
103
+ path: {},
104
+ query: {},
105
+ });
106
+ const response = await (0, fetch_1.simpleFetch)(path, {
107
+ method: 'POST',
108
+ body: request.body,
109
+ apiOptions: this.apiOptions,
110
+ });
111
+ return response.json();
112
+ }
113
+ async createUserCredentialInit(request) {
114
+ const path = (0, url_1.buildPathAndQuery)('/auth/credentials', {
115
+ path: {},
116
+ query: {},
117
+ });
118
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
119
+ userActionHttpMethod: 'POST',
120
+ userActionHttpPath: path,
121
+ userActionPayload: JSON.stringify(request.body),
122
+ userActionServerKind: 'Api',
123
+ }, this.apiOptions);
124
+ return challenge;
125
+ }
126
+ async createUserCredentialComplete(request, signedChallenge) {
127
+ const path = (0, url_1.buildPathAndQuery)('/auth/credentials', {
128
+ path: {},
129
+ query: {},
130
+ });
131
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
132
+ const response = await (0, fetch_1.simpleFetch)(path, {
133
+ method: 'POST',
134
+ body: request.body,
135
+ headers: { 'x-dfns-useraction': userAction },
136
+ apiOptions: this.apiOptions,
137
+ });
138
+ return response.json();
139
+ }
140
+ async activateCredentialInit(request) {
141
+ const path = (0, url_1.buildPathAndQuery)('/auth/credentials/activate', {
142
+ path: {},
143
+ query: {},
144
+ });
145
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
146
+ userActionHttpMethod: 'PUT',
147
+ userActionHttpPath: path,
148
+ userActionPayload: JSON.stringify(request.body),
149
+ userActionServerKind: 'Api',
150
+ }, this.apiOptions);
151
+ return challenge;
152
+ }
153
+ async activateCredentialComplete(request, signedChallenge) {
154
+ const path = (0, url_1.buildPathAndQuery)('/auth/credentials/activate', {
155
+ path: {},
156
+ query: {},
157
+ });
158
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
159
+ const response = await (0, fetch_1.simpleFetch)(path, {
160
+ method: 'PUT',
161
+ body: request.body,
162
+ headers: { 'x-dfns-useraction': userAction },
163
+ apiOptions: this.apiOptions,
164
+ });
165
+ return response.json();
166
+ }
167
+ async deactivateCredentialInit(request) {
168
+ const path = (0, url_1.buildPathAndQuery)('/auth/credentials/deactivate', {
169
+ path: {},
170
+ query: {},
171
+ });
172
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
173
+ userActionHttpMethod: 'PUT',
174
+ userActionHttpPath: path,
175
+ userActionPayload: JSON.stringify(request.body),
176
+ userActionServerKind: 'Api',
177
+ }, this.apiOptions);
178
+ return challenge;
179
+ }
180
+ async deactivateCredentialComplete(request, signedChallenge) {
181
+ const path = (0, url_1.buildPathAndQuery)('/auth/credentials/deactivate', {
182
+ path: {},
183
+ query: {},
184
+ });
185
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
186
+ const response = await (0, fetch_1.simpleFetch)(path, {
187
+ method: 'PUT',
188
+ body: request.body,
189
+ headers: { 'x-dfns-useraction': userAction },
190
+ apiOptions: this.apiOptions,
191
+ });
192
+ return response.json();
193
+ }
194
+ async listUserCredentials() {
195
+ const path = (0, url_1.buildPathAndQuery)('/auth/credentials', {
196
+ path: {},
197
+ query: {},
198
+ });
199
+ const response = await (0, fetch_1.simpleFetch)(path, {
200
+ method: 'GET',
201
+ apiOptions: this.apiOptions,
202
+ });
203
+ return response.json();
204
+ }
205
+ async createUserActionSignatureFromCode(request) {
206
+ const path = (0, url_1.buildPathAndQuery)('/auth/action/code/verify', {
207
+ path: {},
208
+ query: {},
209
+ });
210
+ const response = await (0, fetch_1.simpleFetch)(path, {
211
+ method: 'POST',
212
+ body: request.body,
213
+ apiOptions: this.apiOptions,
214
+ });
215
+ return response.json();
216
+ }
217
+ async createCodeUserActionSignatureChallenge(request) {
218
+ const path = (0, url_1.buildPathAndQuery)('/auth/action/code/init', {
219
+ path: {},
220
+ query: {},
221
+ });
222
+ const response = await (0, fetch_1.simpleFetch)(path, {
223
+ method: 'POST',
224
+ body: request.body,
225
+ apiOptions: this.apiOptions,
226
+ });
227
+ return response.json();
228
+ }
229
+ async createCodeUserActionSignature(request) {
230
+ const path = (0, url_1.buildPathAndQuery)('/auth/action/code', {
231
+ path: {},
232
+ query: {},
233
+ });
234
+ const response = await (0, fetch_1.simpleFetch)(path, {
235
+ method: 'POST',
236
+ body: request.body,
237
+ apiOptions: this.apiOptions,
238
+ });
239
+ return response.json();
240
+ }
241
+ async listPersonalAccessTokens() {
242
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats', {
243
+ path: {},
244
+ query: {},
245
+ });
246
+ const response = await (0, fetch_1.simpleFetch)(path, {
247
+ method: 'GET',
248
+ apiOptions: this.apiOptions,
249
+ });
250
+ return response.json();
251
+ }
252
+ async createPersonalAccessTokenInit(request) {
253
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats', {
254
+ path: {},
255
+ query: {},
256
+ });
257
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
258
+ userActionHttpMethod: 'POST',
259
+ userActionHttpPath: path,
260
+ userActionPayload: JSON.stringify(request.body),
261
+ userActionServerKind: 'Api',
262
+ }, this.apiOptions);
263
+ return challenge;
264
+ }
265
+ async createPersonalAccessTokenComplete(request, signedChallenge) {
266
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats', {
267
+ path: {},
268
+ query: {},
269
+ });
270
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
271
+ const response = await (0, fetch_1.simpleFetch)(path, {
272
+ method: 'POST',
273
+ body: request.body,
274
+ headers: { 'x-dfns-useraction': userAction },
275
+ apiOptions: this.apiOptions,
276
+ });
277
+ return response.json();
278
+ }
279
+ async getPersonalAccessTokens(request) {
280
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
281
+ path: { tokenId: request.tokenId },
282
+ query: {},
283
+ });
284
+ const response = await (0, fetch_1.simpleFetch)(path, {
285
+ method: 'GET',
286
+ apiOptions: this.apiOptions,
287
+ });
288
+ return response.json();
289
+ }
290
+ async updatePersonalAccessTokenInit(request) {
291
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
292
+ path: { tokenId: request.tokenId },
293
+ query: {},
294
+ });
295
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
296
+ userActionHttpMethod: 'PUT',
297
+ userActionHttpPath: path,
298
+ userActionPayload: JSON.stringify(request.body),
299
+ userActionServerKind: 'Api',
300
+ }, this.apiOptions);
301
+ return challenge;
302
+ }
303
+ async updatePersonalAccessTokenComplete(request, signedChallenge) {
304
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
305
+ path: { tokenId: request.tokenId },
306
+ query: {},
307
+ });
308
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
309
+ const response = await (0, fetch_1.simpleFetch)(path, {
310
+ method: 'PUT',
311
+ body: request.body,
312
+ headers: { 'x-dfns-useraction': userAction },
313
+ apiOptions: this.apiOptions,
314
+ });
315
+ return response.json();
316
+ }
317
+ async archivePersonalAccessTokenInit(request) {
318
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
319
+ path: { tokenId: request.tokenId },
320
+ query: {},
321
+ });
322
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
323
+ userActionHttpMethod: 'DELETE',
324
+ userActionHttpPath: path,
325
+ userActionPayload: JSON.stringify({}),
326
+ userActionServerKind: 'Api',
327
+ }, this.apiOptions);
328
+ return challenge;
329
+ }
330
+ async archivePersonalAccessTokenComplete(request, signedChallenge) {
331
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
332
+ path: { tokenId: request.tokenId },
333
+ query: {},
334
+ });
335
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
336
+ const response = await (0, fetch_1.simpleFetch)(path, {
337
+ method: 'DELETE',
338
+ body: {},
339
+ headers: { 'x-dfns-useraction': userAction },
340
+ apiOptions: this.apiOptions,
341
+ });
342
+ return response.json();
343
+ }
344
+ async activatePersonalAccessTokenInit(request) {
345
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId/activate', {
346
+ path: { tokenId: request.tokenId },
347
+ query: {},
348
+ });
349
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
350
+ userActionHttpMethod: 'PUT',
351
+ userActionHttpPath: path,
352
+ userActionPayload: JSON.stringify({}),
353
+ userActionServerKind: 'Api',
354
+ }, this.apiOptions);
355
+ return challenge;
356
+ }
357
+ async activatePersonalAccessTokenComplete(request, signedChallenge) {
358
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId/activate', {
359
+ path: { tokenId: request.tokenId },
360
+ query: {},
361
+ });
362
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
363
+ const response = await (0, fetch_1.simpleFetch)(path, {
364
+ method: 'PUT',
365
+ body: {},
366
+ headers: { 'x-dfns-useraction': userAction },
367
+ apiOptions: this.apiOptions,
368
+ });
369
+ return response.json();
370
+ }
371
+ async deactivatePersonalAccessTokenInit(request) {
372
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId/deactivate', {
373
+ path: { tokenId: request.tokenId },
374
+ query: {},
375
+ });
376
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
377
+ userActionHttpMethod: 'PUT',
378
+ userActionHttpPath: path,
379
+ userActionPayload: JSON.stringify({}),
380
+ userActionServerKind: 'Api',
381
+ }, this.apiOptions);
382
+ return challenge;
383
+ }
384
+ async deactivatePersonalAccessTokenComplete(request, signedChallenge) {
385
+ const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId/deactivate', {
386
+ path: { tokenId: request.tokenId },
387
+ query: {},
388
+ });
389
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
390
+ const response = await (0, fetch_1.simpleFetch)(path, {
391
+ method: 'PUT',
392
+ body: {},
393
+ headers: { 'x-dfns-useraction': userAction },
394
+ apiOptions: this.apiOptions,
395
+ });
396
+ return response.json();
397
+ }
398
+ async listServiceAccounts() {
399
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts', {
400
+ path: {},
401
+ query: {},
402
+ });
403
+ const response = await (0, fetch_1.simpleFetch)(path, {
404
+ method: 'GET',
405
+ apiOptions: this.apiOptions,
406
+ });
407
+ return response.json();
408
+ }
409
+ async createServiceAccountInit(request) {
410
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts', {
411
+ path: {},
412
+ query: {},
413
+ });
414
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
415
+ userActionHttpMethod: 'POST',
416
+ userActionHttpPath: path,
417
+ userActionPayload: JSON.stringify(request.body),
418
+ userActionServerKind: 'Api',
419
+ }, this.apiOptions);
420
+ return challenge;
421
+ }
422
+ async createServiceAccountComplete(request, signedChallenge) {
423
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts', {
424
+ path: {},
425
+ query: {},
426
+ });
427
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
428
+ const response = await (0, fetch_1.simpleFetch)(path, {
429
+ method: 'POST',
430
+ body: request.body,
431
+ headers: { 'x-dfns-useraction': userAction },
432
+ apiOptions: this.apiOptions,
433
+ });
434
+ return response.json();
435
+ }
436
+ async getServiceAccount(request) {
437
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
438
+ path: { serviceAccountId: request.serviceAccountId },
439
+ query: {},
440
+ });
441
+ const response = await (0, fetch_1.simpleFetch)(path, {
442
+ method: 'GET',
443
+ apiOptions: this.apiOptions,
444
+ });
445
+ return response.json();
446
+ }
447
+ async updateServiceAccountInit(request) {
448
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
449
+ path: { serviceAccountId: request.serviceAccountId },
450
+ query: {},
451
+ });
452
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
453
+ userActionHttpMethod: 'PUT',
454
+ userActionHttpPath: path,
455
+ userActionPayload: JSON.stringify(request.body),
456
+ userActionServerKind: 'Api',
457
+ }, this.apiOptions);
458
+ return challenge;
459
+ }
460
+ async updateServiceAccountComplete(request, signedChallenge) {
461
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
462
+ path: { serviceAccountId: request.serviceAccountId },
463
+ query: {},
464
+ });
465
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
466
+ const response = await (0, fetch_1.simpleFetch)(path, {
467
+ method: 'PUT',
468
+ body: request.body,
469
+ headers: { 'x-dfns-useraction': userAction },
470
+ apiOptions: this.apiOptions,
471
+ });
472
+ return response.json();
473
+ }
474
+ async archiveServiceAccountInit(request) {
475
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
476
+ path: { serviceAccountId: request.serviceAccountId },
477
+ query: {},
478
+ });
479
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
480
+ userActionHttpMethod: 'DELETE',
481
+ userActionHttpPath: path,
482
+ userActionPayload: JSON.stringify({}),
483
+ userActionServerKind: 'Api',
484
+ }, this.apiOptions);
485
+ return challenge;
486
+ }
487
+ async archiveServiceAccountComplete(request, signedChallenge) {
488
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
489
+ path: { serviceAccountId: request.serviceAccountId },
490
+ query: {},
491
+ });
492
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
493
+ const response = await (0, fetch_1.simpleFetch)(path, {
494
+ method: 'DELETE',
495
+ body: {},
496
+ headers: { 'x-dfns-useraction': userAction },
497
+ apiOptions: this.apiOptions,
498
+ });
499
+ return response.json();
500
+ }
501
+ async activateServiceAccountInit(request) {
502
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/activate', {
503
+ path: { serviceAccountId: request.serviceAccountId },
504
+ query: {},
505
+ });
506
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
507
+ userActionHttpMethod: 'PUT',
508
+ userActionHttpPath: path,
509
+ userActionPayload: JSON.stringify({}),
510
+ userActionServerKind: 'Api',
511
+ }, this.apiOptions);
512
+ return challenge;
513
+ }
514
+ async activateServiceAccountComplete(request, signedChallenge) {
515
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/activate', {
516
+ path: { serviceAccountId: request.serviceAccountId },
517
+ query: {},
518
+ });
519
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
520
+ const response = await (0, fetch_1.simpleFetch)(path, {
521
+ method: 'PUT',
522
+ body: {},
523
+ headers: { 'x-dfns-useraction': userAction },
524
+ apiOptions: this.apiOptions,
525
+ });
526
+ return response.json();
527
+ }
528
+ async deactivateServiceAccountInit(request) {
529
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/deactivate', {
530
+ path: { serviceAccountId: request.serviceAccountId },
531
+ query: {},
532
+ });
533
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
534
+ userActionHttpMethod: 'PUT',
535
+ userActionHttpPath: path,
536
+ userActionPayload: JSON.stringify({}),
537
+ userActionServerKind: 'Api',
538
+ }, this.apiOptions);
539
+ return challenge;
540
+ }
541
+ async deactivateServiceAccountComplete(request, signedChallenge) {
542
+ const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId/deactivate', {
543
+ path: { serviceAccountId: request.serviceAccountId },
544
+ query: {},
545
+ });
546
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
547
+ const response = await (0, fetch_1.simpleFetch)(path, {
548
+ method: 'PUT',
549
+ body: {},
550
+ headers: { 'x-dfns-useraction': userAction },
551
+ apiOptions: this.apiOptions,
552
+ });
553
+ return response.json();
554
+ }
555
+ async listUsers() {
556
+ const path = (0, url_1.buildPathAndQuery)('/auth/users', {
557
+ path: {},
558
+ query: {},
559
+ });
560
+ const response = await (0, fetch_1.simpleFetch)(path, {
561
+ method: 'GET',
562
+ apiOptions: this.apiOptions,
563
+ });
564
+ return response.json();
565
+ }
566
+ async createUserInit(request) {
567
+ const path = (0, url_1.buildPathAndQuery)('/auth/users', {
568
+ path: {},
569
+ query: {},
570
+ });
571
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
572
+ userActionHttpMethod: 'POST',
573
+ userActionHttpPath: path,
574
+ userActionPayload: JSON.stringify(request.body),
575
+ userActionServerKind: 'Api',
576
+ }, this.apiOptions);
577
+ return challenge;
578
+ }
579
+ async createUserComplete(request, signedChallenge) {
580
+ const path = (0, url_1.buildPathAndQuery)('/auth/users', {
581
+ path: {},
582
+ query: {},
583
+ });
584
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
585
+ const response = await (0, fetch_1.simpleFetch)(path, {
586
+ method: 'POST',
587
+ body: request.body,
588
+ headers: { 'x-dfns-useraction': userAction },
589
+ apiOptions: this.apiOptions,
590
+ });
591
+ return response.json();
592
+ }
593
+ async getUser(request) {
594
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId', {
595
+ path: { userId: request.userId },
596
+ query: {},
597
+ });
598
+ const response = await (0, fetch_1.simpleFetch)(path, {
599
+ method: 'GET',
600
+ apiOptions: this.apiOptions,
601
+ });
602
+ return response.json();
603
+ }
604
+ async updateUserInit(request) {
605
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId', {
606
+ path: { userId: request.userId },
607
+ query: {},
608
+ });
609
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
610
+ userActionHttpMethod: 'PUT',
611
+ userActionHttpPath: path,
612
+ userActionPayload: JSON.stringify(request.body),
613
+ userActionServerKind: 'Api',
614
+ }, this.apiOptions);
615
+ return challenge;
616
+ }
617
+ async updateUserComplete(request, signedChallenge) {
618
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId', {
619
+ path: { userId: request.userId },
620
+ query: {},
621
+ });
622
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
623
+ const response = await (0, fetch_1.simpleFetch)(path, {
624
+ method: 'PUT',
625
+ body: request.body,
626
+ headers: { 'x-dfns-useraction': userAction },
627
+ apiOptions: this.apiOptions,
628
+ });
629
+ return response.json();
630
+ }
631
+ async archiveUserInit(request) {
632
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId', {
633
+ path: { userId: request.userId },
634
+ query: {},
635
+ });
636
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
637
+ userActionHttpMethod: 'DELETE',
638
+ userActionHttpPath: path,
639
+ userActionPayload: JSON.stringify({}),
640
+ userActionServerKind: 'Api',
641
+ }, this.apiOptions);
642
+ return challenge;
643
+ }
644
+ async archiveUserComplete(request, signedChallenge) {
645
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId', {
646
+ path: { userId: request.userId },
647
+ query: {},
648
+ });
649
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
650
+ const response = await (0, fetch_1.simpleFetch)(path, {
651
+ method: 'DELETE',
652
+ body: {},
653
+ headers: { 'x-dfns-useraction': userAction },
654
+ apiOptions: this.apiOptions,
655
+ });
656
+ return response.json();
657
+ }
658
+ async activateUserInit(request) {
659
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId/activate', {
660
+ path: { userId: request.userId },
661
+ query: {},
662
+ });
663
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
664
+ userActionHttpMethod: 'PUT',
665
+ userActionHttpPath: path,
666
+ userActionPayload: JSON.stringify({}),
667
+ userActionServerKind: 'Api',
668
+ }, this.apiOptions);
669
+ return challenge;
670
+ }
671
+ async activateUserComplete(request, signedChallenge) {
672
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId/activate', {
673
+ path: { userId: request.userId },
674
+ query: {},
675
+ });
676
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
677
+ const response = await (0, fetch_1.simpleFetch)(path, {
678
+ method: 'PUT',
679
+ body: {},
680
+ headers: { 'x-dfns-useraction': userAction },
681
+ apiOptions: this.apiOptions,
682
+ });
683
+ return response.json();
684
+ }
685
+ async deactivateUserInit(request) {
686
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId/deactivate', {
687
+ path: { userId: request.userId },
688
+ query: {},
689
+ });
690
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
691
+ userActionHttpMethod: 'PUT',
692
+ userActionHttpPath: path,
693
+ userActionPayload: JSON.stringify({}),
694
+ userActionServerKind: 'Api',
695
+ }, this.apiOptions);
696
+ return challenge;
697
+ }
698
+ async deactivateUserComplete(request, signedChallenge) {
699
+ const path = (0, url_1.buildPathAndQuery)('/auth/users/:userId/deactivate', {
700
+ path: { userId: request.userId },
701
+ query: {},
702
+ });
703
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
704
+ const response = await (0, fetch_1.simpleFetch)(path, {
705
+ method: 'PUT',
706
+ body: {},
707
+ headers: { 'x-dfns-useraction': userAction },
708
+ apiOptions: this.apiOptions,
709
+ });
710
+ return response.json();
711
+ }
712
+ async listApplications() {
713
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps', {
714
+ path: {},
715
+ query: {},
716
+ });
717
+ const response = await (0, fetch_1.simpleFetch)(path, {
718
+ method: 'GET',
719
+ apiOptions: this.apiOptions,
720
+ });
721
+ return response.json();
722
+ }
723
+ async createApplicationInit(request) {
724
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps', {
725
+ path: {},
726
+ query: {},
727
+ });
728
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
729
+ userActionHttpMethod: 'POST',
730
+ userActionHttpPath: path,
731
+ userActionPayload: JSON.stringify(request.body),
732
+ userActionServerKind: 'Api',
733
+ }, this.apiOptions);
734
+ return challenge;
735
+ }
736
+ async createApplicationComplete(request, signedChallenge) {
737
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps', {
738
+ path: {},
739
+ query: {},
740
+ });
741
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
742
+ const response = await (0, fetch_1.simpleFetch)(path, {
743
+ method: 'POST',
744
+ body: request.body,
745
+ headers: { 'x-dfns-useraction': userAction },
746
+ apiOptions: this.apiOptions,
747
+ });
748
+ return response.json();
749
+ }
750
+ async getApplication(request) {
751
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId', {
752
+ path: { appId: request.appId },
753
+ query: {},
754
+ });
755
+ const response = await (0, fetch_1.simpleFetch)(path, {
756
+ method: 'GET',
757
+ apiOptions: this.apiOptions,
758
+ });
759
+ return response.json();
760
+ }
761
+ async updateApplicationInit(request) {
762
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId', {
763
+ path: { appId: request.appId },
764
+ query: {},
765
+ });
766
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
767
+ userActionHttpMethod: 'PUT',
768
+ userActionHttpPath: path,
769
+ userActionPayload: JSON.stringify(request.body),
770
+ userActionServerKind: 'Api',
771
+ }, this.apiOptions);
772
+ return challenge;
773
+ }
774
+ async updateApplicationComplete(request, signedChallenge) {
775
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId', {
776
+ path: { appId: request.appId },
777
+ query: {},
778
+ });
779
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
780
+ const response = await (0, fetch_1.simpleFetch)(path, {
781
+ method: 'PUT',
782
+ body: request.body,
783
+ headers: { 'x-dfns-useraction': userAction },
784
+ apiOptions: this.apiOptions,
785
+ });
786
+ return response.json();
787
+ }
788
+ async archiveApplicationInit(request) {
789
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId', {
790
+ path: { appId: request.appId },
791
+ query: {},
792
+ });
793
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
794
+ userActionHttpMethod: 'DELETE',
795
+ userActionHttpPath: path,
796
+ userActionPayload: JSON.stringify({}),
797
+ userActionServerKind: 'Api',
798
+ }, this.apiOptions);
799
+ return challenge;
800
+ }
801
+ async archiveApplicationComplete(request, signedChallenge) {
802
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId', {
803
+ path: { appId: request.appId },
804
+ query: {},
805
+ });
806
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
807
+ const response = await (0, fetch_1.simpleFetch)(path, {
808
+ method: 'DELETE',
809
+ body: {},
810
+ headers: { 'x-dfns-useraction': userAction },
811
+ apiOptions: this.apiOptions,
812
+ });
813
+ return response.json();
814
+ }
815
+ async activateApplicationInit(request) {
816
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/activate', {
817
+ path: { appId: request.appId },
818
+ query: {},
819
+ });
820
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
821
+ userActionHttpMethod: 'PUT',
822
+ userActionHttpPath: path,
823
+ userActionPayload: JSON.stringify({}),
824
+ userActionServerKind: 'Api',
825
+ }, this.apiOptions);
826
+ return challenge;
827
+ }
828
+ async activateApplicationComplete(request, signedChallenge) {
829
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/activate', {
830
+ path: { appId: request.appId },
831
+ query: {},
832
+ });
833
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
834
+ const response = await (0, fetch_1.simpleFetch)(path, {
835
+ method: 'PUT',
836
+ body: {},
837
+ headers: { 'x-dfns-useraction': userAction },
838
+ apiOptions: this.apiOptions,
839
+ });
840
+ return response.json();
841
+ }
842
+ async deactivateApplicationInit(request) {
843
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/deactivate', {
844
+ path: { appId: request.appId },
845
+ query: {},
846
+ });
847
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
848
+ userActionHttpMethod: 'PUT',
849
+ userActionHttpPath: path,
850
+ userActionPayload: JSON.stringify({}),
851
+ userActionServerKind: 'Api',
852
+ }, this.apiOptions);
853
+ return challenge;
854
+ }
855
+ async deactivateApplicationComplete(request, signedChallenge) {
856
+ const path = (0, url_1.buildPathAndQuery)('/auth/apps/:appId/deactivate', {
857
+ path: { appId: request.appId },
858
+ query: {},
859
+ });
860
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
861
+ const response = await (0, fetch_1.simpleFetch)(path, {
862
+ method: 'PUT',
863
+ body: {},
864
+ headers: { 'x-dfns-useraction': userAction },
865
+ apiOptions: this.apiOptions,
866
+ });
867
+ return response.json();
868
+ }
869
+ async createUserRecovery(request) {
870
+ const path = (0, url_1.buildPathAndQuery)('/auth/recover/user', {
871
+ path: {},
872
+ query: {},
873
+ });
874
+ const response = await (0, fetch_1.simpleFetch)(path, {
875
+ method: 'POST',
876
+ body: request.body,
877
+ apiOptions: this.apiOptions,
878
+ });
879
+ return response.json();
880
+ }
881
+ async restartDelegatedUserRegistrationInit(request) {
882
+ const path = (0, url_1.buildPathAndQuery)('/auth/registration/delegated/restart', {
883
+ path: {},
884
+ query: {},
885
+ });
886
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
887
+ userActionHttpMethod: 'POST',
888
+ userActionHttpPath: path,
889
+ userActionPayload: JSON.stringify(request.body),
890
+ userActionServerKind: 'Api',
891
+ }, this.apiOptions);
892
+ return challenge;
893
+ }
894
+ async restartDelegatedUserRegistrationComplete(request, signedChallenge) {
895
+ const path = (0, url_1.buildPathAndQuery)('/auth/registration/delegated/restart', {
896
+ path: {},
897
+ query: {},
898
+ });
899
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
900
+ const response = await (0, fetch_1.simpleFetch)(path, {
901
+ method: 'POST',
902
+ body: request.body,
903
+ headers: { 'x-dfns-useraction': userAction },
904
+ apiOptions: this.apiOptions,
905
+ });
906
+ return response.json();
907
+ }
908
+ async createDelegatedUserRecoveryInit(request) {
909
+ const path = (0, url_1.buildPathAndQuery)('/auth/recover/user/delegated', {
910
+ path: {},
911
+ query: {},
912
+ });
913
+ const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
914
+ userActionHttpMethod: 'POST',
915
+ userActionHttpPath: path,
916
+ userActionPayload: JSON.stringify(request.body),
917
+ userActionServerKind: 'Api',
918
+ }, this.apiOptions);
919
+ return challenge;
920
+ }
921
+ async createDelegatedUserRecoveryComplete(request, signedChallenge) {
922
+ const path = (0, url_1.buildPathAndQuery)('/auth/recover/user/delegated', {
923
+ path: {},
924
+ query: {},
925
+ });
926
+ const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
927
+ const response = await (0, fetch_1.simpleFetch)(path, {
928
+ method: 'POST',
929
+ body: request.body,
930
+ headers: { 'x-dfns-useraction': userAction },
931
+ apiOptions: this.apiOptions,
932
+ });
933
+ return response.json();
934
+ }
935
+ }
936
+ exports.DelegatedAuthClient = DelegatedAuthClient;