@kaspernj/api-maker 1.0.2159 → 1.0.2161

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 (529) hide show
  1. package/build/api.d.ts +46 -34
  2. package/build/api.d.ts.map +1 -1
  3. package/build/api.js +32 -25
  4. package/build/attribute-not-loaded-error.d.ts.map +1 -1
  5. package/build/attribute-not-loaded-error.js +2 -1
  6. package/build/base-error.d.ts +49 -60
  7. package/build/base-error.d.ts.map +1 -1
  8. package/build/base-error.js +3 -2
  9. package/build/base-model/column.d.ts +2 -2
  10. package/build/base-model/column.d.ts.map +1 -1
  11. package/build/base-model/column.js +3 -2
  12. package/build/base-model/reflection.d.ts +8 -3
  13. package/build/base-model/reflection.d.ts.map +1 -1
  14. package/build/base-model/reflection.js +8 -3
  15. package/build/base-model/scope.d.ts +1 -1
  16. package/build/base-model/scope.d.ts.map +1 -1
  17. package/build/base-model/scope.js +3 -2
  18. package/build/base-model.d.ts +3801 -117
  19. package/build/base-model.d.ts.map +1 -1
  20. package/build/base-model.js +271 -143
  21. package/build/bootstrap/attribute-row.d.ts +14 -1
  22. package/build/bootstrap/attribute-row.d.ts.map +1 -1
  23. package/build/bootstrap/attribute-row.js +23 -5
  24. package/build/bootstrap/attribute-rows.d.ts +10 -1
  25. package/build/bootstrap/attribute-rows.d.ts.map +1 -1
  26. package/build/bootstrap/attribute-rows.js +14 -5
  27. package/build/bootstrap/card.d.ts +19 -1
  28. package/build/bootstrap/card.d.ts.map +1 -1
  29. package/build/bootstrap/card.js +33 -13
  30. package/build/bootstrap/checkbox.d.ts +18 -1
  31. package/build/bootstrap/checkbox.d.ts.map +1 -1
  32. package/build/bootstrap/checkbox.js +23 -3
  33. package/build/bootstrap/checkboxes.d.ts +33 -1
  34. package/build/bootstrap/checkboxes.d.ts.map +1 -1
  35. package/build/bootstrap/checkboxes.js +50 -17
  36. package/build/bootstrap/index.js +2 -1
  37. package/build/bootstrap/input.d.ts +24 -0
  38. package/build/bootstrap/input.d.ts.map +1 -1
  39. package/build/bootstrap/input.js +27 -2
  40. package/build/bootstrap/invalid-feedback.d.ts.map +1 -1
  41. package/build/bootstrap/invalid-feedback.js +2 -1
  42. package/build/bootstrap/paginate.d.ts +7 -1
  43. package/build/bootstrap/paginate.d.ts.map +1 -1
  44. package/build/bootstrap/paginate.js +9 -4
  45. package/build/bootstrap/radio-buttons.js +2 -1
  46. package/build/bootstrap/select.js +2 -1
  47. package/build/bootstrap/sort-link.d.ts +12 -1
  48. package/build/bootstrap/sort-link.d.ts.map +1 -1
  49. package/build/bootstrap/sort-link.js +19 -10
  50. package/build/cable-connection-pool.d.ts +201 -24
  51. package/build/cable-connection-pool.d.ts.map +1 -1
  52. package/build/cable-connection-pool.js +76 -16
  53. package/build/cable-subscription-pool.d.ts +186 -20
  54. package/build/cable-subscription-pool.d.ts.map +1 -1
  55. package/build/cable-subscription-pool.js +61 -22
  56. package/build/cable-subscription.d.ts.map +1 -1
  57. package/build/cable-subscription.js +3 -2
  58. package/build/cache-key-generator.d.ts +194 -20
  59. package/build/cache-key-generator.d.ts.map +1 -1
  60. package/build/cache-key-generator.js +63 -12
  61. package/build/can-can.d.ts +146 -29
  62. package/build/can-can.d.ts.map +1 -1
  63. package/build/can-can.js +105 -19
  64. package/build/channels-consumer.d.ts +23 -1
  65. package/build/channels-consumer.d.ts.map +1 -1
  66. package/build/channels-consumer.js +26 -8
  67. package/build/collection-loader.d.ts +4 -1
  68. package/build/collection-loader.js +2 -1
  69. package/build/collection.d.ts +361 -370
  70. package/build/collection.d.ts.map +1 -1
  71. package/build/collection.js +59 -19
  72. package/build/command-execution.d.ts +50 -26
  73. package/build/command-execution.d.ts.map +1 -1
  74. package/build/command-execution.js +31 -13
  75. package/build/command-submit-data.d.ts +50 -37
  76. package/build/command-submit-data.d.ts.map +1 -1
  77. package/build/command-submit-data.js +35 -22
  78. package/build/commands-pool.d.ts +65 -27
  79. package/build/commands-pool.d.ts.map +1 -1
  80. package/build/commands-pool.js +67 -20
  81. package/build/compose.d.ts +8 -2
  82. package/build/compose.d.ts.map +1 -1
  83. package/build/compose.js +9 -2
  84. package/build/config.d.ts +31 -15
  85. package/build/config.d.ts.map +1 -1
  86. package/build/config.js +60 -23
  87. package/build/custom-error.d.ts.map +1 -1
  88. package/build/custom-error.js +2 -1
  89. package/build/data-set-to-attributes.d.ts +14 -2
  90. package/build/data-set-to-attributes.d.ts.map +1 -1
  91. package/build/data-set-to-attributes.js +12 -3
  92. package/build/deserializer.d.ts +116 -2
  93. package/build/deserializer.d.ts.map +1 -1
  94. package/build/deserializer.js +13 -2
  95. package/build/destroy-error.d.ts.map +1 -1
  96. package/build/destroy-error.js +2 -1
  97. package/build/devise.d.ts +638 -39
  98. package/build/devise.d.ts.map +1 -1
  99. package/build/devise.js +97 -28
  100. package/build/draggable-sort/controller.d.ts +126 -35
  101. package/build/draggable-sort/controller.d.ts.map +1 -1
  102. package/build/draggable-sort/controller.js +100 -28
  103. package/build/draggable-sort/index.d.ts +57 -1
  104. package/build/draggable-sort/index.d.ts.map +1 -1
  105. package/build/draggable-sort/index.js +71 -3
  106. package/build/draggable-sort/item.d.ts +56 -1
  107. package/build/draggable-sort/item.d.ts.map +1 -1
  108. package/build/draggable-sort/item.js +98 -10
  109. package/build/error-logger.d.ts +30 -14
  110. package/build/error-logger.d.ts.map +1 -1
  111. package/build/error-logger.js +22 -11
  112. package/build/event-connection.d.ts.map +1 -1
  113. package/build/event-connection.js +3 -2
  114. package/build/event-emitter-listener.d.ts.map +1 -1
  115. package/build/event-emitter-listener.js +2 -1
  116. package/build/event-model-class.d.ts.map +1 -1
  117. package/build/event-model-class.js +2 -1
  118. package/build/events.d.ts.map +1 -1
  119. package/build/events.js +2 -1
  120. package/build/form.d.ts +24 -1
  121. package/build/form.d.ts.map +1 -1
  122. package/build/form.js +16 -4
  123. package/build/history-expo.d.ts +6 -2
  124. package/build/history-expo.d.ts.map +1 -1
  125. package/build/history-expo.js +5 -2
  126. package/build/history-react-native.d.ts +6 -2
  127. package/build/history-react-native.d.ts.map +1 -1
  128. package/build/history-react-native.js +5 -2
  129. package/build/history.js +2 -1
  130. package/build/index.d.ts.map +1 -1
  131. package/build/index.js +2 -1
  132. package/build/inputs/attachment.d.ts +13 -1
  133. package/build/inputs/attachment.d.ts.map +1 -1
  134. package/build/inputs/attachment.js +22 -8
  135. package/build/inputs/auto-submit.d.ts +41 -13
  136. package/build/inputs/auto-submit.d.ts.map +1 -1
  137. package/build/inputs/auto-submit.js +16 -4
  138. package/build/inputs/checkbox.d.ts +17 -1
  139. package/build/inputs/checkbox.d.ts.map +1 -1
  140. package/build/inputs/checkbox.js +25 -11
  141. package/build/inputs/checkboxes.d.ts +16 -0
  142. package/build/inputs/checkboxes.d.ts.map +1 -1
  143. package/build/inputs/checkboxes.js +20 -4
  144. package/build/inputs/id-for-component.d.ts +21 -2
  145. package/build/inputs/id-for-component.d.ts.map +1 -1
  146. package/build/inputs/id-for-component.js +9 -2
  147. package/build/inputs/input-wrapper.d.ts.map +1 -1
  148. package/build/inputs/input-wrapper.js +2 -1
  149. package/build/inputs/input.d.ts +38 -1
  150. package/build/inputs/input.d.ts.map +1 -1
  151. package/build/inputs/input.js +29 -10
  152. package/build/inputs/money.d.ts +4 -1
  153. package/build/inputs/money.d.ts.map +1 -1
  154. package/build/inputs/money.js +6 -3
  155. package/build/inputs/name-for-component.d.ts +21 -2
  156. package/build/inputs/name-for-component.d.ts.map +1 -1
  157. package/build/inputs/name-for-component.js +9 -2
  158. package/build/inputs/select.d.ts +35 -1
  159. package/build/inputs/select.d.ts.map +1 -1
  160. package/build/inputs/select.js +21 -4
  161. package/build/instance-of-class-name.d.ts +7 -2
  162. package/build/instance-of-class-name.d.ts.map +1 -1
  163. package/build/instance-of-class-name.js +8 -4
  164. package/build/is-expo.d.ts.map +1 -1
  165. package/build/is-expo.js +2 -1
  166. package/build/key-value-store.d.ts +24 -14
  167. package/build/key-value-store.d.ts.map +1 -1
  168. package/build/key-value-store.js +22 -12
  169. package/build/link.d.ts +32 -1
  170. package/build/link.d.ts.map +1 -1
  171. package/build/link.js +76 -30
  172. package/build/logger.d.ts +10 -6
  173. package/build/logger.d.ts.map +1 -1
  174. package/build/logger.js +7 -4
  175. package/build/merge-styles.d.ts +10 -2
  176. package/build/merge-styles.d.ts.map +1 -1
  177. package/build/merge-styles.js +10 -3
  178. package/build/modal.d.ts +4 -1
  179. package/build/modal.d.ts.map +1 -1
  180. package/build/modal.js +6 -4
  181. package/build/model-class-require.d.ts +4 -2
  182. package/build/model-class-require.d.ts.map +1 -1
  183. package/build/model-class-require.js +4 -2
  184. package/build/model-events.d.ts +139 -346
  185. package/build/model-events.d.ts.map +1 -1
  186. package/build/model-events.js +21 -9
  187. package/build/model-name.d.ts +21 -7
  188. package/build/model-name.d.ts.map +1 -1
  189. package/build/model-name.js +12 -2
  190. package/build/model-prop-type.d.ts +533 -26
  191. package/build/model-prop-type.d.ts.map +1 -1
  192. package/build/model-prop-type.js +69 -11
  193. package/build/model-recipes-loader.d.ts +7 -3
  194. package/build/model-recipes-loader.d.ts.map +1 -1
  195. package/build/model-recipes-loader.js +4 -2
  196. package/build/model-recipes-model-loader.d.ts +189 -1493
  197. package/build/model-recipes-model-loader.d.ts.map +1 -1
  198. package/build/model-recipes-model-loader.js +119 -17
  199. package/build/models-response-reader.d.ts +600 -195
  200. package/build/models-response-reader.d.ts.map +1 -1
  201. package/build/models-response-reader.js +12 -4
  202. package/build/models.d.ts +438 -1
  203. package/build/models.d.ts.map +1 -1
  204. package/build/models.js +2 -1
  205. package/build/money-formatter.d.ts +25 -31
  206. package/build/money-formatter.d.ts.map +1 -1
  207. package/build/money-formatter.js +11 -8
  208. package/build/not-loaded-error.d.ts.map +1 -1
  209. package/build/not-loaded-error.js +2 -1
  210. package/build/params.d.ts +25 -17
  211. package/build/params.d.ts.map +1 -1
  212. package/build/params.js +19 -15
  213. package/build/preloaded.d.ts +61 -64
  214. package/build/preloaded.d.ts.map +1 -1
  215. package/build/preloaded.js +10 -4
  216. package/build/reset-realtime-runtime-state.d.ts.map +1 -1
  217. package/build/reset-realtime-runtime-state.js +2 -1
  218. package/build/resize-observer.d.ts +1 -1
  219. package/build/resize-observer.d.ts.map +1 -1
  220. package/build/resize-observer.js +2 -1
  221. package/build/rest-props-validator.d.ts +2 -2
  222. package/build/rest-props-validator.d.ts.map +1 -1
  223. package/build/rest-props-validator.js +3 -2
  224. package/build/result.d.ts +142 -175
  225. package/build/result.d.ts.map +1 -1
  226. package/build/result.js +3 -2
  227. package/build/router/route.d.ts +51 -1
  228. package/build/router/route.d.ts.map +1 -1
  229. package/build/router/route.js +48 -12
  230. package/build/router/switch.d.ts +38 -2
  231. package/build/router/switch.d.ts.map +1 -1
  232. package/build/router/switch.js +34 -13
  233. package/build/router.d.ts +21 -1
  234. package/build/router.d.ts.map +1 -1
  235. package/build/router.js +15 -4
  236. package/build/routes-native.d.ts +13 -13
  237. package/build/routes-native.d.ts.map +1 -1
  238. package/build/routes-native.js +23 -11
  239. package/build/routes.d.ts +17 -9
  240. package/build/routes.d.ts.map +1 -1
  241. package/build/routes.js +7 -2
  242. package/build/run-last.d.ts.map +1 -1
  243. package/build/run-last.js +2 -1
  244. package/build/serializer.d.ts +44 -12
  245. package/build/serializer.d.ts.map +1 -1
  246. package/build/serializer.js +36 -7
  247. package/build/services.d.ts +29 -4
  248. package/build/services.d.ts.map +1 -1
  249. package/build/services.js +16 -4
  250. package/build/session-status-updater.d.ts +73 -25
  251. package/build/session-status-updater.d.ts.map +1 -1
  252. package/build/session-status-updater.js +52 -14
  253. package/build/source-maps-loader.d.ts +88 -33
  254. package/build/source-maps-loader.d.ts.map +1 -1
  255. package/build/source-maps-loader.js +74 -18
  256. package/build/super-admin/config-reader.d.ts.map +1 -1
  257. package/build/super-admin/config-reader.js +11 -16
  258. package/build/super-admin/edit-page/edit-attribute-checkbox.d.ts +12 -1
  259. package/build/super-admin/edit-page/edit-attribute-checkbox.d.ts.map +1 -1
  260. package/build/super-admin/edit-page/edit-attribute-checkbox.js +22 -8
  261. package/build/super-admin/edit-page/edit-attribute-content.d.ts +10 -1
  262. package/build/super-admin/edit-page/edit-attribute-content.d.ts.map +1 -1
  263. package/build/super-admin/edit-page/edit-attribute-content.js +20 -9
  264. package/build/super-admin/edit-page/edit-attribute-input.d.ts +10 -1
  265. package/build/super-admin/edit-page/edit-attribute-input.d.ts.map +1 -1
  266. package/build/super-admin/edit-page/edit-attribute-input.js +13 -4
  267. package/build/super-admin/edit-page/edit-attribute.d.ts +8 -1
  268. package/build/super-admin/edit-page/edit-attribute.d.ts.map +1 -1
  269. package/build/super-admin/edit-page/edit-attribute.js +11 -4
  270. package/build/super-admin/edit-page.d.ts +7 -1
  271. package/build/super-admin/edit-page.d.ts.map +1 -1
  272. package/build/super-admin/edit-page.js +11 -5
  273. package/build/super-admin/has-edit-config.d.ts.map +1 -1
  274. package/build/super-admin/has-edit-config.js +2 -1
  275. package/build/super-admin/index-page.d.ts +6 -1
  276. package/build/super-admin/index-page.d.ts.map +1 -1
  277. package/build/super-admin/index-page.js +9 -4
  278. package/build/super-admin/index.d.ts +6 -1
  279. package/build/super-admin/index.d.ts.map +1 -1
  280. package/build/super-admin/index.js +16 -10
  281. package/build/super-admin/layout/header/index.d.ts +6 -1
  282. package/build/super-admin/layout/header/index.d.ts.map +1 -1
  283. package/build/super-admin/layout/header/index.js +18 -12
  284. package/build/super-admin/layout/index.d.ts +26 -1
  285. package/build/super-admin/layout/index.d.ts.map +1 -1
  286. package/build/super-admin/layout/index.js +41 -7
  287. package/build/super-admin/layout/menu/index.d.ts +4 -1
  288. package/build/super-admin/layout/menu/index.d.ts.map +1 -1
  289. package/build/super-admin/layout/menu/index.js +13 -7
  290. package/build/super-admin/layout/menu/menu-content.d.ts +4 -1
  291. package/build/super-admin/layout/menu/menu-content.d.ts.map +1 -1
  292. package/build/super-admin/layout/menu/menu-content.js +6 -4
  293. package/build/super-admin/layout/menu/menu-item.d.ts +11 -1
  294. package/build/super-admin/layout/menu/menu-item.d.ts.map +1 -1
  295. package/build/super-admin/layout/menu/menu-item.js +19 -9
  296. package/build/super-admin/layout/no-access.d.ts +4 -1
  297. package/build/super-admin/layout/no-access.d.ts.map +1 -1
  298. package/build/super-admin/layout/no-access.js +7 -5
  299. package/build/super-admin/model-class-table.d.ts +6 -1
  300. package/build/super-admin/model-class-table.d.ts.map +1 -1
  301. package/build/super-admin/model-class-table.js +9 -4
  302. package/build/super-admin/models.d.ts.map +1 -1
  303. package/build/super-admin/models.js +2 -1
  304. package/build/super-admin/show-nav.d.ts +4 -1
  305. package/build/super-admin/show-nav.d.ts.map +1 -1
  306. package/build/super-admin/show-nav.js +6 -4
  307. package/build/super-admin/show-page/belongs-to-attribute-row.d.ts +18 -1
  308. package/build/super-admin/show-page/belongs-to-attribute-row.d.ts.map +1 -1
  309. package/build/super-admin/show-page/belongs-to-attribute-row.js +14 -5
  310. package/build/super-admin/show-page/index.d.ts +6 -1
  311. package/build/super-admin/show-page/index.d.ts.map +1 -1
  312. package/build/super-admin/show-page/index.js +11 -5
  313. package/build/super-admin/show-reflection-actions.d.ts +8 -1
  314. package/build/super-admin/show-reflection-actions.d.ts.map +1 -1
  315. package/build/super-admin/show-reflection-actions.js +11 -4
  316. package/build/super-admin/show-reflection-link.d.ts +6 -1
  317. package/build/super-admin/show-reflection-link.d.ts.map +1 -1
  318. package/build/super-admin/show-reflection-link.js +12 -5
  319. package/build/super-admin/show-reflection-page.d.ts +7 -1
  320. package/build/super-admin/show-reflection-page.d.ts.map +1 -1
  321. package/build/super-admin/show-reflection-page.js +10 -4
  322. package/build/table/column-content.d.ts +155 -19
  323. package/build/table/column-content.d.ts.map +1 -1
  324. package/build/table/column-content.js +55 -12
  325. package/build/table/column-identifier.d.ts +11 -2
  326. package/build/table/column-identifier.d.ts.map +1 -1
  327. package/build/table/column-identifier.js +7 -2
  328. package/build/table/column-visible.d.ts +11 -2
  329. package/build/table/column-visible.d.ts.map +1 -1
  330. package/build/table/column-visible.js +8 -2
  331. package/build/table/components/column.d.ts +4 -1
  332. package/build/table/components/column.d.ts.map +1 -1
  333. package/build/table/components/column.js +6 -4
  334. package/build/table/components/flat-list.d.ts +4 -1
  335. package/build/table/components/flat-list.d.ts.map +1 -1
  336. package/build/table/components/flat-list.js +6 -4
  337. package/build/table/components/header.d.ts +4 -1
  338. package/build/table/components/header.d.ts.map +1 -1
  339. package/build/table/components/header.js +6 -4
  340. package/build/table/components/row.d.ts +4 -1
  341. package/build/table/components/row.d.ts.map +1 -1
  342. package/build/table/components/row.js +6 -4
  343. package/build/table/filters/attribute-element.d.ts +4 -1
  344. package/build/table/filters/attribute-element.d.ts.map +1 -1
  345. package/build/table/filters/attribute-element.js +7 -7
  346. package/build/table/filters/filter-form.d.ts +60 -1
  347. package/build/table/filters/filter-form.d.ts.map +1 -1
  348. package/build/table/filters/filter-form.js +89 -28
  349. package/build/table/filters/filter.d.ts +4 -1
  350. package/build/table/filters/filter.d.ts.map +1 -1
  351. package/build/table/filters/filter.js +6 -4
  352. package/build/table/filters/index.d.ts +129 -1
  353. package/build/table/filters/index.d.ts.map +1 -1
  354. package/build/table/filters/index.js +26 -9
  355. package/build/table/filters/load-search-modal.d.ts +132 -1
  356. package/build/table/filters/load-search-modal.d.ts.map +1 -1
  357. package/build/table/filters/load-search-modal.js +32 -10
  358. package/build/table/filters/reflection-element.d.ts +4 -1
  359. package/build/table/filters/reflection-element.d.ts.map +1 -1
  360. package/build/table/filters/reflection-element.js +6 -4
  361. package/build/table/filters/save-search-modal.d.ts +136 -1
  362. package/build/table/filters/save-search-modal.d.ts.map +1 -1
  363. package/build/table/filters/save-search-modal.js +39 -6
  364. package/build/table/filters/scope-element.d.ts +8 -1
  365. package/build/table/filters/scope-element.d.ts.map +1 -1
  366. package/build/table/filters/scope-element.js +13 -8
  367. package/build/table/header-column-content.d.ts +9 -1
  368. package/build/table/header-column-content.d.ts.map +1 -1
  369. package/build/table/header-column-content.js +12 -4
  370. package/build/table/header-column.d.ts +52 -1
  371. package/build/table/header-column.d.ts.map +1 -1
  372. package/build/table/header-column.js +39 -10
  373. package/build/table/header-select.d.ts +20 -1
  374. package/build/table/header-select.d.ts.map +1 -1
  375. package/build/table/header-select.js +27 -8
  376. package/build/table/model-callback-args.d.ts +116 -3
  377. package/build/table/model-callback-args.d.ts.map +1 -1
  378. package/build/table/model-callback-args.js +10 -3
  379. package/build/table/model-column.d.ts +138 -1
  380. package/build/table/model-column.d.ts.map +1 -1
  381. package/build/table/model-column.js +27 -4
  382. package/build/table/model-row.d.ts +21 -1
  383. package/build/table/model-row.d.ts.map +1 -1
  384. package/build/table/model-row.js +24 -4
  385. package/build/table/select-calculator.d.ts +37 -2
  386. package/build/table/select-calculator.d.ts.map +1 -1
  387. package/build/table/select-calculator.js +29 -6
  388. package/build/table/settings/column-row.d.ts +8 -1
  389. package/build/table/settings/column-row.d.ts.map +1 -1
  390. package/build/table/settings/column-row.js +13 -12
  391. package/build/table/settings/download-action.d.ts +7 -1
  392. package/build/table/settings/download-action.d.ts.map +1 -1
  393. package/build/table/settings/download-action.js +10 -4
  394. package/build/table/settings/index.d.ts +7 -1
  395. package/build/table/settings/index.d.ts.map +1 -1
  396. package/build/table/settings/index.js +10 -4
  397. package/build/table/should-render-loading-content.d.ts +2 -2
  398. package/build/table/should-render-loading-content.d.ts.map +1 -1
  399. package/build/table/should-render-loading-content.js +3 -2
  400. package/build/table/table-settings.d.ts +236 -43
  401. package/build/table/table-settings.d.ts.map +1 -1
  402. package/build/table/table-settings.js +105 -21
  403. package/build/table/table.d.ts +273 -1
  404. package/build/table/table.d.ts.map +1 -1
  405. package/build/table/table.js +210 -53
  406. package/build/table/use-sorting.d.ts +10 -8
  407. package/build/table/use-sorting.d.ts.map +1 -1
  408. package/build/table/use-sorting.js +16 -8
  409. package/build/table/widths.d.ts +55 -8
  410. package/build/table/widths.d.ts.map +1 -1
  411. package/build/table/widths.js +25 -2
  412. package/build/table/worker-plugins-check-all-checkbox.d.ts +20 -1
  413. package/build/table/worker-plugins-check-all-checkbox.d.ts.map +1 -1
  414. package/build/table/worker-plugins-check-all-checkbox.js +29 -9
  415. package/build/table/worker-plugins-checkbox.d.ts +7 -1
  416. package/build/table/worker-plugins-checkbox.d.ts.map +1 -1
  417. package/build/table/worker-plugins-checkbox.js +14 -8
  418. package/build/translated-attributes.d.ts +7 -2
  419. package/build/translated-attributes.d.ts.map +1 -1
  420. package/build/translated-attributes.js +8 -2
  421. package/build/translated-collections.d.ts +11 -2
  422. package/build/translated-collections.d.ts.map +1 -1
  423. package/build/translated-collections.js +9 -3
  424. package/build/updated-attribute.d.ts.map +1 -1
  425. package/build/updated-attribute.js +2 -1
  426. package/build/url-encode.d.ts.map +1 -1
  427. package/build/url-encode.js +2 -1
  428. package/build/use-can-can.d.ts +8 -0
  429. package/build/use-can-can.d.ts.map +1 -1
  430. package/build/use-can-can.js +39 -13
  431. package/build/use-collection.d.ts +174 -117
  432. package/build/use-collection.d.ts.map +1 -1
  433. package/build/use-collection.js +133 -51
  434. package/build/use-created-event.d.ts +120 -11
  435. package/build/use-created-event.d.ts.map +1 -1
  436. package/build/use-created-event.js +10 -7
  437. package/build/use-current-user-context.d.ts +2 -2
  438. package/build/use-current-user-context.d.ts.map +1 -1
  439. package/build/use-current-user-context.js +3 -2
  440. package/build/use-current-user.d.ts +86 -70
  441. package/build/use-current-user.d.ts.map +1 -1
  442. package/build/use-current-user.js +36 -8
  443. package/build/use-destroyed-event.d.ts +117 -8
  444. package/build/use-destroyed-event.d.ts.map +1 -1
  445. package/build/use-destroyed-event.js +29 -22
  446. package/build/use-input.d.ts +74 -12
  447. package/build/use-input.d.ts.map +1 -1
  448. package/build/use-input.js +33 -5
  449. package/build/use-model-class-event.d.ts +124 -10
  450. package/build/use-model-class-event.d.ts.map +1 -1
  451. package/build/use-model-class-event.js +26 -16
  452. package/build/use-model-event.d.ts +121 -8
  453. package/build/use-model-event.d.ts.map +1 -1
  454. package/build/use-model-event.js +24 -19
  455. package/build/use-model.d.ts +165 -243
  456. package/build/use-model.d.ts.map +1 -1
  457. package/build/use-model.js +94 -35
  458. package/build/use-resize-observer.d.ts.map +1 -1
  459. package/build/use-resize-observer.js +2 -1
  460. package/build/use-router.d.ts.map +1 -1
  461. package/build/use-router.js +2 -1
  462. package/build/use-screen-layout.d.ts +7 -2
  463. package/build/use-screen-layout.d.ts.map +1 -1
  464. package/build/use-screen-layout.js +8 -5
  465. package/build/use-shape.js +2 -1
  466. package/build/use-styles.d.ts +11 -5
  467. package/build/use-styles.d.ts.map +1 -1
  468. package/build/use-styles.js +16 -9
  469. package/build/use-updated-event.d.ts +66 -182
  470. package/build/use-updated-event.d.ts.map +1 -1
  471. package/build/use-updated-event.js +22 -18
  472. package/build/use-validation-errors.d.ts.map +1 -1
  473. package/build/use-validation-errors.js +2 -1
  474. package/build/utils/button.d.ts +16 -1
  475. package/build/utils/button.d.ts.map +1 -1
  476. package/build/utils/button.js +27 -8
  477. package/build/utils/card.d.ts +11 -1
  478. package/build/utils/card.d.ts.map +1 -1
  479. package/build/utils/card.js +13 -2
  480. package/build/utils/checkbox.d.ts +14 -1
  481. package/build/utils/checkbox.d.ts.map +1 -1
  482. package/build/utils/checkbox.js +22 -9
  483. package/build/utils/checkboxes.d.ts +27 -1
  484. package/build/utils/checkboxes.d.ts.map +1 -1
  485. package/build/utils/checkboxes.js +44 -17
  486. package/build/utils/default-style.d.ts +11 -4
  487. package/build/utils/default-style.d.ts.map +1 -1
  488. package/build/utils/default-style.js +12 -4
  489. package/build/utils/header.d.ts +6 -1
  490. package/build/utils/header.d.ts.map +1 -1
  491. package/build/utils/header.js +4 -2
  492. package/build/utils/icon.d.ts +9 -7
  493. package/build/utils/icon.d.ts.map +1 -1
  494. package/build/utils/icon.js +12 -11
  495. package/build/utils/invalid-feedback.d.ts +6 -1
  496. package/build/utils/invalid-feedback.d.ts.map +1 -1
  497. package/build/utils/invalid-feedback.js +8 -2
  498. package/build/utils/modal.d.ts +4 -1
  499. package/build/utils/modal.d.ts.map +1 -1
  500. package/build/utils/modal.js +11 -9
  501. package/build/utils/text.d.ts +9 -1
  502. package/build/utils/text.d.ts.map +1 -1
  503. package/build/utils/text.js +9 -2
  504. package/build/validation-error.d.ts +5 -2
  505. package/build/validation-error.d.ts.map +1 -1
  506. package/build/validation-error.js +5 -2
  507. package/build/validation-errors.d.ts +57 -15
  508. package/build/validation-errors.d.ts.map +1 -1
  509. package/build/validation-errors.js +37 -8
  510. package/build/websocket-request-client.d.ts +61 -15
  511. package/build/websocket-request-client.d.ts.map +1 -1
  512. package/build/websocket-request-client.js +35 -9
  513. package/build/with-api-maker.d.ts +2 -1
  514. package/build/with-api-maker.d.ts.map +1 -1
  515. package/build/with-api-maker.js +2 -1
  516. package/build/with-collection.d.ts +2 -1
  517. package/build/with-collection.d.ts.map +1 -1
  518. package/build/with-collection.js +2 -1
  519. package/build/with-current-user.d.ts.map +1 -1
  520. package/build/with-current-user.js +2 -1
  521. package/build/with-model.d.ts +2 -1
  522. package/build/with-model.d.ts.map +1 -1
  523. package/build/with-model.js +2 -1
  524. package/build/with-router.d.ts.map +1 -1
  525. package/build/with-router.js +2 -1
  526. package/package.json +6 -5
  527. package/build/base-component.d.ts +0 -4
  528. package/build/base-component.d.ts.map +0 -1
  529. package/build/base-component.js +0 -4
