sonamu 0.6.0 → 0.7.1
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/.swcrc.project-default +18 -0
- package/bin/cli.js +24 -0
- package/dist/ai/agents/agent.d.ts +11 -0
- package/dist/ai/agents/agent.d.ts.map +1 -0
- package/dist/ai/agents/agent.js +65 -0
- package/dist/ai/agents/index.d.ts +3 -0
- package/dist/ai/agents/index.d.ts.map +1 -0
- package/dist/ai/agents/index.js +4 -0
- package/dist/ai/agents/types.d.ts +43 -0
- package/dist/ai/agents/types.d.ts.map +1 -0
- package/dist/ai/agents/types.js +3 -0
- package/dist/ai/index.d.ts +2 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +3 -0
- package/dist/ai/providers/rtzr/api.d.ts +22 -0
- package/dist/ai/providers/rtzr/api.d.ts.map +1 -0
- package/dist/ai/providers/rtzr/api.js +28 -0
- package/dist/ai/providers/rtzr/error.d.ts +18 -0
- package/dist/ai/providers/rtzr/error.d.ts.map +1 -0
- package/dist/ai/providers/rtzr/error.js +29 -0
- package/dist/ai/providers/rtzr/index.d.ts +5 -0
- package/dist/ai/providers/rtzr/index.d.ts.map +1 -0
- package/dist/ai/providers/rtzr/index.js +6 -0
- package/dist/ai/providers/rtzr/model.d.ts +52 -0
- package/dist/ai/providers/rtzr/model.d.ts.map +1 -0
- package/dist/ai/providers/rtzr/model.js +137 -0
- package/dist/ai/providers/rtzr/options.d.ts +7 -0
- package/dist/ai/providers/rtzr/options.d.ts.map +1 -0
- package/dist/ai/providers/rtzr/options.js +47 -0
- package/dist/ai/providers/rtzr/provider.d.ts +18 -0
- package/dist/ai/providers/rtzr/provider.d.ts.map +1 -0
- package/dist/ai/providers/rtzr/provider.js +54 -0
- package/dist/ai/providers/rtzr/utils.d.ts +19 -0
- package/dist/ai/providers/rtzr/utils.d.ts.map +1 -0
- package/dist/ai/providers/rtzr/utils.js +88 -0
- package/dist/api/base-frame.d.ts +2 -2
- package/dist/api/base-frame.d.ts.map +1 -1
- package/dist/api/base-frame.js +2 -1
- package/dist/api/caster.d.ts.map +1 -1
- package/dist/api/caster.js +6 -1
- package/dist/api/code-converters.d.ts +58 -14
- package/dist/api/code-converters.d.ts.map +1 -1
- package/dist/api/code-converters.js +178 -409
- package/dist/api/config.d.ts +27 -13
- package/dist/api/config.d.ts.map +1 -1
- package/dist/api/config.js +19 -26
- package/dist/api/context.d.ts +4 -3
- package/dist/api/context.d.ts.map +1 -1
- package/dist/api/context.js +1 -1
- package/dist/api/decorators.d.ts +20 -6
- package/dist/api/decorators.d.ts.map +1 -1
- package/dist/api/decorators.js +111 -18
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +3 -3
- package/dist/api/sonamu.d.ts +7 -7
- package/dist/api/sonamu.d.ts.map +1 -1
- package/dist/api/sonamu.js +83 -51
- package/dist/api/validator.d.ts +6 -0
- package/dist/api/validator.d.ts.map +1 -0
- package/dist/api/validator.js +81 -0
- package/dist/bin/build-config.d.ts +5 -1
- package/dist/bin/build-config.d.ts.map +1 -1
- package/dist/bin/build-config.js +5 -2
- package/dist/bin/cli.js +165 -64
- package/dist/bin/loader-register.d.ts +2 -0
- package/dist/bin/loader-register.d.ts.map +1 -0
- package/dist/bin/loader-register.js +34 -0
- package/dist/database/_batch_update.d.ts +5 -3
- package/dist/database/_batch_update.d.ts.map +1 -1
- package/dist/database/_batch_update.js +30 -13
- package/dist/database/base-model.d.ts +96 -10
- package/dist/database/base-model.d.ts.map +1 -1
- package/dist/database/base-model.js +232 -89
- package/dist/database/base-model.types.d.ts +93 -0
- package/dist/database/base-model.types.d.ts.map +1 -0
- package/dist/database/base-model.types.js +10 -0
- package/dist/database/code-generator.d.ts +1 -1
- package/dist/database/code-generator.d.ts.map +1 -1
- package/dist/database/code-generator.js +11 -10
- package/dist/database/db.d.ts +5 -6
- package/dist/database/db.d.ts.map +1 -1
- package/dist/database/db.js +22 -25
- package/dist/database/puri-subset.test-d.js +81 -0
- package/dist/database/puri-subset.types.d.ts +123 -0
- package/dist/database/puri-subset.types.d.ts.map +1 -0
- package/dist/database/puri-subset.types.js +16 -0
- package/dist/database/puri-wrapper.d.ts +13 -11
- package/dist/database/puri-wrapper.d.ts.map +1 -1
- package/dist/database/puri-wrapper.js +2 -2
- package/dist/database/puri.d.ts +25 -14
- package/dist/database/puri.d.ts.map +1 -1
- package/dist/database/puri.js +83 -21
- package/dist/database/puri.types.d.ts +21 -7
- package/dist/database/puri.types.d.ts.map +1 -1
- package/dist/database/puri.types.js +4 -1
- package/dist/database/transaction-context.d.ts +1 -1
- package/dist/database/transaction-context.d.ts.map +1 -1
- package/dist/database/transaction-context.js +1 -1
- package/dist/database/upsert-builder.d.ts +9 -3
- package/dist/database/upsert-builder.d.ts.map +1 -1
- package/dist/database/upsert-builder.js +227 -78
- package/dist/entity/entity-manager.d.ts +165 -2
- package/dist/entity/entity-manager.d.ts.map +1 -1
- package/dist/entity/entity-manager.js +26 -10
- package/dist/entity/entity.d.ts +5 -3
- package/dist/entity/entity.d.ts.map +1 -1
- package/dist/entity/entity.js +153 -54
- package/dist/exceptions/error-handler.d.ts +1 -1
- package/dist/exceptions/error-handler.d.ts.map +1 -1
- package/dist/exceptions/error-handler.js +1 -1
- package/dist/exceptions/so-exceptions.d.ts +1 -1
- package/dist/exceptions/so-exceptions.d.ts.map +1 -1
- package/dist/exceptions/so-exceptions.js +1 -1
- package/dist/file-storage/driver.d.ts +1 -1
- package/dist/file-storage/driver.d.ts.map +1 -1
- package/dist/file-storage/driver.js +1 -1
- package/dist/file-storage/file-storage.js +2 -2
- package/dist/index.d.ts +18 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -13
- package/dist/migration/code-generation.d.ts +1 -1
- package/dist/migration/code-generation.d.ts.map +1 -1
- package/dist/migration/code-generation.js +123 -67
- package/dist/migration/migration-set.d.ts +2 -10
- package/dist/migration/migration-set.d.ts.map +1 -1
- package/dist/migration/migration-set.js +67 -218
- package/dist/migration/migrator.d.ts +24 -73
- package/dist/migration/migrator.d.ts.map +1 -1
- package/dist/migration/migrator.js +121 -301
- package/dist/migration/postgresql-schema-reader.d.ts +51 -0
- package/dist/migration/postgresql-schema-reader.d.ts.map +1 -0
- package/dist/migration/postgresql-schema-reader.js +245 -0
- package/dist/migration/types.d.ts +6 -38
- package/dist/migration/types.d.ts.map +1 -1
- package/dist/migration/types.js +1 -1
- package/dist/naite/messaging-types.d.ts +43 -0
- package/dist/naite/messaging-types.d.ts.map +1 -0
- package/dist/naite/messaging-types.js +7 -0
- package/dist/naite/naite-reporter.d.ts +41 -0
- package/dist/naite/naite-reporter.d.ts.map +1 -0
- package/dist/naite/naite-reporter.js +102 -0
- package/dist/naite/naite.d.ts +91 -8
- package/dist/naite/naite.d.ts.map +1 -1
- package/dist/naite/naite.js +285 -41
- package/dist/stream/sse.d.ts +2 -2
- package/dist/stream/sse.d.ts.map +1 -1
- package/dist/stream/sse.js +1 -1
- package/dist/syncer/api-parser.d.ts +3 -13
- package/dist/syncer/api-parser.d.ts.map +1 -1
- package/dist/syncer/api-parser.js +67 -56
- package/dist/syncer/checksum.d.ts +2 -2
- package/dist/syncer/checksum.d.ts.map +1 -1
- package/dist/syncer/checksum.js +11 -11
- package/dist/syncer/code-generator.d.ts +3 -3
- package/dist/syncer/code-generator.d.ts.map +1 -1
- package/dist/syncer/code-generator.js +37 -17
- package/dist/syncer/entity-operations.d.ts +2 -2
- package/dist/syncer/entity-operations.d.ts.map +1 -1
- package/dist/syncer/entity-operations.js +9 -8
- package/dist/syncer/file-patterns.d.ts +1 -1
- package/dist/syncer/file-patterns.d.ts.map +1 -1
- package/dist/syncer/file-patterns.js +1 -1
- package/dist/syncer/index.d.ts +4 -4
- package/dist/syncer/index.d.ts.map +1 -1
- package/dist/syncer/index.js +5 -5
- package/dist/syncer/module-loader.d.ts +4 -4
- package/dist/syncer/module-loader.d.ts.map +1 -1
- package/dist/syncer/module-loader.js +17 -12
- package/dist/syncer/syncer.d.ts +31 -24
- package/dist/syncer/syncer.d.ts.map +1 -1
- package/dist/syncer/syncer.js +92 -45
- package/dist/template/entity-converter.d.ts +1 -1
- package/dist/template/entity-converter.d.ts.map +1 -1
- package/dist/template/entity-converter.js +15 -8
- package/dist/template/helpers.d.ts +2 -2
- package/dist/template/helpers.d.ts.map +1 -1
- package/dist/template/helpers.js +3 -3
- package/dist/template/implementations/entity.template.d.ts +2 -2
- package/dist/template/implementations/entity.template.d.ts.map +1 -1
- package/dist/template/implementations/entity.template.js +4 -5
- package/dist/template/implementations/generated.template.d.ts +2 -3
- package/dist/template/implementations/generated.template.d.ts.map +1 -1
- package/dist/template/implementations/generated.template.js +46 -29
- package/dist/template/implementations/generated_http.template.d.ts +2 -3
- package/dist/template/implementations/generated_http.template.d.ts.map +1 -1
- package/dist/template/implementations/generated_http.template.js +9 -9
- package/dist/template/implementations/generated_sso.template.d.ts +3 -4
- package/dist/template/implementations/generated_sso.template.d.ts.map +1 -1
- package/dist/template/implementations/generated_sso.template.js +54 -25
- package/dist/template/implementations/init_types.template.d.ts +2 -2
- package/dist/template/implementations/init_types.template.d.ts.map +1 -1
- package/dist/template/implementations/init_types.template.js +2 -2
- package/dist/template/implementations/model.template.d.ts +2 -2
- package/dist/template/implementations/model.template.d.ts.map +1 -1
- package/dist/template/implementations/model.template.js +47 -37
- package/dist/template/implementations/model_test.template.d.ts +2 -2
- package/dist/template/implementations/model_test.template.d.ts.map +1 -1
- package/dist/template/implementations/model_test.template.js +2 -2
- package/dist/template/implementations/service.template.d.ts +4 -4
- package/dist/template/implementations/service.template.d.ts.map +1 -1
- package/dist/template/implementations/service.template.js +24 -16
- package/dist/template/implementations/view_enums_buttonset.template.d.ts +2 -2
- package/dist/template/implementations/view_enums_buttonset.template.d.ts.map +1 -1
- package/dist/template/implementations/view_enums_buttonset.template.js +1 -1
- package/dist/template/implementations/view_enums_dropdown.template.d.ts +2 -2
- package/dist/template/implementations/view_enums_dropdown.template.d.ts.map +1 -1
- package/dist/template/implementations/view_enums_dropdown.template.js +2 -2
- package/dist/template/implementations/view_enums_select.template.d.ts +2 -2
- package/dist/template/implementations/view_enums_select.template.d.ts.map +1 -1
- package/dist/template/implementations/view_enums_select.template.js +2 -2
- package/dist/template/implementations/view_form.template.d.ts +2 -2
- package/dist/template/implementations/view_form.template.d.ts.map +1 -1
- package/dist/template/implementations/view_form.template.js +4 -4
- package/dist/template/implementations/view_id_all_select.template.d.ts +2 -2
- package/dist/template/implementations/view_id_all_select.template.d.ts.map +1 -1
- package/dist/template/implementations/view_id_all_select.template.js +1 -1
- package/dist/template/implementations/view_id_async_select.template.d.ts +2 -2
- package/dist/template/implementations/view_id_async_select.template.d.ts.map +1 -1
- package/dist/template/implementations/view_id_async_select.template.js +1 -1
- package/dist/template/implementations/view_list.template.d.ts +2 -2
- package/dist/template/implementations/view_list.template.d.ts.map +1 -1
- package/dist/template/implementations/view_list.template.js +29 -19
- package/dist/template/implementations/view_list_columns.template.d.ts +3 -3
- package/dist/template/implementations/view_list_columns.template.d.ts.map +1 -1
- package/dist/template/implementations/view_list_columns.template.js +1 -1
- package/dist/template/implementations/view_search_input.template.d.ts +2 -2
- package/dist/template/implementations/view_search_input.template.d.ts.map +1 -1
- package/dist/template/implementations/view_search_input.template.js +1 -1
- package/dist/template/index.d.ts +4 -2
- package/dist/template/index.d.ts.map +1 -1
- package/dist/template/index.js +5 -3
- package/dist/template/template-manager.d.ts +56 -0
- package/dist/template/template-manager.d.ts.map +1 -0
- package/dist/template/template-manager.js +125 -0
- package/dist/template/template-types.d.ts +16 -0
- package/dist/template/template-types.d.ts.map +1 -0
- package/dist/template/template-types.js +7 -0
- package/dist/template/template.d.ts +12 -2
- package/dist/template/template.d.ts.map +1 -1
- package/dist/template/template.js +19 -6
- package/dist/template/zod-converter.d.ts +40 -7
- package/dist/template/zod-converter.d.ts.map +1 -1
- package/dist/template/zod-converter.js +386 -58
- package/dist/testing/_relation-graph.d.ts +1 -1
- package/dist/testing/_relation-graph.d.ts.map +1 -1
- package/dist/testing/_relation-graph.js +12 -3
- package/dist/testing/fixture-manager.d.ts +42 -11
- package/dist/testing/fixture-manager.d.ts.map +1 -1
- package/dist/testing/fixture-manager.js +338 -236
- package/dist/types/types.d.ts +709 -104
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js +309 -52
- package/dist/typings/knex.d.js +2 -2
- package/dist/utils/async-utils.d.ts.map +1 -1
- package/dist/utils/async-utils.js +3 -3
- package/dist/utils/console-util.js +1 -1
- package/dist/utils/controller.d.ts +1 -0
- package/dist/utils/controller.d.ts.map +1 -1
- package/dist/utils/controller.js +4 -1
- package/dist/utils/esm-utils.d.ts +0 -6
- package/dist/utils/esm-utils.d.ts.map +1 -1
- package/dist/utils/esm-utils.js +2 -9
- package/dist/utils/formatter.d.ts +3 -0
- package/dist/utils/formatter.d.ts.map +1 -0
- package/dist/utils/formatter.js +110 -0
- package/dist/utils/fs-utils.d.ts +1 -1
- package/dist/utils/fs-utils.d.ts.map +1 -1
- package/dist/utils/fs-utils.js +1 -1
- package/dist/utils/lodash-able.d.ts.map +1 -1
- package/dist/utils/lodash-able.js +1 -1
- package/dist/utils/object-utils.d.ts +44 -0
- package/dist/utils/object-utils.d.ts.map +1 -0
- package/dist/utils/object-utils.js +191 -0
- package/dist/utils/path-utils.d.ts +1 -1
- package/dist/utils/path-utils.d.ts.map +1 -1
- package/dist/utils/path-utils.js +3 -3
- package/dist/utils/process-utils.js +1 -1
- package/dist/utils/sql-parser.d.ts +5 -1
- package/dist/utils/sql-parser.d.ts.map +1 -1
- package/dist/utils/sql-parser.js +14 -3
- package/dist/utils/type-utils.d.ts +23 -0
- package/dist/utils/type-utils.d.ts.map +1 -0
- package/dist/utils/type-utils.js +45 -0
- package/dist/utils/utils.d.ts +7 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +44 -5
- package/dist/utils/zod-error.d.ts +1 -1
- package/dist/utils/zod-error.d.ts.map +1 -1
- package/dist/utils/zod-error.js +1 -1
- package/package.json +55 -30
- package/src/ai/agents/agent.ts +87 -0
- package/src/ai/agents/index.ts +2 -0
- package/src/ai/agents/types.ts +47 -0
- package/src/ai/index.ts +1 -0
- package/src/ai/providers/rtzr/api.ts +37 -0
- package/src/ai/providers/rtzr/error.ts +34 -0
- package/src/ai/providers/rtzr/index.ts +4 -0
- package/src/ai/providers/rtzr/model.ts +201 -0
- package/src/ai/providers/rtzr/options.ts +49 -0
- package/src/ai/providers/rtzr/provider.ts +91 -0
- package/src/ai/providers/rtzr/utils.ts +127 -0
- package/src/api/base-frame.ts +4 -2
- package/src/api/caster.ts +17 -23
- package/src/api/code-converters.ts +176 -533
- package/src/api/config.ts +39 -56
- package/src/api/context.ts +7 -18
- package/src/api/decorators.ts +175 -46
- package/src/api/index.ts +2 -2
- package/src/api/sonamu.ts +133 -124
- package/src/api/validator.ts +83 -0
- package/src/bin/build-config.ts +7 -1
- package/src/bin/cli.ts +192 -110
- package/src/bin/loader-register.ts +38 -0
- package/src/database/_batch_update.ts +46 -31
- package/src/database/base-model.ts +390 -182
- package/src/database/base-model.types.ts +155 -0
- package/src/database/code-generator.ts +13 -32
- package/src/database/db.ts +36 -50
- package/src/database/puri-subset.test-d.ts +471 -0
- package/src/database/puri-subset.types.ts +195 -0
- package/src/database/puri-wrapper.ts +58 -67
- package/src/database/puri.ts +182 -126
- package/src/database/puri.types.ts +64 -31
- package/src/database/transaction-context.ts +1 -1
- package/src/database/upsert-builder.ts +261 -132
- package/src/entity/entity-manager.ts +36 -28
- package/src/entity/entity.ts +330 -249
- package/src/exceptions/error-handler.ts +3 -3
- package/src/exceptions/so-exceptions.ts +11 -11
- package/src/file-storage/driver.ts +5 -5
- package/src/file-storage/file-storage.ts +2 -2
- package/src/index.ts +18 -12
- package/src/migration/code-generation.ts +185 -172
- package/src/migration/migration-set.ts +80 -293
- package/src/migration/migrator.ts +182 -425
- package/src/migration/mysql-schema-reader.ts.txt +272 -0
- package/src/migration/postgresql-schema-reader.ts +310 -0
- package/src/migration/types.ts +6 -39
- package/src/naite/messaging-types.ts +51 -0
- package/src/naite/naite-reporter.ts +128 -0
- package/src/naite/naite.ts +378 -33
- package/src/shared/web.shared.ts.txt +20 -24
- package/src/stream/sse.ts +5 -5
- package/src/syncer/api-parser.ts +52 -69
- package/src/syncer/checksum.ts +25 -37
- package/src/syncer/code-generator.ts +58 -62
- package/src/syncer/entity-operations.ts +12 -15
- package/src/syncer/file-patterns.ts +2 -2
- package/src/syncer/index.ts +4 -4
- package/src/syncer/module-loader.ts +28 -25
- package/src/syncer/syncer.ts +155 -162
- package/src/template/entity-converter.ts +18 -27
- package/src/template/helpers.ts +8 -11
- package/src/template/implementations/entity.template.ts +6 -6
- package/src/template/implementations/generated.template.ts +99 -99
- package/src/template/implementations/generated_http.template.ts +21 -54
- package/src/template/implementations/generated_sso.template.ts +78 -65
- package/src/template/implementations/init_types.template.ts +4 -6
- package/src/template/implementations/model.template.ts +47 -38
- package/src/template/implementations/model_test.template.ts +3 -3
- package/src/template/implementations/service.template.ts +56 -80
- package/src/template/implementations/view_enums_buttonset.template.ts +2 -2
- package/src/template/implementations/view_enums_dropdown.template.ts +4 -4
- package/src/template/implementations/view_enums_select.template.ts +3 -3
- package/src/template/implementations/view_form.template.ts +34 -75
- package/src/template/implementations/view_id_all_select.template.ts +2 -2
- package/src/template/implementations/view_id_async_select.template.ts +9 -23
- package/src/template/implementations/view_list.template.ts +54 -95
- package/src/template/implementations/view_list_columns.template.ts +4 -10
- package/src/template/implementations/view_search_input.template.ts +2 -2
- package/src/template/index.ts +4 -2
- package/src/template/template-manager.ts +166 -0
- package/src/template/template-types.ts +16 -0
- package/src/template/template.ts +29 -10
- package/src/template/zod-converter.ts +459 -101
- package/src/testing/_relation-graph.ts +18 -11
- package/src/testing/fixture-manager.ts +468 -362
- package/src/types/types.ts +516 -248
- package/src/typings/knex.d.ts +7 -9
- package/src/utils/async-utils.ts +8 -12
- package/src/utils/console-util.ts +1 -1
- package/src/utils/controller.ts +3 -0
- package/src/utils/esm-utils.ts +8 -18
- package/src/utils/formatter.ts +109 -0
- package/src/utils/fs-utils.ts +1 -1
- package/src/utils/lodash-able.ts +1 -4
- package/src/utils/object-utils.ts +217 -0
- package/src/utils/path-utils.ts +3 -6
- package/src/utils/process-utils.ts +1 -1
- package/src/utils/sql-parser.ts +23 -5
- package/src/utils/type-utils.ts +83 -0
- package/src/utils/utils.ts +58 -9
- package/src/utils/zod-error.ts +3 -3
- package/dist/bin/cli-wrapper.d.ts +0 -3
- package/dist/bin/cli-wrapper.d.ts.map +0 -1
- package/dist/bin/cli-wrapper.js +0 -72
- package/dist/database/knex-plugins/knex-on-duplicate-update.d.ts +0 -2
- package/dist/database/knex-plugins/knex-on-duplicate-update.d.ts.map +0 -1
- package/dist/database/knex-plugins/knex-on-duplicate-update.js +0 -39
- package/dist/entity/entity-utils.d.ts +0 -61
- package/dist/entity/entity-utils.d.ts.map +0 -1
- package/dist/entity/entity-utils.js +0 -210
- package/src/bin/cli-wrapper.ts +0 -82
- package/src/database/knex-plugins/knex-on-duplicate-update.ts +0 -45
- package/src/entity/entity-utils.ts +0 -291
package/dist/types/types.d.ts
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import type { GuardKey } from "./../api/decorators";
|
|
2
1
|
import type { FastifyReply, FastifyRequest } from "fastify";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
import type { ApiDecoratorOptions, AuthContext, Context } from "../api";
|
|
5
|
-
|
|
6
|
-
[key in T]: {
|
|
7
|
-
[lang in L]: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export type EnumsLabelKo<T extends string> = EnumsLabel<T, "ko">;
|
|
11
|
-
export declare const SQLDateTimeString: z.ZodString;
|
|
12
|
-
export type SQLDateTimeString = z.infer<typeof SQLDateTimeString>;
|
|
4
|
+
import type { GuardKey } from "./../api/decorators";
|
|
13
5
|
export declare function zArrayable<T extends z.ZodTypeAny>(shape: T): z.ZodUnion<[T, z.ZodArray<T>]>;
|
|
14
6
|
export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
|
|
15
7
|
export type CommonProp = {
|
|
@@ -21,57 +13,66 @@ export type CommonProp = {
|
|
|
21
13
|
};
|
|
22
14
|
export type IntegerProp = CommonProp & {
|
|
23
15
|
type: "integer";
|
|
24
|
-
|
|
16
|
+
};
|
|
17
|
+
export type IntegerArrayProp = CommonProp & {
|
|
18
|
+
type: "integer[]";
|
|
25
19
|
};
|
|
26
20
|
export type BigIntegerProp = CommonProp & {
|
|
27
21
|
type: "bigInteger";
|
|
28
|
-
unsigned?: true;
|
|
29
22
|
};
|
|
30
|
-
export type
|
|
31
|
-
type: "
|
|
32
|
-
textType: "text" | "mediumtext" | "longtext";
|
|
23
|
+
export type BigIntegerArrayProp = CommonProp & {
|
|
24
|
+
type: "bigInteger[]";
|
|
33
25
|
};
|
|
34
26
|
export type StringProp = CommonProp & {
|
|
35
27
|
type: "string";
|
|
36
|
-
length
|
|
28
|
+
length?: number;
|
|
29
|
+
};
|
|
30
|
+
export type StringArrayProp = CommonProp & {
|
|
31
|
+
type: "string[]";
|
|
32
|
+
length?: number;
|
|
37
33
|
};
|
|
38
34
|
export type EnumProp = CommonProp & {
|
|
39
35
|
type: "enum";
|
|
40
|
-
length: number;
|
|
41
36
|
id: string;
|
|
37
|
+
length?: number;
|
|
38
|
+
};
|
|
39
|
+
export type EnumArrayProp = CommonProp & {
|
|
40
|
+
type: "enum[]";
|
|
41
|
+
id: string;
|
|
42
|
+
};
|
|
43
|
+
export type NumberProp = CommonProp & {
|
|
44
|
+
type: "number";
|
|
45
|
+
precision?: number;
|
|
46
|
+
scale?: number;
|
|
47
|
+
numberType?: "real" | "double precision" | "numeric";
|
|
42
48
|
};
|
|
43
|
-
export type
|
|
44
|
-
type: "
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
export type NumberArrayProp = CommonProp & {
|
|
50
|
+
type: "number[]";
|
|
51
|
+
precision?: number;
|
|
52
|
+
scale?: number;
|
|
53
|
+
numberType?: "real" | "double precision" | "numeric";
|
|
48
54
|
};
|
|
49
|
-
export type
|
|
50
|
-
type: "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
scale: number;
|
|
55
|
+
export type NumericProp = CommonProp & {
|
|
56
|
+
type: "numeric";
|
|
57
|
+
precision?: number;
|
|
58
|
+
scale?: number;
|
|
54
59
|
};
|
|
55
|
-
export type
|
|
56
|
-
type: "
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
scale: number;
|
|
60
|
+
export type NumericArrayProp = CommonProp & {
|
|
61
|
+
type: "numeric[]";
|
|
62
|
+
precision?: number;
|
|
63
|
+
scale?: number;
|
|
60
64
|
};
|
|
61
65
|
export type BooleanProp = CommonProp & {
|
|
62
66
|
type: "boolean";
|
|
63
67
|
};
|
|
68
|
+
export type BooleanArrayProp = CommonProp & {
|
|
69
|
+
type: "boolean[]";
|
|
70
|
+
};
|
|
64
71
|
export type DateProp = CommonProp & {
|
|
65
72
|
type: "date";
|
|
66
73
|
};
|
|
67
|
-
export type
|
|
68
|
-
type: "
|
|
69
|
-
};
|
|
70
|
-
export type TimeProp = CommonProp & {
|
|
71
|
-
type: "time";
|
|
72
|
-
};
|
|
73
|
-
export type TimestampProp = CommonProp & {
|
|
74
|
-
type: "timestamp";
|
|
74
|
+
export type DateArrayProp = CommonProp & {
|
|
75
|
+
type: "date[]";
|
|
75
76
|
};
|
|
76
77
|
export type JsonProp = CommonProp & {
|
|
77
78
|
type: "json";
|
|
@@ -80,6 +81,9 @@ export type JsonProp = CommonProp & {
|
|
|
80
81
|
export type UuidProp = CommonProp & {
|
|
81
82
|
type: "uuid";
|
|
82
83
|
};
|
|
84
|
+
export type UuidArrayProp = CommonProp & {
|
|
85
|
+
type: "uuid[]";
|
|
86
|
+
};
|
|
83
87
|
export type VirtualProp = CommonProp & {
|
|
84
88
|
type: "virtual";
|
|
85
89
|
id: string;
|
|
@@ -124,7 +128,7 @@ export type ManyToManyRelationProp = _RelationProp & {
|
|
|
124
128
|
onDelete: RelationOn;
|
|
125
129
|
};
|
|
126
130
|
export type RelationProp = OneToOneRelationProp | BelongsToOneRelationProp | HasManyRelationProp | ManyToManyRelationProp;
|
|
127
|
-
export type EntityProp = IntegerProp | BigIntegerProp |
|
|
131
|
+
export type EntityProp = IntegerProp | IntegerArrayProp | BigIntegerProp | BigIntegerArrayProp | StringProp | StringArrayProp | EnumProp | EnumArrayProp | NumberProp | NumberArrayProp | NumericProp | NumericArrayProp | NumericProp | BooleanProp | BooleanArrayProp | DateProp | DateArrayProp | UuidProp | UuidArrayProp | JsonProp | VirtualProp | RelationProp;
|
|
128
132
|
export type EntityIndex = {
|
|
129
133
|
type: "index" | "unique" | "fulltext";
|
|
130
134
|
columns: string[];
|
|
@@ -158,17 +162,6 @@ export type EntitySubsetRow = {
|
|
|
158
162
|
isOpen?: boolean;
|
|
159
163
|
};
|
|
160
164
|
export type FlattenSubsetRow = Omit<EntitySubsetRow, "children">;
|
|
161
|
-
export type SMDInput<T extends string> = {
|
|
162
|
-
id: string;
|
|
163
|
-
parentId?: string;
|
|
164
|
-
table?: string;
|
|
165
|
-
title?: string;
|
|
166
|
-
props?: EntityProp[];
|
|
167
|
-
indexes?: EntityIndex[];
|
|
168
|
-
subsets?: {
|
|
169
|
-
[subset: string]: T[];
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
165
|
/**
|
|
173
166
|
* 엔티티의 필드 구조를 트리 형태로 표현하는 중간 노드입니다.
|
|
174
167
|
*
|
|
@@ -193,34 +186,47 @@ export type EntityPropNode = {
|
|
|
193
186
|
prop?: EntityProp;
|
|
194
187
|
children: EntityPropNode[];
|
|
195
188
|
};
|
|
196
|
-
export declare function
|
|
197
|
-
export declare function
|
|
198
|
-
export declare function
|
|
199
|
-
export declare function
|
|
200
|
-
export declare function
|
|
201
|
-
export declare function
|
|
202
|
-
export declare function
|
|
203
|
-
export declare function
|
|
204
|
-
export declare function
|
|
205
|
-
export declare function
|
|
206
|
-
export declare function
|
|
207
|
-
export declare function
|
|
208
|
-
export declare function
|
|
209
|
-
export declare function
|
|
210
|
-
export declare function
|
|
211
|
-
export declare function
|
|
212
|
-
export declare function
|
|
213
|
-
export declare function
|
|
214
|
-
export declare function
|
|
215
|
-
export declare function
|
|
216
|
-
export declare function
|
|
189
|
+
export declare function isIntegerSingleProp(p: unknown): p is IntegerProp;
|
|
190
|
+
export declare function isIntegerArrayProp(p: unknown): p is IntegerArrayProp;
|
|
191
|
+
export declare function isIntegerProp(p: unknown): p is IntegerProp | IntegerArrayProp;
|
|
192
|
+
export declare function isBigIntegerSingleProp(p: unknown): p is BigIntegerProp;
|
|
193
|
+
export declare function isBigIntegerArrayProp(p: unknown): p is BigIntegerArrayProp;
|
|
194
|
+
export declare function isBigIntegerProp(p: unknown): p is BigIntegerProp | BigIntegerArrayProp;
|
|
195
|
+
export declare function isStringSingleProp(p: unknown): p is StringProp;
|
|
196
|
+
export declare function isStringArrayProp(p: unknown): p is StringArrayProp;
|
|
197
|
+
export declare function isStringProp(p: unknown): p is StringProp | StringArrayProp;
|
|
198
|
+
export declare function isEnumSingleProp(p: unknown): p is EnumProp;
|
|
199
|
+
export declare function isEnumArrayProp(p: unknown): p is EnumArrayProp;
|
|
200
|
+
export declare function isEnumProp(p: unknown): p is EnumProp | EnumArrayProp;
|
|
201
|
+
export declare function isNumberSingleProp(p: unknown): p is NumberProp;
|
|
202
|
+
export declare function isNumberArrayProp(p: unknown): p is NumberArrayProp;
|
|
203
|
+
export declare function isNumberProp(p: unknown): p is NumberProp | NumberArrayProp;
|
|
204
|
+
export declare function isNumericSingleProp(p: unknown): p is NumericProp;
|
|
205
|
+
export declare function isNumericArrayProp(p: unknown): p is NumericArrayProp;
|
|
206
|
+
export declare function isNumericProp(p: unknown): p is NumericProp | NumericArrayProp;
|
|
207
|
+
export declare function isBooleanSingleProp(p: unknown): p is BooleanProp;
|
|
208
|
+
export declare function isBooleanArrayProp(p: unknown): p is BooleanArrayProp;
|
|
209
|
+
export declare function isBooleanProp(p: unknown): p is BooleanProp | BooleanArrayProp;
|
|
210
|
+
export declare function isDateSingleProp(p: unknown): p is DateProp;
|
|
211
|
+
export declare function isDateArrayProp(p: unknown): p is DateArrayProp;
|
|
212
|
+
export declare function isDateProp(p: unknown): p is DateProp | DateArrayProp;
|
|
213
|
+
export declare function isUuidSingleProp(p: unknown): p is UuidProp;
|
|
214
|
+
export declare function isUuidArrayProp(p: unknown): p is UuidArrayProp;
|
|
215
|
+
export declare function isUuidProp(p: unknown): p is UuidProp | UuidArrayProp;
|
|
216
|
+
export declare function isJsonProp(p: unknown): p is JsonProp;
|
|
217
|
+
export declare function isVirtualProp(p: unknown): p is VirtualProp;
|
|
218
|
+
export declare function isRelationProp(p: unknown): p is RelationProp;
|
|
219
|
+
export declare function isOneToOneRelationProp(p: unknown): p is OneToOneRelationProp;
|
|
220
|
+
export declare function isBelongsToOneRelationProp(p: unknown): p is BelongsToOneRelationProp;
|
|
221
|
+
export declare function isHasManyRelationProp(p: unknown): p is HasManyRelationProp;
|
|
222
|
+
export declare function isManyToManyRelationProp(p: unknown): p is ManyToManyRelationProp;
|
|
217
223
|
type JoinClause = {
|
|
218
224
|
from: string;
|
|
219
225
|
to: string;
|
|
220
226
|
} | {
|
|
221
227
|
custom: string;
|
|
222
228
|
};
|
|
223
|
-
export declare function isCustomJoinClause(p:
|
|
229
|
+
export declare function isCustomJoinClause(p: unknown): p is {
|
|
224
230
|
custom: string;
|
|
225
231
|
};
|
|
226
232
|
type SubsetLoader = {
|
|
@@ -257,8 +263,8 @@ export type SubsetQuery = {
|
|
|
257
263
|
loaders: SubsetLoader[];
|
|
258
264
|
};
|
|
259
265
|
export declare const SonamuQueryMode: z.ZodEnum<{
|
|
260
|
-
count: "count";
|
|
261
266
|
list: "list";
|
|
267
|
+
count: "count";
|
|
262
268
|
both: "both";
|
|
263
269
|
}>;
|
|
264
270
|
export type SonamuQueryMode = z.infer<typeof SonamuQueryMode>;
|
|
@@ -269,13 +275,14 @@ export type KnexError = {
|
|
|
269
275
|
sqlMessage: string;
|
|
270
276
|
sqlState: string;
|
|
271
277
|
};
|
|
272
|
-
export declare function isKnexError(e:
|
|
278
|
+
export declare function isKnexError(e: unknown): e is KnexError;
|
|
273
279
|
export type KnexColumnType = "string" | "text" | "smalltext" | "mediumtext" | "longtext" | "integer" | "bigInteger" | "decimal" | "timestamp" | "boolean" | "foreign" | "uuid" | "json" | "float" | "date" | "time" | "datetime";
|
|
280
|
+
export type MigrationColumnType = "string" | "string[]" | "integer" | "integer[]" | "bigInteger" | "bigInteger[]" | "numberOrNumeric" | "numberOrNumeric[]" | "boolean" | "boolean[]" | "date" | "date[]" | "uuid" | "uuid[]" | "json";
|
|
274
281
|
export type MigrationColumn = {
|
|
275
282
|
name: string;
|
|
276
|
-
type:
|
|
283
|
+
type: MigrationColumnType;
|
|
277
284
|
nullable: boolean;
|
|
278
|
-
|
|
285
|
+
numberType?: "real" | "double precision" | "numeric";
|
|
279
286
|
length?: number;
|
|
280
287
|
defaultTo?: string;
|
|
281
288
|
precision?: number;
|
|
@@ -383,22 +390,22 @@ export declare namespace ApiParamType {
|
|
|
383
390
|
id: string;
|
|
384
391
|
constraint?: ApiParamType;
|
|
385
392
|
};
|
|
386
|
-
function isObject(v:
|
|
387
|
-
function isUnion(v:
|
|
388
|
-
function isIntersection(v:
|
|
389
|
-
function isStringLiteral(v:
|
|
390
|
-
function isNumericLiteral(v:
|
|
391
|
-
function isArray(v:
|
|
392
|
-
function isRef(v:
|
|
393
|
-
function isIndexedAccess(v:
|
|
394
|
-
function isTupleType(v:
|
|
395
|
-
function isPick(v:
|
|
396
|
-
function isOmit(v:
|
|
397
|
-
function isPartial(v:
|
|
398
|
-
function isPromise(v:
|
|
399
|
-
function isContext(v:
|
|
400
|
-
function isRefKnex(v:
|
|
401
|
-
function isTypeParam(v:
|
|
393
|
+
function isObject(v: unknown): v is ApiParamType.Object;
|
|
394
|
+
function isUnion(v: unknown): v is ApiParamType.Union;
|
|
395
|
+
function isIntersection(v: unknown): v is ApiParamType.Intersection;
|
|
396
|
+
function isStringLiteral(v: unknown): v is ApiParamType.StringLiteral;
|
|
397
|
+
function isNumericLiteral(v: unknown): v is ApiParamType.NumericLiteral;
|
|
398
|
+
function isArray(v: unknown): v is ApiParamType.Array;
|
|
399
|
+
function isRef(v: unknown): v is ApiParamType.Ref;
|
|
400
|
+
function isIndexedAccess(v: unknown): v is ApiParamType.IndexedAccess;
|
|
401
|
+
function isTupleType(v: unknown): v is ApiParamType.TupleType;
|
|
402
|
+
function isPick(v: unknown): v is ApiParamType.Pick;
|
|
403
|
+
function isOmit(v: unknown): v is ApiParamType.Omit;
|
|
404
|
+
function isPartial(v: unknown): v is ApiParamType.Partial;
|
|
405
|
+
function isPromise(v: unknown): v is ApiParamType.Promise;
|
|
406
|
+
function isContext(v: unknown): v is ApiParamType.Context;
|
|
407
|
+
function isRefKnex(v: unknown): v is ApiParamType.Ref;
|
|
408
|
+
function isTypeParam(v: unknown): v is ApiParamType.TypeParam;
|
|
402
409
|
}
|
|
403
410
|
export type ApiParamType = "string" | "number" | "boolean" | "null" | "undefined" | "void" | "any" | "unknown" | "true" | "false" | ApiParamType.StringLiteral | ApiParamType.NumericLiteral | ApiParamType.Object | ApiParamType.Union | ApiParamType.Intersection | ApiParamType.Array | ApiParamType.Ref | ApiParamType.IndexedAccess | ApiParamType.TypeParam | ApiParamType.TupleType;
|
|
404
411
|
/**
|
|
@@ -435,17 +442,614 @@ export type RenderingNode = {
|
|
|
435
442
|
optional?: boolean;
|
|
436
443
|
nullable?: boolean;
|
|
437
444
|
};
|
|
445
|
+
export declare const RelationPropSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
446
|
+
relationType: z.ZodLiteral<"BelongsToOne">;
|
|
447
|
+
customJoinClause: z.ZodOptional<z.ZodString>;
|
|
448
|
+
useConstraint: z.ZodOptional<z.ZodBoolean>;
|
|
449
|
+
onUpdate: z.ZodOptional<z.ZodEnum<{
|
|
450
|
+
CASCADE: "CASCADE";
|
|
451
|
+
"SET NULL": "SET NULL";
|
|
452
|
+
"NO ACTION": "NO ACTION";
|
|
453
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
454
|
+
RESTRICT: "RESTRICT";
|
|
455
|
+
}>>;
|
|
456
|
+
onDelete: z.ZodOptional<z.ZodEnum<{
|
|
457
|
+
CASCADE: "CASCADE";
|
|
458
|
+
"SET NULL": "SET NULL";
|
|
459
|
+
"NO ACTION": "NO ACTION";
|
|
460
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
461
|
+
RESTRICT: "RESTRICT";
|
|
462
|
+
}>>;
|
|
463
|
+
type: z.ZodLiteral<"relation">;
|
|
464
|
+
with: z.ZodString;
|
|
465
|
+
name: z.ZodString;
|
|
466
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
467
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
468
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
469
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
470
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
471
|
+
relationType: z.ZodLiteral<"HasMany">;
|
|
472
|
+
joinColumn: z.ZodString;
|
|
473
|
+
fromColumn: z.ZodOptional<z.ZodString>;
|
|
474
|
+
type: z.ZodLiteral<"relation">;
|
|
475
|
+
with: z.ZodString;
|
|
476
|
+
name: z.ZodString;
|
|
477
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
478
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
479
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
480
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
481
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
482
|
+
relationType: z.ZodLiteral<"ManyToMany">;
|
|
483
|
+
joinTable: z.ZodString;
|
|
484
|
+
onUpdate: z.ZodEnum<{
|
|
485
|
+
CASCADE: "CASCADE";
|
|
486
|
+
"SET NULL": "SET NULL";
|
|
487
|
+
"NO ACTION": "NO ACTION";
|
|
488
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
489
|
+
RESTRICT: "RESTRICT";
|
|
490
|
+
}>;
|
|
491
|
+
onDelete: z.ZodEnum<{
|
|
492
|
+
CASCADE: "CASCADE";
|
|
493
|
+
"SET NULL": "SET NULL";
|
|
494
|
+
"NO ACTION": "NO ACTION";
|
|
495
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
496
|
+
RESTRICT: "RESTRICT";
|
|
497
|
+
}>;
|
|
498
|
+
type: z.ZodLiteral<"relation">;
|
|
499
|
+
with: z.ZodString;
|
|
500
|
+
name: z.ZodString;
|
|
501
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
502
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
503
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
504
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
505
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
506
|
+
relationType: z.ZodLiteral<"OneToOne">;
|
|
507
|
+
customJoinClause: z.ZodOptional<z.ZodString>;
|
|
508
|
+
hasJoinColumn: z.ZodOptional<z.ZodBoolean>;
|
|
509
|
+
useConstraint: z.ZodOptional<z.ZodBoolean>;
|
|
510
|
+
onUpdate: z.ZodOptional<z.ZodEnum<{
|
|
511
|
+
CASCADE: "CASCADE";
|
|
512
|
+
"SET NULL": "SET NULL";
|
|
513
|
+
"NO ACTION": "NO ACTION";
|
|
514
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
515
|
+
RESTRICT: "RESTRICT";
|
|
516
|
+
}>>;
|
|
517
|
+
onDelete: z.ZodOptional<z.ZodEnum<{
|
|
518
|
+
CASCADE: "CASCADE";
|
|
519
|
+
"SET NULL": "SET NULL";
|
|
520
|
+
"NO ACTION": "NO ACTION";
|
|
521
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
522
|
+
RESTRICT: "RESTRICT";
|
|
523
|
+
}>>;
|
|
524
|
+
type: z.ZodLiteral<"relation">;
|
|
525
|
+
with: z.ZodString;
|
|
526
|
+
name: z.ZodString;
|
|
527
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
528
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
529
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
530
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
531
|
+
}, z.core.$strict>], "relationType">;
|
|
532
|
+
export declare const NormalPropSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
533
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"integer">, z.ZodLiteral<"integer[]">, z.ZodLiteral<"bigInteger">, z.ZodLiteral<"bigInteger[]">, z.ZodLiteral<"boolean">, z.ZodLiteral<"boolean[]">, z.ZodLiteral<"date">, z.ZodLiteral<"date[]">, z.ZodLiteral<"uuid">, z.ZodLiteral<"uuid[]">]>;
|
|
534
|
+
name: z.ZodString;
|
|
535
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
536
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
537
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
538
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
539
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
540
|
+
type: z.ZodLiteral<"string">;
|
|
541
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
542
|
+
name: z.ZodString;
|
|
543
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
544
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
545
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
546
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
547
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
548
|
+
type: z.ZodLiteral<"string[]">;
|
|
549
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
550
|
+
name: z.ZodString;
|
|
551
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
552
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
553
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
554
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
555
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
556
|
+
type: z.ZodLiteral<"enum">;
|
|
557
|
+
id: z.ZodString;
|
|
558
|
+
name: z.ZodString;
|
|
559
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
560
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
561
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
562
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
563
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
564
|
+
type: z.ZodLiteral<"enum[]">;
|
|
565
|
+
id: z.ZodString;
|
|
566
|
+
name: z.ZodString;
|
|
567
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
568
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
569
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
570
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
571
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
572
|
+
numberType: z.ZodOptional<z.ZodEnum<{
|
|
573
|
+
numeric: "numeric";
|
|
574
|
+
real: "real";
|
|
575
|
+
"double precision": "double precision";
|
|
576
|
+
}>>;
|
|
577
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
578
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
579
|
+
type: z.ZodLiteral<"number">;
|
|
580
|
+
name: z.ZodString;
|
|
581
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
582
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
583
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
584
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
585
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
586
|
+
numberType: z.ZodOptional<z.ZodEnum<{
|
|
587
|
+
numeric: "numeric";
|
|
588
|
+
real: "real";
|
|
589
|
+
"double precision": "double precision";
|
|
590
|
+
}>>;
|
|
591
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
592
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
593
|
+
type: z.ZodLiteral<"number[]">;
|
|
594
|
+
name: z.ZodString;
|
|
595
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
596
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
597
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
598
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
599
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
600
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
601
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
602
|
+
type: z.ZodLiteral<"numeric">;
|
|
603
|
+
name: z.ZodString;
|
|
604
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
605
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
606
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
607
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
608
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
609
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
610
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
611
|
+
type: z.ZodLiteral<"numeric[]">;
|
|
612
|
+
name: z.ZodString;
|
|
613
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
614
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
615
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
616
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
617
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
618
|
+
type: z.ZodLiteral<"json">;
|
|
619
|
+
id: z.ZodString;
|
|
620
|
+
name: z.ZodString;
|
|
621
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
622
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
623
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
624
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
625
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
626
|
+
type: z.ZodLiteral<"virtual">;
|
|
627
|
+
id: z.ZodString;
|
|
628
|
+
name: z.ZodString;
|
|
629
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
630
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
631
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
632
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
633
|
+
}, z.core.$strict>], "type">;
|
|
634
|
+
export declare const EntityJsonSchema: z.ZodObject<{
|
|
635
|
+
id: z.ZodString;
|
|
636
|
+
title: z.ZodString;
|
|
637
|
+
table: z.ZodString;
|
|
638
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
639
|
+
props: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
640
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"integer">, z.ZodLiteral<"integer[]">, z.ZodLiteral<"bigInteger">, z.ZodLiteral<"bigInteger[]">, z.ZodLiteral<"boolean">, z.ZodLiteral<"boolean[]">, z.ZodLiteral<"date">, z.ZodLiteral<"date[]">, z.ZodLiteral<"uuid">, z.ZodLiteral<"uuid[]">]>;
|
|
641
|
+
name: z.ZodString;
|
|
642
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
643
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
644
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
645
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
646
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
647
|
+
type: z.ZodLiteral<"string">;
|
|
648
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
649
|
+
name: z.ZodString;
|
|
650
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
651
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
652
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
653
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
654
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
655
|
+
type: z.ZodLiteral<"string[]">;
|
|
656
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
657
|
+
name: z.ZodString;
|
|
658
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
659
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
660
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
661
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
662
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
663
|
+
type: z.ZodLiteral<"enum">;
|
|
664
|
+
id: z.ZodString;
|
|
665
|
+
name: z.ZodString;
|
|
666
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
667
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
668
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
669
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
670
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
671
|
+
type: z.ZodLiteral<"enum[]">;
|
|
672
|
+
id: z.ZodString;
|
|
673
|
+
name: z.ZodString;
|
|
674
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
675
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
676
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
677
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
678
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
679
|
+
numberType: z.ZodOptional<z.ZodEnum<{
|
|
680
|
+
numeric: "numeric";
|
|
681
|
+
real: "real";
|
|
682
|
+
"double precision": "double precision";
|
|
683
|
+
}>>;
|
|
684
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
685
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
686
|
+
type: z.ZodLiteral<"number">;
|
|
687
|
+
name: z.ZodString;
|
|
688
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
689
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
690
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
691
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
692
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
693
|
+
numberType: z.ZodOptional<z.ZodEnum<{
|
|
694
|
+
numeric: "numeric";
|
|
695
|
+
real: "real";
|
|
696
|
+
"double precision": "double precision";
|
|
697
|
+
}>>;
|
|
698
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
699
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
700
|
+
type: z.ZodLiteral<"number[]">;
|
|
701
|
+
name: z.ZodString;
|
|
702
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
703
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
704
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
705
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
706
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
707
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
708
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
709
|
+
type: z.ZodLiteral<"numeric">;
|
|
710
|
+
name: z.ZodString;
|
|
711
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
712
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
713
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
714
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
715
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
716
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
717
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
718
|
+
type: z.ZodLiteral<"numeric[]">;
|
|
719
|
+
name: z.ZodString;
|
|
720
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
721
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
722
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
723
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
724
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
725
|
+
type: z.ZodLiteral<"json">;
|
|
726
|
+
id: z.ZodString;
|
|
727
|
+
name: z.ZodString;
|
|
728
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
729
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
730
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
731
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
732
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
733
|
+
type: z.ZodLiteral<"virtual">;
|
|
734
|
+
id: z.ZodString;
|
|
735
|
+
name: z.ZodString;
|
|
736
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
737
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
738
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
739
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
740
|
+
}, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
741
|
+
relationType: z.ZodLiteral<"BelongsToOne">;
|
|
742
|
+
customJoinClause: z.ZodOptional<z.ZodString>;
|
|
743
|
+
useConstraint: z.ZodOptional<z.ZodBoolean>;
|
|
744
|
+
onUpdate: z.ZodOptional<z.ZodEnum<{
|
|
745
|
+
CASCADE: "CASCADE";
|
|
746
|
+
"SET NULL": "SET NULL";
|
|
747
|
+
"NO ACTION": "NO ACTION";
|
|
748
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
749
|
+
RESTRICT: "RESTRICT";
|
|
750
|
+
}>>;
|
|
751
|
+
onDelete: z.ZodOptional<z.ZodEnum<{
|
|
752
|
+
CASCADE: "CASCADE";
|
|
753
|
+
"SET NULL": "SET NULL";
|
|
754
|
+
"NO ACTION": "NO ACTION";
|
|
755
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
756
|
+
RESTRICT: "RESTRICT";
|
|
757
|
+
}>>;
|
|
758
|
+
type: z.ZodLiteral<"relation">;
|
|
759
|
+
with: z.ZodString;
|
|
760
|
+
name: z.ZodString;
|
|
761
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
762
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
763
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
764
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
765
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
766
|
+
relationType: z.ZodLiteral<"HasMany">;
|
|
767
|
+
joinColumn: z.ZodString;
|
|
768
|
+
fromColumn: z.ZodOptional<z.ZodString>;
|
|
769
|
+
type: z.ZodLiteral<"relation">;
|
|
770
|
+
with: z.ZodString;
|
|
771
|
+
name: z.ZodString;
|
|
772
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
773
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
774
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
775
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
776
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
777
|
+
relationType: z.ZodLiteral<"ManyToMany">;
|
|
778
|
+
joinTable: z.ZodString;
|
|
779
|
+
onUpdate: z.ZodEnum<{
|
|
780
|
+
CASCADE: "CASCADE";
|
|
781
|
+
"SET NULL": "SET NULL";
|
|
782
|
+
"NO ACTION": "NO ACTION";
|
|
783
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
784
|
+
RESTRICT: "RESTRICT";
|
|
785
|
+
}>;
|
|
786
|
+
onDelete: z.ZodEnum<{
|
|
787
|
+
CASCADE: "CASCADE";
|
|
788
|
+
"SET NULL": "SET NULL";
|
|
789
|
+
"NO ACTION": "NO ACTION";
|
|
790
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
791
|
+
RESTRICT: "RESTRICT";
|
|
792
|
+
}>;
|
|
793
|
+
type: z.ZodLiteral<"relation">;
|
|
794
|
+
with: z.ZodString;
|
|
795
|
+
name: z.ZodString;
|
|
796
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
797
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
798
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
799
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
800
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
801
|
+
relationType: z.ZodLiteral<"OneToOne">;
|
|
802
|
+
customJoinClause: z.ZodOptional<z.ZodString>;
|
|
803
|
+
hasJoinColumn: z.ZodOptional<z.ZodBoolean>;
|
|
804
|
+
useConstraint: z.ZodOptional<z.ZodBoolean>;
|
|
805
|
+
onUpdate: z.ZodOptional<z.ZodEnum<{
|
|
806
|
+
CASCADE: "CASCADE";
|
|
807
|
+
"SET NULL": "SET NULL";
|
|
808
|
+
"NO ACTION": "NO ACTION";
|
|
809
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
810
|
+
RESTRICT: "RESTRICT";
|
|
811
|
+
}>>;
|
|
812
|
+
onDelete: z.ZodOptional<z.ZodEnum<{
|
|
813
|
+
CASCADE: "CASCADE";
|
|
814
|
+
"SET NULL": "SET NULL";
|
|
815
|
+
"NO ACTION": "NO ACTION";
|
|
816
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
817
|
+
RESTRICT: "RESTRICT";
|
|
818
|
+
}>>;
|
|
819
|
+
type: z.ZodLiteral<"relation">;
|
|
820
|
+
with: z.ZodString;
|
|
821
|
+
name: z.ZodString;
|
|
822
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
823
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
824
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
825
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
826
|
+
}, z.core.$strict>], "relationType">], "type">>;
|
|
827
|
+
indexes: z.ZodArray<z.ZodObject<{
|
|
828
|
+
type: z.ZodEnum<{
|
|
829
|
+
index: "index";
|
|
830
|
+
unique: "unique";
|
|
831
|
+
fulltext: "fulltext";
|
|
832
|
+
}>;
|
|
833
|
+
columns: z.ZodArray<z.ZodString>;
|
|
834
|
+
name: z.ZodOptional<z.ZodString>;
|
|
835
|
+
parser: z.ZodOptional<z.ZodEnum<{
|
|
836
|
+
"built-in": "built-in";
|
|
837
|
+
ngram: "ngram";
|
|
838
|
+
}>>;
|
|
839
|
+
}, z.core.$strict>>;
|
|
840
|
+
subsets: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
841
|
+
enums: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
842
|
+
}, z.core.$strict>;
|
|
438
843
|
export declare const TemplateOptions: z.ZodObject<{
|
|
439
844
|
entity: z.ZodObject<{
|
|
440
|
-
|
|
845
|
+
table: z.ZodOptional<z.ZodString>;
|
|
441
846
|
parentId: z.ZodOptional<z.ZodString>;
|
|
442
847
|
title: z.ZodString;
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
848
|
+
props: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
849
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"integer">, z.ZodLiteral<"integer[]">, z.ZodLiteral<"bigInteger">, z.ZodLiteral<"bigInteger[]">, z.ZodLiteral<"boolean">, z.ZodLiteral<"boolean[]">, z.ZodLiteral<"date">, z.ZodLiteral<"date[]">, z.ZodLiteral<"uuid">, z.ZodLiteral<"uuid[]">]>;
|
|
850
|
+
name: z.ZodString;
|
|
851
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
852
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
853
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
854
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
855
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
856
|
+
type: z.ZodLiteral<"string">;
|
|
857
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
858
|
+
name: z.ZodString;
|
|
859
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
860
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
861
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
862
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
863
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
864
|
+
type: z.ZodLiteral<"string[]">;
|
|
865
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
866
|
+
name: z.ZodString;
|
|
867
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
868
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
869
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
870
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
871
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
872
|
+
type: z.ZodLiteral<"enum">;
|
|
873
|
+
id: z.ZodString;
|
|
874
|
+
name: z.ZodString;
|
|
875
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
876
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
877
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
878
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
879
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
880
|
+
type: z.ZodLiteral<"enum[]">;
|
|
881
|
+
id: z.ZodString;
|
|
882
|
+
name: z.ZodString;
|
|
883
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
884
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
885
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
886
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
887
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
888
|
+
numberType: z.ZodOptional<z.ZodEnum<{
|
|
889
|
+
numeric: "numeric";
|
|
890
|
+
real: "real";
|
|
891
|
+
"double precision": "double precision";
|
|
892
|
+
}>>;
|
|
893
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
894
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
895
|
+
type: z.ZodLiteral<"number">;
|
|
896
|
+
name: z.ZodString;
|
|
897
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
898
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
899
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
900
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
901
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
902
|
+
numberType: z.ZodOptional<z.ZodEnum<{
|
|
903
|
+
numeric: "numeric";
|
|
904
|
+
real: "real";
|
|
905
|
+
"double precision": "double precision";
|
|
906
|
+
}>>;
|
|
907
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
908
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
909
|
+
type: z.ZodLiteral<"number[]">;
|
|
910
|
+
name: z.ZodString;
|
|
911
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
912
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
913
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
914
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
915
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
916
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
917
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
918
|
+
type: z.ZodLiteral<"numeric">;
|
|
919
|
+
name: z.ZodString;
|
|
920
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
921
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
922
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
923
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
924
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
925
|
+
precision: z.ZodOptional<z.ZodNumber>;
|
|
926
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
927
|
+
type: z.ZodLiteral<"numeric[]">;
|
|
928
|
+
name: z.ZodString;
|
|
929
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
930
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
931
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
932
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
933
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
934
|
+
type: z.ZodLiteral<"json">;
|
|
935
|
+
id: z.ZodString;
|
|
936
|
+
name: z.ZodString;
|
|
937
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
938
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
939
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
940
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
941
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
942
|
+
type: z.ZodLiteral<"virtual">;
|
|
943
|
+
id: z.ZodString;
|
|
944
|
+
name: z.ZodString;
|
|
945
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
946
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
947
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
948
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
949
|
+
}, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
950
|
+
relationType: z.ZodLiteral<"BelongsToOne">;
|
|
951
|
+
customJoinClause: z.ZodOptional<z.ZodString>;
|
|
952
|
+
useConstraint: z.ZodOptional<z.ZodBoolean>;
|
|
953
|
+
onUpdate: z.ZodOptional<z.ZodEnum<{
|
|
954
|
+
CASCADE: "CASCADE";
|
|
955
|
+
"SET NULL": "SET NULL";
|
|
956
|
+
"NO ACTION": "NO ACTION";
|
|
957
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
958
|
+
RESTRICT: "RESTRICT";
|
|
959
|
+
}>>;
|
|
960
|
+
onDelete: z.ZodOptional<z.ZodEnum<{
|
|
961
|
+
CASCADE: "CASCADE";
|
|
962
|
+
"SET NULL": "SET NULL";
|
|
963
|
+
"NO ACTION": "NO ACTION";
|
|
964
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
965
|
+
RESTRICT: "RESTRICT";
|
|
966
|
+
}>>;
|
|
967
|
+
type: z.ZodLiteral<"relation">;
|
|
968
|
+
with: z.ZodString;
|
|
969
|
+
name: z.ZodString;
|
|
970
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
971
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
972
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
973
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
974
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
975
|
+
relationType: z.ZodLiteral<"HasMany">;
|
|
976
|
+
joinColumn: z.ZodString;
|
|
977
|
+
fromColumn: z.ZodOptional<z.ZodString>;
|
|
978
|
+
type: z.ZodLiteral<"relation">;
|
|
979
|
+
with: z.ZodString;
|
|
980
|
+
name: z.ZodString;
|
|
981
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
982
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
983
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
984
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
985
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
986
|
+
relationType: z.ZodLiteral<"ManyToMany">;
|
|
987
|
+
joinTable: z.ZodString;
|
|
988
|
+
onUpdate: z.ZodEnum<{
|
|
989
|
+
CASCADE: "CASCADE";
|
|
990
|
+
"SET NULL": "SET NULL";
|
|
991
|
+
"NO ACTION": "NO ACTION";
|
|
992
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
993
|
+
RESTRICT: "RESTRICT";
|
|
994
|
+
}>;
|
|
995
|
+
onDelete: z.ZodEnum<{
|
|
996
|
+
CASCADE: "CASCADE";
|
|
997
|
+
"SET NULL": "SET NULL";
|
|
998
|
+
"NO ACTION": "NO ACTION";
|
|
999
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
1000
|
+
RESTRICT: "RESTRICT";
|
|
1001
|
+
}>;
|
|
1002
|
+
type: z.ZodLiteral<"relation">;
|
|
1003
|
+
with: z.ZodString;
|
|
1004
|
+
name: z.ZodString;
|
|
1005
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
1006
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
1007
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1008
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
1009
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1010
|
+
relationType: z.ZodLiteral<"OneToOne">;
|
|
1011
|
+
customJoinClause: z.ZodOptional<z.ZodString>;
|
|
1012
|
+
hasJoinColumn: z.ZodOptional<z.ZodBoolean>;
|
|
1013
|
+
useConstraint: z.ZodOptional<z.ZodBoolean>;
|
|
1014
|
+
onUpdate: z.ZodOptional<z.ZodEnum<{
|
|
1015
|
+
CASCADE: "CASCADE";
|
|
1016
|
+
"SET NULL": "SET NULL";
|
|
1017
|
+
"NO ACTION": "NO ACTION";
|
|
1018
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
1019
|
+
RESTRICT: "RESTRICT";
|
|
1020
|
+
}>>;
|
|
1021
|
+
onDelete: z.ZodOptional<z.ZodEnum<{
|
|
1022
|
+
CASCADE: "CASCADE";
|
|
1023
|
+
"SET NULL": "SET NULL";
|
|
1024
|
+
"NO ACTION": "NO ACTION";
|
|
1025
|
+
"SET DEFAULT": "SET DEFAULT";
|
|
1026
|
+
RESTRICT: "RESTRICT";
|
|
1027
|
+
}>>;
|
|
1028
|
+
type: z.ZodLiteral<"relation">;
|
|
1029
|
+
with: z.ZodString;
|
|
1030
|
+
name: z.ZodString;
|
|
1031
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
1032
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
1033
|
+
toFilter: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1034
|
+
dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
1035
|
+
}, z.core.$strict>], "relationType">], "type">>>;
|
|
1036
|
+
indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1037
|
+
type: z.ZodEnum<{
|
|
1038
|
+
index: "index";
|
|
1039
|
+
unique: "unique";
|
|
1040
|
+
fulltext: "fulltext";
|
|
1041
|
+
}>;
|
|
1042
|
+
columns: z.ZodArray<z.ZodString>;
|
|
1043
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1044
|
+
parser: z.ZodOptional<z.ZodEnum<{
|
|
1045
|
+
"built-in": "built-in";
|
|
1046
|
+
ngram: "ngram";
|
|
1047
|
+
}>>;
|
|
1048
|
+
}, z.core.$strict>>>;
|
|
1049
|
+
subsets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
1050
|
+
enums: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1051
|
+
entityId: z.ZodString;
|
|
1052
|
+
}, z.core.$strict>;
|
|
449
1053
|
init_types: z.ZodObject<{
|
|
450
1054
|
entityId: z.ZodString;
|
|
451
1055
|
}, z.core.$strip>;
|
|
@@ -456,8 +1060,8 @@ export declare const TemplateOptions: z.ZodObject<{
|
|
|
456
1060
|
}, z.core.$strip>;
|
|
457
1061
|
model: z.ZodObject<{
|
|
458
1062
|
entityId: z.ZodString;
|
|
459
|
-
defaultSearchField: z.ZodString
|
|
460
|
-
defaultOrderBy: z.ZodString
|
|
1063
|
+
defaultSearchField: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
defaultOrderBy: z.ZodOptional<z.ZodString>;
|
|
461
1065
|
}, z.core.$strip>;
|
|
462
1066
|
model_test: z.ZodObject<{
|
|
463
1067
|
entityId: z.ZodString;
|
|
@@ -554,6 +1158,7 @@ export type FixtureSearchOptions = {
|
|
|
554
1158
|
value: string;
|
|
555
1159
|
searchType: "equals" | "like";
|
|
556
1160
|
};
|
|
1161
|
+
type ColumnValue = string | number | boolean | Date | null;
|
|
557
1162
|
export type FixtureRecord = {
|
|
558
1163
|
fixtureId: string;
|
|
559
1164
|
entityId: string;
|
|
@@ -561,7 +1166,7 @@ export type FixtureRecord = {
|
|
|
561
1166
|
columns: {
|
|
562
1167
|
[key: string]: {
|
|
563
1168
|
prop: EntityProp;
|
|
564
|
-
value:
|
|
1169
|
+
value: ColumnValue | ColumnValue[];
|
|
565
1170
|
};
|
|
566
1171
|
};
|
|
567
1172
|
fetchedRecords: string[];
|
|
@@ -573,7 +1178,7 @@ export type FixtureRecord = {
|
|
|
573
1178
|
export type FixtureImportResult = {
|
|
574
1179
|
entityId: string;
|
|
575
1180
|
data: {
|
|
576
|
-
[key: string]:
|
|
1181
|
+
[key: string]: ColumnValue;
|
|
577
1182
|
};
|
|
578
1183
|
};
|
|
579
1184
|
export type RelationNode = {
|