@medusajs/types 1.11.13 → 1.11.14-next-20240305095805

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 (356) hide show
  1. package/dist/api-key/common/api-key.d.ts +21 -0
  2. package/dist/api-key/common/api-key.d.ts.map +1 -0
  3. package/dist/api-key/common/api-key.js +3 -0
  4. package/dist/api-key/common/api-key.js.map +1 -0
  5. package/dist/api-key/common/index.d.ts +2 -0
  6. package/dist/api-key/common/index.d.ts.map +1 -0
  7. package/dist/api-key/common/index.js +18 -0
  8. package/dist/api-key/common/index.js.map +1 -0
  9. package/dist/api-key/index.d.ts +4 -0
  10. package/dist/api-key/index.d.ts.map +1 -0
  11. package/dist/api-key/index.js +20 -0
  12. package/dist/api-key/index.js.map +1 -0
  13. package/dist/api-key/mutations/api-key.d.ts +20 -0
  14. package/dist/api-key/mutations/api-key.d.ts.map +1 -0
  15. package/dist/api-key/mutations/api-key.js +3 -0
  16. package/dist/api-key/mutations/api-key.js.map +1 -0
  17. package/dist/api-key/mutations/index.d.ts +2 -0
  18. package/dist/api-key/mutations/index.d.ts.map +1 -0
  19. package/dist/api-key/mutations/index.js +18 -0
  20. package/dist/api-key/mutations/index.js.map +1 -0
  21. package/dist/api-key/service.d.ts +104 -0
  22. package/dist/api-key/service.d.ts.map +1 -0
  23. package/dist/api-key/service.js +3 -0
  24. package/dist/api-key/service.js.map +1 -0
  25. package/dist/auth/common/auth-user.d.ts +78 -0
  26. package/dist/auth/common/auth-user.d.ts.map +1 -1
  27. package/dist/auth/common/provider.d.ts +57 -0
  28. package/dist/auth/common/provider.d.ts.map +1 -1
  29. package/dist/auth/service.d.ts +160 -0
  30. package/dist/auth/service.d.ts.map +1 -1
  31. package/dist/bundles.d.ts +5 -0
  32. package/dist/bundles.d.ts.map +1 -1
  33. package/dist/bundles.js +6 -1
  34. package/dist/bundles.js.map +1 -1
  35. package/dist/cart/common.d.ts +22 -13
  36. package/dist/cart/common.d.ts.map +1 -1
  37. package/dist/cart/index.d.ts +1 -0
  38. package/dist/cart/index.d.ts.map +1 -1
  39. package/dist/cart/index.js +1 -0
  40. package/dist/cart/index.js.map +1 -1
  41. package/dist/cart/mutations.d.ts +21 -14
  42. package/dist/cart/mutations.d.ts.map +1 -1
  43. package/dist/cart/mutations.js.map +1 -1
  44. package/dist/cart/service.d.ts +38 -24
  45. package/dist/cart/service.d.ts.map +1 -1
  46. package/dist/cart/workflows.d.ts +80 -0
  47. package/dist/cart/workflows.d.ts.map +1 -0
  48. package/dist/cart/workflows.js +3 -0
  49. package/dist/cart/workflows.js.map +1 -0
  50. package/dist/common/common.d.ts +233 -0
  51. package/dist/common/common.d.ts.map +1 -1
  52. package/dist/common/config-module.d.ts +5 -4
  53. package/dist/common/config-module.d.ts.map +1 -1
  54. package/dist/currency/common/currency.d.ts +36 -0
  55. package/dist/currency/common/currency.d.ts.map +1 -0
  56. package/dist/currency/common/currency.js.map +1 -0
  57. package/dist/currency/common/index.d.ts +2 -0
  58. package/dist/currency/common/index.d.ts.map +1 -0
  59. package/dist/currency/common/index.js +18 -0
  60. package/dist/currency/common/index.js.map +1 -0
  61. package/dist/currency/index.d.ts +3 -0
  62. package/dist/currency/index.d.ts.map +1 -0
  63. package/dist/currency/index.js +19 -0
  64. package/dist/currency/index.js.map +1 -0
  65. package/dist/currency/service.d.ts +223 -0
  66. package/dist/currency/service.d.ts.map +1 -0
  67. package/dist/currency/service.js +3 -0
  68. package/dist/currency/service.js.map +1 -0
  69. package/dist/customer/common.d.ts +380 -0
  70. package/dist/customer/common.d.ts.map +1 -1
  71. package/dist/customer/mutations.d.ts +231 -4
  72. package/dist/customer/mutations.d.ts.map +1 -1
  73. package/dist/customer/service.d.ts +611 -0
  74. package/dist/customer/service.d.ts.map +1 -1
  75. package/dist/dal/index.d.ts +35 -0
  76. package/dist/dal/index.d.ts.map +1 -1
  77. package/dist/dal/index.js.map +1 -1
  78. package/dist/fulfillment/common/address.d.ts +19 -0
  79. package/dist/fulfillment/common/address.d.ts.map +1 -0
  80. package/dist/fulfillment/common/address.js +3 -0
  81. package/dist/fulfillment/common/address.js.map +1 -0
  82. package/dist/fulfillment/common/fulfillment-item.d.ts +16 -0
  83. package/dist/fulfillment/common/fulfillment-item.d.ts.map +1 -0
  84. package/dist/fulfillment/common/fulfillment-item.js +3 -0
  85. package/dist/fulfillment/common/fulfillment-item.js.map +1 -0
  86. package/dist/fulfillment/common/fulfillment-label.d.ts +13 -0
  87. package/dist/fulfillment/common/fulfillment-label.d.ts.map +1 -0
  88. package/dist/fulfillment/common/fulfillment-label.js +3 -0
  89. package/dist/fulfillment/common/fulfillment-label.js.map +1 -0
  90. package/dist/fulfillment/common/fulfillment-set.d.ts +19 -0
  91. package/dist/fulfillment/common/fulfillment-set.d.ts.map +1 -0
  92. package/dist/fulfillment/common/fulfillment-set.js +3 -0
  93. package/dist/fulfillment/common/fulfillment-set.js.map +1 -0
  94. package/dist/fulfillment/common/fulfillment.d.ts +26 -0
  95. package/dist/fulfillment/common/fulfillment.d.ts.map +1 -0
  96. package/dist/fulfillment/common/fulfillment.js +3 -0
  97. package/dist/fulfillment/common/fulfillment.js.map +1 -0
  98. package/dist/fulfillment/common/geo-zone.d.ts +22 -0
  99. package/dist/fulfillment/common/geo-zone.d.ts.map +1 -0
  100. package/dist/fulfillment/common/geo-zone.js +3 -0
  101. package/dist/fulfillment/common/geo-zone.js.map +1 -0
  102. package/dist/fulfillment/common/index.d.ts +13 -0
  103. package/dist/fulfillment/common/index.d.ts.map +1 -0
  104. package/dist/fulfillment/common/index.js +29 -0
  105. package/dist/fulfillment/common/index.js.map +1 -0
  106. package/dist/fulfillment/common/service-provider.d.ts +11 -0
  107. package/dist/fulfillment/common/service-provider.d.ts.map +1 -0
  108. package/dist/fulfillment/common/service-provider.js +3 -0
  109. package/dist/fulfillment/common/service-provider.js.map +1 -0
  110. package/dist/fulfillment/common/service-zone.d.ts +22 -0
  111. package/dist/fulfillment/common/service-zone.d.ts.map +1 -0
  112. package/dist/fulfillment/common/service-zone.js +3 -0
  113. package/dist/fulfillment/common/service-zone.js.map +1 -0
  114. package/dist/fulfillment/common/shipping-option-rule.d.ts +22 -0
  115. package/dist/fulfillment/common/shipping-option-rule.d.ts.map +1 -0
  116. package/dist/fulfillment/common/shipping-option-rule.js +3 -0
  117. package/dist/fulfillment/common/shipping-option-rule.js.map +1 -0
  118. package/dist/fulfillment/common/shipping-option-type.d.ts +20 -0
  119. package/dist/fulfillment/common/shipping-option-type.d.ts.map +1 -0
  120. package/dist/fulfillment/common/shipping-option-type.js +3 -0
  121. package/dist/fulfillment/common/shipping-option-type.js.map +1 -0
  122. package/dist/fulfillment/common/shipping-option.d.ts +38 -0
  123. package/dist/fulfillment/common/shipping-option.d.ts.map +1 -0
  124. package/dist/fulfillment/common/shipping-option.js +3 -0
  125. package/dist/fulfillment/common/shipping-option.js.map +1 -0
  126. package/dist/fulfillment/common/shipping-profile.d.ts +19 -0
  127. package/dist/fulfillment/common/shipping-profile.d.ts.map +1 -0
  128. package/dist/fulfillment/common/shipping-profile.js +3 -0
  129. package/dist/fulfillment/common/shipping-profile.js.map +1 -0
  130. package/dist/fulfillment/mutations/fulfillment-set.d.ts +15 -0
  131. package/dist/fulfillment/mutations/fulfillment-set.d.ts.map +1 -0
  132. package/dist/fulfillment/mutations/fulfillment-set.js +3 -0
  133. package/dist/fulfillment/mutations/fulfillment-set.js.map +1 -0
  134. package/dist/fulfillment/mutations/geo-zone.d.ts +44 -0
  135. package/dist/fulfillment/mutations/geo-zone.d.ts.map +1 -0
  136. package/dist/fulfillment/mutations/geo-zone.js +3 -0
  137. package/dist/fulfillment/mutations/geo-zone.js.map +1 -0
  138. package/dist/fulfillment/mutations/index.d.ts +8 -0
  139. package/dist/fulfillment/mutations/index.d.ts.map +1 -0
  140. package/dist/fulfillment/mutations/index.js +24 -0
  141. package/dist/fulfillment/mutations/index.js.map +1 -0
  142. package/dist/fulfillment/mutations/service-zone.d.ts +14 -0
  143. package/dist/fulfillment/mutations/service-zone.d.ts.map +1 -0
  144. package/dist/fulfillment/mutations/service-zone.js +3 -0
  145. package/dist/fulfillment/mutations/service-zone.js.map +1 -0
  146. package/dist/fulfillment/mutations/shipping-option-rule.d.ts +10 -0
  147. package/dist/fulfillment/mutations/shipping-option-rule.d.ts.map +1 -0
  148. package/dist/fulfillment/mutations/shipping-option-rule.js +3 -0
  149. package/dist/fulfillment/mutations/shipping-option-rule.js.map +1 -0
  150. package/dist/fulfillment/mutations/shipping-option-type.d.ts +10 -0
  151. package/dist/fulfillment/mutations/shipping-option-type.d.ts.map +1 -0
  152. package/dist/fulfillment/mutations/shipping-option-type.js +3 -0
  153. package/dist/fulfillment/mutations/shipping-option-type.js.map +1 -0
  154. package/dist/fulfillment/mutations/shipping-option.d.ts +29 -0
  155. package/dist/fulfillment/mutations/shipping-option.d.ts.map +1 -0
  156. package/dist/fulfillment/mutations/shipping-option.js +3 -0
  157. package/dist/fulfillment/mutations/shipping-option.js.map +1 -0
  158. package/dist/fulfillment/mutations/shipping-profile.d.ts +8 -0
  159. package/dist/fulfillment/mutations/shipping-profile.d.ts.map +1 -0
  160. package/dist/fulfillment/mutations/shipping-profile.js +3 -0
  161. package/dist/fulfillment/mutations/shipping-profile.js.map +1 -0
  162. package/dist/fulfillment/service.d.ts +308 -14
  163. package/dist/fulfillment/service.d.ts.map +1 -1
  164. package/dist/index.d.ts +7 -1
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +7 -1
  167. package/dist/index.js.map +1 -1
  168. package/dist/inventory/service.d.ts +3 -0
  169. package/dist/inventory/service.d.ts.map +1 -1
  170. package/dist/modules-sdk/index.d.ts +1 -8
  171. package/dist/modules-sdk/index.d.ts.map +1 -1
  172. package/dist/modules-sdk/index.js +1 -0
  173. package/dist/modules-sdk/index.js.map +1 -1
  174. package/dist/modules-sdk/module-provider.d.ts +10 -0
  175. package/dist/modules-sdk/module-provider.d.ts.map +1 -0
  176. package/dist/modules-sdk/module-provider.js +3 -0
  177. package/dist/modules-sdk/module-provider.js.map +1 -0
  178. package/dist/order/common.d.ts +780 -0
  179. package/dist/order/common.d.ts.map +1 -0
  180. package/dist/{fulfillment → order}/common.js.map +1 -1
  181. package/dist/order/index.d.ts +4 -0
  182. package/dist/order/index.d.ts.map +1 -0
  183. package/dist/order/index.js +20 -0
  184. package/dist/order/index.js.map +1 -0
  185. package/dist/order/mutations.d.ts +274 -0
  186. package/dist/order/mutations.d.ts.map +1 -0
  187. package/dist/order/mutations.js +4 -0
  188. package/dist/order/mutations.js.map +1 -0
  189. package/dist/order/service.d.ts +78 -0
  190. package/dist/order/service.d.ts.map +1 -0
  191. package/dist/order/service.js +3 -0
  192. package/dist/order/service.js.map +1 -0
  193. package/dist/payment/common.d.ts +160 -0
  194. package/dist/payment/common.d.ts.map +1 -1
  195. package/dist/payment/common.js +29 -1
  196. package/dist/payment/common.js.map +1 -1
  197. package/dist/payment/index.d.ts +1 -0
  198. package/dist/payment/index.d.ts.map +1 -1
  199. package/dist/payment/index.js +1 -0
  200. package/dist/payment/index.js.map +1 -1
  201. package/dist/payment/mutations.d.ts +176 -12
  202. package/dist/payment/mutations.d.ts.map +1 -1
  203. package/dist/payment/provider.d.ts +220 -0
  204. package/dist/payment/provider.d.ts.map +1 -0
  205. package/dist/payment/provider.js +26 -0
  206. package/dist/payment/provider.js.map +1 -0
  207. package/dist/payment/service.d.ts +291 -21
  208. package/dist/payment/service.d.ts.map +1 -1
  209. package/dist/pricing/common/index.d.ts +0 -1
  210. package/dist/pricing/common/index.d.ts.map +1 -1
  211. package/dist/pricing/common/index.js +0 -1
  212. package/dist/pricing/common/index.js.map +1 -1
  213. package/dist/pricing/common/money-amount.d.ts +0 -11
  214. package/dist/pricing/common/money-amount.d.ts.map +1 -1
  215. package/dist/pricing/common/price-set-rule-type.d.ts.map +1 -1
  216. package/dist/pricing/service.d.ts +11 -295
  217. package/dist/pricing/service.d.ts.map +1 -1
  218. package/dist/product/common.d.ts +1 -1
  219. package/dist/product/common.d.ts.map +1 -1
  220. package/dist/product/service.d.ts +3 -0
  221. package/dist/product/service.d.ts.map +1 -1
  222. package/dist/promotion/common/application-method.d.ts +3 -3
  223. package/dist/promotion/common/application-method.d.ts.map +1 -1
  224. package/dist/promotion/common/promotion.d.ts +3 -3
  225. package/dist/promotion/common/promotion.d.ts.map +1 -1
  226. package/dist/region/common.d.ts +89 -26
  227. package/dist/region/common.d.ts.map +1 -1
  228. package/dist/region/mutations.d.ts +54 -17
  229. package/dist/region/mutations.d.ts.map +1 -1
  230. package/dist/region/service.d.ts +280 -8
  231. package/dist/region/service.d.ts.map +1 -1
  232. package/dist/region__legacy/common.d.ts +32 -0
  233. package/dist/region__legacy/common.d.ts.map +1 -1
  234. package/dist/sales-channel/common.d.ts +45 -0
  235. package/dist/sales-channel/common.d.ts.map +1 -1
  236. package/dist/sales-channel/mutations.d.ts +27 -0
  237. package/dist/sales-channel/mutations.d.ts.map +1 -1
  238. package/dist/sales-channel/service.d.ts +172 -0
  239. package/dist/sales-channel/service.d.ts.map +1 -1
  240. package/dist/shared-context.d.ts +2 -0
  241. package/dist/shared-context.d.ts.map +1 -1
  242. package/dist/stock-location/common.d.ts +114 -0
  243. package/dist/stock-location/common.d.ts.map +1 -1
  244. package/dist/stock-location/service.d.ts +3 -0
  245. package/dist/stock-location/service.d.ts.map +1 -1
  246. package/dist/store/common/index.d.ts +2 -0
  247. package/dist/store/common/index.d.ts.map +1 -0
  248. package/dist/store/common/index.js +18 -0
  249. package/dist/store/common/index.js.map +1 -0
  250. package/dist/store/common/store.d.ts +15 -0
  251. package/dist/store/common/store.d.ts.map +1 -0
  252. package/dist/store/common/store.js +3 -0
  253. package/dist/store/common/store.js.map +1 -0
  254. package/dist/store/index.d.ts +4 -0
  255. package/dist/store/index.d.ts.map +1 -0
  256. package/dist/store/index.js +20 -0
  257. package/dist/store/index.js.map +1 -0
  258. package/dist/store/mutations/index.d.ts +2 -0
  259. package/dist/store/mutations/index.d.ts.map +1 -0
  260. package/dist/store/mutations/index.js +18 -0
  261. package/dist/store/mutations/index.js.map +1 -0
  262. package/dist/store/mutations/store.d.ts +26 -0
  263. package/dist/store/mutations/store.d.ts.map +1 -0
  264. package/dist/store/mutations/store.js +3 -0
  265. package/dist/store/mutations/store.js.map +1 -0
  266. package/dist/store/service.d.ts +212 -0
  267. package/dist/store/service.d.ts.map +1 -0
  268. package/dist/store/service.js +3 -0
  269. package/dist/store/service.js.map +1 -0
  270. package/dist/tax/common.d.ts +157 -0
  271. package/dist/tax/common.d.ts.map +1 -0
  272. package/dist/tax/common.js +3 -0
  273. package/dist/tax/common.js.map +1 -0
  274. package/dist/tax/index.d.ts +5 -0
  275. package/dist/tax/index.d.ts.map +1 -0
  276. package/dist/tax/index.js +21 -0
  277. package/dist/tax/index.js.map +1 -0
  278. package/dist/tax/mutations.d.ts +50 -0
  279. package/dist/tax/mutations.d.ts.map +1 -0
  280. package/dist/{fulfillment → tax}/mutations.js.map +1 -1
  281. package/dist/tax/provider.d.ts +34 -0
  282. package/dist/tax/provider.d.ts.map +1 -0
  283. package/dist/tax/provider.js.map +1 -0
  284. package/dist/tax/service.d.ts +38 -0
  285. package/dist/tax/service.d.ts.map +1 -0
  286. package/dist/tax/service.js +3 -0
  287. package/dist/tax/service.js.map +1 -0
  288. package/dist/totals/big-number.d.ts +7 -0
  289. package/dist/totals/big-number.d.ts.map +1 -0
  290. package/dist/totals/big-number.js +3 -0
  291. package/dist/totals/big-number.js.map +1 -0
  292. package/dist/totals/index.d.ts +2 -0
  293. package/dist/totals/index.d.ts.map +1 -0
  294. package/dist/totals/index.js +18 -0
  295. package/dist/totals/index.js.map +1 -0
  296. package/dist/user/common.d.ts +83 -3
  297. package/dist/user/common.d.ts.map +1 -1
  298. package/dist/user/mutations.d.ts +38 -2
  299. package/dist/user/mutations.d.ts.map +1 -1
  300. package/dist/user/service.d.ts +161 -2
  301. package/dist/user/service.d.ts.map +1 -1
  302. package/dist/workflow/index.d.ts +2 -0
  303. package/dist/workflow/index.d.ts.map +1 -1
  304. package/dist/workflow/index.js +3 -1
  305. package/dist/workflow/index.js.map +1 -1
  306. package/dist/workflow/invite/accept-invite.d.ts +11 -0
  307. package/dist/workflow/invite/accept-invite.d.ts.map +1 -0
  308. package/dist/workflow/invite/accept-invite.js +3 -0
  309. package/dist/workflow/invite/accept-invite.js.map +1 -0
  310. package/dist/workflow/invite/create-invite.d.ts +5 -0
  311. package/dist/workflow/invite/create-invite.d.ts.map +1 -0
  312. package/dist/workflow/invite/create-invite.js +3 -0
  313. package/dist/workflow/invite/create-invite.js.map +1 -0
  314. package/dist/workflow/invite/delete-invite.d.ts +4 -0
  315. package/dist/workflow/invite/delete-invite.d.ts.map +1 -0
  316. package/dist/workflow/invite/delete-invite.js +3 -0
  317. package/dist/workflow/invite/delete-invite.js.map +1 -0
  318. package/dist/workflow/invite/index.d.ts +5 -0
  319. package/dist/workflow/invite/index.d.ts.map +1 -0
  320. package/dist/workflow/invite/index.js +21 -0
  321. package/dist/workflow/invite/index.js.map +1 -0
  322. package/dist/workflow/invite/resend-invite.d.ts +4 -0
  323. package/dist/workflow/invite/resend-invite.d.ts.map +1 -0
  324. package/dist/workflow/invite/resend-invite.js +3 -0
  325. package/dist/workflow/invite/resend-invite.js.map +1 -0
  326. package/dist/workflow/user/create-user.d.ts +5 -0
  327. package/dist/workflow/user/create-user.d.ts.map +1 -0
  328. package/dist/workflow/user/create-user.js +3 -0
  329. package/dist/workflow/user/create-user.js.map +1 -0
  330. package/dist/workflow/user/delete-user.d.ts +4 -0
  331. package/dist/workflow/user/delete-user.d.ts.map +1 -0
  332. package/dist/workflow/user/delete-user.js +3 -0
  333. package/dist/workflow/user/delete-user.js.map +1 -0
  334. package/dist/workflow/user/index.d.ts +4 -0
  335. package/dist/workflow/user/index.d.ts.map +1 -0
  336. package/dist/workflow/user/index.js +20 -0
  337. package/dist/workflow/user/index.js.map +1 -0
  338. package/dist/workflow/user/update-user.d.ts +5 -0
  339. package/dist/workflow/user/update-user.d.ts.map +1 -0
  340. package/dist/workflow/user/update-user.js +3 -0
  341. package/dist/workflow/user/update-user.js.map +1 -0
  342. package/package.json +2 -1
  343. package/dist/authentication/common/provider.d.ts +0 -22
  344. package/dist/authentication/common/provider.d.ts.map +0 -1
  345. package/dist/authentication/common/provider.js.map +0 -1
  346. package/dist/fulfillment/common.d.ts +0 -6
  347. package/dist/fulfillment/common.d.ts.map +0 -1
  348. package/dist/fulfillment/mutations.d.ts +0 -2
  349. package/dist/fulfillment/mutations.d.ts.map +0 -1
  350. package/dist/pricing/common/currency.d.ts +0 -82
  351. package/dist/pricing/common/currency.d.ts.map +0 -1
  352. package/dist/pricing/common/currency.js.map +0 -1
  353. /package/dist/{pricing → currency}/common/currency.js +0 -0
  354. /package/dist/{fulfillment → order}/common.js +0 -0
  355. /package/dist/{fulfillment → tax}/mutations.js +0 -0
  356. /package/dist/{authentication/common → tax}/provider.js +0 -0