@@ -2,8 +2,46 @@
2
2
  * @template {typeof import("./base-model.js").default} MC
3
3
  * @typedef {InstanceType<MC>} ModelOf
4
4
  */
5
- /** @typedef {Record<string, any>} PreloadMap */
6
- /** @typedef {string | Array<string | PreloadMap> | PreloadMap} PreloadValue */
5
+ /** @typedef {Record<string, string | string[] | Record<string, string | string[]>>} PreloadMap */
6
+ /** @typedef {string | string[] | PreloadMap} PreloadValue */
7
+ /** @typedef {Record<string, string | number | boolean | null | Array<string | number | boolean | null>>} CollectionSearchParamMap */
8
+ /** @typedef {CollectionSearchParamMap | string[]} CollectionSearchParams */
9
+ /** @typedef {Record<string, string | number | boolean | null>} CollectionRansackParams */
10
+ /**
11
+ * @typedef {(
12
+ * string |
13
+ * number |
14
+ * boolean |
15
+ * null |
16
+ * Array<string | [string, string]> |
17
+ * PreloadValue |
18
+ * CollectionRansackParams |
19
+ * CollectionSearchParams |
20
+ * Record<string, string[]>
21
+ * )} QueryParamValue
22
+ */
23
+ /** @typedef {Record<string, QueryParamValue>} QueryParamValueMap */
24
+ /**
25
+ * @typedef {object} CollectionResponseMeta
26
+ * @property {number} count
27
+ * @property {number} currentPage
28
+ * @property {number} perPage
29
+ * @property {number} totalCount
30
+ * @property {number} totalPages
31
+ */
32
+ /**
33
+ * @template {typeof import("./base-model.js").default} MC
34
+ * @typedef {object} CollectionResponse
35
+ * @property {Array<ModelOf<MC>>} collection
36
+ * @property {CollectionResponseMeta} meta
37
+ */
38
+ /**
39
+ * @template {typeof import("./base-model.js").default} MC
40
+ * @typedef {object} ResultArgs
41
+ * @property {ApiMakerCollection<MC>} collection
42
+ * @property {Array<ModelOf<MC>>} models
43
+ * @property {CollectionResponse<MC>} response
44
+ */
7
45
  /**
8
46
  * @template {typeof import("./base-model.js").default} MC
9
47
  * @typedef {object} CollectionArgsType
@@ -21,12 +59,12 @@
21
59
  * @property {number} [limit]
22
60
  * @property {number} [page]
23
61
  * @property {string} [pageKey]
24
- * @property {Record<string, any>} [params]
62
+ * @property {QueryParamValueMap} [params]
25
63
  * @property {number} [per]
26
64
  * @property {string} [perKey]
27
65
  * @property {PreloadValue} [preload]
28
- * @property {Record<string, any>} [ransack]
29
- * @property {Record<string, any>} [search]
66
+ * @property {CollectionRansackParams} [ransack]
67
+ * @property {CollectionSearchParams} [search]
30
68
  * @property {string} [searchKey]
31
69
  * @property {Record<string, string[]>} [select]
32
70
  * @property {Record<string, string[]>} [selectColumns]
@@ -60,41 +98,46 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
60
98
  * @returns {Promise<void>}
61
99
  */
