mollie-api-typescript 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/dist/commonjs/funcs/accountsList.d.ts.map +1 -1
  2. package/dist/commonjs/funcs/accountsList.js +3 -3
  3. package/dist/commonjs/funcs/accountsList.js.map +1 -1
  4. package/dist/commonjs/funcs/accountsListAccounts.d.ts.map +1 -1
  5. package/dist/commonjs/funcs/accountsListAccounts.js +3 -3
  6. package/dist/commonjs/funcs/accountsListAccounts.js.map +1 -1
  7. package/dist/commonjs/funcs/balanceTransfersList.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/balanceTransfersList.js +4 -3
  9. package/dist/commonjs/funcs/balanceTransfersList.js.map +1 -1
  10. package/dist/commonjs/funcs/balancesList.d.ts.map +1 -1
  11. package/dist/commonjs/funcs/balancesList.js +4 -3
  12. package/dist/commonjs/funcs/balancesList.js.map +1 -1
  13. package/dist/commonjs/funcs/balancesListTransactions.d.ts.map +1 -1
  14. package/dist/commonjs/funcs/balancesListTransactions.js +4 -3
  15. package/dist/commonjs/funcs/balancesListTransactions.js.map +1 -1
  16. package/dist/commonjs/funcs/capturesList.d.ts.map +1 -1
  17. package/dist/commonjs/funcs/capturesList.js +4 -3
  18. package/dist/commonjs/funcs/capturesList.js.map +1 -1
  19. package/dist/commonjs/funcs/chargebacksAll.d.ts.map +1 -1
  20. package/dist/commonjs/funcs/chargebacksAll.js +4 -3
  21. package/dist/commonjs/funcs/chargebacksAll.js.map +1 -1
  22. package/dist/commonjs/funcs/chargebacksList.d.ts.map +1 -1
  23. package/dist/commonjs/funcs/chargebacksList.js +4 -3
  24. package/dist/commonjs/funcs/chargebacksList.js.map +1 -1
  25. package/dist/commonjs/funcs/clientsList.d.ts.map +1 -1
  26. package/dist/commonjs/funcs/clientsList.js +4 -3
  27. package/dist/commonjs/funcs/clientsList.js.map +1 -1
  28. package/dist/commonjs/funcs/customersList.d.ts.map +1 -1
  29. package/dist/commonjs/funcs/customersList.js +4 -3
  30. package/dist/commonjs/funcs/customersList.js.map +1 -1
  31. package/dist/commonjs/funcs/customersListPayments.d.ts.map +1 -1
  32. package/dist/commonjs/funcs/customersListPayments.js +4 -3
  33. package/dist/commonjs/funcs/customersListPayments.js.map +1 -1
  34. package/dist/commonjs/funcs/invoicesList.d.ts.map +1 -1
  35. package/dist/commonjs/funcs/invoicesList.js +4 -3
  36. package/dist/commonjs/funcs/invoicesList.js.map +1 -1
  37. package/dist/commonjs/funcs/mandatesList.d.ts.map +1 -1
  38. package/dist/commonjs/funcs/mandatesList.js +4 -3
  39. package/dist/commonjs/funcs/mandatesList.js.map +1 -1
  40. package/dist/commonjs/funcs/paymentLinksList.d.ts.map +1 -1
  41. package/dist/commonjs/funcs/paymentLinksList.js +4 -3
  42. package/dist/commonjs/funcs/paymentLinksList.js.map +1 -1
  43. package/dist/commonjs/funcs/paymentLinksListPayments.d.ts.map +1 -1
  44. package/dist/commonjs/funcs/paymentLinksListPayments.js +4 -3
  45. package/dist/commonjs/funcs/paymentLinksListPayments.js.map +1 -1
  46. package/dist/commonjs/funcs/paymentsList.d.ts.map +1 -1
  47. package/dist/commonjs/funcs/paymentsList.js +4 -3
  48. package/dist/commonjs/funcs/paymentsList.js.map +1 -1
  49. package/dist/commonjs/funcs/payoutsList.d.ts.map +1 -1
  50. package/dist/commonjs/funcs/payoutsList.js +4 -3
  51. package/dist/commonjs/funcs/payoutsList.js.map +1 -1
  52. package/dist/commonjs/funcs/profilesList.d.ts.map +1 -1
  53. package/dist/commonjs/funcs/profilesList.js +4 -3
  54. package/dist/commonjs/funcs/profilesList.js.map +1 -1
  55. package/dist/commonjs/funcs/refundsAll.d.ts.map +1 -1
  56. package/dist/commonjs/funcs/refundsAll.js +4 -3
  57. package/dist/commonjs/funcs/refundsAll.js.map +1 -1
  58. package/dist/commonjs/funcs/refundsList.d.ts.map +1 -1
  59. package/dist/commonjs/funcs/refundsList.js +4 -3
  60. package/dist/commonjs/funcs/refundsList.js.map +1 -1
  61. package/dist/commonjs/funcs/salesInvoicesList.d.ts.map +1 -1
  62. package/dist/commonjs/funcs/salesInvoicesList.js +4 -3
  63. package/dist/commonjs/funcs/salesInvoicesList.js.map +1 -1
  64. package/dist/commonjs/funcs/settlementsList.d.ts.map +1 -1
  65. package/dist/commonjs/funcs/settlementsList.js +4 -3
  66. package/dist/commonjs/funcs/settlementsList.js.map +1 -1
  67. package/dist/commonjs/funcs/settlementsListCaptures.d.ts.map +1 -1
  68. package/dist/commonjs/funcs/settlementsListCaptures.js +4 -3
  69. package/dist/commonjs/funcs/settlementsListCaptures.js.map +1 -1
  70. package/dist/commonjs/funcs/settlementsListChargebacks.d.ts.map +1 -1
  71. package/dist/commonjs/funcs/settlementsListChargebacks.js +4 -3
  72. package/dist/commonjs/funcs/settlementsListChargebacks.js.map +1 -1
  73. package/dist/commonjs/funcs/settlementsListPayments.d.ts.map +1 -1
  74. package/dist/commonjs/funcs/settlementsListPayments.js +4 -3
  75. package/dist/commonjs/funcs/settlementsListPayments.js.map +1 -1
  76. package/dist/commonjs/funcs/settlementsListRefunds.d.ts.map +1 -1
  77. package/dist/commonjs/funcs/settlementsListRefunds.js +4 -3
  78. package/dist/commonjs/funcs/settlementsListRefunds.js.map +1 -1
  79. package/dist/commonjs/funcs/subscriptionsAll.d.ts.map +1 -1
  80. package/dist/commonjs/funcs/subscriptionsAll.js +4 -3
  81. package/dist/commonjs/funcs/subscriptionsAll.js.map +1 -1
  82. package/dist/commonjs/funcs/subscriptionsList.d.ts.map +1 -1
  83. package/dist/commonjs/funcs/subscriptionsList.js +4 -3
  84. package/dist/commonjs/funcs/subscriptionsList.js.map +1 -1
  85. package/dist/commonjs/funcs/subscriptionsListPayments.d.ts.map +1 -1
  86. package/dist/commonjs/funcs/subscriptionsListPayments.js +4 -3
  87. package/dist/commonjs/funcs/subscriptionsListPayments.js.map +1 -1
  88. package/dist/commonjs/funcs/terminalsList.d.ts.map +1 -1
  89. package/dist/commonjs/funcs/terminalsList.js +4 -3
  90. package/dist/commonjs/funcs/terminalsList.js.map +1 -1
  91. package/dist/commonjs/funcs/unmatchedCreditTransfersList.d.ts.map +1 -1
  92. package/dist/commonjs/funcs/unmatchedCreditTransfersList.js +4 -3
  93. package/dist/commonjs/funcs/unmatchedCreditTransfersList.js.map +1 -1
  94. package/dist/commonjs/funcs/webhooksList.d.ts.map +1 -1
  95. package/dist/commonjs/funcs/webhooksList.js +4 -3
  96. package/dist/commonjs/funcs/webhooksList.js.map +1 -1
  97. package/dist/commonjs/lib/config.d.ts +3 -3
  98. package/dist/commonjs/lib/config.js +3 -3
  99. package/dist/commonjs/lib/encodings.js +12 -12
  100. package/dist/commonjs/lib/encodings.js.map +1 -1
  101. package/dist/commonjs/lib/env.d.ts.map +1 -1
  102. package/dist/commonjs/lib/env.js +3 -3
  103. package/dist/commonjs/lib/env.js.map +1 -1
  104. package/dist/commonjs/lib/matchers.js +3 -3
  105. package/dist/commonjs/lib/matchers.js.map +1 -1
  106. package/dist/commonjs/lib/primitives.d.ts +1 -0
  107. package/dist/commonjs/lib/primitives.d.ts.map +1 -1
  108. package/dist/commonjs/lib/primitives.js +18 -0
  109. package/dist/commonjs/lib/primitives.js.map +1 -1
  110. package/dist/commonjs/models/listpaymentresponse.d.ts +4 -0
  111. package/dist/commonjs/models/listpaymentresponse.d.ts.map +1 -1
  112. package/dist/commonjs/models/listpaymentresponse.js +1 -0
  113. package/dist/commonjs/models/listpaymentresponse.js.map +1 -1
  114. package/dist/commonjs/models/listsettlementpaymentresponse.d.ts +4 -0
  115. package/dist/commonjs/models/listsettlementpaymentresponse.d.ts.map +1 -1
  116. package/dist/commonjs/models/listsettlementpaymentresponse.js +1 -0
  117. package/dist/commonjs/models/listsettlementpaymentresponse.js.map +1 -1
  118. package/dist/commonjs/models/paymentresponse.d.ts +4 -0
  119. package/dist/commonjs/models/paymentresponse.d.ts.map +1 -1
  120. package/dist/commonjs/models/paymentresponse.js +1 -0
  121. package/dist/commonjs/models/paymentresponse.js.map +1 -1
  122. package/dist/esm/funcs/accountsList.d.ts.map +1 -1
  123. package/dist/esm/funcs/accountsList.js +3 -3
  124. package/dist/esm/funcs/accountsList.js.map +1 -1
  125. package/dist/esm/funcs/accountsListAccounts.d.ts.map +1 -1
  126. package/dist/esm/funcs/accountsListAccounts.js +3 -3
  127. package/dist/esm/funcs/accountsListAccounts.js.map +1 -1
  128. package/dist/esm/funcs/balanceTransfersList.d.ts.map +1 -1
  129. package/dist/esm/funcs/balanceTransfersList.js +4 -3
  130. package/dist/esm/funcs/balanceTransfersList.js.map +1 -1
  131. package/dist/esm/funcs/balancesList.d.ts.map +1 -1
  132. package/dist/esm/funcs/balancesList.js +4 -3
  133. package/dist/esm/funcs/balancesList.js.map +1 -1
  134. package/dist/esm/funcs/balancesListTransactions.d.ts.map +1 -1
  135. package/dist/esm/funcs/balancesListTransactions.js +4 -3
  136. package/dist/esm/funcs/balancesListTransactions.js.map +1 -1
  137. package/dist/esm/funcs/capturesList.d.ts.map +1 -1
  138. package/dist/esm/funcs/capturesList.js +4 -3
  139. package/dist/esm/funcs/capturesList.js.map +1 -1
  140. package/dist/esm/funcs/chargebacksAll.d.ts.map +1 -1
  141. package/dist/esm/funcs/chargebacksAll.js +4 -3
  142. package/dist/esm/funcs/chargebacksAll.js.map +1 -1
  143. package/dist/esm/funcs/chargebacksList.d.ts.map +1 -1
  144. package/dist/esm/funcs/chargebacksList.js +4 -3
  145. package/dist/esm/funcs/chargebacksList.js.map +1 -1
  146. package/dist/esm/funcs/clientsList.d.ts.map +1 -1
  147. package/dist/esm/funcs/clientsList.js +4 -3
  148. package/dist/esm/funcs/clientsList.js.map +1 -1
  149. package/dist/esm/funcs/customersList.d.ts.map +1 -1
  150. package/dist/esm/funcs/customersList.js +4 -3
  151. package/dist/esm/funcs/customersList.js.map +1 -1
  152. package/dist/esm/funcs/customersListPayments.d.ts.map +1 -1
  153. package/dist/esm/funcs/customersListPayments.js +4 -3
  154. package/dist/esm/funcs/customersListPayments.js.map +1 -1
  155. package/dist/esm/funcs/invoicesList.d.ts.map +1 -1
  156. package/dist/esm/funcs/invoicesList.js +4 -3
  157. package/dist/esm/funcs/invoicesList.js.map +1 -1
  158. package/dist/esm/funcs/mandatesList.d.ts.map +1 -1
  159. package/dist/esm/funcs/mandatesList.js +4 -3
  160. package/dist/esm/funcs/mandatesList.js.map +1 -1
  161. package/dist/esm/funcs/paymentLinksList.d.ts.map +1 -1
  162. package/dist/esm/funcs/paymentLinksList.js +4 -3
  163. package/dist/esm/funcs/paymentLinksList.js.map +1 -1
  164. package/dist/esm/funcs/paymentLinksListPayments.d.ts.map +1 -1
  165. package/dist/esm/funcs/paymentLinksListPayments.js +4 -3
  166. package/dist/esm/funcs/paymentLinksListPayments.js.map +1 -1
  167. package/dist/esm/funcs/paymentsList.d.ts.map +1 -1
  168. package/dist/esm/funcs/paymentsList.js +4 -3
  169. package/dist/esm/funcs/paymentsList.js.map +1 -1
  170. package/dist/esm/funcs/payoutsList.d.ts.map +1 -1
  171. package/dist/esm/funcs/payoutsList.js +4 -3
  172. package/dist/esm/funcs/payoutsList.js.map +1 -1
  173. package/dist/esm/funcs/profilesList.d.ts.map +1 -1
  174. package/dist/esm/funcs/profilesList.js +4 -3
  175. package/dist/esm/funcs/profilesList.js.map +1 -1
  176. package/dist/esm/funcs/refundsAll.d.ts.map +1 -1
  177. package/dist/esm/funcs/refundsAll.js +4 -3
  178. package/dist/esm/funcs/refundsAll.js.map +1 -1
  179. package/dist/esm/funcs/refundsList.d.ts.map +1 -1
  180. package/dist/esm/funcs/refundsList.js +4 -3
  181. package/dist/esm/funcs/refundsList.js.map +1 -1
  182. package/dist/esm/funcs/salesInvoicesList.d.ts.map +1 -1
  183. package/dist/esm/funcs/salesInvoicesList.js +4 -3
  184. package/dist/esm/funcs/salesInvoicesList.js.map +1 -1
  185. package/dist/esm/funcs/settlementsList.d.ts.map +1 -1
  186. package/dist/esm/funcs/settlementsList.js +4 -3
  187. package/dist/esm/funcs/settlementsList.js.map +1 -1
  188. package/dist/esm/funcs/settlementsListCaptures.d.ts.map +1 -1
  189. package/dist/esm/funcs/settlementsListCaptures.js +4 -3
  190. package/dist/esm/funcs/settlementsListCaptures.js.map +1 -1
  191. package/dist/esm/funcs/settlementsListChargebacks.d.ts.map +1 -1
  192. package/dist/esm/funcs/settlementsListChargebacks.js +4 -3
  193. package/dist/esm/funcs/settlementsListChargebacks.js.map +1 -1
  194. package/dist/esm/funcs/settlementsListPayments.d.ts.map +1 -1
  195. package/dist/esm/funcs/settlementsListPayments.js +4 -3
  196. package/dist/esm/funcs/settlementsListPayments.js.map +1 -1
  197. package/dist/esm/funcs/settlementsListRefunds.d.ts.map +1 -1
  198. package/dist/esm/funcs/settlementsListRefunds.js +4 -3
  199. package/dist/esm/funcs/settlementsListRefunds.js.map +1 -1
  200. package/dist/esm/funcs/subscriptionsAll.d.ts.map +1 -1
  201. package/dist/esm/funcs/subscriptionsAll.js +4 -3
  202. package/dist/esm/funcs/subscriptionsAll.js.map +1 -1
  203. package/dist/esm/funcs/subscriptionsList.d.ts.map +1 -1
  204. package/dist/esm/funcs/subscriptionsList.js +4 -3
  205. package/dist/esm/funcs/subscriptionsList.js.map +1 -1
  206. package/dist/esm/funcs/subscriptionsListPayments.d.ts.map +1 -1
  207. package/dist/esm/funcs/subscriptionsListPayments.js +4 -3
  208. package/dist/esm/funcs/subscriptionsListPayments.js.map +1 -1
  209. package/dist/esm/funcs/terminalsList.d.ts.map +1 -1
  210. package/dist/esm/funcs/terminalsList.js +4 -3
  211. package/dist/esm/funcs/terminalsList.js.map +1 -1
  212. package/dist/esm/funcs/unmatchedCreditTransfersList.d.ts.map +1 -1
  213. package/dist/esm/funcs/unmatchedCreditTransfersList.js +4 -3
  214. package/dist/esm/funcs/unmatchedCreditTransfersList.js.map +1 -1
  215. package/dist/esm/funcs/webhooksList.d.ts.map +1 -1
  216. package/dist/esm/funcs/webhooksList.js +4 -3
  217. package/dist/esm/funcs/webhooksList.js.map +1 -1
  218. package/dist/esm/lib/config.d.ts +3 -3
  219. package/dist/esm/lib/config.js +3 -3
  220. package/dist/esm/lib/encodings.js +1 -1
  221. package/dist/esm/lib/encodings.js.map +1 -1
  222. package/dist/esm/lib/env.d.ts.map +1 -1
  223. package/dist/esm/lib/env.js +3 -3
  224. package/dist/esm/lib/env.js.map +1 -1
  225. package/dist/esm/lib/matchers.js +1 -1
  226. package/dist/esm/lib/matchers.js.map +1 -1
  227. package/dist/esm/lib/primitives.d.ts +1 -0
  228. package/dist/esm/lib/primitives.d.ts.map +1 -1
  229. package/dist/esm/lib/primitives.js +17 -0
  230. package/dist/esm/lib/primitives.js.map +1 -1
  231. package/dist/esm/models/listpaymentresponse.d.ts +4 -0
  232. package/dist/esm/models/listpaymentresponse.d.ts.map +1 -1
  233. package/dist/esm/models/listpaymentresponse.js +1 -0
  234. package/dist/esm/models/listpaymentresponse.js.map +1 -1
  235. package/dist/esm/models/listsettlementpaymentresponse.d.ts +4 -0
  236. package/dist/esm/models/listsettlementpaymentresponse.d.ts.map +1 -1
  237. package/dist/esm/models/listsettlementpaymentresponse.js +1 -0
  238. package/dist/esm/models/listsettlementpaymentresponse.js.map +1 -1
  239. package/dist/esm/models/paymentresponse.d.ts +4 -0
  240. package/dist/esm/models/paymentresponse.d.ts.map +1 -1
  241. package/dist/esm/models/paymentresponse.js +1 -0
  242. package/dist/esm/models/paymentresponse.js.map +1 -1
  243. package/jsr.json +1 -1
  244. package/package.json +1 -1
  245. package/src/funcs/accountsList.ts +7 -3
  246. package/src/funcs/accountsListAccounts.ts +7 -3
  247. package/src/funcs/balanceTransfersList.ts +5 -3
  248. package/src/funcs/balancesList.ts +5 -3
  249. package/src/funcs/balancesListTransactions.ts +5 -3
  250. package/src/funcs/capturesList.ts +5 -3
  251. package/src/funcs/chargebacksAll.ts +5 -3
  252. package/src/funcs/chargebacksList.ts +5 -3
  253. package/src/funcs/clientsList.ts +5 -3
  254. package/src/funcs/customersList.ts +5 -3
  255. package/src/funcs/customersListPayments.ts +5 -3
  256. package/src/funcs/invoicesList.ts +5 -3
  257. package/src/funcs/mandatesList.ts +5 -3
  258. package/src/funcs/paymentLinksList.ts +5 -3
  259. package/src/funcs/paymentLinksListPayments.ts +5 -3
  260. package/src/funcs/paymentsList.ts +5 -3
  261. package/src/funcs/payoutsList.ts +5 -3
  262. package/src/funcs/profilesList.ts +5 -3
  263. package/src/funcs/refundsAll.ts +5 -3
  264. package/src/funcs/refundsList.ts +5 -3
  265. package/src/funcs/salesInvoicesList.ts +5 -3
  266. package/src/funcs/settlementsList.ts +5 -3
  267. package/src/funcs/settlementsListCaptures.ts +5 -3
  268. package/src/funcs/settlementsListChargebacks.ts +5 -3
  269. package/src/funcs/settlementsListPayments.ts +5 -3
  270. package/src/funcs/settlementsListRefunds.ts +5 -3
  271. package/src/funcs/subscriptionsAll.ts +5 -3
  272. package/src/funcs/subscriptionsList.ts +5 -3
  273. package/src/funcs/subscriptionsListPayments.ts +5 -3
  274. package/src/funcs/terminalsList.ts +5 -3
  275. package/src/funcs/unmatchedCreditTransfersList.ts +5 -3
  276. package/src/funcs/webhooksList.ts +5 -3
  277. package/src/lib/config.ts +3 -3
  278. package/src/lib/encodings.ts +1 -1
  279. package/src/lib/env.ts +7 -3
  280. package/src/lib/matchers.ts +1 -1
  281. package/src/lib/primitives.ts +16 -0
  282. package/src/models/listpaymentresponse.ts +5 -0
  283. package/src/models/listsettlementpaymentresponse.ts +5 -0
  284. package/src/models/paymentresponse.ts +5 -0
  285. package/dist/commonjs/lib/dlv.d.ts +0 -14
  286. package/dist/commonjs/lib/dlv.d.ts.map +0 -1
  287. package/dist/commonjs/lib/dlv.js +0 -50
  288. package/dist/commonjs/lib/dlv.js.map +0 -1
  289. package/dist/commonjs/lib/is-plain-object.d.ts +0 -2
  290. package/dist/commonjs/lib/is-plain-object.d.ts.map +0 -1
  291. package/dist/commonjs/lib/is-plain-object.js +0 -42
  292. package/dist/commonjs/lib/is-plain-object.js.map +0 -1
  293. package/dist/esm/lib/dlv.d.ts +0 -14
  294. package/dist/esm/lib/dlv.d.ts.map +0 -1
  295. package/dist/esm/lib/dlv.js +0 -47
  296. package/dist/esm/lib/dlv.js.map +0 -1
  297. package/dist/esm/lib/is-plain-object.d.ts +0 -2
  298. package/dist/esm/lib/is-plain-object.d.ts.map +0 -1
  299. package/dist/esm/lib/is-plain-object.js +0 -39
  300. package/dist/esm/lib/is-plain-object.js.map +0 -1
  301. package/src/lib/dlv.ts +0 -54
  302. package/src/lib/is-plain-object.ts +0 -44
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -246,10 +245,13 @@ async function $do(
246
245
  >;
247
246
  "~next"?: { url: string };
248
247
  } => {
249
- let nextURL = dlv(responseData, "_links.next.href");
250
- if (typeof nextURL !== "string") {
248
+ const nextURLValue =
249
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
250
+ .next?.href;
251
+ if (typeof nextURLValue !== "string") {
251
252
  return { next: () => null };
252
253
  }
254
+ let nextURL = nextURLValue;
253
255
 
254
256
  try {
255
257
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -241,10 +240,13 @@ async function $do(
241
240
  >;
242
241
  "~next"?: { url: string };
243
242
  } => {
244
- let nextURL = dlv(responseData, "_links.next.href");
245
- if (typeof nextURL !== "string") {
243
+ const nextURLValue =
244
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
245
+ .next?.href;
246
+ if (typeof nextURLValue !== "string") {
246
247
  return { next: () => null };
247
248
  }
249
+ let nextURL = nextURLValue;
248
250
 
249
251
  try {
250
252
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -245,10 +244,13 @@ async function $do(
245
244
  >;
246
245
  "~next"?: { url: string };
247
246
  } => {
248
- let nextURL = dlv(responseData, "_links.next.href");
249
- if (typeof nextURL !== "string") {
247
+ const nextURLValue =
248
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
249
+ .next?.href;
250
+ if (typeof nextURLValue !== "string") {
250
251
  return { next: () => null };
251
252
  }
253
+ let nextURL = nextURLValue;
252
254
 
253
255
  try {
254
256
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -238,10 +237,13 @@ async function $do(
238
237
  >;
239
238
  "~next"?: { url: string };
240
239
  } => {
241
- let nextURL = dlv(responseData, "_links.next.href");
242
- if (typeof nextURL !== "string") {
240
+ const nextURLValue =
241
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
242
+ .next?.href;
243
+ if (typeof nextURLValue !== "string") {
243
244
  return { next: () => null };
244
245
  }
246
+ let nextURL = nextURLValue;
245
247
 
246
248
  try {
247
249
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -242,10 +241,13 @@ async function $do(
242
241
  >;
243
242
  "~next"?: { url: string };
244
243
  } => {
245
- let nextURL = dlv(responseData, "_links.next.href");
246
- if (typeof nextURL !== "string") {
244
+ const nextURLValue =
245
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
246
+ .next?.href;
247
+ if (typeof nextURLValue !== "string") {
247
248
  return { next: () => null };
248
249
  }
250
+ let nextURL = nextURLValue;
249
251
 
250
252
  try {
251
253
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -245,10 +244,13 @@ async function $do(
245
244
  >;
246
245
  "~next"?: { url: string };
247
246
  } => {
248
- let nextURL = dlv(responseData, "_links.next.href");
249
- if (typeof nextURL !== "string") {
247
+ const nextURLValue =
248
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
249
+ .next?.href;
250
+ if (typeof nextURLValue !== "string") {
250
251
  return { next: () => null };
251
252
  }
253
+ let nextURL = nextURLValue;
252
254
 
253
255
  try {
254
256
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -245,10 +244,13 @@ async function $do(
245
244
  >;
246
245
  "~next"?: { url: string };
247
246
  } => {
248
- let nextURL = dlv(responseData, "_links.next.href");
249
- if (typeof nextURL !== "string") {
247
+ const nextURLValue =
248
+ (responseData as { _links?: { next: { href?: unknown } | null } })._links
249
+ ?.next?.href;
250
+ if (typeof nextURLValue !== "string") {
250
251
  return { next: () => null };
251
252
  }
253
+ let nextURL = nextURLValue;
252
254
 
253
255
  try {
254
256
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -242,10 +241,13 @@ async function $do(
242
241
  >;
243
242
  "~next"?: { url: string };
244
243
  } => {
245
- let nextURL = dlv(responseData, "_links.next.href");
246
- if (typeof nextURL !== "string") {
244
+ const nextURLValue =
245
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
246
+ .next?.href;
247
+ if (typeof nextURLValue !== "string") {
247
248
  return { next: () => null };
248
249
  }
250
+ let nextURL = nextURLValue;
249
251
 
250
252
  try {
251
253
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -245,10 +244,13 @@ async function $do(
245
244
  >;
246
245
  "~next"?: { url: string };
247
246
  } => {
248
- let nextURL = dlv(responseData, "_links.next.href");
249
- if (typeof nextURL !== "string") {
247
+ const nextURLValue =
248
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
249
+ .next?.href;
250
+ if (typeof nextURLValue !== "string") {
250
251
  return { next: () => null };
251
252
  }
253
+ let nextURL = nextURLValue;
252
254
 
253
255
  try {
254
256
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -246,10 +245,13 @@ async function $do(
246
245
  >;
247
246
  "~next"?: { url: string };
248
247
  } => {
249
- let nextURL = dlv(responseData, "_links.next.href");
250
- if (typeof nextURL !== "string") {
248
+ const nextURLValue =
249
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
250
+ .next?.href;
251
+ if (typeof nextURLValue !== "string") {
251
252
  return { next: () => null };
252
253
  }
254
+ let nextURL = nextURLValue;
253
255
 
254
256
  try {
255
257
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -249,10 +248,13 @@ async function $do(
249
248
  >;
250
249
  "~next"?: { url: string };
251
250
  } => {
252
- let nextURL = dlv(responseData, "_links.next.href");
253
- if (typeof nextURL !== "string") {
251
+ const nextURLValue =
252
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
253
+ .next?.href;
254
+ if (typeof nextURLValue !== "string") {
254
255
  return { next: () => null };
255
256
  }
257
+ let nextURL = nextURLValue;
256
258
 
257
259
  try {
258
260
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -245,10 +244,13 @@ async function $do(
245
244
  >;
246
245
  "~next"?: { url: string };
247
246
  } => {
248
- let nextURL = dlv(responseData, "_links.next.href");
249
- if (typeof nextURL !== "string") {
247
+ const nextURLValue =
248
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
249
+ .next?.href;
250
+ if (typeof nextURLValue !== "string") {
250
251
  return { next: () => null };
251
252
  }
253
+ let nextURL = nextURLValue;
252
254
 
253
255
  try {
254
256
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -242,10 +241,13 @@ async function $do(
242
241
  >;
243
242
  "~next"?: { url: string };
244
243
  } => {
245
- let nextURL = dlv(responseData, "_links.next.href");
246
- if (typeof nextURL !== "string") {
244
+ const nextURLValue =
245
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
246
+ .next?.href;
247
+ if (typeof nextURLValue !== "string") {
247
248
  return { next: () => null };
248
249
  }
250
+ let nextURL = nextURLValue;
249
251
 
250
252
  try {
251
253
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -245,10 +244,13 @@ async function $do(
245
244
  >;
246
245
  "~next"?: { url: string };
247
246
  } => {
248
- let nextURL = dlv(responseData, "_links.next.href");
249
- if (typeof nextURL !== "string") {
247
+ const nextURLValue =
248
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
249
+ .next?.href;
250
+ if (typeof nextURLValue !== "string") {
250
251
  return { next: () => null };
251
252
  }
253
+ let nextURL = nextURLValue;
252
254
 
253
255
  try {
254
256
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -253,10 +252,13 @@ async function $do(
253
252
  >;
254
253
  "~next"?: { url: string };
255
254
  } => {
256
- let nextURL = dlv(responseData, "_links.next.href");
257
- if (typeof nextURL !== "string") {
255
+ const nextURLValue =
256
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
257
+ .next?.href;
258
+ if (typeof nextURLValue !== "string") {
258
259
  return { next: () => null };
259
260
  }
261
+ let nextURL = nextURLValue;
260
262
 
261
263
  try {
262
264
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -240,10 +239,13 @@ async function $do(
240
239
  >;
241
240
  "~next"?: { url: string };
242
241
  } => {
243
- let nextURL = dlv(responseData, "_links.next.href");
244
- if (typeof nextURL !== "string") {
242
+ const nextURLValue =
243
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
244
+ .next?.href;
245
+ if (typeof nextURLValue !== "string") {
245
246
  return { next: () => null };
246
247
  }
248
+ let nextURL = nextURLValue;
247
249
 
248
250
  try {
249
251
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -243,10 +242,13 @@ async function $do(
243
242
  >;
244
243
  "~next"?: { url: string };
245
244
  } => {
246
- let nextURL = dlv(responseData, "_links.next.href");
247
- if (typeof nextURL !== "string") {
245
+ const nextURLValue =
246
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
247
+ .next?.href;
248
+ if (typeof nextURLValue !== "string") {
248
249
  return { next: () => null };
249
250
  }
251
+ let nextURL = nextURLValue;
250
252
 
251
253
  try {
252
254
  if (nextURL.startsWith("/")) {
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import { ClientCore } from "../core.js";
7
- import { dlv } from "../lib/dlv.js";
8
7
  import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
8
  import { matchStatusCode } from "../lib/http.js";
10
9
  import * as M from "../lib/matchers.js";
@@ -239,10 +238,13 @@ async function $do(
239
238
  >;
240
239
  "~next"?: { url: string };
241
240
  } => {
242
- let nextURL = dlv(responseData, "_links.next.href");
243
- if (typeof nextURL !== "string") {
241
+ const nextURLValue =
242
+ (responseData as { _links: { next: { href?: unknown } | null } })._links
243
+ .next?.href;
244
+ if (typeof nextURLValue !== "string") {
244
245
  return { next: () => null };
245
246
  }
247
+ let nextURL = nextURLValue;
246
248
 
247
249
  try {
248
250
  if (nextURL.startsWith("/")) {
package/src/lib/config.ts CHANGED
@@ -78,8 +78,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
78
78
  export const SDK_METADATA = {
79
79
  language: "typescript",
80
80
  openapiDocVersion: "1.0.0",
81
- sdkVersion: "1.11.0",
82
- genVersion: "2.900.1",
81
+ sdkVersion: "1.12.0",
82
+ genVersion: "2.903.5",
83
83
  userAgent:
84
- "speakeasy-sdk/typescript 1.11.0 2.900.1 1.0.0 mollie-api-typescript",
84
+ "speakeasy-sdk/typescript 1.12.0 2.903.5 1.0.0 mollie-api-typescript",
85
85
  } as const;
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import { bytesToBase64 } from "./base64.js";
7
- import { isPlainObject } from "./is-plain-object.js";
7
+ import { isPlainObject } from "./primitives.js";
8
8
 
9
9
  export class EncodingError extends Error {
10
10
  constructor(message: string) {
package/src/lib/env.ts CHANGED
@@ -5,7 +5,6 @@
5
5
 
6
6
  import * as z from "zod/v3";
7
7
  import { SDKOptions } from "./config.js";
8
- import { dlv } from "./dlv.js";
9
8
 
10
9
  export interface Env {
11
10
  CLIENT_API_KEY?: string | undefined;
@@ -64,11 +63,16 @@ export function env(): Env {
64
63
  return envMemo;
65
64
  }
66
65
 
66
+ const globals = globalThis as {
67
+ Deno?: { env?: { toObject?: () => Record<string, string | undefined> } };
68
+ process?: { env?: Record<string, string | undefined> };
69
+ };
70
+
67
71
  let envObject: Record<string, unknown> = {};
68
72
  if (isDeno()) {
69
- envObject = (globalThis as any).Deno?.env?.toObject?.() ?? {};
73
+ envObject = globals.Deno?.env?.toObject?.() ?? {};
70
74
  } else {
71
- envObject = dlv(globalThis, "process.env") ?? {};
75
+ envObject = globals.process?.env ?? {};
72
76
  }
73
77
 
74
78
  envMemo = envSchema.parse(envObject);
@@ -7,7 +7,7 @@ import { ClientDefaultError } from "../models/errors/clientdefaulterror.js";
7
7
  import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
8
  import { ERR, OK, Result } from "../types/fp.js";
9
9
  import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js";
10
- import { isPlainObject } from "./is-plain-object.js";
10
+ import { isPlainObject } from "./primitives.js";
11
11
 
12
12
  export type Encoding =
13
13
  | "jsonl"
@@ -149,3 +149,19 @@ export function allRequired<V extends Record<string, unknown>>(
149
149
 
150
150
  return v as ReturnType<typeof allRequired<V>>;
151
151
  }
152
+
153
+ export function isPlainObject(
154
+ value: unknown,
155
+ ): value is Record<string, unknown> {
156
+ if (value === null || typeof value !== "object") return false;
157
+ if (Object.prototype.toString.call(value) !== "[object Object]") return false;
158
+ const proto = Object.getPrototypeOf(value);
159
+ if (proto === null || proto === Object.prototype) return true;
160
+ // cross-realm plain objects (vm contexts, iframes) inherit from a
161
+ // different realm's Object.prototype, which itself has a null prototype
162
+ try {
163
+ return Object.getPrototypeOf(proto) === null;
164
+ } catch {
165
+ return false;
166
+ }
167
+ }
@@ -721,6 +721,10 @@ export type ListPaymentResponseDetails = {
721
721
  * Multibanco entity reference of the transaction
722
722
  */
723
723
  multibancoEntity?: string | null | undefined;
724
+ /**
725
+ * Bizum payment reference of the transaction
726
+ */
727
+ bizumReference?: string | null | undefined;
724
728
  };
725
729
 
726
730
  /**
@@ -1454,6 +1458,7 @@ export const ListPaymentResponseDetails$inboundSchema: z.ZodType<
1454
1458
  remainderDetails: z.record(z.any()).optional(),
1455
1459
  multibancoReference: z.nullable(z.string()).optional(),
1456
1460
  multibancoEntity: z.nullable(z.string()).optional(),
1461
+ bizumReference: z.nullable(z.string()).optional(),
1457
1462
  });
1458
1463
 
1459
1464
  export function listPaymentResponseDetailsFromJSON(
@@ -695,6 +695,10 @@ export type ListSettlementPaymentResponseDetails = {
695
695
  * Multibanco entity reference of the transaction
696
696
  */
697
697
  multibancoEntity?: string | null | undefined;
698
+ /**
699
+ * Bizum payment reference of the transaction
700
+ */
701
+ bizumReference?: string | null | undefined;
698
702
  };
699
703
 
700
704
  /**
@@ -1473,6 +1477,7 @@ export const ListSettlementPaymentResponseDetails$inboundSchema: z.ZodType<
1473
1477
  remainderDetails: z.record(z.any()).optional(),
1474
1478
  multibancoReference: z.nullable(z.string()).optional(),
1475
1479
  multibancoEntity: z.nullable(z.string()).optional(),
1480
+ bizumReference: z.nullable(z.string()).optional(),
1476
1481
  });
1477
1482
 
1478
1483
  export function listSettlementPaymentResponseDetailsFromJSON(
@@ -719,6 +719,10 @@ export type PaymentResponseDetails = {
719
719
  * Multibanco entity reference of the transaction
720
720
  */
721
721
  multibancoEntity?: string | null | undefined;
722
+ /**
723
+ * Bizum payment reference of the transaction
724
+ */
725
+ bizumReference?: string | null | undefined;
722
726
  };
723
727
 
724
728
  /**
@@ -1453,6 +1457,7 @@ export const PaymentResponseDetails$inboundSchema: z.ZodType<
1453
1457
  remainderDetails: z.record(z.any()).optional(),
1454
1458
  multibancoReference: z.nullable(z.string()).optional(),
1455
1459
  multibancoEntity: z.nullable(z.string()).optional(),
1460
+ bizumReference: z.nullable(z.string()).optional(),
1456
1461
  });
1457
1462
 
1458
1463
  export function paymentResponseDetailsFromJSON(
@@ -1,14 +0,0 @@
1
- /**
2
- * @param obj The object to walk
3
- * @param key The key path to walk the object with
4
- * @param def A default value to return if the result is undefined
5
- *
6
- * @example
7
- * dlv(obj, "a.b.c.d")
8
- * @example
9
- * dlv(object, ["a", "b", "c", "d"])
10
- * @example
11
- * dlv(object, "foo.bar.baz", "Hello, default value!")
12
- */
13
- export declare function dlv<T = any>(obj: any, key: string | string[], def?: T, p?: number, undef?: never): T | undefined;
14
- //# sourceMappingURL=dlv.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dlv.d.ts","sourceRoot":"","sources":["../../../src/lib/dlv.ts"],"names":[],"mappings":"AA4BA;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EACzB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EACtB,GAAG,CAAC,EAAE,CAAC,EACP,CAAC,CAAC,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,KAAK,GACZ,CAAC,GAAG,SAAS,CAOf"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- * @generated-id: b1988214835a
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.dlv = dlv;
8
- /*
9
- MIT License
10
-
11
- Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
12
-
13
- Permission is hereby granted, free of charge, to any person obtaining a copy of
14
- this software and associated documentation files (the "Software"), to deal in
15
- the Software without restriction, including without limitation the rights to
16
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
17
- the Software, and to permit persons to whom the Software is furnished to do so,
18
- subject to the following conditions:
19
-
20
- The above copyright notice and this permission notice shall be included in all
21
- copies or substantial portions of the Software.
22
-
23
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
25
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
26
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
27
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
- */
30
- /**
31
- * @param obj The object to walk
32
- * @param key The key path to walk the object with
33
- * @param def A default value to return if the result is undefined
34
- *
35
- * @example
36
- * dlv(obj, "a.b.c.d")
37
- * @example
38
- * dlv(object, ["a", "b", "c", "d"])
39
- * @example
40
- * dlv(object, "foo.bar.baz", "Hello, default value!")
41
- */
42
- function dlv(obj, key, def, p, undef) {
43
- key = Array.isArray(key) ? key : key.split(".");
44
- for (p = 0; p < key.length; p++) {
45
- const k = key[p];
46
- obj = k != null && obj ? obj[k] : undef;
47
- }
48
- return obj === undef ? def : obj;
49
- }
50
- //# sourceMappingURL=dlv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dlv.js","sourceRoot":"","sources":["../../../src/lib/dlv.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAqCH,kBAaC;AAhDD;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF;;;;;;;;;;;GAWG;AACH,SAAgB,GAAG,CACjB,GAAQ,EACR,GAAsB,EACtB,GAAO,EACP,CAAU,EACV,KAAa;IAEb,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACjB,GAAG,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC;IACD,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC"}