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