@@ -0,0 +1,21 @@
1
+ import { BaseFilterable } from "../../dal";
2
+ export type ApiKeyType = "secret" | "publishable";
3
+ export interface ApiKeyDTO {
4
+ id: string;
5
+ token: string;
6
+ redacted: string;
7
+ title: string;
8
+ type: ApiKeyType;
9
+ last_used_at: Date | null;
10
+ created_by: string;
11
+ created_at: Date;
12
+ revoked_by: string | null;
13
+ revoked_at: Date | null;
14
+ }
15
+ export interface FilterableApiKeyProps extends BaseFilterable<FilterableApiKeyProps> {
16
+ id?: string | string[];
17
+ token?: string | string[];
18
+ title?: string | string[];
19
+ type?: ApiKeyType;
20
+ }
21
+ //# sourceMappingURL=api-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key.d.ts","sourceRoot":"","sources":["../../../src/api-key/common/api-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAA;AACjD,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB;AAED,MAAM,WAAW,qBACf,SAAQ,cAAc,CAAC,qBAAqB,CAAC;IAC7C,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=api-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key.js","sourceRoot":"","sources":["../../../src/api-key/common/api-key.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./api-key";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api-key/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,18 @@
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("./api-key"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-key/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
@@ -0,0 +1,4 @@
1
+ export * from "./common";
2
+ export * from "./mutations";
3
+ export * from "./service";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-key/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,20 @@
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("./common"), exports);
18
+ __exportStar(require("./mutations"), exports);
19
+ __exportStar(require("./service"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-key/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,8CAA2B;AAC3B,4CAAyB"}
@@ -0,0 +1,20 @@
1
+ import { ApiKeyType } from "../common";
2
+ export interface CreateApiKeyDTO {
3
+ title: string;
4
+ type: ApiKeyType;
5
+ created_by: string;
6
+ }
7
+ export interface UpsertApiKeyDTO {
8
+ id?: string;
9
+ title?: string;
10
+ type?: ApiKeyType;
11
+ created_by?: string;
12
+ }
13
+ export interface UpdateApiKeyDTO {
14
+ title?: string;
15
+ }
16
+ export interface RevokeApiKeyDTO {
17
+ revoked_by: string;
18
+ revoke_in?: number;
19
+ }
20
+ //# sourceMappingURL=api-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key.d.ts","sourceRoot":"","sources":["../../../src/api-key/mutations/api-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAEtC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,UAAU,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;CAEnB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=api-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key.js","sourceRoot":"","sources":["../../../src/api-key/mutations/api-key.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./api-key";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api-key/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,18 @@
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("./api-key"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-key/mutations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
@@ -0,0 +1,104 @@
1
+ import { IModuleService } from "../modules-sdk";
2
+ import { ApiKeyDTO, FilterableApiKeyProps } from "./common";
3
+ import { FindConfig } from "../common";
4
+ import { Context } from "../shared-context";
5
+ import { CreateApiKeyDTO, RevokeApiKeyDTO, UpdateApiKeyDTO, UpsertApiKeyDTO } from "./mutations";
6
+ export interface IApiKeyModuleService extends IModuleService {
7
+ /**
8
+ * Create a new api key
9
+ * @param data
10
+ * @param sharedContext
11
+ */
12
+ create(data: CreateApiKeyDTO[], sharedContext?: Context): Promise<ApiKeyDTO[]>;
13
+ create(data: CreateApiKeyDTO, sharedContext?: Context): Promise<ApiKeyDTO>;
14
+ /**
15
+ * This method updates existing API keys, or creates new ones if they don't exist.
16
+ *
17
+ * @param {UpsertApiKeyDTO[]} data - The attributes to update or create for each API key.
18
+ * @returns {Promise<ApiKeyDTO[]>} The updated and created API keys.
19
+ *
20
+ * @example
21
+ * {example-code}
22
+ */
23
+ upsert(data: UpsertApiKeyDTO[], sharedContext?: Context): Promise<ApiKeyDTO[]>;
24
+ /**
25
+ * This method updates an existing API key, or creates a new one if it doesn't exist.
26
+ *
27
+ * @param {UpsertApiKeyDTO} data - The attributes to update or create for the API key.
28
+ * @returns {Promise<ApiKeyDTO>} The updated or created API key.
29
+ *
30
+ * @example
31
+ * {example-code}
32
+ */
33
+ upsert(data: UpsertApiKeyDTO, sharedContext?: Context): Promise<ApiKeyDTO>;
34
+ /**
35
+ * This method updates an existing API key.
36
+ *
37
+ * @param {string} id - The API key's ID.
38
+ * @param {UpdateApiKeyDTO} data - The details to update in the API key.
39
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
40
+ * @returns {Promise<ApiKeyDTO>} The updated API key.
41
+ */
42
+ update(id: string, data: UpdateApiKeyDTO, sharedContext?: Context): Promise<ApiKeyDTO>;
43
+ /**
44
+ * This method updates existing API keys.
45
+ *
46
+ * @param {FilterableApiKeyProps} selector - The filters to specify which API keys should be updated.
47
+ * @param {UpdateApiKeyDTO} data - The details to update in the API keys.
48
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
49
+ * @returns {Promise<ApiKeyDTO[]>} The updated API keys.
50
+ *
51
+ * @example
52
+ * {example-code}
53
+ */
54
+ update(selector: FilterableApiKeyProps, data: UpdateApiKeyDTO, sharedContext?: Context): Promise<ApiKeyDTO[]>;
55
+ /**
56
+ * Delete an api key
57
+ * @param ids
58
+ * @param sharedContext
59
+ */
60
+ delete(ids: string[], sharedContext?: Context): Promise<void>;
61
+ delete(id: string, sharedContext?: Context): Promise<void>;
62
+ /**
63
+ * Retrieve an api key
64
+ * @param id
65
+ * @param config
66
+ * @param sharedContext
67
+ */
68
+ retrieve(id: string, config?: FindConfig<ApiKeyDTO>, sharedContext?: Context): Promise<ApiKeyDTO>;
69
+ /**
70
+ * List api keys
71
+ * @param filters
72
+ * @param config
73
+ * @param sharedContext
74
+ */
75
+ list(filters?: FilterableApiKeyProps, config?: FindConfig<ApiKeyDTO>, sharedContext?: Context): Promise<ApiKeyDTO[]>;
76
+ /**
77
+ * List and count api keys
78
+ * @param filters
79
+ * @param config
80
+ * @param sharedContext
81
+ */
82
+ listAndCount(filters?: FilterableApiKeyProps, config?: FindConfig<ApiKeyDTO>, sharedContext?: Context): Promise<[ApiKeyDTO[], number]>;
83
+ /**
84
+ * Revokes an api key
85
+ * @param selector
86
+ * @param data
87
+ * @param sharedContext
88
+ */
89
+ revoke(selector: FilterableApiKeyProps, data: RevokeApiKeyDTO, sharedContext?: Context): Promise<ApiKeyDTO[]>;
90
+ /**
91
+ * Revokes an api key
92
+ * @param id
93
+ * @param data
94
+ * @param sharedContext
95
+ */
96
+ revoke(id: string, data: RevokeApiKeyDTO, sharedContext?: Context): Promise<ApiKeyDTO>;
97
+ /**
98
+ * Check the validity of an api key
99
+ * @param token
100
+ * @param sharedContext
101
+ */
102
+ authenticate(token: string, sharedContext?: Context): Promise<ApiKeyDTO | false>;
103
+ }
104
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/api-key/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,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AC,EAC9B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,SAAS,CAAC,CAAA;IAErB;;;;;OAKG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,qBAAqB,EAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,EAC9B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,SAAS,EAAE,CAAC,CAAA;IAEvB;;;;;OAKG;IACH,YAAY,CACV,OAAO,CAAC,EAAE,qBAAqB,EAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,EAC9B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC,CAAA;IAEjC;;;;;OAKG;IACH,MAAM,CACJ,QAAQ,EAAE,qBAAqB,EAC/B,IAAI,EAAE,eAAe,EACrB,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,SAAS,EAAE,CAAC,CAAA;IACvB;;;;;OAKG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,eAAe,EACrB,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,SAAS,CAAC,CAAA;IAErB;;;;OAIG;IACH,YAAY,CACV,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAA;CAC9B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/api-key/service.ts"],"names":[],"mappings":""}
@@ -1,30 +1,108 @@
1
1
  import { BaseFilterable } from "../../dal";
2
+ /**
3
+ * @interface
4
+ *
5
+ * The auth user details.
6
+ */
2
7
  export type AuthUserDTO = {
8
+ /**
9
+ * The ID of the auth user.
10
+ */
3
11
  id: string;
12
+ /**
13
+ * The provider of the auth user.
14
+ */
4
15
  provider: string;
16
+ /**
17
+ * The associated providers entity's ID.
18
+ */
5
19
  entity_id: string;
20
+ /**
21
+ * The scope of the auth user.
22
+ */
6
23
  scope: string;
24
+ /**
25
+ * The provider metadata of the auth user.
26
+ */
7
27
  provider_metadata?: Record<string, unknown>;
28
+ /**
29
+ * The user metadata of the auth user.
30
+ */
8
31
  user_metadata: Record<string, unknown>;
32
+ /**
33
+ * The app metadata of the auth user.
34
+ */
9
35
  app_metadata: Record<string, unknown>;
10
36
  };
37
+ /**
38
+ * @interface
39
+ *
40
+ * The auth user to be created.
41
+ */
11
42
  export type CreateAuthUserDTO = {
43
+ /**
44
+ * The ID of the auth user.
45
+ */
12
46
  id?: string;
47
+ /**
48
+ * The provider of the auth user.
49
+ */
13
50
  provider: string;
51
+ /**
52
+ * The associated entity's ID.
53
+ */
14
54
  entity_id: string;
55
+ /**
56
+ * The scope of the auth user.
57
+ */
15
58
  scope: string;
59
+ /**
60
+ * The provider metadata of the auth user.
61
+ */
16
62
  provider_metadata?: Record<string, unknown>;
63
+ /**
64
+ * The user metadata of the auth user.
65
+ */
17
66
  user_metadata?: Record<string, unknown>;
67
+ /**
68
+ * The app metadata of the auth user.
69
+ */
18
70
  app_metadata?: Record<string, unknown>;
19
71
  };
72
+ /**
73
+ * @interface
74
+ *
75
+ * The attributes to update in the auth user.
76
+ */
20
77
  export type UpdateAuthUserDTO = {
78
+ /**
79
+ * The ID of the auth user.
80
+ */
21
81
  id: string;
82
+ /**
83
+ * The provider metadata of the auth user.
84
+ */
22
85
  provider_metadata?: Record<string, unknown>;
86
+ /**
87
+ * The user metadata of the auth user.
88
+ */
23
89
  user_metadata?: Record<string, unknown>;
90
+ /**
91
+ * The app metadata of the auth user.
92
+ */
24
93
  app_metadata?: Record<string, unknown>;
25
94
  };
95
+ /**
96
+ * The filters to apply on the retrieved auth user.
97
+ */
26
98
  export interface FilterableAuthUserProps extends BaseFilterable<FilterableAuthUserProps> {
99
+ /**
100
+ * The IDs to filter the auth user by.
101
+ */
27
102
  id?: string[];
103
+ /**
104
+ * Filter the auth auth user by the associated provider(s).
105
+ */
28
106
  provider?: string[] | string;
29
107
  }
30
108
  //# sourceMappingURL=auth-user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-user.d.ts","sourceRoot":"","sources":["../../../src/auth/common/auth-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,Y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AAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACvC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE3C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACvC,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,uBACf,SAAQ,cAAc,CAAC,uBAAuB,CAAC;IAC/C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;CAC7B"}
@@ -1,20 +1,77 @@
1
+ /**
2
+ * @interface
3
+ *
4
+ * The details of the authentication response.
5
+ */
1
6
  export type AuthenticationResponse = {
7
+ /**
8
+ * Whether the authentication was successful.
9
+ */
2
10
  success: boolean;
11
+ /**
12
+ * The authenticated user's details. The details shape
13
+ * depends on the used provider ID.
14
+ */
3
15
  authUser?: any;
16
+ /**
17
+ * The error message, if an error occurs.
18
+ */
4
19
  error?: string;
20
+ /**
21
+ * Redirect location. Location takes precedence over success.
22
+ */
5
23
  location?: string;
6
24
  };
25
+ /**
26
+ * @interface
27
+ *
28
+ * Provider configuration for the Medusa auth module.
29
+ */
7
30
  export type AuthModuleProviderConfig = {
31
+ /**
32
+ * Provider name
33
+ */
8
34
  name: string;
35
+ /**
36
+ * Scope configurations for the provider
37
+ */
9
38
  scopes: Record<string, AuthProviderScope>;
10
39
  };
40
+ /**
41
+ * @interface
42
+ *
43
+ * Configuration of a single provider scope
44
+ */
11
45
  export type AuthProviderScope = Record<string, unknown>;
46
+ /**
47
+ * @interface
48
+ *
49
+ * Input for authentication and callback validation methods.
50
+ */
12
51
  export type AuthenticationInput = {
52
+ /**
53
+ * url of incoming authentication request.
54
+ */
13
55
  url: string;
56
+ /**
57
+ * Headers of incoming authentication request.
58
+ */
14
59
  headers: Record<string, string>;
60
+ /**
61
+ * Query params of incoming authentication request.
62
+ */
15
63
  query: Record<string, string>;
64
+ /**
65
+ * Body of incoming authentication request.
66
+ */
16
67
  body: Record<string, string>;
68
+ /**
69
+ * Scope for authentication request.
70
+ */
17
71
  authScope: string;
72
+ /**
73
+ * Protocol of incoming authentication request (For example, `https`).
74
+ */
18
75
  protocol: string;
19
76
  };
20
77
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/auth/common/provider.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB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