62
100
  each(callback: (arg0: {
63
- changes: {};
101
+ abilities: import("./base-model.js").ModelAbilityMap;
102
+ changes: import("./base-model.js").ModelDataMap;
103
+ collection: ApiMakerCollection<any>;
104
+ _identifierKey: string | number;
105
+ _markedForDestruction: boolean;
106
+ modelData: import("./base-model.js").ModelDataMap;
64
107
  newRecord: boolean;
65
- relationshipsCache: {};
66
- relationships: {};
67
- abilities: Record<string, any>;
68
- modelData: {};
69
- assignAttributes(newAttributes: Record<string, any>): void;
70
- attributes(): Record<string, any>;
108
+ previousModelData: any;
109
+ preloadedRelationships: import("./base-model.js").PreloadedRelationshipMap;
110
+ relationshipsCache: import("./base-model.js").LoadedRelationshipMap;
111
+ relationships: import("./base-model.js").LoadedRelationshipMap;
112
+ uniqueKeyValue: number;
113
+ assignAttributes(newAttributes: ModelDataMap): void;
114
+ attributes(): ModelDataMap;
71
115
  can(givenAbilityName: string): boolean;
72
116
  clone(): /*elided*/ any;
73
117
  cacheKey(): number | string;
74
118
  localCacheKey(): string;
75
119
  fullCacheKey(): string;
76
- create(attributes?: Record<string, any>, options?: object): Promise<{
120
+ create(attributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
77
121
  model: /*elided*/ any;
78
- response: object;
122
+ response: ModelCommandResponse;
79
123
  }>;
80
- createRaw(rawData: FormData | Record<string, any>, options?: object): Promise<{
124
+ createRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions): Promise<{
81
125
  model: /*elided*/ any;
82
- response: any;
126
+ response: ModelCommandResponse;
83
127
  }>;
84
128
  destroy(): Promise<{
85
129
  model: /*elided*/ any;
86
- response: object;
130
+ response: ModelCommandResponse;
87
131
  }>;
88
132
  ensureAbilities(listOfAbilities: string[]): Promise<void>;
89
- getAttributes(): Record<string, any>;
90
- handleResponseError(response: object): never;
133
+ getAttributes(): ModelDataMap;
134
+ handleResponseError(response: ModelCommandResponse): never;
91
135
  identifierKey(): number | string;
92
- _identifierKey: string | number;
93
136
  isAssociationLoaded(associationName: string): boolean;
94
137
  isAssociationLoadedUnderscore(associationNameUnderscore: string): boolean;
95
138
  isAssociationPresent(associationName: string): boolean;
96
- ensureAssociationLoaded(associationName: string): Promise<any>;
97
- ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<any>;
139
+ ensureAssociationLoaded(associationName: string): Promise<LoadedRelationshipValue>;
140
+ ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<LoadedRelationshipValue>;
98
141
  isAttributeChanged(attributeName: string): boolean;
99
142
  isChanged(): boolean;
100
143
  isNewRecord(): boolean;
@@ -102,70 +145,54 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
102
145
  savedChangeToAttribute(attributeName: string): boolean;
103
146
  setNewModel(model: /*elided*/ any): void;
104
147
  setNewModelData(model: /*elided*/ any): void;
105
- previousModelData: any;
106
- _isDateChanged(oldValue: any, newValue: any): boolean | void;
107
- _isIntegerChanged(oldValue: any, newValue: any): boolean | void;
108
- _isStringChanged(oldValue: any, newValue: any): boolean | void;
148
+ _isDateChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
149
+ _isIntegerChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
150
+ _isStringChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
109
151
  modelClassData(): ModelClassDataType;
110
152
  reload(): Promise<void>;
111
153
  save(): Promise<{
112
154
  model: /*elided*/ any;
113
155
  response?: object;
114
156
  }>;
115
- saveRaw(rawData: any, options?: {}): Promise<{
157
+ saveRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
158
+ simpleModelErrors?: boolean;
159
+ }): Promise<{
116
160
  model: /*elided*/ any;
117
- response: object;
161
+ response: ModelCommandResponse;
118
162
  }>;
119
- update(newAttributes?: Record<string, any>, options?: ParseValidationErrorsOptions): Promise<{
163
+ update(newAttributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
120
164
  model: /*elided*/ any;
121
165
  response?: object;
122
166
  }>;
123
- _refreshModelFromResponse(response: object): void;
124
- _refreshModelDataFromResponse(response: object): void;
125
- updateRaw(rawData: FormData | Record<string, any>, options?: ParseValidationErrorsOptions & {
167
+ _refreshModelFromResponse(response: ModelCommandResponse): void;
168
+ _refreshModelDataFromResponse(response: ModelCommandResponse): void;
169
+ updateRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
126
170
  simpleModelErrors?: boolean;
127
171
  }): Promise<{
128
- response: object;
172
+ response: ModelCommandResponse;
129
173
  model: /*elided*/ any;
130
174
  }>;
131
175
  isValid(): never;
132
176
  isValidOnServer(): Promise<{
133
177
  valid: boolean;
134
- errors: Record<string, any>;
178
+ errors: ValidationResponseErrors;
135
179
  }>;
136
- modelClass(): Record<string, any>;
180
+ modelClass(): BaseModelClassType;
137
181
  preloadRelationship(relationshipName: string, model: /*elided*/ any | /*elided*/ any[] | null): void;
138
182
  markForDestruction(): void;
139
- _markedForDestruction: boolean;
140
183
  markedForDestruction(): boolean;
141
184
  uniqueKey(): number;
142
- uniqueKeyValue: number;
143
- _callMemberCommand(args: Record<string, any>, commandArgs: Record<string, any>): Promise<object>;
144
- readAttribute(attributeName: string): any;
145
- readAttributeUnderscore(attributeName: string): any;
146
- isAttributeLoaded(attributeName: any): boolean;
147
- _isPresent(value: any): boolean;
148
- _loadBelongsToReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any | null>;
149
- _readBelongsToReflection({ reflectionName }: {
150
- modelClass: any;
151
- reflectionName: string;
152
- }): any | null;
153
- _loadHasManyReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<Array<any>>;
154
- _loadHasOneReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any>;
155
- _readHasOneReflection({ reflectionName }: {
156
- modelClass: any;
157
- reflectionName: string;
158
- }): any | null;
159
- _readModelDataFromArgs(args?: {
160
- data?: {
161
- b?: Record<string, any>;
162
- a?: Record<string, any>;
163
- r?: any;
164
- };
165
- collection?: ApiMakerCollection<any>;
166
- }): void;
167
- collection: ApiMakerCollection<any>;
168
- preloadedRelationships: any;
185
+ _callMemberCommand(args: ModelCommandDescriptor, commandArgs: ModelCommandOptions): import("./command-execution.js").default;
186
+ readAttribute(attributeName: string): ModelValue | null | undefined;
187
+ readAttributeUnderscore(attributeName: string): ModelValue | null | undefined;
188
+ isAttributeLoaded(attributeName: string): boolean;
189
+ _isPresent(value: ModelValue | null | undefined): boolean;
190
+ _loadBelongsToReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
191
+ _readBelongsToReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
192
+ _loadHasManyReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any[]>;
193
+ _loadHasOneReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
194
+ _readHasOneReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
195
+ _readModelDataFromArgs(args?: BaseModelArgsObject): void;
169
196
  _readPreloadedRelationships(preloaded: {
170
197
  getModel: (relationshipType: string, relationshipId: number | string) => /*elided*/ any;
171
198
  }): void;
@@ -213,41 +240,46 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
213
240
  * @returns {import("./base-model.js").default}
214
241
  */
215
242
  find(callback: (arg0: {
216
- changes: {};
243
+ abilities: import("./base-model.js").ModelAbilityMap;
244
+ changes: import("./base-model.js").ModelDataMap;
245
+ collection: ApiMakerCollection<any>;
246
+ _identifierKey: string | number;
247
+ _markedForDestruction: boolean;
248
+ modelData: import("./base-model.js").ModelDataMap;
217
249
  newRecord: boolean;
218
- relationshipsCache: {};
219
- relationships: {};
220
- abilities: Record<string, any>;
221
- modelData: {};
222
- assignAttributes(newAttributes: Record<string, any>): void;
223
- attributes(): Record<string, any>;
250
+ previousModelData: any;
251
+ preloadedRelationships: import("./base-model.js").PreloadedRelationshipMap;
252
+ relationshipsCache: import("./base-model.js").LoadedRelationshipMap;
253
+ relationships: import("./base-model.js").LoadedRelationshipMap;
254
+ uniqueKeyValue: number;
255
+ assignAttributes(newAttributes: ModelDataMap): void;
256
+ attributes(): ModelDataMap;
224
257
  can(givenAbilityName: string): boolean;
225
258
  clone(): /*elided*/ any;
226
259
  cacheKey(): number | string;
227
260
  localCacheKey(): string;
228
261
  fullCacheKey(): string;
229
- create(attributes?: Record<string, any>, options?: object): Promise<{
262
+ create(attributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
230
263
  model: /*elided*/ any;
231
- response: object;
264
+ response: ModelCommandResponse;
232
265
  }>;
233
- createRaw(rawData: FormData | Record<string, any>, options?: object): Promise<{
266
+ createRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions): Promise<{
234
267
  model: /*elided*/ any;
235
- response: any;
268
+ response: ModelCommandResponse;
236
269
  }>;
237
270
  destroy(): Promise<{
238
271
  model: /*elided*/ any;
239
- response: object;
272
+ response: ModelCommandResponse;
240
273
  }>;
241
274
  ensureAbilities(listOfAbilities: string[]): Promise<void>;
242
- getAttributes(): Record<string, any>;
243
- handleResponseError(response: object): never;
275
+ getAttributes(): ModelDataMap;
276
+ handleResponseError(response: ModelCommandResponse): never;
244
277
  identifierKey(): number | string;
245
- _identifierKey: string | number;
246
278
  isAssociationLoaded(associationName: string): boolean;
247
279
  isAssociationLoadedUnderscore(associationNameUnderscore: string): boolean;
248
280
  isAssociationPresent(associationName: string): boolean;
249
- ensureAssociationLoaded(associationName: string): Promise<any>;
250
- ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<any>;
281
+ ensureAssociationLoaded(associationName: string): Promise<LoadedRelationshipValue>;
282
+ ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<LoadedRelationshipValue>;
251
283
  isAttributeChanged(attributeName: string): boolean;
252
284
  isChanged(): boolean;
253
285
  isNewRecord(): boolean;
@@ -255,110 +287,99 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
255
287
  savedChangeToAttribute(attributeName: string): boolean;
256
288
  setNewModel(model: /*elided*/ any): void;
257
289
  setNewModelData(model: /*elided*/ any): void;
258
- previousModelData: any;
259
- _isDateChanged(oldValue: any, newValue: any): boolean | void;
260
- _isIntegerChanged(oldValue: any, newValue: any): boolean | void;
261
- _isStringChanged(oldValue: any, newValue: any): boolean | void;
290
+ _isDateChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
291
+ _isIntegerChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
292
+ _isStringChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
262
293
  modelClassData(): ModelClassDataType;
263
294
  reload(): Promise<void>;
264
295
  save(): Promise<{
265
296
  model: /*elided*/ any;
266
297
  response?: object;
267
298
  }>;
268
- saveRaw(rawData: any, options?: {}): Promise<{
299
+ saveRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
300
+ simpleModelErrors?: boolean;
301
+ }): Promise<{
269
302
  model: /*elided*/ any;
270
- response: object;
303
+ response: ModelCommandResponse;
271
304
  }>;
272
- update(newAttributes?: Record<string, any>, options?: ParseValidationErrorsOptions): Promise<{
305
+ update(newAttributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
273
306
  model: /*elided*/ any;
274
307
  response?: object;
275
308
  }>;
276
- _refreshModelFromResponse(response: object): void;
277
- _refreshModelDataFromResponse(response: object): void;
278
- updateRaw(rawData: FormData | Record<string, any>, options?: ParseValidationErrorsOptions & {
309
+ _refreshModelFromResponse(response: ModelCommandResponse): void;
310
+ _refreshModelDataFromResponse(response: ModelCommandResponse): void;
311
+ updateRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
279
312
  simpleModelErrors?: boolean;
280
313
  }): Promise<{
281
- response: object;
314
+ response: ModelCommandResponse;
282
315
  model: /*elided*/ any;
283
316
  }>;
284
317
  isValid(): never;
285
318
  isValidOnServer(): Promise<{
286
319
  valid: boolean;
287
- errors: Record<string, any>;
320
+ errors: ValidationResponseErrors;
288
321
  }>;
289
- modelClass(): Record<string, any>;
322
+ modelClass(): BaseModelClassType;
290
323
  preloadRelationship(relationshipName: string, model: /*elided*/ any | /*elided*/ any[] | null): void;
291
324
  markForDestruction(): void;
292
- _markedForDestruction: boolean;
293
325
  markedForDestruction(): boolean;
294
326
  uniqueKey(): number;
295
- uniqueKeyValue: number;
296
- _callMemberCommand(args: Record<string, any>, commandArgs: Record<string, any>): Promise<object>;
297
- readAttribute(attributeName: string): any;
298
- readAttributeUnderscore(attributeName: string): any;
299
- isAttributeLoaded(attributeName: any): boolean;
300
- _isPresent(value: any): boolean;
301
- _loadBelongsToReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any | null>;
302
- _readBelongsToReflection({ reflectionName }: {
303
- modelClass: any;
304
- reflectionName: string;
305
- }): any | null;
306
- _loadHasManyReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<Array<any>>;
307
- _loadHasOneReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any>;
308
- _readHasOneReflection({ reflectionName }: {
309
- modelClass: any;
310
- reflectionName: string;
311
- }): any | null;
312
- _readModelDataFromArgs(args?: {
313
- data?: {
314
- b?: Record<string, any>;
315
- a?: Record<string, any>;
316
- r?: any;
317
- };
318
- collection?: ApiMakerCollection<any>;
319
- }): void;
320
- collection: ApiMakerCollection<any>;
321
- preloadedRelationships: any;
327
+ _callMemberCommand(args: ModelCommandDescriptor, commandArgs: ModelCommandOptions): import("./command-execution.js").default;
328
+ readAttribute(attributeName: string): ModelValue | null | undefined;
329
+ readAttributeUnderscore(attributeName: string): ModelValue | null | undefined;
330
+ isAttributeLoaded(attributeName: string): boolean;
331
+ _isPresent(value: ModelValue | null | undefined): boolean;
332
+ _loadBelongsToReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
333
+ _readBelongsToReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
334
+ _loadHasManyReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any[]>;
335
+ _loadHasOneReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
336
+ _readHasOneReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
337
+ _readModelDataFromArgs(args?: BaseModelArgsObject): void;
322
338
  _readPreloadedRelationships(preloaded: {
323
339
  getModel: (relationshipType: string, relationshipId: number | string) => /*elided*/ any;
324
340
  }): void;
325
341
  primaryKey(): number | string;
326
342
  }) => boolean): {
327
- changes: {};
343
+ abilities: import("./base-model.js").ModelAbilityMap;
344
+ changes: import("./base-model.js").ModelDataMap;
345
+ collection: ApiMakerCollection<any>;
346
+ _identifierKey: string | number;
347
+ _markedForDestruction: boolean;
348
+ modelData: import("./base-model.js").ModelDataMap;
328
349
  newRecord: boolean;
329
- relationshipsCache: {};
330
- relationships: {};
331
- abilities: Record<string, any>;
332
- modelData: {};
333
- assignAttributes(newAttributes: Record<string, any>): void;
334
- attributes(): Record<string, any>;
350
+ previousModelData: any;
351
+ preloadedRelationships: import("./base-model.js").PreloadedRelationshipMap;
352
+ relationshipsCache: import("./base-model.js").LoadedRelationshipMap;
353
+ relationships: import("./base-model.js").LoadedRelationshipMap;
354
+ uniqueKeyValue: number;
355
+ assignAttributes(newAttributes: ModelDataMap): void;
356
+ attributes(): ModelDataMap;
335
357
  can(givenAbilityName: string): boolean;
336
358
  clone(): /*elided*/ any;
337
359
  cacheKey(): number | string;
338
360
  localCacheKey(): string;
339
361
  fullCacheKey(): string;
340
- create(attributes?: Record<string, any>, options?: object): Promise<{
362
+ create(attributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
341
363
  model: /*elided*/ any;
342
- response: object;
364
+ response: ModelCommandResponse;
343
365
  }>;
344
- createRaw(rawData: FormData | Record<string, any>, options?: object): Promise<{
366
+ createRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions): Promise<{
345
367
  model: /*elided*/ any;
346
- response: any;
368
+ response: ModelCommandResponse;
347
369
  }>;
348
370
  destroy(): Promise<{
349
371
  model: /*elided*/ any;
350
- response: object;
372
+ response: ModelCommandResponse;
351
373
  }>;
352
374
  ensureAbilities(listOfAbilities: string[]): Promise<void>;
353
- getAttributes(): Record<string, any>;
354
- handleResponseError(response: object): never;
375
+ getAttributes(): ModelDataMap;
376
+ handleResponseError(response: ModelCommandResponse): never;
355
377
  identifierKey(): number | string;
356
- _identifierKey: string | number;
357
378
  isAssociationLoaded(associationName: string): boolean;
358
379
  isAssociationLoadedUnderscore(associationNameUnderscore: string): boolean;
359
380
  isAssociationPresent(associationName: string): boolean;
360
- ensureAssociationLoaded(associationName: string): Promise<any>;
361
- ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<any>;
381
+ ensureAssociationLoaded(associationName: string): Promise<LoadedRelationshipValue>;
382
+ ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<LoadedRelationshipValue>;
362
383
  isAttributeChanged(attributeName: string): boolean;
363
384
  isChanged(): boolean;
364
385
  isNewRecord(): boolean;
@@ -366,70 +387,54 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
366
387
  savedChangeToAttribute(attributeName: string): boolean;
367
388
  setNewModel(model: /*elided*/ any): void;
368
389
  setNewModelData(model: /*elided*/ any): void;
369
- previousModelData: any;
370
- _isDateChanged(oldValue: any, newValue: any): boolean | void;
371
- _isIntegerChanged(oldValue: any, newValue: any): boolean | void;
372
- _isStringChanged(oldValue: any, newValue: any): boolean | void;
390
+ _isDateChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
391
+ _isIntegerChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
392
+ _isStringChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
373
393
  modelClassData(): ModelClassDataType;
374
394
  reload(): Promise<void>;
375
395
  save(): Promise<{
376
396
  model: /*elided*/ any;
377
397
  response?: object;
378
398
  }>;
379
- saveRaw(rawData: any, options?: {}): Promise<{
399
+ saveRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
400
+ simpleModelErrors?: boolean;
401
+ }): Promise<{
380
402
  model: /*elided*/ any;
381
- response: object;
403
+ response: ModelCommandResponse;
382
404
  }>;
383
- update(newAttributes?: Record<string, any>, options?: ParseValidationErrorsOptions): Promise<{
405
+ update(newAttributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
384
406
  model: /*elided*/ any;
385
407
  response?: object;
386
408
  }>;
387
- _refreshModelFromResponse(response: object): void;
388
- _refreshModelDataFromResponse(response: object): void;
389
- updateRaw(rawData: FormData | Record<string, any>, options?: ParseValidationErrorsOptions & {
409
+ _refreshModelFromResponse(response: ModelCommandResponse): void;
410
+ _refreshModelDataFromResponse(response: ModelCommandResponse): void;
411
+ updateRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
390
412
  simpleModelErrors?: boolean;
391
413
  }): Promise<{
392
- response: object;
414
+ response: ModelCommandResponse;
393
415
  model: /*elided*/ any;
394
416
  }>;
395
417
  isValid(): never;
396
418
  isValidOnServer(): Promise<{
397
419
  valid: boolean;
398
- errors: Record<string, any>;
420
+ errors: ValidationResponseErrors;
399
421
  }>;
400
- modelClass(): Record<string, any>;
422
+ modelClass(): BaseModelClassType;
401
423
  preloadRelationship(relationshipName: string, model: /*elided*/ any | /*elided*/ any[] | null): void;
402
424
  markForDestruction(): void;
403
- _markedForDestruction: boolean;
404
425
  markedForDestruction(): boolean;
405
426
  uniqueKey(): number;
406
- uniqueKeyValue: number;
407
- _callMemberCommand(args: Record<string, any>, commandArgs: Record<string, any>): Promise<object>;
408
- readAttribute(attributeName: string): any;
409
- readAttributeUnderscore(attributeName: string): any;
410
- isAttributeLoaded(attributeName: any): boolean;
411
- _isPresent(value: any): boolean;
412
- _loadBelongsToReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any | null>;
413
- _readBelongsToReflection({ reflectionName }: {
414
- modelClass: any;
415
- reflectionName: string;
416
- }): any | null;
417
- _loadHasManyReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<Array<any>>;
418
- _loadHasOneReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any>;
419
- _readHasOneReflection({ reflectionName }: {
420
- modelClass: any;
421
- reflectionName: string;
422
- }): any | null;
423
- _readModelDataFromArgs(args?: {
424
- data?: {
425
- b?: Record<string, any>;
426
- a?: Record<string, any>;
427
- r?: any;
428
- };
429
- collection?: ApiMakerCollection<any>;
430
- }): void;
431
- collection: ApiMakerCollection<any>;
432
- preloadedRelationships: any;
427
+ _callMemberCommand(args: ModelCommandDescriptor, commandArgs: ModelCommandOptions): import("./command-execution.js").default;
428
+ readAttribute(attributeName: string): ModelValue | null | undefined;
429
+ readAttributeUnderscore(attributeName: string): ModelValue | null | undefined;
430
+ isAttributeLoaded(attributeName: string): boolean;
431
+ _isPresent(value: ModelValue | null | undefined): boolean;
432
+ _loadBelongsToReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
433
+ _readBelongsToReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
434
+ _loadHasManyReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any[]>;
435
+ _loadHasOneReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
436
+ _readHasOneReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
437
+ _readModelDataFromArgs(args?: BaseModelArgsObject): void;
433
438
  _readPreloadedRelationships(preloaded: {
434
439
  getModel: (relationshipType: string, relationshipId: number | string) => /*elided*/ any;
435
440
  }): void;
@@ -440,41 +445,46 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
440
445
  * @returns {void}
441
446
  */
442
447
  forEach(callback: (arg0: {
443
- changes: {};
448
+ abilities: import("./base-model.js").ModelAbilityMap;
449
+ changes: import("./base-model.js").ModelDataMap;
450
+ collection: ApiMakerCollection<any>;
451
+ _identifierKey: string | number;
452
+ _markedForDestruction: boolean;
453
+ modelData: import("./base-model.js").ModelDataMap;
444
454
  newRecord: boolean;
445
- relationshipsCache: {};
446
- relationships: {};
447
- abilities: Record<string, any>;
448
- modelData: {};
449
- assignAttributes(newAttributes: Record<string, any>): void;
450
- attributes(): Record<string, any>;
455
+ previousModelData: any;
456
+ preloadedRelationships: import("./base-model.js").PreloadedRelationshipMap;
457
+ relationshipsCache: import("./base-model.js").LoadedRelationshipMap;
458
+ relationships: import("./base-model.js").LoadedRelationshipMap;
459
+ uniqueKeyValue: number;
460
+ assignAttributes(newAttributes: ModelDataMap): void;
461
+ attributes(): ModelDataMap;
451
462
  can(givenAbilityName: string): boolean;
452
463
  clone(): /*elided*/ any;
453
464
  cacheKey(): number | string;
454
465
  localCacheKey(): string;
455
466
  fullCacheKey(): string;
456
- create(attributes?: Record<string, any>, options?: object): Promise<{
467
+ create(attributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
457
468
  model: /*elided*/ any;
458
- response: object;
469
+ response: ModelCommandResponse;
459
470
  }>;
460
- createRaw(rawData: FormData | Record<string, any>, options?: object): Promise<{
471
+ createRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions): Promise<{
461
472
  model: /*elided*/ any;
462
- response: any;
473
+ response: ModelCommandResponse;
463
474
  }>;
464
475
  destroy(): Promise<{
465
476
  model: /*elided*/ any;
466
- response: object;
477
+ response: ModelCommandResponse;
467
478
  }>;
468
479
  ensureAbilities(listOfAbilities: string[]): Promise<void>;
469
- getAttributes(): Record<string, any>;
470
- handleResponseError(response: object): never;
480
+ getAttributes(): ModelDataMap;
481
+ handleResponseError(response: ModelCommandResponse): never;
471
482
  identifierKey(): number | string;
472
- _identifierKey: string | number;
473
483
  isAssociationLoaded(associationName: string): boolean;
474
484
  isAssociationLoadedUnderscore(associationNameUnderscore: string): boolean;
475
485
  isAssociationPresent(associationName: string): boolean;
476
- ensureAssociationLoaded(associationName: string): Promise<any>;
477
- ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<any>;
486
+ ensureAssociationLoaded(associationName: string): Promise<LoadedRelationshipValue>;
487
+ ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<LoadedRelationshipValue>;
478
488
  isAttributeChanged(attributeName: string): boolean;
479
489
  isChanged(): boolean;
480
490
  isNewRecord(): boolean;
@@ -482,70 +492,54 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
482
492
  savedChangeToAttribute(attributeName: string): boolean;
483
493
  setNewModel(model: /*elided*/ any): void;
484
494
  setNewModelData(model: /*elided*/ any): void;
485
- previousModelData: any;
486
- _isDateChanged(oldValue: any, newValue: any): boolean | void;
487
- _isIntegerChanged(oldValue: any, newValue: any): boolean | void;
488
- _isStringChanged(oldValue: any, newValue: any): boolean | void;
495
+ _isDateChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
496
+ _isIntegerChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
497
+ _isStringChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
489
498
  modelClassData(): ModelClassDataType;
490
499
  reload(): Promise<void>;
491
500
  save(): Promise<{
492
501
  model: /*elided*/ any;
493
502
  response?: object;
494
503
  }>;
495
- saveRaw(rawData: any, options?: {}): Promise<{
504
+ saveRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
505
+ simpleModelErrors?: boolean;
506
+ }): Promise<{
496
507
  model: /*elided*/ any;
497
- response: object;
508
+ response: ModelCommandResponse;
498
509
  }>;
499
- update(newAttributes?: Record<string, any>, options?: ParseValidationErrorsOptions): Promise<{
510
+ update(newAttributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
500
511
  model: /*elided*/ any;
501
512
  response?: object;
502
513
  }>;
503
- _refreshModelFromResponse(response: object): void;
504
- _refreshModelDataFromResponse(response: object): void;
505
- updateRaw(rawData: FormData | Record<string, any>, options?: ParseValidationErrorsOptions & {
514
+ _refreshModelFromResponse(response: ModelCommandResponse): void;
515
+ _refreshModelDataFromResponse(response: ModelCommandResponse): void;
516
+ updateRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
506
517
  simpleModelErrors?: boolean;
507
518
  }): Promise<{
508
- response: object;
519
+ response: ModelCommandResponse;
509
520
  model: /*elided*/ any;
510
521
  }>;
511
522
  isValid(): never;
512
523
  isValidOnServer(): Promise<{
513
524
  valid: boolean;
514
- errors: Record<string, any>;
525
+ errors: ValidationResponseErrors;
515
526
  }>;
516
- modelClass(): Record<string, any>;
527
+ modelClass(): BaseModelClassType;
517
528
  preloadRelationship(relationshipName: string, model: /*elided*/ any | /*elided*/ any[] | null): void;
518
529
  markForDestruction(): void;
519
- _markedForDestruction: boolean;
520
530
  markedForDestruction(): boolean;
521
531
  uniqueKey(): number;
522
- uniqueKeyValue: number;
523
- _callMemberCommand(args: Record<string, any>, commandArgs: Record<string, any>): Promise<object>;
524
- readAttribute(attributeName: string): any;
525
- readAttributeUnderscore(attributeName: string): any;
526
- isAttributeLoaded(attributeName: any): boolean;
527
- _isPresent(value: any): boolean;
528
- _loadBelongsToReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any | null>;
529
- _readBelongsToReflection({ reflectionName }: {
530
- modelClass: any;
531
- reflectionName: string;
532
- }): any | null;
533
- _loadHasManyReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<Array<any>>;
534
- _loadHasOneReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any>;
535
- _readHasOneReflection({ reflectionName }: {
536
- modelClass: any;
537
- reflectionName: string;
538
- }): any | null;
539
- _readModelDataFromArgs(args?: {
540
- data?: {
541
- b?: Record<string, any>;
542
- a?: Record<string, any>;
543
- r?: any;
544
- };
545
- collection?: ApiMakerCollection<any>;
546
- }): void;
547
- collection: ApiMakerCollection<any>;
548
- preloadedRelationships: any;
532
+ _callMemberCommand(args: ModelCommandDescriptor, commandArgs: ModelCommandOptions): import("./command-execution.js").default;
533
+ readAttribute(attributeName: string): ModelValue | null | undefined;
534
+ readAttributeUnderscore(attributeName: string): ModelValue | null | undefined;
535
+ isAttributeLoaded(attributeName: string): boolean;
536
+ _isPresent(value: ModelValue | null | undefined): boolean;
537
+ _loadBelongsToReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
538
+ _readBelongsToReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
539
+ _loadHasManyReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any[]>;
540
+ _loadHasOneReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
541
+ _readHasOneReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
542
+ _readModelDataFromArgs(args?: BaseModelArgsObject): void;
549
543
  _readPreloadedRelationships(preloaded: {
550
544
  getModel: (relationshipType: string, relationshipId: number | string) => /*elided*/ any;
551
545
  }): void;
@@ -553,44 +547,49 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
553
547
  }) => void): void;
554
548
  /**
555
549
  * @param {function(import("./base-model.js").default): void} callback
556
- * @returns {any[]}
550
+ * @returns {Array<unknown>}
557
551
  */
558
552
  map(callback: (arg0: {
559
- changes: {};
553
+ abilities: import("./base-model.js").ModelAbilityMap;
554
+ changes: import("./base-model.js").ModelDataMap;
555
+ collection: ApiMakerCollection<any>;
556
+ _identifierKey: string | number;
557
+ _markedForDestruction: boolean;
558
+ modelData: import("./base-model.js").ModelDataMap;
560
559
  newRecord: boolean;
561
- relationshipsCache: {};
562
- relationships: {};
563
- abilities: Record<string, any>;
564
- modelData: {};
565
- assignAttributes(newAttributes: Record<string, any>): void;
566
- attributes(): Record<string, any>;
560
+ previousModelData: any;
561
+ preloadedRelationships: import("./base-model.js").PreloadedRelationshipMap;
562
+ relationshipsCache: import("./base-model.js").LoadedRelationshipMap;
563
+ relationships: import("./base-model.js").LoadedRelationshipMap;
564
+ uniqueKeyValue: number;
565
+ assignAttributes(newAttributes: ModelDataMap): void;
566
+ attributes(): ModelDataMap;
567
567
  can(givenAbilityName: string): boolean;
568
568
  clone(): /*elided*/ any;
569
569
  cacheKey(): number | string;
570
570
  localCacheKey(): string;
571
571
  fullCacheKey(): string;
572
- create(attributes?: Record<string, any>, options?: object): Promise<{
572
+ create(attributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
573
573
  model: /*elided*/ any;
574
- response: object;
574
+ response: ModelCommandResponse;
575
575
  }>;
576
- createRaw(rawData: FormData | Record<string, any>, options?: object): Promise<{
576
+ createRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions): Promise<{
577
577
  model: /*elided*/ any;
578
- response: any;
578
+ response: ModelCommandResponse;
579
579
  }>;
580
580
  destroy(): Promise<{
581
581
  model: /*elided*/ any;
582
- response: object;
582
+ response: ModelCommandResponse;
583
583
  }>;
584
584
  ensureAbilities(listOfAbilities: string[]): Promise<void>;
585
- getAttributes(): Record<string, any>;
586
- handleResponseError(response: object): never;
585
+ getAttributes(): ModelDataMap;
586
+ handleResponseError(response: ModelCommandResponse): never;
587
587
  identifierKey(): number | string;
588
- _identifierKey: string | number;
589
588
  isAssociationLoaded(associationName: string): boolean;
590
589
  isAssociationLoadedUnderscore(associationNameUnderscore: string): boolean;
591
590
  isAssociationPresent(associationName: string): boolean;
592
- ensureAssociationLoaded(associationName: string): Promise<any>;
593
- ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<any>;
591
+ ensureAssociationLoaded(associationName: string): Promise<LoadedRelationshipValue>;
592
+ ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<LoadedRelationshipValue>;
594
593
  isAttributeChanged(attributeName: string): boolean;
595
594
  isChanged(): boolean;
596
595
  isNewRecord(): boolean;
@@ -598,75 +597,59 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
598
597
  savedChangeToAttribute(attributeName: string): boolean;
599
598
  setNewModel(model: /*elided*/ any): void;
600
599
  setNewModelData(model: /*elided*/ any): void;
601
- previousModelData: any;
602
- _isDateChanged(oldValue: any, newValue: any): boolean | void;
603
- _isIntegerChanged(oldValue: any, newValue: any): boolean | void;
604
- _isStringChanged(oldValue: any, newValue: any): boolean | void;
600
+ _isDateChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
601
+ _isIntegerChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
602
+ _isStringChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
605
603
  modelClassData(): ModelClassDataType;
606
604
  reload(): Promise<void>;
607
605
  save(): Promise<{
608
606
  model: /*elided*/ any;
609
607
  response?: object;
610
608
  }>;
611
- saveRaw(rawData: any, options?: {}): Promise<{
609
+ saveRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
610
+ simpleModelErrors?: boolean;
611
+ }): Promise<{
612
612
  model: /*elided*/ any;
613
- response: object;
613
+ response: ModelCommandResponse;
614
614
  }>;
615
- update(newAttributes?: Record<string, any>, options?: ParseValidationErrorsOptions): Promise<{
615
+ update(newAttributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
616
616
  model: /*elided*/ any;
617
617
  response?: object;
618
618
  }>;
619
- _refreshModelFromResponse(response: object): void;
620
- _refreshModelDataFromResponse(response: object): void;
621
- updateRaw(rawData: FormData | Record<string, any>, options?: ParseValidationErrorsOptions & {
619
+ _refreshModelFromResponse(response: ModelCommandResponse): void;
620
+ _refreshModelDataFromResponse(response: ModelCommandResponse): void;
621
+ updateRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
622
622
  simpleModelErrors?: boolean;
623
623
  }): Promise<{
624
- response: object;
624
+ response: ModelCommandResponse;
625
625
  model: /*elided*/ any;
626
626
  }>;
627
627
  isValid(): never;
628
628
  isValidOnServer(): Promise<{
629
629
  valid: boolean;
630
- errors: Record<string, any>;
630
+ errors: ValidationResponseErrors;
631
631
  }>;
632
- modelClass(): Record<string, any>;
632
+ modelClass(): BaseModelClassType;
633
633
  preloadRelationship(relationshipName: string, model: /*elided*/ any | /*elided*/ any[] | null): void;
634
634
  markForDestruction(): void;
635
- _markedForDestruction: boolean;
636
635
  markedForDestruction(): boolean;
637
636
  uniqueKey(): number;
638
- uniqueKeyValue: number;
639
- _callMemberCommand(args: Record<string, any>, commandArgs: Record<string, any>): Promise<object>;
640
- readAttribute(attributeName: string): any;
641
- readAttributeUnderscore(attributeName: string): any;
642
- isAttributeLoaded(attributeName: any): boolean;
643
- _isPresent(value: any): boolean;
644
- _loadBelongsToReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any | null>;
645
- _readBelongsToReflection({ reflectionName }: {
646
- modelClass: any;
647
- reflectionName: string;
648
- }): any | null;
649
- _loadHasManyReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<Array<any>>;
650
- _loadHasOneReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any>;
651
- _readHasOneReflection({ reflectionName }: {
652
- modelClass: any;
653
- reflectionName: string;
654
- }): any | null;
655
- _readModelDataFromArgs(args?: {
656
- data?: {
657
- b?: Record<string, any>;
658
- a?: Record<string, any>;
659
- r?: any;
660
- };
661
- collection?: ApiMakerCollection<any>;
662
- }): void;
663
- collection: ApiMakerCollection<any>;
664
- preloadedRelationships: any;
637
+ _callMemberCommand(args: ModelCommandDescriptor, commandArgs: ModelCommandOptions): import("./command-execution.js").default;
638
+ readAttribute(attributeName: string): ModelValue | null | undefined;
639
+ readAttributeUnderscore(attributeName: string): ModelValue | null | undefined;
640
+ isAttributeLoaded(attributeName: string): boolean;
641
+ _isPresent(value: ModelValue | null | undefined): boolean;
642
+ _loadBelongsToReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
643
+ _readBelongsToReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
644
+ _loadHasManyReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any[]>;
645
+ _loadHasOneReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
646
+ _readHasOneReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
647
+ _readModelDataFromArgs(args?: BaseModelArgsObject): void;
665
648
  _readPreloadedRelationships(preloaded: {
666
649
  getModel: (relationshipType: string, relationshipId: number | string) => /*elided*/ any;
667
650
  }): void;
668
651
  primaryKey(): number | string;
669
- }) => void): any[];
652
+ }) => void): Array<unknown>;
670
653
  /**
671
654
  * @param {PreloadValue} preloadValue
672
655
  * @returns {this}
@@ -684,8 +667,8 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
684
667
  pageKey(pageKey: string): this;
685
668
  /** @returns {boolean} */
686
669
  isFiltered(): boolean;
687
- /** @returns {Record<string, any>} */
688
- params(): Record<string, any>;
670
+ /** @returns {QueryParamValueMap} */
671
+ params(): QueryParamValueMap;
689
672
  /**
690
673
  * @param {number} per
691
674
  * @returns {this}
@@ -697,17 +680,17 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
697
680
  */
698
681
  perKey(perKey: string): this;
699
682
  /**
700
- * @param {Record<string, any>} params
683
+ * @param {CollectionRansackParams} params
701
684
  * @returns {this}
702
685
  */
703
- ransack(params: Record<string, any>): this;
686
+ ransack(params: CollectionRansackParams): this;
704
687
  /** @returns {Promise<Result>} */
705
688
  result(): Promise<Result>;
706
689
  /**
707
- * @param {Record<string, any>} params
690
+ * @param {CollectionSearchParams} params
708
691
  * @returns {this}
709
692
  */
710
- search(params: Record<string, any>): this;
693
+ search(params: CollectionSearchParams): this;
711
694
  /**
712
695
  * @param {string} searchKey
713
696
  * @returns {this}
@@ -744,51 +727,75 @@ export default class ApiMakerCollection<MC extends typeof import("./base-model.j
744
727
  * @returns {this}
745
728
  */
746
729
  _merge(newQueryArgs: QueryArgsType): this;
747
- /** @returns {Promise<{collection: Array<ModelOf<MC>>}>} */
748
- _response(): Promise<{
749
- collection: Array<ModelOf<MC>>;
750
- }>;
730
+ /** @returns {import("./command-execution.js").default} */
731
+ _response(): import("./command-execution.js").default;
751
732
  }
752
733
  export type ModelOf<MC extends typeof import("./base-model.js").default> = InstanceType<MC>;
753
- export type PreloadMap = Record<string, any>;
754
- export type PreloadValue = string | Array<string | PreloadMap> | PreloadMap;
734
+ export type PreloadMap = Record<string, string | string[] | Record<string, string | string[]>>;
735
+ export type PreloadValue = string | string[] | PreloadMap;
736
+ export type CollectionSearchParamMap = Record<string, string | number | boolean | null | Array<string | number | boolean | null>>;
737
+ export type CollectionSearchParams = CollectionSearchParamMap | string[];
738
+ export type CollectionRansackParams = Record<string, string | number | boolean | null>;
739
+ export type QueryParamValue = (string | number | boolean | null | Array<string | [string, string]> | PreloadValue | CollectionRansackParams | CollectionSearchParams | Record<string, string[]>);
740
+ export type QueryParamValueMap = Record<string, QueryParamValue>;
741
+ export type CollectionResponseMeta = {
742
+ count: number;
743
+ currentPage: number;
744
+ perPage: number;
745
+ totalCount: number;
746
+ totalPages: number;
747
+ };
748
+ export type CollectionResponse<MC extends typeof import("./base-model.js").default> = {
749
+ collection: Array<ModelOf<MC>>;
750
+ meta: CollectionResponseMeta;
751
+ };
752
+ export type ResultArgs<MC extends typeof import("./base-model.js").default> = {
753
+ collection: ApiMakerCollection<MC>;
754
+ models: Array<ModelOf<MC>>;
755
+ response: CollectionResponse<MC>;
756
+ };
755
757
  export type CollectionArgsType<MC extends typeof import("./base-model.js").default> = {
756
758
  model?: {
757
- changes: {};
759
+ abilities: import("./base-model.js").ModelAbilityMap;
760
+ changes: import("./base-model.js").ModelDataMap;
761
+ collection: ApiMakerCollection<any>;
762
+ _identifierKey: string | number;
763
+ _markedForDestruction: boolean;
764
+ modelData: import("./base-model.js").ModelDataMap;
758
765
  newRecord: boolean;
759
- relationshipsCache: {};
760
- relationships: {};
761
- abilities: Record<string, any>;
762
- modelData: {};
763
- assignAttributes(newAttributes: Record<string, any>): void;
764
- attributes(): Record<string, any>;
766
+ previousModelData: any;
767
+ preloadedRelationships: import("./base-model.js").PreloadedRelationshipMap;
768
+ relationshipsCache: import("./base-model.js").LoadedRelationshipMap;
769
+ relationships: import("./base-model.js").LoadedRelationshipMap;
770
+ uniqueKeyValue: number;
771
+ assignAttributes(newAttributes: ModelDataMap): void;
772
+ attributes(): ModelDataMap;
765
773
  can(givenAbilityName: string): boolean;
766
774
  clone(): /*elided*/ any;
767
775
  cacheKey(): number | string;
768
776
  localCacheKey(): string;
769
777
  fullCacheKey(): string;
770
- create(attributes?: Record<string, any>, options?: object): Promise<{
778
+ create(attributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
771
779
  model: /*elided*/ any;
772
- response: object;
780
+ response: ModelCommandResponse;
773
781
  }>;
774
- createRaw(rawData: FormData | Record<string, any>, options?: object): Promise<{
782
+ createRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions): Promise<{
775
783
  model: /*elided*/ any;
776
- response: any;
784
+ response: ModelCommandResponse;
777
785
  }>;
778
786
  destroy(): Promise<{
779
787
  model: /*elided*/ any;
780
- response: object;
788
+ response: ModelCommandResponse;
781
789
  }>;
782
790
  ensureAbilities(listOfAbilities: string[]): Promise<void>;
783
- getAttributes(): Record<string, any>;
784
- handleResponseError(response: object): never;
791
+ getAttributes(): ModelDataMap;
792
+ handleResponseError(response: ModelCommandResponse): never;
785
793
  identifierKey(): number | string;
786
- _identifierKey: string | number;
787
794
  isAssociationLoaded(associationName: string): boolean;
788
795
  isAssociationLoadedUnderscore(associationNameUnderscore: string): boolean;
789
796
  isAssociationPresent(associationName: string): boolean;
790
- ensureAssociationLoaded(associationName: string): Promise<any>;
791
- ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<any>;
797
+ ensureAssociationLoaded(associationName: string): Promise<LoadedRelationshipValue>;
798
+ ensureAssociationLoadedUnderscore(associationNameUnderscore: string): Promise<LoadedRelationshipValue>;
792
799
  isAttributeChanged(attributeName: string): boolean;
793
800
  isChanged(): boolean;
794
801
  isNewRecord(): boolean;
@@ -796,70 +803,54 @@ export type CollectionArgsType<MC extends typeof import("./base-model.js").defau
796
803
  savedChangeToAttribute(attributeName: string): boolean;
797
804
  setNewModel(model: /*elided*/ any): void;
798
805
  setNewModelData(model: /*elided*/ any): void;
799
- previousModelData: any;
800
- _isDateChanged(oldValue: any, newValue: any): boolean | void;
801
- _isIntegerChanged(oldValue: any, newValue: any): boolean | void;
802
- _isStringChanged(oldValue: any, newValue: any): boolean | void;
806
+ _isDateChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
807
+ _isIntegerChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
808
+ _isStringChanged(oldValue: ModelValue | null | undefined, newValue: ModelValue | null | undefined): boolean | void;
803
809
  modelClassData(): ModelClassDataType;
804
810
  reload(): Promise<void>;
805
811
  save(): Promise<{
806
812
  model: /*elided*/ any;
807
813
  response?: object;
808
814
  }>;
809
- saveRaw(rawData: any, options?: {}): Promise<{
815
+ saveRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
816
+ simpleModelErrors?: boolean;
817
+ }): Promise<{
810
818
  model: /*elided*/ any;
811
- response: object;
819
+ response: ModelCommandResponse;
812
820
  }>;
813
- update(newAttributes?: Record<string, any>, options?: ParseValidationErrorsOptions): Promise<{
821
+ update(newAttributes?: ModelDataMap, options?: ParseValidationErrorsOptions): Promise<{
814
822
  model: /*elided*/ any;
815
823
  response?: object;
816
824
  }>;
817
- _refreshModelFromResponse(response: object): void;
818
- _refreshModelDataFromResponse(response: object): void;
819
- updateRaw(rawData: FormData | Record<string, any>, options?: ParseValidationErrorsOptions & {
825
+ _refreshModelFromResponse(response: ModelCommandResponse): void;
826
+ _refreshModelDataFromResponse(response: ModelCommandResponse): void;
827
+ updateRaw(rawData: RawDataInput, options?: ParseValidationErrorsOptions & {
820
828
  simpleModelErrors?: boolean;
821
829
  }): Promise<{
822
- response: object;
830
+ response: ModelCommandResponse;
823
831
  model: /*elided*/ any;
824
832
  }>;
825
833
  isValid(): never;
826
834
  isValidOnServer(): Promise<{
827
835
  valid: boolean;
828
- errors: Record<string, any>;
836
+ errors: ValidationResponseErrors;
829
837
  }>;
830
- modelClass(): Record<string, any>;
838
+ modelClass(): BaseModelClassType;
831
839
  preloadRelationship(relationshipName: string, model: /*elided*/ any | /*elided*/ any[] | null): void;
832
840
  markForDestruction(): void;
833
- _markedForDestruction: boolean;
834
841
  markedForDestruction(): boolean;
835
842
  uniqueKey(): number;
836
- uniqueKeyValue: number;
837
- _callMemberCommand(args: Record<string, any>, commandArgs: Record<string, any>): Promise<object>;
838
- readAttribute(attributeName: string): any;
839
- readAttributeUnderscore(attributeName: string): any;
840
- isAttributeLoaded(attributeName: any): boolean;
841
- _isPresent(value: any): boolean;
842
- _loadBelongsToReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any | null>;
843
- _readBelongsToReflection({ reflectionName }: {
844
- modelClass: any;
845
- reflectionName: string;
846
- }): any | null;
847
- _loadHasManyReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<Array<any>>;
848
- _loadHasOneReflection(args: import("./collection.js").CollectionArgsType<any>, queryArgs?: import("./collection.js").QueryArgsType): Promise<any>;
849
- _readHasOneReflection({ reflectionName }: {
850
- modelClass: any;
851
- reflectionName: string;
852
- }): any | null;
853
- _readModelDataFromArgs(args?: {
854
- data?: {
855
- b?: Record<string, any>;
856
- a?: Record<string, any>;
857
- r?: any;
858
- };
859
- collection?: ApiMakerCollection<any>;
860
- }): void;
861
- collection: ApiMakerCollection<any>;
862
- preloadedRelationships: any;
843
+ _callMemberCommand(args: ModelCommandDescriptor, commandArgs: ModelCommandOptions): import("./command-execution.js").default;
844
+ readAttribute(attributeName: string): ModelValue | null | undefined;
845
+ readAttributeUnderscore(attributeName: string): ModelValue | null | undefined;
846
+ isAttributeLoaded(attributeName: string): boolean;
847
+ _isPresent(value: ModelValue | null | undefined): boolean;
848
+ _loadBelongsToReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
849
+ _readBelongsToReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
850
+ _loadHasManyReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any[]>;
851
+ _loadHasOneReflection(args: RelationshipLoadArgs, queryArgs?: import("./collection.js").QueryArgsType): Promise</*elided*/ any | null>;
852
+ _readHasOneReflection({ reflectionName }: RelationshipLoadArgs): /*elided*/ any | null;
853
+ _readModelDataFromArgs(args?: BaseModelArgsObject): void;
863
854
  _readPreloadedRelationships(preloaded: {
864
855
  getModel: (relationshipType: string, relationshipId: number | string) => /*elided*/ any;
865
856
  }): void;
@@ -877,12 +868,12 @@ export type QueryArgsType = {
877
868
  limit?: number;
878
869
  page?: number;
879
870
  pageKey?: string;
880
- params?: Record<string, any>;
871
+ params?: QueryParamValueMap;
881
872
  per?: number;
882
873
  perKey?: string;
883
874
  preload?: PreloadValue;
884
- ransack?: Record<string, any>;
885
- search?: Record<string, any>;
875
+ ransack?: CollectionRansackParams;
876
+ search?: CollectionSearchParams;
886
877
  searchKey?: string;
887
878
  select?: Record<string, string[]>;
888
879
  selectColumns?: Record<string, string[]>;