twenty-sdk 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +139 -44
- package/dist/HtmlTagToRemoteComponent-Bd5sgek2.js +1 -0
- package/dist/HtmlTagToRemoteComponent-DlsAI7JU.mjs +146 -0
- package/dist/RatingValues-CT-y6O0b-CsGZSJKO.mjs +402 -0
- package/dist/RatingValues-CT-y6O0b-D7JSZAMu.js +1 -0
- package/dist/cli/commands/app/app-dev.d.ts +25 -0
- package/dist/cli/commands/{app-generate.command.d.ts → app/app-generate.d.ts} +1 -1
- package/dist/cli/commands/{app-uninstall.command.d.ts → app/app-uninstall.d.ts} +1 -1
- package/dist/cli/commands/app-command.d.ts +2 -0
- package/dist/cli/commands/auth/auth-list.d.ts +4 -0
- package/dist/cli/commands/auth/auth-login.d.ts +8 -0
- package/dist/cli/commands/auth/auth-logout.d.ts +4 -0
- package/dist/cli/commands/auth/auth-status.d.ts +5 -0
- package/dist/cli/commands/auth/auth-switch.d.ts +7 -0
- package/dist/cli/commands/entity/entity-add.d.ts +12 -0
- package/dist/cli/commands/logic-function/logic-function-execute.d.ts +10 -0
- package/dist/cli/commands/{app-logs.command.d.ts → logic-function/logic-function-logs.d.ts} +1 -1
- package/dist/cli/utilities/api/api-service.d.ts +51 -0
- package/dist/cli/utilities/build/common/cleanup-removed-files.d.ts +1 -0
- package/dist/cli/utilities/build/common/esbuild-result-processor.d.ts +11 -0
- package/dist/cli/utilities/build/common/esbuild-watcher.d.ts +37 -0
- package/dist/cli/utilities/build/common/file-upload-watcher.d.ts +24 -0
- package/dist/cli/utilities/build/common/front-component-build/jsx-transform-to-remote-dom-worker-format-plugin.d.ts +3 -0
- package/dist/cli/utilities/build/common/front-component-build/react-globals-plugin.d.ts +2 -0
- package/dist/cli/utilities/build/common/front-component-build/types/ParsedImportSpecifier.d.ts +4 -0
- package/dist/cli/utilities/build/common/front-component-build/utils/extract-names-from-import-specifier.d.ts +2 -0
- package/dist/cli/utilities/build/common/front-component-build/utils/replace-html-tags-with-remote-components.d.ts +1 -0
- package/dist/cli/utilities/build/common/front-component-build/utils/unwrap-define-front-component-to-direct-export.d.ts +1 -0
- package/dist/cli/utilities/build/common/restartable-watcher-interface.d.ts +25 -0
- package/dist/cli/utilities/build/manifest/manifest-build.d.ts +7 -0
- package/dist/cli/utilities/build/manifest/manifest-extract-config-from-file.d.ts +5 -0
- package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +20 -0
- package/dist/cli/utilities/build/manifest/manifest-types.d.ts +4 -0
- package/dist/cli/utilities/build/manifest/manifest-update-checksums.d.ts +17 -0
- package/dist/cli/utilities/build/manifest/manifest-validate.d.ts +6 -0
- package/dist/cli/utilities/build/manifest/manifest-watcher.d.ts +12 -0
- package/dist/cli/utilities/build/manifest/manifest-writer.d.ts +2 -0
- package/dist/cli/{services/generate.service.d.ts → utilities/client/client-service.d.ts} +2 -2
- package/dist/cli/{services/config.service.d.ts → utilities/config/config-service.d.ts} +4 -0
- package/dist/cli/utilities/dev/dev-mode-orchestrator.d.ts +42 -0
- package/dist/cli/utilities/dev/dev-ui-state-manager.d.ts +31 -0
- package/dist/cli/utilities/dev/dev-ui-state.d.ts +27 -0
- package/dist/cli/utilities/dev/dev-ui.d.ts +4 -0
- package/dist/cli/utilities/entity/entity-field-template.d.ts +11 -0
- package/dist/cli/utilities/entity/entity-front-component-template.d.ts +4 -0
- package/dist/cli/utilities/entity/entity-logic-function-template.d.ts +4 -0
- package/dist/cli/{utils/get-new-object-file-content.d.ts → utilities/entity/entity-object-template.d.ts} +1 -1
- package/dist/cli/{utils/jsonc-parser.d.ts → utilities/file/file-jsonc.d.ts} +1 -5
- package/dist/cli/utilities/file/file-tarball.d.ts +16 -0
- package/dist/cli/utilities/file/file-uploader.d.ts +14 -0
- package/dist/cli/{utils/get-ts-program-and-diagnostics.d.ts → utilities/typescript/typescript-program.d.ts} +1 -1
- package/dist/cli.cjs +280 -179
- package/dist/cli.mjs +11094 -9467
- package/dist/front-component/host/components/FrontComponentRenderer.d.ts +8 -0
- package/dist/front-component/host/generated/host-component-registry.d.ts +4 -0
- package/dist/front-component/host/generated/host-index.d.ts +1 -0
- package/dist/front-component/index.d.ts +10 -0
- package/dist/front-component/remote/components/FrontComponentWorkerEffect.d.ts +8 -0
- package/dist/front-component/remote/generated/remote-components.d.ts +44 -0
- package/dist/front-component/remote/generated/remote-elements.d.ts +195 -0
- package/dist/front-component/remote/generated/remote-index.d.ts +2 -0
- package/dist/front-component/remote/mock/mock-front-component.d.ts +3 -0
- package/dist/front-component/remote/worker/createRemoteWorker.d.ts +1 -0
- package/dist/front-component/remote/worker/remote-worker.d.ts +0 -0
- package/dist/front-component/types/HostToWorkerRenderContext.d.ts +3 -0
- package/dist/front-component/types/PropertySchema.d.ts +4 -0
- package/dist/front-component/types/WorkerExports.d.ts +5 -0
- package/dist/front-component-constants/AllowedHtmlElements.d.ts +11 -0
- package/dist/front-component-constants/AllowedUiComponents.d.ts +9 -0
- package/dist/front-component-constants/CommonHtmlEvents.d.ts +1 -0
- package/dist/front-component-constants/EventToReact.d.ts +1 -0
- package/dist/front-component-constants/HtmlCommonProperties.d.ts +2 -0
- package/dist/front-component-constants/HtmlTagToRemoteComponent.d.ts +1 -0
- package/dist/front-component-constants/index.d.ts +8 -0
- package/dist/front-component-constants.cjs +1 -0
- package/dist/front-component-constants.mjs +77 -0
- package/dist/front-component.cjs +328 -0
- package/dist/front-component.mjs +42579 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2183 -242
- package/dist/jsx-runtime-C9ldtZbm.mjs +10472 -0
- package/dist/jsx-runtime-CfccAQK_.js +54 -0
- package/dist/sdk/application/application-config.d.ts +2 -0
- package/dist/sdk/application/define-application.d.ts +3 -0
- package/dist/sdk/common/types/define-entity.type.d.ts +11 -0
- package/dist/sdk/common/utils/create-validation-result.d.ts +5 -0
- package/dist/{application → sdk}/fields/composite-fields.d.ts +1 -1
- package/dist/sdk/fields/define-field.d.ts +3 -0
- package/dist/sdk/fields/validate-fields.d.ts +2 -0
- package/dist/sdk/front-components/define-front-component.d.ts +3 -0
- package/dist/sdk/front-components/front-component-config.d.ts +5 -0
- package/dist/sdk/index.d.ts +22 -0
- package/dist/sdk/logic-functions/define-logic-function.d.ts +3 -0
- package/dist/sdk/logic-functions/logic-function-config.d.ts +6 -0
- package/dist/sdk/logic-functions/triggers/route-payload-type.d.ts +1 -0
- package/dist/sdk/objects/define-object.d.ts +3 -0
- package/dist/sdk/objects/standard-object-ids.d.ts +1 -0
- package/dist/sdk/roles/define-role.d.ts +3 -0
- package/dist/sdk/roles/permission-flag-type.d.ts +1 -0
- package/dist/types-Bg4PAegr.js +1 -0
- package/dist/types-DVJsIqkp.mjs +7 -0
- package/dist/vendor/twenty-shared/ObjectRecordGroupByDateGranularity-BZ0Penru.js +1 -0
- package/dist/vendor/twenty-shared/ObjectRecordGroupByDateGranularity-DmLx4uDl.mjs +263 -0
- package/dist/vendor/twenty-shared/RatingValues-Bd_cXQ5v.js +1 -0
- package/dist/vendor/twenty-shared/RatingValues-CT-y6O0b.mjs +388 -0
- package/dist/vendor/twenty-shared/application/applicationType.d.ts +17 -4
- package/dist/vendor/twenty-shared/application/applicationType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/assetManifestType.d.ts +7 -0
- package/dist/vendor/twenty-shared/application/assetManifestType.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/constants/AssetDirectory.d.ts +2 -0
- package/dist/vendor/twenty-shared/application/constants/AssetDirectory.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/constants/GeneratedDirectory.d.ts +2 -0
- package/dist/vendor/twenty-shared/application/constants/GeneratedDirectory.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/constants/OutputDirectory.d.ts +2 -0
- package/dist/vendor/twenty-shared/application/constants/OutputDirectory.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/enums/syncable-entities.enum.d.ts +8 -0
- package/dist/vendor/twenty-shared/application/enums/syncable-entities.enum.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/fieldManifestType.d.ts +12 -1
- package/dist/vendor/twenty-shared/application/fieldManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/frontComponentManifestType.d.ts +10 -0
- package/dist/vendor/twenty-shared/application/frontComponentManifestType.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/index.d.ts +11 -5
- package/dist/vendor/twenty-shared/application/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/{serverlessFunctionManifestType.d.ts → logicFunctionManifestType.d.ts} +9 -5
- package/dist/vendor/twenty-shared/application/logicFunctionManifestType.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/manifestType.d.ts +20 -0
- package/dist/vendor/twenty-shared/application/manifestType.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/objectFieldManifest.type.d.ts +5 -0
- package/dist/vendor/twenty-shared/application/objectFieldManifest.type.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/application/objectManifestType.d.ts +2 -2
- package/dist/vendor/twenty-shared/application/objectManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/roleManifestType.d.ts +3 -18
- package/dist/vendor/twenty-shared/application/roleManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application.cjs +1 -1
- package/dist/vendor/twenty-shared/application.mjs +8 -3
- package/dist/vendor/twenty-shared/constants/DocumentationBaseUrl.d.ts +2 -0
- package/dist/vendor/twenty-shared/constants/DocumentationBaseUrl.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/DocumentationDefaultLanguage.d.ts +2 -0
- package/dist/vendor/twenty-shared/constants/DocumentationDefaultLanguage.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/DocumentationDefaultPath.d.ts +2 -0
- package/dist/vendor/twenty-shared/constants/DocumentationDefaultPath.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/DocumentationPaths.d.ts +165 -0
- package/dist/vendor/twenty-shared/constants/DocumentationPaths.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/DocumentationSupportedLanguages.d.ts +3 -0
- package/dist/vendor/twenty-shared/constants/DocumentationSupportedLanguages.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/FilesFieldMaxNumberOfValues.d.ts +2 -0
- package/dist/vendor/twenty-shared/constants/FilesFieldMaxNumberOfValues.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/PermissionFlagType.d.ts +1 -0
- package/dist/vendor/twenty-shared/constants/PermissionFlagType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/constants/index.d.ts +8 -0
- package/dist/vendor/twenty-shared/constants/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/constants.cjs +1 -1
- package/dist/vendor/twenty-shared/constants.mjs +56 -35
- package/dist/vendor/twenty-shared/database-events/database-event-payload.type.d.ts +1 -1
- package/dist/vendor/twenty-shared/database-events/database-event-payload.type.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/database-events/object-record-delete.event.d.ts +4 -0
- package/dist/vendor/twenty-shared/database-events/object-record-delete.event.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/database-events/object-record-restore.event.d.ts +4 -0
- package/dist/vendor/twenty-shared/database-events/object-record-restore.event.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/database-events/object-record-update.event.d.ts +3 -3
- package/dist/vendor/twenty-shared/database-events/object-record-update.event.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/isValidCountryCode-D-UqlXRW.js +4 -0
- package/dist/vendor/twenty-shared/{isValidCountryCode-E35rsxfD.mjs → isValidCountryCode-Dyji5s5r.mjs} +2351 -2320
- package/dist/vendor/twenty-shared/metadata/MetadataValidationError.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/metadata/all-metadata-name.constant.d.ts +5 -4
- package/dist/vendor/twenty-shared/metadata/all-metadata-name.constant.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/metadata/index.d.ts +1 -1
- package/dist/vendor/twenty-shared/metadata/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/metadata/standard-object.constant.d.ts +2196 -0
- package/dist/vendor/twenty-shared/metadata/standard-object.constant.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/metadata.cjs +1 -1
- package/dist/vendor/twenty-shared/metadata.mjs +2025 -69
- package/dist/vendor/twenty-shared/translations/constants/AppLocales.d.ts +1 -0
- package/dist/vendor/twenty-shared/translations/constants/AppLocales.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/translations/index.d.ts +1 -0
- package/dist/vendor/twenty-shared/translations/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/translations.cjs +1 -1
- package/dist/vendor/twenty-shared/translations.mjs +2 -2
- package/dist/vendor/twenty-shared/types/ExtractSerializedRelationProperties.type.d.ts +6 -0
- package/dist/vendor/twenty-shared/types/ExtractSerializedRelationProperties.type.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/FieldMetadataDefaultValue.d.ts +44 -88
- package/dist/vendor/twenty-shared/types/FieldMetadataDefaultValue.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/FieldMetadataOptions.d.ts +2 -1
- package/dist/vendor/twenty-shared/types/FieldMetadataOptions.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/FieldMetadataSettings.d.ts +15 -9
- package/dist/vendor/twenty-shared/types/FieldMetadataSettings.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/FieldMetadataType.d.ts +18 -17
- package/dist/vendor/twenty-shared/types/FieldMetadataType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/FileCategory.d.ts +12 -0
- package/dist/vendor/twenty-shared/types/FileCategory.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/FileFolder.d.ts +14 -0
- package/dist/vendor/twenty-shared/types/FileFolder.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/IsEmptyObject.type.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/IsEmptyObject.type.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/IsEmptyRecord.type.d.ts +1 -1
- package/dist/vendor/twenty-shared/types/IsEmptyRecord.type.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/IsNever.type.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/IsNever.type.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/IsSerializedRelation.type.d.ts +4 -0
- package/dist/vendor/twenty-shared/types/IsSerializedRelation.type.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/LogicFunctionEvent.d.ts +28 -0
- package/dist/vendor/twenty-shared/types/LogicFunctionEvent.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/ObjectPermissions.d.ts +4 -0
- package/dist/vendor/twenty-shared/types/ObjectPermissions.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/OrderBy.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/OrderBy.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/QueryCursorDirection.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/QueryCursorDirection.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RecordGqlFieldsDeprecated.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/RecordGqlFieldsDeprecated.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RecordGqlOperationGqlRecordFields.d.ts +4 -0
- package/dist/vendor/twenty-shared/types/RecordGqlOperationGqlRecordFields.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RecordGqlOperationOrderBy.d.ts +10 -0
- package/dist/vendor/twenty-shared/types/RecordGqlOperationOrderBy.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RecordGqlOperationSignature.d.ts +9 -0
- package/dist/vendor/twenty-shared/types/RecordGqlOperationSignature.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RecordGqlOperationVariables.d.ts +14 -0
- package/dist/vendor/twenty-shared/types/RecordGqlOperationVariables.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicate.d.ts +15 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicate.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicateGroup.d.ts +11 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicateGroup.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicateGroupLogicalOperator.d.ts +5 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicateGroupLogicalOperator.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicateOperand.d.ts +19 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicateOperand.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicateValue.d.ts +6 -0
- package/dist/vendor/twenty-shared/types/RowLevelPermissionPredicateValue.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/SerializedRelation.type.d.ts +5 -0
- package/dist/vendor/twenty-shared/types/SerializedRelation.type.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/SettingsPath.d.ts +5 -4
- package/dist/vendor/twenty-shared/types/SettingsPath.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/__tests__/extract-serialized-relation-properties.type-test.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/__tests__/extract-serialized-relation-properties.type-test.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/index.d.ts +29 -4
- package/dist/vendor/twenty-shared/types/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/page-layout/PageLayoutTabLayoutMode.d.ts +6 -0
- package/dist/vendor/twenty-shared/types/page-layout/PageLayoutTabLayoutMode.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/page-layout/PageLayoutWidgetConditionalDisplay.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/page-layout/PageLayoutWidgetConditionalDisplay.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/page-layout/page-layout-widget-position.type.d.ts +18 -0
- package/dist/vendor/twenty-shared/types/page-layout/page-layout-widget-position.type.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types.cjs +1 -1
- package/dist/vendor/twenty-shared/types.mjs +85 -76
- package/dist/vendor/twenty-shared/utils/array/compareArraysOfObjectsByProperty.d.ts +2 -0
- package/dist/vendor/twenty-shared/utils/array/compareArraysOfObjectsByProperty.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/files/extractFolderPathFilenameAndTypeOrThrow.util.d.ts +6 -0
- package/dist/vendor/twenty-shared/utils/files/extractFolderPathFilenameAndTypeOrThrow.util.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/index.d.ts +13 -0
- package/dist/vendor/twenty-shared/utils/filter/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingArrayFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingArrayFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingBooleanFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingBooleanFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingCurrencyFilter.d.ts +10 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingCurrencyFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingDateFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingDateFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingFloatFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingFloatFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingMultiSelectFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingMultiSelectFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingRatingFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingRatingFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingRawJsonFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingRawJsonFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingRichTextV2Filter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingRichTextV2Filter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingSelectFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingSelectFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingStringFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingStringFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingTSVectorFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingTSVectorFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingUUIDFilter.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/utils/isMatchingUUIDFilter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/format/formatToShortNumber.d.ts +2 -0
- package/dist/vendor/twenty-shared/utils/format/formatToShortNumber.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/index.d.ts +19 -0
- package/dist/vendor/twenty-shared/utils/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/strings/index.d.ts +1 -0
- package/dist/vendor/twenty-shared/utils/strings/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/strings/pascalCase.d.ts +2 -0
- package/dist/vendor/twenty-shared/utils/strings/pascalCase.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/strings/stringifySafely.d.ts +2 -0
- package/dist/vendor/twenty-shared/utils/strings/stringifySafely.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/typeguard/isPlainObject.d.ts +2 -0
- package/dist/vendor/twenty-shared/utils/typeguard/isPlainObject.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/validation/isValidLocale.d.ts +2 -2
- package/dist/vendor/twenty-shared/utils/validation/isValidLocale.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/validation/normalizeLocale.d.ts +2 -5
- package/dist/vendor/twenty-shared/utils/validation/normalizeLocale.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils.cjs +2 -2
- package/dist/vendor/twenty-shared/utils.mjs +994 -522
- package/dist/vendor/twenty-shared/workflow/index.d.ts +4 -0
- package/dist/vendor/twenty-shared/workflow/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/code-action-schema.d.ts +2 -3
- package/dist/vendor/twenty-shared/workflow/schemas/code-action-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/code-action-settings-schema.d.ts +2 -3
- package/dist/vendor/twenty-shared/workflow/schemas/code-action-settings-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/logic-function-action-schema.d.ts +29 -0
- package/dist/vendor/twenty-shared/workflow/schemas/logic-function-action-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/logic-function-action-settings-schema.d.ts +18 -0
- package/dist/vendor/twenty-shared/workflow/schemas/logic-function-action-settings-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/send-email-action-schema.d.ts +5 -1
- package/dist/vendor/twenty-shared/workflow/schemas/send-email-action-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/send-email-action-settings-schema.d.ts +5 -1
- package/dist/vendor/twenty-shared/workflow/schemas/send-email-action-settings-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-action-schema.d.ts +32 -4
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-action-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-schema.d.ts +32 -4
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-state-schema.d.ts +32 -4
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-state-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/types/EmailRecipients.d.ts +6 -0
- package/dist/vendor/twenty-shared/workflow/types/EmailRecipients.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/utils/variable-path.util.d.ts +12 -0
- package/dist/vendor/twenty-shared/workflow/utils/variable-path.util.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow.cjs +3 -3
- package/dist/vendor/twenty-shared/workflow.mjs +205 -166
- package/package.json +39 -15
- package/dist/ObjectRecordGroupByDateGranularity-CtpRADP1-Bft-VMSh.mjs +0 -3151
- package/dist/ObjectRecordGroupByDateGranularity-CtpRADP1-Duv5iOeZ.js +0 -20
- package/dist/application/application-config.d.ts +0 -2
- package/dist/application/define-app.d.ts +0 -18
- package/dist/application/fields/field.decorator.d.ts +0 -3
- package/dist/application/fields/relation.decorator.d.ts +0 -28
- package/dist/application/functions/define-function.d.ts +0 -28
- package/dist/application/functions/function-config.d.ts +0 -9
- package/dist/application/index.d.ts +0 -19
- package/dist/application/objects/define-object.d.ts +0 -35
- package/dist/application/objects/object.decorator.d.ts +0 -4
- package/dist/application/objects/standard-object-ids.d.ts +0 -1
- package/dist/application/permission-flag-type.d.ts +0 -1
- package/dist/application/role-config.d.ts +0 -2
- package/dist/application/roles/define-role.d.ts +0 -26
- package/dist/cli/commands/app-add.command.d.ts +0 -13
- package/dist/cli/commands/app-dev.command.d.ts +0 -11
- package/dist/cli/commands/app-sync.command.d.ts +0 -7
- package/dist/cli/commands/app.command.d.ts +0 -10
- package/dist/cli/commands/auth.command.d.ts +0 -9
- package/dist/cli/services/api.service.d.ts +0 -20
- package/dist/cli/utils/config-loader.d.ts +0 -43
- package/dist/cli/utils/display-entity-summary.d.ts +0 -2
- package/dist/cli/utils/display-errors.d.ts +0 -2
- package/dist/cli/utils/display-warnings.d.ts +0 -2
- package/dist/cli/utils/get-function-base-file.d.ts +0 -4
- package/dist/cli/utils/load-env-variables.d.ts +0 -2
- package/dist/cli/utils/load-manifest.d.ts +0 -41
- package/dist/cli/utils/validate-manifest.d.ts +0 -22
- package/dist/vendor/twenty-shared/ObjectRecordGroupByDateGranularity-BwpmSE4s.js +0 -1
- package/dist/vendor/twenty-shared/ObjectRecordGroupByDateGranularity-CtpRADP1.mjs +0 -500
- package/dist/vendor/twenty-shared/RatingValues-B_wgYyso.js +0 -1
- package/dist/vendor/twenty-shared/RatingValues-DNSj7xKA.mjs +0 -224
- package/dist/vendor/twenty-shared/application/applicationManifestType.d.ts +0 -12
- package/dist/vendor/twenty-shared/application/applicationManifestType.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/application/packageJsonType.d.ts +0 -14
- package/dist/vendor/twenty-shared/application/packageJsonType.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/application/serverlessFunctionManifestType.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/isValidCountryCode-WBKj_GIR.js +0 -4
- package/dist/vendor/twenty-shared/metadata/standard-object-ids.d.ts +0 -51
- package/dist/vendor/twenty-shared/metadata/standard-object-ids.d.ts.map +0 -1
- /package/dist/cli/{types/api-response.types.d.ts → utilities/api/api-response-type.d.ts} +0 -0
- /package/dist/cli/{constants → utilities/config}/current-execution-directory.d.ts +0 -0
- /package/dist/cli/{utils/convert-to-label.d.ts → utilities/entity/entity-label.d.ts} +0 -0
- /package/dist/cli/{utils/get-role-base-file.d.ts → utilities/entity/entity-role-template.d.ts} +0 -0
- /package/dist/cli/{utils/find-path-file.d.ts → utilities/file/file-find.d.ts} +0 -0
- /package/dist/cli/{utils/format-path.d.ts → utilities/file/file-path.d.ts} +0 -0
- /package/dist/cli/{utils/format-and-warn-ts-diagnostics.d.ts → utilities/typescript/typescript-diagnostics.d.ts} +0 -0
- /package/dist/{application → sdk/common/types}/syncable-entity-options.type.d.ts +0 -0
- /package/dist/{application → sdk}/fields/field-type.d.ts +0 -0
- /package/dist/{application → sdk}/fields/on-delete-action.d.ts +0 -0
- /package/dist/{application → sdk}/fields/relation-type.d.ts +0 -0
- /package/dist/{application/functions → sdk/logic-functions}/triggers/cron-payload-type.d.ts +0 -0
- /package/dist/{application/functions → sdk/logic-functions}/triggers/database-event-payload-type.d.ts +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";function u(e,t,n){function r(s,c){var l;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(l=s._zod).traits??(l.traits=new Set),s._zod.traits.add(e),t(s,c);for(const m in a.prototype)m in s||Object.defineProperty(s,m,{value:a.prototype[m].bind(s)});s._zod.constr=a,s._zod.def=c}const o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(s){var c;const l=n?.Parent?new i:this;r(l,s),(c=l._zod).deferred??(c.deferred=[]);for(const m of l._zod.deferred)m();return l}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class K extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class at extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const st={};function x(e){return st}function Ft(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ge(e,t){return typeof t=="bigint"?t.toString():t}function $e(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function we(e){return e==null}function be(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Pe=Symbol("evaluating");function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Pe)return r===void 0&&(r=Pe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function B(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function q(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Ue(e){return JSON.stringify(e)}const ut="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ae(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Mt=$e(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function H(e){if(ae(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(ae(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ct(e){return H(e)?{...e}:Array.isArray(e)?[...e]:e}const Lt=new Set(["string","number","symbol"]);function fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function C(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function f(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function jt(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function xt(e,t){const n=e._zod.def,r=q(e._zod.def,{get shape(){const o={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=n.shape[i])}return B(this,"shape",o),o},checks:[]});return C(e,r)}function Vt(e,t){const n=e._zod.def,r=q(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete o[i]}return B(this,"shape",o),o},checks:[]});return C(e,r)}function Bt(e,t){if(!H(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=q(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return B(this,"shape",i),i},checks:[]});return C(e,o)}function qt(e,t){if(!H(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return B(this,"shape",r),r},checks:e._zod.def.checks};return C(e,n)}function Wt(e,t){const n=q(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return B(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return C(e,n)}function Kt(e,t,n){const r=q(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=e?new e({type:"optional",innerType:o[a]}):o[a])}else for(const a in o)i[a]=e?new e({type:"optional",innerType:o[a]}):o[a];return B(this,"shape",i),i},checks:[]});return C(t,r)}function Ht(e,t,n){const r=q(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return B(this,"shape",i),i},checks:[]});return C(t,r)}function W(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function lt(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function G(e){return typeof e=="string"?e:e?.message}function V(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=G(e.inst?._zod.def?.error?.(e))??G(t?.error?.(e))??G(n.customError?.(e))??G(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ze(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function X(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const ft=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ge,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},dt=u("$ZodError",ft),pt=u("$ZodError",ft,{Parent:Error});function Xt(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Yt(e,t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s}));else if(a.code==="invalid_key")o({issues:a.issues});else if(a.code==="invalid_element")o({issues:a.issues});else if(a.path.length===0)r._errors.push(n(a));else{let s=r,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(e),r}const Ee=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new K;if(a.issues.length){const s=new(o?.Err??e)(a.issues.map(c=>V(c,i,x())));throw ut(s,o?.callee),s}return a.value},ze=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new(o?.Err??e)(a.issues.map(c=>V(c,i,x())));throw ut(s,o?.callee),s}return a.value},de=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new K;return i.issues.length?{success:!1,error:new(e??dt)(i.issues.map(a=>V(a,o,x())))}:{success:!0,data:i.value}},Gt=de(pt),pe=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>V(a,o,x())))}:{success:!0,data:i.value}},Jt=pe(pt),Qt=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ee(e)(t,n,o)},en=e=>(t,n,r)=>Ee(e)(t,n,r),tn=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ze(e)(t,n,o)},nn=e=>async(t,n,r)=>ze(e)(t,n,r),rn=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return de(e)(t,n,o)},on=e=>(t,n,r)=>de(e)(t,n,r),an=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return pe(e)(t,n,o)},sn=e=>async(t,n,r)=>pe(e)(t,n,r),un=/^[cC][^\s-]{8,}$/,cn=/^[0-9a-z]+$/,ln=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fn=/^[0-9a-vA-V]{20}$/,dn=/^[A-Za-z0-9]{27}$/,pn=/^[a-zA-Z0-9_-]{21}$/,hn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ce=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,_n=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,gn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vn(){return new RegExp(gn,"u")}const yn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,An=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$n=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,wn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ht=/^[A-Za-z0-9_-]*$/,Zn=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,En=/^\+(?:[0-9]){6,14}[0-9]$/,mt="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zn=new RegExp(`^${mt}$`);function _t(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function In(e){return new RegExp(`^${_t(e)}$`)}function kn(e){const t=_t({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${mt}T(?:${r})$`)}const Tn=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},On=/^[^A-Z]*$/,Rn=/^[^a-z]*$/,N=u("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Sn=u("$ZodCheckMaxLength",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!we(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const a=Ze(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Nn=u("$ZodCheckMinLength",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!we(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const a=Ze(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Dn=u("$ZodCheckLengthEquals",(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!we(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const a=Ze(o),s=i>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),he=u("$ZodCheckStringFormat",(e,t)=>{var n,r;N.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Pn=u("$ZodCheckRegex",(e,t)=>{he.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Un=u("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=On),he.init(e,t)}),Cn=u("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Rn),he.init(e,t)}),Fn=u("$ZodCheckIncludes",(e,t)=>{N.init(e,t);const n=fe(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Mn=u("$ZodCheckStartsWith",(e,t)=>{N.init(e,t);const n=new RegExp(`^${fe(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Ln=u("$ZodCheckEndsWith",(e,t)=>{N.init(e,t);const n=new RegExp(`.*${fe(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),jn=u("$ZodCheckOverwrite",(e,t)=>{N.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class xn{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
2
|
-
`).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),i=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,o.join(`
|
|
3
|
-
`))}}const Vn={major:4,minor:1,patch:11},E=u("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Vn;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,s,c)=>{let l=W(a),m;for(const b of s){if(b._zod.def.when){if(!b._zod.def.when(a))continue}else if(l)continue;const g=a.issues.length,v=b._zod.check(a);if(v instanceof Promise&&c?.async===!1)throw new K;if(m||v instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await v,a.issues.length!==g&&(l||(l=W(a,g)))});else{if(a.issues.length===g)continue;l||(l=W(a,g))}}return m?m.then(()=>a):a},i=(a,s,c)=>{if(W(a))return a.aborted=!0,a;const l=o(s,r,c);if(l instanceof Promise){if(c.async===!1)throw new K;return l.then(m=>e._zod.parse(m,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){const l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(m=>i(m,a,s)):i(l,a,s)}const c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new K;return c.then(l=>o(l,r,s))}return o(c,r,s)}}e["~standard"]={validate:o=>{try{const i=Gt(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Jt(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),Ie=u("$ZodString",(e,t)=>{E.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Tn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),A=u("$ZodStringFormat",(e,t)=>{he.init(e,t),Ie.init(e,t)}),Bn=u("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=mn),A.init(e,t)}),qn=u("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ce(r))}else t.pattern??(t.pattern=Ce());A.init(e,t)}),Wn=u("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_n),A.init(e,t)}),Kn=u("$ZodURL",(e,t)=>{A.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Zn.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Hn=u("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vn()),A.init(e,t)}),Xn=u("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=pn),A.init(e,t)}),Yn=u("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=un),A.init(e,t)}),Gn=u("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=cn),A.init(e,t)}),Jn=u("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ln),A.init(e,t)}),Qn=u("$ZodXID",(e,t)=>{t.pattern??(t.pattern=fn),A.init(e,t)}),er=u("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=dn),A.init(e,t)}),tr=u("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=kn(t)),A.init(e,t)}),nr=u("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=zn),A.init(e,t)}),rr=u("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=In(t)),A.init(e,t)}),or=u("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=hn),A.init(e,t)}),ir=u("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=yn),A.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),ar=u("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=An),A.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),sr=u("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=$n),A.init(e,t)}),ur=u("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wn),A.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function gt(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const cr=u("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=bn),A.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{gt(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function lr(e){if(!ht.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return gt(n)}const fr=u("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ht),A.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{lr(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),dr=u("$ZodE164",(e,t)=>{t.pattern??(t.pattern=En),A.init(e,t)});function pr(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const hr=u("$ZodJWT",(e,t)=>{A.init(e,t),e._zod.check=n=>{pr(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),mr=u("$ZodUnknown",(e,t)=>{E.init(e,t),e._zod.parse=n=>n}),_r=u("$ZodNever",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Fe(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}const gr=u("$ZodArray",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let a=0;a<o.length;a++){const s=o[a],c=t.element._zod.run({value:s,issues:[]},r);c instanceof Promise?i.push(c.then(l=>Fe(l,n,a))):Fe(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function se(e,t,n,r){e.issues.length&&t.issues.push(...lt(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function vt(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=jt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function yt(e,t,n,r,o,i){const a=[],s=o.keySet,c=o.catchall._zod,l=c.def.type;for(const m of Object.keys(t)){if(s.has(m))continue;if(l==="never"){a.push(m);continue}const b=c.run({value:t[m],issues:[]},r);b instanceof Promise?e.push(b.then(g=>se(g,n,m,t))):se(b,n,m,t)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const vr=u("$ZodObject",(e,t)=>{if(E.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=$e(()=>vt(t));y(e._zod,"propValues",()=>{const s=t.shape,c={};for(const l in s){const m=s[l]._zod;if(m.values){c[l]??(c[l]=new Set);for(const b of m.values)c[l].add(b)}}return c});const o=ae,i=t.catchall;let a;e._zod.parse=(s,c)=>{a??(a=r.value);const l=s.value;if(!o(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};const m=[],b=a.shape;for(const g of a.keys){const $=b[g]._zod.run({value:l[g],issues:[]},c);$ instanceof Promise?m.push($.then(U=>se(U,s,g,l))):se($,s,g,l)}return i?yt(m,l,s,c,r.value,e):m.length?Promise.all(m).then(()=>s):s}}),yr=u("$ZodObjectJIT",(e,t)=>{vr.init(e,t);const n=e._zod.parse,r=$e(()=>vt(t)),o=g=>{const v=new xn(["shape","payload","ctx"]),$=r.value,U=R=>{const p=Ue(R);return`shape[${p}]._zod.run({ value: input[${p}], issues: [] }, ctx)`};v.write("const input = payload.value;");const M=Object.create(null);let L=0;for(const R of $.keys)M[R]=`key_${L++}`;v.write("const newResult = {};");for(const R of $.keys){const p=M[R],T=Ue(R);v.write(`const ${p} = ${U(R)};`),v.write(`
|
|
4
|
-
if (${p}.issues.length) {
|
|
5
|
-
payload.issues = payload.issues.concat(${p}.issues.map(iss => ({
|
|
6
|
-
...iss,
|
|
7
|
-
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
8
|
-
})));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (${p}.value === undefined) {
|
|
13
|
-
if (${T} in input) {
|
|
14
|
-
newResult[${T}] = undefined;
|
|
15
|
-
}
|
|
16
|
-
} else {
|
|
17
|
-
newResult[${T}] = ${p}.value;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
`)}v.write("payload.value = newResult;"),v.write("return payload;");const j=v.compile();return(R,p)=>j(g,R,p)};let i;const a=ae,s=!st.jitless,l=s&&Mt.value,m=t.catchall;let b;e._zod.parse=(g,v)=>{b??(b=r.value);const $=g.value;return a($)?s&&l&&v?.async===!1&&v.jitless!==!0?(i||(i=o(t.shape)),g=i(g,v),m?yt([],$,g,v,b,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:$,inst:e}),g)}});function Me(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!W(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>V(a,r,x())))}),t)}const Ar=u("$ZodUnion",(e,t)=>{E.init(e,t),y(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),y(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),y(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),y(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>be(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let a=!1;const s=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>Me(c,o,e,i)):Me(s,o,e,i)}}),$r=u("$ZodIntersection",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>Le(n,c,l)):Le(n,i,a)}});function ve(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(H(e)&&H(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const a=ve(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],a=ve(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Le(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),W(e))return e;const r=ve(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const wr=u("$ZodEnum",(e,t)=>{E.init(e,t);const n=Ft(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Lt.has(typeof o)).map(o=>typeof o=="string"?fe(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),br=u("$ZodTransform",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new at(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new K;return n.value=o,n}});function je(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Zr=u("$ZodOptional",(e,t)=>{E.init(e,t),e._zod.optin="optional",e._zod.optout="optional",y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),y(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${be(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>je(i,n.value)):je(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Er=u("$ZodNullable",(e,t)=>{E.init(e,t),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${be(n.source)}|null)$`):void 0}),y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),zr=u("$ZodDefault",(e,t)=>{E.init(e,t),e._zod.optin="optional",y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>xe(i,t)):xe(o,t)}});function xe(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Ir=u("$ZodPrefault",(e,t)=>{E.init(e,t),e._zod.optin="optional",y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),kr=u("$ZodNonOptional",(e,t)=>{E.init(e,t),y(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Ve(i,e)):Ve(o,e)}});function Ve(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Tr=u("$ZodCatch",(e,t)=>{E.init(e,t),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>V(a,r,x()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>V(i,r,x()))},input:n.value}),n.issues=[]),n)}}),Or=u("$ZodPipe",(e,t)=>{E.init(e,t),y(e._zod,"values",()=>t.in._zod.values),y(e._zod,"optin",()=>t.in._zod.optin),y(e._zod,"optout",()=>t.out._zod.optout),y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(a=>J(a,t.in,r)):J(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>J(i,t.out,r)):J(o,t.out,r)}});function J(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Rr=u("$ZodReadonly",(e,t)=>{E.init(e,t),y(e._zod,"propValues",()=>t.innerType._zod.propValues),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Be):Be(o)}});function Be(e){return e.value=Object.freeze(e.value),e}const Sr=u("$ZodCustom",(e,t)=>{N.init(e,t),E.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>qe(i,n,r,e));qe(o,n,r,e)}});function qe(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(X(o))}}class Nr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Dr(){return new Nr}const Q=Dr();function Pr(e,t){return new e({type:"string",...f(t)})}function Ur(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...f(t)})}function We(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...f(t)})}function Cr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...f(t)})}function Fr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...f(t)})}function Mr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...f(t)})}function Lr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...f(t)})}function jr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...f(t)})}function xr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...f(t)})}function Vr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...f(t)})}function Br(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...f(t)})}function qr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...f(t)})}function Wr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...f(t)})}function Kr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...f(t)})}function Hr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...f(t)})}function Xr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...f(t)})}function Yr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...f(t)})}function Gr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...f(t)})}function Jr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...f(t)})}function Qr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...f(t)})}function eo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...f(t)})}function to(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...f(t)})}function no(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...f(t)})}function ro(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...f(t)})}function oo(e,t){return new e({type:"string",format:"date",check:"string_format",...f(t)})}function io(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...f(t)})}function ao(e,t){return new e({type:"string",format:"duration",check:"string_format",...f(t)})}function so(e){return new e({type:"unknown"})}function uo(e,t){return new e({type:"never",...f(t)})}function At(e,t){return new Sn({check:"max_length",...f(t),maximum:e})}function ue(e,t){return new Nn({check:"min_length",...f(t),minimum:e})}function $t(e,t){return new Dn({check:"length_equals",...f(t),length:e})}function co(e,t){return new Pn({check:"string_format",format:"regex",...f(t),pattern:e})}function lo(e){return new Un({check:"string_format",format:"lowercase",...f(e)})}function fo(e){return new Cn({check:"string_format",format:"uppercase",...f(e)})}function po(e,t){return new Fn({check:"string_format",format:"includes",...f(t),includes:e})}function ho(e,t){return new Mn({check:"string_format",format:"starts_with",...f(t),prefix:e})}function mo(e,t){return new Ln({check:"string_format",format:"ends_with",...f(t),suffix:e})}function Y(e){return new jn({check:"overwrite",tx:e})}function _o(e){return Y(t=>t.normalize(e))}function go(){return Y(e=>e.trim())}function vo(){return Y(e=>e.toLowerCase())}function yo(){return Y(e=>e.toUpperCase())}function Ao(e,t,n){return new e({type:"array",element:t,...f(n)})}function $o(e,t,n){return new e({type:"custom",check:"custom",fn:t,...f(n)})}function wo(e){const t=bo(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(X(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(X(o))}},e(n.value,n)));return t}function bo(e,t){const n=new N({check:"custom",...f(t)});return n._zod.check=e,n}const Zo=u("ZodISODateTime",(e,t)=>{tr.init(e,t),w.init(e,t)});function Eo(e){return ro(Zo,e)}const zo=u("ZodISODate",(e,t)=>{nr.init(e,t),w.init(e,t)});function Io(e){return oo(zo,e)}const ko=u("ZodISOTime",(e,t)=>{rr.init(e,t),w.init(e,t)});function To(e){return io(ko,e)}const Oo=u("ZodISODuration",(e,t)=>{or.init(e,t),w.init(e,t)});function Ro(e){return ao(Oo,e)}const So=(e,t)=>{dt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Yt(e,n)},flatten:{value:n=>Xt(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ge,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ge,2)}},isEmpty:{get(){return e.issues.length===0}}})},O=u("ZodError",So,{Parent:Error}),No=Ee(O),Do=ze(O),Po=de(O),Uo=pe(O),Co=Qt(O),Fo=en(O),Mo=tn(O),Lo=nn(O),jo=rn(O),xo=on(O),Vo=an(O),Bo=sn(O),z=u("ZodType",(e,t)=>(E.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(q(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>C(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>No(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Po(e,n,r),e.parseAsync=async(n,r)=>Do(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Uo(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Co(e,n,r),e.decode=(n,r)=>Fo(e,n,r),e.encodeAsync=async(n,r)=>Mo(e,n,r),e.decodeAsync=async(n,r)=>Lo(e,n,r),e.safeEncode=(n,r)=>jo(e,n,r),e.safeDecode=(n,r)=>xo(e,n,r),e.safeEncodeAsync=async(n,r)=>Vo(e,n,r),e.safeDecodeAsync=async(n,r)=>Bo(e,n,r),e.refine=(n,r)=>e.check(Pi(n,r)),e.superRefine=n=>e.check(Ui(n)),e.overwrite=n=>e.check(Y(n)),e.optional=()=>Ye(e),e.nullable=()=>Ge(e),e.nullish=()=>Ye(Ge(e)),e.nonoptional=n=>ki(e,n),e.array=()=>pi(e),e.or=n=>gi([e,n]),e.and=n=>yi(e,n),e.transform=n=>Je(e,wi(n)),e.default=n=>Ei(e,n),e.prefault=n=>Ii(e,n),e.catch=n=>Oi(e,n),e.pipe=n=>Je(e,n),e.readonly=()=>Ni(e),e.describe=n=>{const r=e.clone();return Q.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Q.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Q.get(e);const r=e.clone();return Q.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),wt=u("_ZodString",(e,t)=>{Ie.init(e,t),z.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(co(...r)),e.includes=(...r)=>e.check(po(...r)),e.startsWith=(...r)=>e.check(ho(...r)),e.endsWith=(...r)=>e.check(mo(...r)),e.min=(...r)=>e.check(ue(...r)),e.max=(...r)=>e.check(At(...r)),e.length=(...r)=>e.check($t(...r)),e.nonempty=(...r)=>e.check(ue(1,...r)),e.lowercase=r=>e.check(lo(r)),e.uppercase=r=>e.check(fo(r)),e.trim=()=>e.check(go()),e.normalize=(...r)=>e.check(_o(...r)),e.toLowerCase=()=>e.check(vo()),e.toUpperCase=()=>e.check(yo())}),qo=u("ZodString",(e,t)=>{Ie.init(e,t),wt.init(e,t),e.email=n=>e.check(Ur(Wo,n)),e.url=n=>e.check(jr(Ko,n)),e.jwt=n=>e.check(no(ui,n)),e.emoji=n=>e.check(xr(Ho,n)),e.guid=n=>e.check(We(He,n)),e.uuid=n=>e.check(Cr(ee,n)),e.uuidv4=n=>e.check(Fr(ee,n)),e.uuidv6=n=>e.check(Mr(ee,n)),e.uuidv7=n=>e.check(Lr(ee,n)),e.nanoid=n=>e.check(Vr(Xo,n)),e.guid=n=>e.check(We(He,n)),e.cuid=n=>e.check(Br(Yo,n)),e.cuid2=n=>e.check(qr(Go,n)),e.ulid=n=>e.check(Wr(Jo,n)),e.base64=n=>e.check(Qr(ii,n)),e.base64url=n=>e.check(eo(ai,n)),e.xid=n=>e.check(Kr(Qo,n)),e.ksuid=n=>e.check(Hr(ei,n)),e.ipv4=n=>e.check(Xr(ti,n)),e.ipv6=n=>e.check(Yr(ni,n)),e.cidrv4=n=>e.check(Gr(ri,n)),e.cidrv6=n=>e.check(Jr(oi,n)),e.e164=n=>e.check(to(si,n)),e.datetime=n=>e.check(Eo(n)),e.date=n=>e.check(Io(n)),e.time=n=>e.check(To(n)),e.duration=n=>e.check(Ro(n))});function Ke(e){return Pr(qo,e)}const w=u("ZodStringFormat",(e,t)=>{A.init(e,t),wt.init(e,t)}),Wo=u("ZodEmail",(e,t)=>{Wn.init(e,t),w.init(e,t)}),He=u("ZodGUID",(e,t)=>{Bn.init(e,t),w.init(e,t)}),ee=u("ZodUUID",(e,t)=>{qn.init(e,t),w.init(e,t)}),Ko=u("ZodURL",(e,t)=>{Kn.init(e,t),w.init(e,t)}),Ho=u("ZodEmoji",(e,t)=>{Hn.init(e,t),w.init(e,t)}),Xo=u("ZodNanoID",(e,t)=>{Xn.init(e,t),w.init(e,t)}),Yo=u("ZodCUID",(e,t)=>{Yn.init(e,t),w.init(e,t)}),Go=u("ZodCUID2",(e,t)=>{Gn.init(e,t),w.init(e,t)}),Jo=u("ZodULID",(e,t)=>{Jn.init(e,t),w.init(e,t)}),Qo=u("ZodXID",(e,t)=>{Qn.init(e,t),w.init(e,t)}),ei=u("ZodKSUID",(e,t)=>{er.init(e,t),w.init(e,t)}),ti=u("ZodIPv4",(e,t)=>{ir.init(e,t),w.init(e,t)}),ni=u("ZodIPv6",(e,t)=>{ar.init(e,t),w.init(e,t)}),ri=u("ZodCIDRv4",(e,t)=>{sr.init(e,t),w.init(e,t)}),oi=u("ZodCIDRv6",(e,t)=>{ur.init(e,t),w.init(e,t)}),ii=u("ZodBase64",(e,t)=>{cr.init(e,t),w.init(e,t)}),ai=u("ZodBase64URL",(e,t)=>{fr.init(e,t),w.init(e,t)}),si=u("ZodE164",(e,t)=>{dr.init(e,t),w.init(e,t)}),ui=u("ZodJWT",(e,t)=>{hr.init(e,t),w.init(e,t)}),ci=u("ZodUnknown",(e,t)=>{mr.init(e,t),z.init(e,t)});function Xe(){return so(ci)}const li=u("ZodNever",(e,t)=>{_r.init(e,t),z.init(e,t)});function fi(e){return uo(li,e)}const di=u("ZodArray",(e,t)=>{gr.init(e,t),z.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(ue(n,r)),e.nonempty=n=>e.check(ue(1,n)),e.max=(n,r)=>e.check(At(n,r)),e.length=(n,r)=>e.check($t(n,r)),e.unwrap=()=>e.element});function pi(e,t){return Ao(di,e,t)}const hi=u("ZodObject",(e,t)=>{yr.init(e,t),z.init(e,t),y(e,"shape",()=>t.shape),e.keyof=()=>Ai(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Xe()}),e.loose=()=>e.clone({...e._zod.def,catchall:Xe()}),e.strict=()=>e.clone({...e._zod.def,catchall:fi()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Bt(e,n),e.safeExtend=n=>qt(e,n),e.merge=n=>Wt(e,n),e.pick=n=>xt(e,n),e.omit=n=>Vt(e,n),e.partial=(...n)=>Kt(bt,e,n[0]),e.required=(...n)=>Ht(Zt,e,n[0])});function mi(e,t){const n={type:"object",shape:e??{},...f(t)};return new hi(n)}const _i=u("ZodUnion",(e,t)=>{Ar.init(e,t),z.init(e,t),e.options=t.options});function gi(e,t){return new _i({type:"union",options:e,...f(t)})}const vi=u("ZodIntersection",(e,t)=>{$r.init(e,t),z.init(e,t)});function yi(e,t){return new vi({type:"intersection",left:e,right:t})}const ye=u("ZodEnum",(e,t)=>{wr.init(e,t),z.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const a of r)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ye({...t,checks:[],...f(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const a of r)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ye({...t,checks:[],...f(o),entries:i})}});function Ai(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ye({type:"enum",entries:n,...f(t)})}const $i=u("ZodTransform",(e,t)=>{br.init(e,t),z.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new at(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(X(i,n.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(X(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function wi(e){return new $i({type:"transform",transform:e})}const bt=u("ZodOptional",(e,t)=>{Zr.init(e,t),z.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ye(e){return new bt({type:"optional",innerType:e})}const bi=u("ZodNullable",(e,t)=>{Er.init(e,t),z.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ge(e){return new bi({type:"nullable",innerType:e})}const Zi=u("ZodDefault",(e,t)=>{zr.init(e,t),z.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ei(e,t){return new Zi({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ct(t)}})}const zi=u("ZodPrefault",(e,t)=>{Ir.init(e,t),z.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ii(e,t){return new zi({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ct(t)}})}const Zt=u("ZodNonOptional",(e,t)=>{kr.init(e,t),z.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ki(e,t){return new Zt({type:"nonoptional",innerType:e,...f(t)})}const Ti=u("ZodCatch",(e,t)=>{Tr.init(e,t),z.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Oi(e,t){return new Ti({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Ri=u("ZodPipe",(e,t)=>{Or.init(e,t),z.init(e,t),e.in=t.in,e.out=t.out});function Je(e,t){return new Ri({type:"pipe",in:e,out:t})}const Si=u("ZodReadonly",(e,t)=>{Rr.init(e,t),z.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ni(e){return new Si({type:"readonly",innerType:e})}const Di=u("ZodCustom",(e,t)=>{Sr.init(e,t),z.init(e,t)});function Pi(e,t={}){return $o(Di,e,t)}function Ui(e){return wo(e)}var me=function(){function e(t){this.groups=[],this.each=!1,this.context=void 0,this.type=t.type,this.name=t.name,this.target=t.target,this.propertyName=t.propertyName,this.constraints=t?.constraints,this.constraintCls=t.constraintCls,this.validationTypeOptions=t.validationTypeOptions,t.validationOptions&&(this.message=t.validationOptions.message,this.groups=t.validationOptions.groups,this.always=t.validationOptions.always,this.each=t.validationOptions.each,this.context=t.validationOptions.context)}return e}(),Ci=function(){function e(){}return e.prototype.transform=function(t){var n=[];return Object.keys(t.properties).forEach(function(r){t.properties[r].forEach(function(o){var i={message:o.message,groups:o.groups,always:o.always,each:o.each},a={type:o.type,name:o.name,target:t.name,propertyName:r,constraints:o.constraints,validationTypeOptions:o.options,validationOptions:i};n.push(new me(a))})}),n},e}();function Fi(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof window<"u")return window;if(typeof self<"u")return self}var Mi=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Qe=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},Li=function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},Et=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(t){var n=this,r=new Ci().transform(t);r.forEach(function(o){return n.addValidationMetadata(o)})},e.prototype.addValidationMetadata=function(t){var n=this.validationMetadatas.get(t.target);n?n.push(t):this.validationMetadatas.set(t.target,[t])},e.prototype.addConstraintMetadata=function(t){var n=this.constraintMetadatas.get(t.target);n?n.push(t):this.constraintMetadatas.set(t.target,[t])},e.prototype.groupByPropertyName=function(t){var n={};return t.forEach(function(r){n[r.propertyName]||(n[r.propertyName]=[]),n[r.propertyName].push(r)}),n},e.prototype.getTargetValidationMetadatas=function(t,n,r,o,i){var a,s,c=function(p){return typeof p.always<"u"?p.always:p.groups&&p.groups.length?!1:r},l=function(p){return!!(o&&(!i||!i.length)&&p.groups&&p.groups.length)},m=this.validationMetadatas.get(t)||[],b=m.filter(function(p){return p.target!==t&&p.target!==n?!1:c(p)?!0:l(p)?!1:i&&i.length>0?p.groups&&!!p.groups.find(function(T){return i.indexOf(T)!==-1}):!0}),g=[];try{for(var v=Mi(this.validationMetadatas.entries()),$=v.next();!$.done;$=v.next()){var U=Qe($.value,2),M=U[0],L=U[1];t.prototype instanceof M&&g.push.apply(g,Li([],Qe(L),!1))}}catch(p){a={error:p}}finally{try{$&&!$.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}var j=g.filter(function(p){return typeof p.target=="string"||p.target===t||p.target instanceof Function&&!(t.prototype instanceof p.target)?!1:c(p)?!0:l(p)?!1:i&&i.length>0?p.groups&&!!p.groups.find(function(T){return i.indexOf(T)!==-1}):!0}),R=j.filter(function(p){return!b.find(function(T){return T.propertyName===p.propertyName&&T.type===p.type})});return b.concat(R)},e.prototype.getTargetValidatorConstraints=function(t){return this.constraintMetadatas.get(t)||[]},e}();function ce(){var e=Fi();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new Et),e.classValidatorMetadataStorage}var le=function(){function e(){}return e.isValid=function(t){var n=this;return t!=="isValid"&&t!=="getMessage"&&Object.keys(this).map(function(r){return n[r]}).indexOf(t)!==-1},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}(),ji=new(function(){function e(){this.instances=[]}return e.prototype.get=function(t){var n=this.instances.find(function(r){return r.type===t});return n||(n={type:t,object:new t},this.instances.push(n)),n.object},e}());function zt(e){return ji.get(e)}var xi=function(){function e(t,n,r){r===void 0&&(r=!1),this.target=t,this.name=n,this.async=r}return Object.defineProperty(e.prototype,"instance",{get:function(){return zt(this.target)},enumerable:!1,configurable:!0}),e}();function It(e){var t;if(e.validator instanceof Function){t=e.validator;var n=zt(Et).getTargetValidatorConstraints(e.validator);if(n.length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var r=e.validator;t=function(){function i(){}return i.prototype.validate=function(a,s){return r.validate(a,s)},i.prototype.defaultMessage=function(a){return r.defaultMessage?r.defaultMessage(a):""},i}(),ce().addConstraintMetadata(new xi(t,e.name,e.async))}var o={type:e.name&&le.isValid(e.name)?e.name:le.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};ce().addValidationMetadata(new me(o))}function D(e,t){return function(n){var r="";return e(r,n)}}function P(e,t){return function(n,r){It({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}var Vi="isOptional";function Bi(e){return function(t,n){var r={type:le.CONDITIONAL_VALIDATION,name:Vi,target:t.constructor,propertyName:n,constraints:[function(o,i){return o[n]!==null&&o[n]!==void 0}],validationOptions:e};ce().addValidationMetadata(new me(r))}}function _(e,t){return function(n,r){var o={type:le.CONDITIONAL_VALIDATION,target:n.constructor,propertyName:r,constraints:[e],validationOptions:t};ce().addValidationMetadata(new me(o))}}var qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var te={exports:{}},et;function Te(){return et||(et=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){if(r==null)throw new TypeError("Expected a string but received a ".concat(r));if(r.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(r.constructor.name))}e.exports=t.default,e.exports.default=t.default}(te,te.exports)),te.exports}var Wi="isNotEmpty";function Ki(e){return e!==""&&e!==null&&e!==void 0}function kt(e){return P({name:Wi,validator:{validate:function(t,n){return Ki(t)},defaultMessage:D(function(t){return t+"$property should not be empty"})}},e)}var Z={},tt;function Hi(){if(tt)return Z;tt=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.farsiLocales=Z.englishLocales=Z.dotDecimal=Z.decimal=Z.commaDecimal=Z.bengaliLocales=Z.arabicLocales=Z.alphanumeric=Z.alpha=void 0;for(var e=Z.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"kk-KZ":/^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/,"ta-IN":/^[\u0B80-\u0BFF]+$/i,"te-IN":/^[\u0C00-\u0C7F]+$/i,"kn-IN":/^[\u0C80-\u0CFF]+$/i,"ml-IN":/^[\u0D00-\u0D7F]+$/i,"gu-IN":/^[\u0A80-\u0AFF]+$/i,"pa-IN":/^[\u0A00-\u0A7F]+$/i,"or-IN":/^[\u0B00-\u0B7F]+$/i},t=Z.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"kk-KZ":/^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/,"ta-IN":/^[0-9\u0B80-\u0BFF.]+$/i,"te-IN":/^[0-9\u0C00-\u0C7F.]+$/i,"kn-IN":/^[0-9\u0C80-\u0CFF.]+$/i,"ml-IN":/^[0-9\u0D00-\u0D7F.]+$/i,"gu-IN":/^[0-9\u0A80-\u0AFF.]+$/i,"pa-IN":/^[0-9\u0A00-\u0A7F.]+$/i,"or-IN":/^[0-9\u0B00-\u0B7F.]+$/i},n=Z.decimal={"en-US":".",ar:"٫"},r=Z.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"],o,i=0;i<r.length;i++)o="en-".concat(r[i]),e[o]=e["en-US"],t[o]=t["en-US"],n[o]=n["en-US"];for(var a=Z.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],s,c=0;c<a.length;c++)s="ar-".concat(a[c]),e[s]=e.ar,t[s]=t.ar,n[s]=n.ar;for(var l=Z.farsiLocales=["IR","AF"],m,b=0;b<l.length;b++)m="fa-".concat(l[b]),t[m]=t.fa,n[m]=n.ar;for(var g=Z.bengaliLocales=["BD","IN"],v,$=0;$<g.length;$++)v="bn-".concat(g[$]),e[v]=e.bn,t[v]=t.bn,n[v]=n["en-US"];for(var U=Z.dotDecimal=["ar-EG","ar-LB","ar-LY"],M=Z.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","gu-IN","hi-IN","hu-HU","id-ID","it-IT","kk-KZ","kn-IN","ku-IQ","ml-IN","nb-NO","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","pt-PT","ru-RU","si-LK","sl-SI","sr-RS","sr-RS@latin","sv-SE","ta-IN","te-IN","tr-TR","uk-UA","vi-VN"],L=0;L<U.length;L++)n[U[L]]=n["en-US"];for(var j=0;j<M.length;j++)n[M[j]]=",";return e["fr-CA"]=e["fr-FR"],t["fr-CA"]=t["fr-FR"],e["pt-BR"]=e["pt-PT"],t["pt-BR"]=t["pt-PT"],n["pt-BR"]=n["pt-PT"],e["pl-Pl"]=e["pl-PL"],t["pl-Pl"]=t["pl-PL"],n["pl-Pl"]=n["pl-PL"],e["fa-AF"]=e.fa,Z}var ne={exports:{}},nt;function Xi(){return nt||(nt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(Te());function r(a){return a&&a.__esModule?a:{default:a}}var o={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,loose:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};function i(a,s){return(0,n.default)(a),s==null&&(s="all"),s in o?o[s].test(a):!1}e.exports=t.default,e.exports.default=t.default}(ne,ne.exports)),ne.exports}var Yi=Xi();const Gi=ke(Yi);var Ji="isUuid";function Qi(e,t){return typeof e=="string"&&Gi(e,t)}function ea(e,t){return P({name:Ji,constraints:[e],validator:{validate:function(n,r){return Qi(n,r?.constraints[0])},defaultMessage:D(function(n){return n+"$property must be a UUID"})}},t)}var re={exports:{}},rt;function ta(){return rt||(rt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(Te());function r(i){return i&&i.__esModule?i:{default:i}}function o(i,a,s){return(0,n.default)(i),Object.prototype.toString.call(a)!=="[object RegExp]"&&(a=new RegExp(a,s)),!!i.match(a)}e.exports=t.default,e.exports.default=t.default}(re,re.exports)),re.exports}var na=ta();const ra=ke(na);var oa="matches";function ia(e,t,n){return typeof e=="string"&&ra(e,t,n)}function Tt(e,t,n){var r;return r=t,P({name:oa,constraints:[e,r],validator:{validate:function(o,i){return ia(o,i?.constraints[0],i?.constraints[1])},defaultMessage:D(function(o,i){return o+"$property must match $constraint1 regular expression"})}},n)}var oe={exports:{}},ot;function aa(){return ot||(ot=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=o(Te()),r=Hi();function o(s){return s&&s.__esModule?s:{default:s}}var i=/^[0-9]+$/;function a(s,c){return(0,n.default)(s),c&&c.no_symbols?i.test(s):new RegExp("^[+-]?([0-9]*[".concat((c||{}).locale?r.decimal[c.locale]:".","])?[0-9]+$")).test(s)}e.exports=t.default,e.exports.default=t.default}(oe,oe.exports)),oe.exports}var sa=aa();const ua=ke(sa);var ca="isNumberString";function la(e,t){return typeof e=="string"&&ua(e,t)}function fa(e,t){return P({name:ca,constraints:[e],validator:{validate:function(n,r){return la(n,r?.constraints[0])},defaultMessage:D(function(n){return n+"$property must be a number string"})}},t)}var da="isBoolean";function pa(e){return e instanceof Boolean||typeof e=="boolean"}function ha(e){return P({name:da,validator:{validate:function(t,n){return pa(t)},defaultMessage:D(function(t){return t+"$property must be a boolean value"})}},e)}var ma="isDate";function _a(e){return e instanceof Date&&!isNaN(e.getTime())}function Ot(e){return P({name:ma,validator:{validate:function(t,n){return _a(t)},defaultMessage:D(function(t){return t+"$property must be a Date instance"})}},e)}var ga="isNumber";function va(e,t){if(t===void 0&&(t={}),typeof e!="number")return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(t.maxDecimalPlaces!==void 0){var n=0;if(e%1!==0&&(n=e.toString().split(".")[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}function Oe(e,t){return e===void 0&&(e={}),P({name:ga,constraints:[e],validator:{validate:function(n,r){return va(n,r?.constraints[0])},defaultMessage:D(function(n){return n+"$property must be a number conforming to the specified constraints"})}},t)}var ya="isString";function Aa(e){return e instanceof String||typeof e=="string"}function S(e){return P({name:ya,validator:{validate:function(t,n){return Aa(t)},defaultMessage:D(function(t){return t+"$property must be a string"})}},e)}var $a="isArray";function wa(e){return Array.isArray(e)}function Re(e){return P({name:$a,validator:{validate:function(t,n){return wa(t)},defaultMessage:D(function(t){return t+"$property must be an array"})}},e)}var ba="isObject";function Za(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&!Array.isArray(e)}function Se(e){return P({name:ba,validator:{validate:function(t,n){return Za(t)},defaultMessage:D(function(t){return t+"$property must be an object"})}},e)}let ie;const Ea=new Uint8Array(16);function za(){if(!ie&&(ie=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ie))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ie(Ea)}const I=[];for(let e=0;e<256;++e)I.push((e+256).toString(16).slice(1));function Ia(e,t=0){return I[e[t+0]]+I[e[t+1]]+I[e[t+2]]+I[e[t+3]]+"-"+I[e[t+4]]+I[e[t+5]]+"-"+I[e[t+6]]+I[e[t+7]]+"-"+I[e[t+8]]+I[e[t+9]]+"-"+I[e[t+10]]+I[e[t+11]]+I[e[t+12]]+I[e[t+13]]+I[e[t+14]]+I[e[t+15]]}const ka=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),it={randomUUID:ka};function Ta(e,t,n){if(it.randomUUID&&!e)return it.randomUUID();e=e||{};const r=e.random||(e.rng||za)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ia(r)}var d=(e=>(e.UUID="UUID",e.TEXT="TEXT",e.PHONES="PHONES",e.EMAILS="EMAILS",e.DATE_TIME="DATE_TIME",e.DATE="DATE",e.BOOLEAN="BOOLEAN",e.NUMBER="NUMBER",e.NUMERIC="NUMERIC",e.LINKS="LINKS",e.CURRENCY="CURRENCY",e.FULL_NAME="FULL_NAME",e.RATING="RATING",e.SELECT="SELECT",e.MULTI_SELECT="MULTI_SELECT",e.RELATION="RELATION",e.MORPH_RELATION="MORPH_RELATION",e.POSITION="POSITION",e.ADDRESS="ADDRESS",e.RAW_JSON="RAW_JSON",e.RICH_TEXT="RICH_TEXT",e.RICH_TEXT_V2="RICH_TEXT_V2",e.ACTOR="ACTOR",e.ARRAY="ARRAY",e.TS_VECTOR="TS_VECTOR",e))(d||{}),Ae=(e=>(e.EMAIL="EMAIL",e.CALENDAR="CALENDAR",e.WORKFLOW="WORKFLOW",e.AGENT="AGENT",e.API="API",e.IMPORT="IMPORT",e.MANUAL="MANUAL",e.SYSTEM="SYSTEM",e.WEBHOOK="WEBHOOK",e.APPLICATION="APPLICATION",e))(Ae||{});const Oa={type:d.ACTOR,properties:[{name:"source",type:d.SELECT,hidden:!1,isRequired:!0,options:Object.keys(Ae).map((e,t)=>({id:Ta(),label:`${Ae[e].toLowerCase()}`,value:e,position:t}))},{name:"workspaceMemberId",type:d.UUID,hidden:"input",isRequired:!1},{name:"name",type:d.TEXT,hidden:"input",isRequired:!0},{name:"context",type:d.RAW_JSON,hidden:!1,isRequired:!1}]},Ra={type:d.ADDRESS,properties:[{name:"addressStreet1",type:d.TEXT,hidden:!1,isRequired:!1},{name:"addressStreet2",type:d.TEXT,hidden:!1,isRequired:!1},{name:"addressCity",type:d.TEXT,hidden:!1,isRequired:!1},{name:"addressPostcode",type:d.TEXT,hidden:!1,isRequired:!1},{name:"addressState",type:d.TEXT,hidden:!1,isRequired:!1},{name:"addressCountry",type:d.TEXT,hidden:!1,isRequired:!1},{name:"addressLat",type:d.NUMERIC,hidden:!1,isRequired:!1},{name:"addressLng",type:d.NUMERIC,hidden:!1,isRequired:!1}]},Sa={type:d.CURRENCY,properties:[{name:"amountMicros",type:d.NUMERIC,hidden:!1,isRequired:!1},{name:"currencyCode",type:d.TEXT,hidden:!1,isRequired:!1}]},Na={type:d.EMAILS,properties:[{name:"primaryEmail",type:d.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:"additionalEmails",type:d.RAW_JSON,hidden:!1,isRequired:!1}]},Da={type:d.FULL_NAME,properties:[{name:"firstName",type:d.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1},{name:"lastName",type:d.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1}]},Pa={type:d.LINKS,properties:[{name:"primaryLinkLabel",type:d.TEXT,hidden:!1,isRequired:!1},{name:"primaryLinkUrl",type:d.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:"secondaryLinks",type:d.RAW_JSON,hidden:!1,isRequired:!1}]},Ua={type:d.PHONES,properties:[{name:"primaryPhoneNumber",type:d.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:"primaryPhoneCountryCode",type:d.TEXT,hidden:!1,isRequired:!1},{name:"primaryPhoneCallingCode",type:d.TEXT,hidden:!1,isRequired:!1},{name:"additionalPhones",type:d.RAW_JSON,hidden:!1,isRequired:!1}]},Ca={type:d.RICH_TEXT_V2,properties:[{name:"blocknote",type:d.TEXT,hidden:!1,isRequired:!1},{name:"markdown",type:d.TEXT,hidden:!1,isRequired:!1}]};mi({blocknote:Ke().nullable().optional(),markdown:Ke().nullable()});d.LINKS,d.CURRENCY,d.FULL_NAME,d.ADDRESS,d.ACTOR,d.EMAILS,d.PHONES,d.RICH_TEXT_V2;var Fa=Object.defineProperty,h=(e,t,n,r)=>{for(var o=void 0,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=a(t,n,o)||o);return o&&Fa(t,n,o),o};const k=e=>(t,n)=>{It({name:"isQuotedString",target:t.constructor,propertyName:n,options:e,validator:{validate:r=>typeof r=="string"&&/^'{1}.*'{1}$/.test(r),defaultMessage:r=>`${r.property} must be a quoted string`}})},Rt={UUID:"uuid",NOW:"now"};class Ma{}h([_((e,t)=>t!==null),k()],Ma.prototype,"value");class La{}h([_((e,t)=>t!==null),Se()],La.prototype,"value");class St{}h([_((e,t)=>t!==null),k()],St.prototype,"blocknote");h([_((e,t)=>t!==null),k()],St.prototype,"markdown");class ja{}h([_((e,t)=>t!==null),S()],ja.prototype,"value");class xa{}h([_((e,t)=>t!==null),Oe()],xa.prototype,"value");class Va{}h([_((e,t)=>t!==null),ha()],Va.prototype,"value");class Ba{}h([_((e,t)=>t!==null),Re(),k({each:!0})],Ba.prototype,"value");class qa{}h([_((e,t)=>t!==null),Ot()],qa.prototype,"value");class Wa{}h([_((e,t)=>t!==null),Ot()],Wa.prototype,"value");class Nt{}h([_((e,t)=>t!==null),fa()],Nt.prototype,"amountMicros");h([_((e,t)=>t!==null),k()],Nt.prototype,"currencyCode");class Dt{}h([_((e,t)=>t!==null),k()],Dt.prototype,"firstName");h([_((e,t)=>t!==null),k()],Dt.prototype,"lastName");class Ka{}h([Tt(Rt.UUID),kt()],Ka.prototype,"value");class Ha{}h([Tt(Rt.NOW),kt()],Ha.prototype,"value");class F{}h([_((e,t)=>t!==null),S()],F.prototype,"addressStreet1");h([_((e,t)=>t!==null),S()],F.prototype,"addressStreet2");h([_((e,t)=>t!==null),S()],F.prototype,"addressCity");h([_((e,t)=>t!==null),S()],F.prototype,"addressPostcode");h([_((e,t)=>t!==null),S()],F.prototype,"addressState");h([_((e,t)=>t!==null),S()],F.prototype,"addressCountry");h([_((e,t)=>t!==null),Oe()],F.prototype,"addressLat");h([_((e,t)=>t!==null),Oe()],F.prototype,"addressLng");class Pt{}h([S()],Pt.prototype,"label");h([S()],Pt.prototype,"url");class Ne{}h([_((e,t)=>t!==null),k()],Ne.prototype,"primaryLinkLabel");h([_((e,t)=>t!==null),k()],Ne.prototype,"primaryLinkUrl");h([_((e,t)=>t!==null),Re()],Ne.prototype,"secondaryLinks");class De{}h([_((e,t)=>t!==null),S()],De.prototype,"source");h([_((e,t)=>t!==null),Bi(),ea()],De.prototype,"workspaceMemberId");h([_((e,t)=>t!==null),S()],De.prototype,"name");class Ut{}h([_((e,t)=>t!==null),k()],Ut.prototype,"primaryEmail");h([_((e,t)=>t!==null),Se()],Ut.prototype,"additionalEmails");class _e{}h([_((e,t)=>t!==null),k()],_e.prototype,"primaryPhoneNumber");h([_((e,t)=>t!==null),k()],_e.prototype,"primaryPhoneCountryCode");h([_((e,t)=>t!==null),k()],_e.prototype,"primaryPhoneCallingCode");h([_((e,t)=>t!==null),Se()],_e.prototype,"additionalPhones");class Xa{}h([_((e,t)=>t!==null),Re()],Xa.prototype,"value");var Ct=(e=>(e.DAY="DAY",e.MONTH="MONTH",e.QUARTER="QUARTER",e.YEAR="YEAR",e.WEEK="WEEK",e.DAY_OF_THE_WEEK="DAY_OF_THE_WEEK",e.MONTH_OF_THE_YEAR="MONTH_OF_THE_YEAR",e.QUARTER_OF_THE_YEAR="QUARTER_OF_THE_YEAR",e.NONE="NONE",e))(Ct||{});exports.commonjsGlobal=qi;exports.s=d;exports.ue=Ct;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Application } from '../vendor/twenty-shared/application';
|
|
2
|
-
/**
|
|
3
|
-
* Define an application configuration with validation.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import { defineApp } from 'twenty-sdk';
|
|
8
|
-
* import { APP_ID } from '../src/constants';
|
|
9
|
-
*
|
|
10
|
-
* export default defineApp({
|
|
11
|
-
* universalIdentifier: APP_ID,
|
|
12
|
-
* displayName: 'My App',
|
|
13
|
-
* description: 'My app description',
|
|
14
|
-
* icon: 'IconWorld',
|
|
15
|
-
* });
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const defineApp: <T extends Application>(config: T) => T;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { SyncableEntityOptions } from '../syncable-entity-options.type';
|
|
2
|
-
import { RelationOnDeleteAction, RelationType } from '../../vendor/twenty-shared/types';
|
|
3
|
-
interface WorkspaceRelationMinimumBaseOptions<TClass> {
|
|
4
|
-
label: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
icon?: string;
|
|
7
|
-
inverseSideTargetUniversalIdentifier: string;
|
|
8
|
-
inverseSideFieldKey?: keyof TClass;
|
|
9
|
-
onDelete?: RelationOnDeleteAction;
|
|
10
|
-
}
|
|
11
|
-
interface WorkspaceRegularRelationBaseOptions<TClass> extends WorkspaceRelationMinimumBaseOptions<TClass> {
|
|
12
|
-
isMorphRelation?: false;
|
|
13
|
-
}
|
|
14
|
-
interface WorkspaceMorphRelationBaseOptions<TClass> extends WorkspaceRelationMinimumBaseOptions<TClass> {
|
|
15
|
-
isMorphRelation: true;
|
|
16
|
-
morphId: string;
|
|
17
|
-
}
|
|
18
|
-
type WorkspaceRelationBaseOptions<TClass> = WorkspaceRegularRelationBaseOptions<TClass> | WorkspaceMorphRelationBaseOptions<TClass>;
|
|
19
|
-
type WorkspaceOtherRelationOptions<TClass> = WorkspaceRelationBaseOptions<TClass> & {
|
|
20
|
-
type: RelationType.ONE_TO_MANY;
|
|
21
|
-
};
|
|
22
|
-
type WorkspaceManyToOneRelationOptions<TClass extends object> = WorkspaceRelationBaseOptions<TClass> & {
|
|
23
|
-
type: RelationType.MANY_TO_ONE;
|
|
24
|
-
inverseSideFieldKey: keyof TClass;
|
|
25
|
-
};
|
|
26
|
-
type RelationOptions<T extends object> = SyncableEntityOptions & (WorkspaceOtherRelationOptions<T> | WorkspaceManyToOneRelationOptions<T>);
|
|
27
|
-
export declare const Relation: <T extends object>(_: RelationOptions<T>) => PropertyDecorator;
|
|
28
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { FunctionConfig } from './function-config';
|
|
2
|
-
/**
|
|
3
|
-
* Define a serverless function configuration with validation.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import { defineFunction } from 'twenty-sdk';
|
|
8
|
-
* import { sendPostcard } from '../src/handlers/send-postcard';
|
|
9
|
-
*
|
|
10
|
-
* export const config = defineFunction({
|
|
11
|
-
* universalIdentifier: 'e56d363b-0bdc-4d8a-a393-6f0d1c75bdcf',
|
|
12
|
-
* name: 'Send Postcard',
|
|
13
|
-
* description: 'Send a postcard to a contact',
|
|
14
|
-
* timeoutSeconds: 30,
|
|
15
|
-
* handler: sendPostcard,
|
|
16
|
-
* triggers: [
|
|
17
|
-
* {
|
|
18
|
-
* universalIdentifier: 'c9f84c8d-...',
|
|
19
|
-
* type: 'route',
|
|
20
|
-
* path: '/postcards/send',
|
|
21
|
-
* httpMethod: 'POST',
|
|
22
|
-
* isAuthRequired: true,
|
|
23
|
-
* },
|
|
24
|
-
* ],
|
|
25
|
-
* });
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export declare const defineFunction: <T extends FunctionConfig>(config: T) => T;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ServerlessFunctionManifest, ServerlessFunctionTriggerManifest } from '../../vendor/twenty-shared/application';
|
|
2
|
-
export type FunctionHandler = (...args: any[]) => any | Promise<any>;
|
|
3
|
-
export type FunctionConfig = Omit<ServerlessFunctionManifest, 'handlerPath' | 'handlerName'> & {
|
|
4
|
-
name?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
timeoutSeconds?: number;
|
|
7
|
-
handler: FunctionHandler;
|
|
8
|
-
triggers?: ServerlessFunctionTriggerManifest[];
|
|
9
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type { ApplicationConfig } from './application-config';
|
|
2
|
-
export { defineApp } from './define-app';
|
|
3
|
-
export type { ActorField, AddressField, CurrencyField, EmailsField, FullNameField, LinksField, PhonesField, RichTextField, } from './fields/composite-fields';
|
|
4
|
-
export { FieldType } from './fields/field-type';
|
|
5
|
-
export { Field } from './fields/field.decorator';
|
|
6
|
-
export { OnDeleteAction } from './fields/on-delete-action';
|
|
7
|
-
export { RelationType } from './fields/relation-type';
|
|
8
|
-
export { Relation } from './fields/relation.decorator';
|
|
9
|
-
export { defineFunction } from './functions/define-function';
|
|
10
|
-
export type { FunctionHandler, FunctionConfig, } from './functions/function-config';
|
|
11
|
-
export type { CronPayload } from './functions/triggers/cron-payload-type';
|
|
12
|
-
export type { DatabaseEventPayload, ObjectRecordCreateEvent, ObjectRecordUpdateEvent, ObjectRecordEvent, ObjectRecordDeleteEvent, ObjectRecordDestroyEvent, ObjectRecordBaseEvent, ObjectRecordRestoreEvent, ObjectRecordUpsertEvent, } from './functions/triggers/database-event-payload-type';
|
|
13
|
-
export { defineObject } from './objects/define-object';
|
|
14
|
-
export { Object } from './objects/object.decorator';
|
|
15
|
-
export { STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from './objects/standard-object-ids';
|
|
16
|
-
export { PermissionFlag } from './permission-flag-type';
|
|
17
|
-
export type { RoleConfig } from './role-config';
|
|
18
|
-
export { defineRole } from './roles/define-role';
|
|
19
|
-
export type { SyncableEntityOptions } from './syncable-entity-options.type';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ObjectManifest } from '../../vendor/twenty-shared/application';
|
|
2
|
-
/**
|
|
3
|
-
* Define an object configuration with validation.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import { defineObject, FieldType } from 'twenty-sdk';
|
|
8
|
-
* import { POST_CARD_ID, STATUS_OPTIONS } from '../../src/constants';
|
|
9
|
-
*
|
|
10
|
-
* export default defineObject({
|
|
11
|
-
* universalIdentifier: POST_CARD_ID,
|
|
12
|
-
* nameSingular: 'postCard',
|
|
13
|
-
* namePlural: 'postCards',
|
|
14
|
-
* labelSingular: 'Post Card',
|
|
15
|
-
* labelPlural: 'Post Cards',
|
|
16
|
-
* icon: 'IconMail',
|
|
17
|
-
* fields: [
|
|
18
|
-
* {
|
|
19
|
-
* universalIdentifier: '...',
|
|
20
|
-
* name: 'content',
|
|
21
|
-
* type: FieldType.TEXT,
|
|
22
|
-
* label: 'Content',
|
|
23
|
-
* },
|
|
24
|
-
* {
|
|
25
|
-
* universalIdentifier: '...',
|
|
26
|
-
* name: 'status',
|
|
27
|
-
* type: FieldType.SELECT,
|
|
28
|
-
* label: 'Status',
|
|
29
|
-
* options: STATUS_OPTIONS,
|
|
30
|
-
* },
|
|
31
|
-
* ],
|
|
32
|
-
* });
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export declare const defineObject: <T extends ObjectManifest>(config: T) => T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { STANDARD_OBJECT_IDS as STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from '../../vendor/twenty-shared/metadata';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PermissionFlagType as PermissionFlag } from '../vendor/twenty-shared/constants';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { RoleConfig } from '../role-config';
|
|
2
|
-
/**
|
|
3
|
-
* Define a role configuration with validation.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import { defineRole, PermissionFlag } from 'twenty-sdk';
|
|
8
|
-
*
|
|
9
|
-
* export default defineRole({
|
|
10
|
-
* universalIdentifier: 'b648f87b-1d26-4961-b974-0908fd991061',
|
|
11
|
-
* label: 'App User',
|
|
12
|
-
* description: 'Standard user role for the app',
|
|
13
|
-
* icon: 'IconUser',
|
|
14
|
-
* canReadAllObjectRecords: false,
|
|
15
|
-
* objectPermissions: [
|
|
16
|
-
* {
|
|
17
|
-
* objectNameSingular: 'postCard',
|
|
18
|
-
* canReadObjectRecords: true,
|
|
19
|
-
* canUpdateObjectRecords: true,
|
|
20
|
-
* },
|
|
21
|
-
* ],
|
|
22
|
-
* permissionFlags: [PermissionFlag.UPLOAD_FILE],
|
|
23
|
-
* });
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare const defineRole: <T extends RoleConfig>(config: T) => T;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare enum SyncableEntity {
|
|
2
|
-
AGENT = "agent",
|
|
3
|
-
OBJECT = "object",
|
|
4
|
-
FUNCTION = "function",
|
|
5
|
-
ROLE = "role"
|
|
6
|
-
}
|
|
7
|
-
export declare const isSyncableEntity: (value: string) => value is SyncableEntity;
|
|
8
|
-
export declare class AppAddCommand {
|
|
9
|
-
execute(entityType?: SyncableEntity, path?: string): Promise<void>;
|
|
10
|
-
private getEntity;
|
|
11
|
-
private getEntityName;
|
|
12
|
-
private getObjectData;
|
|
13
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ApiResponse } from '../types/api-response.types';
|
|
2
|
-
import { PackageJson, ApplicationManifest } from '../../vendor/twenty-shared/application';
|
|
3
|
-
export declare class ApiService {
|
|
4
|
-
private client;
|
|
5
|
-
private configService;
|
|
6
|
-
constructor();
|
|
7
|
-
validateAuth(): Promise<boolean>;
|
|
8
|
-
syncApplication({ packageJson, yarnLock, manifest, }: {
|
|
9
|
-
packageJson: PackageJson;
|
|
10
|
-
yarnLock: string;
|
|
11
|
-
manifest: ApplicationManifest;
|
|
12
|
-
}): Promise<ApiResponse>;
|
|
13
|
-
uninstallApplication(universalIdentifier: string): Promise<ApiResponse>;
|
|
14
|
-
getSchema(): Promise<ApiResponse<string>>;
|
|
15
|
-
subscribeToLogs({ applicationUniversalIdentifier, functionUniversalIdentifier, functionName, }: {
|
|
16
|
-
applicationUniversalIdentifier: string;
|
|
17
|
-
functionUniversalIdentifier?: string;
|
|
18
|
-
functionName?: string;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Load a TypeScript config file using jiti runtime evaluation.
|
|
3
|
-
* This allows importing constants and other modules in config files.
|
|
4
|
-
*
|
|
5
|
-
* Supports multiple export patterns:
|
|
6
|
-
* - `export default { ... }`
|
|
7
|
-
* - `export const anyName = { ... }` (any named export that is a plain object)
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* const config = await loadConfig<AppDefinition>('/path/to/src/app/application.config.ts');
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare const loadConfig: <T>(filepath: string) => Promise<T>;
|
|
15
|
-
/**
|
|
16
|
-
* Load a function module and extract handler info from config.handler property.
|
|
17
|
-
*
|
|
18
|
-
* The handler can be either:
|
|
19
|
-
* 1. Imported from another file:
|
|
20
|
-
* ```typescript
|
|
21
|
-
* import { myHandler } from '../src/handlers/my-handler';
|
|
22
|
-
* export const config = { handler: myHandler, ... };
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* 2. Defined locally in the same file:
|
|
26
|
-
* ```typescript
|
|
27
|
-
* export const myHandler = async () => { ... };
|
|
28
|
-
* export const config = { handler: myHandler, ... };
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```typescript
|
|
33
|
-
* const { config, handlerName, handlerPath } = await loadFunctionModule(
|
|
34
|
-
* '/path/to/src/app/functions/my-function.function.ts',
|
|
35
|
-
* '/path/to/app'
|
|
36
|
-
* );
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare const loadFunctionModule: (filepath: string, appPath: string) => Promise<{
|
|
40
|
-
config: unknown;
|
|
41
|
-
handlerName: string;
|
|
42
|
-
handlerPath: string;
|
|
43
|
-
}>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ApplicationManifest, PackageJson } from '../../vendor/twenty-shared/application';
|
|
2
|
-
import { ValidationWarning } from './validate-manifest';
|
|
3
|
-
export type LoadManifestResult = {
|
|
4
|
-
packageJson: PackageJson;
|
|
5
|
-
yarnLock: string;
|
|
6
|
-
manifest: ApplicationManifest;
|
|
7
|
-
shouldGenerate: boolean;
|
|
8
|
-
warnings: ValidationWarning[];
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Load an application manifest using the folder structure with jiti runtime evaluation.
|
|
12
|
-
*
|
|
13
|
-
* Files are detected by their suffix (*.object.ts, *.function.ts, *.role.ts)
|
|
14
|
-
* and can be placed anywhere within src/app/.
|
|
15
|
-
*
|
|
16
|
-
* Example structures:
|
|
17
|
-
* ```
|
|
18
|
-
* # Traditional (by type)
|
|
19
|
-
* my-app/
|
|
20
|
-
* ├── src/
|
|
21
|
-
* │ └── app/
|
|
22
|
-
* │ ├── application.config.ts
|
|
23
|
-
* │ ├── objects/
|
|
24
|
-
* │ │ └── postCard.object.ts
|
|
25
|
-
* │ ├── functions/
|
|
26
|
-
* │ │ └── createPostCard.function.ts
|
|
27
|
-
* │ └── roles/
|
|
28
|
-
* │ └── admin.role.ts
|
|
29
|
-
*
|
|
30
|
-
* # Feature-based
|
|
31
|
-
* my-app/
|
|
32
|
-
* ├── src/
|
|
33
|
-
* │ └── app/
|
|
34
|
-
* │ ├── application.config.ts
|
|
35
|
-
* │ └── post-card/
|
|
36
|
-
* │ ├── postCard.object.ts
|
|
37
|
-
* │ ├── createPostCard.function.ts
|
|
38
|
-
* │ └── postCardAdmin.role.ts
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export declare const loadManifest: (appPath: string) => Promise<LoadManifestResult>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ApplicationManifest } from '../../vendor/twenty-shared/application';
|
|
2
|
-
export type ValidationError = {
|
|
3
|
-
path: string;
|
|
4
|
-
message: string;
|
|
5
|
-
};
|
|
6
|
-
export type ValidationWarning = {
|
|
7
|
-
path?: string;
|
|
8
|
-
message: string;
|
|
9
|
-
};
|
|
10
|
-
export type ValidationResult = {
|
|
11
|
-
isValid: boolean;
|
|
12
|
-
errors: ValidationError[];
|
|
13
|
-
warnings: ValidationWarning[];
|
|
14
|
-
};
|
|
15
|
-
export declare class ManifestValidationError extends Error {
|
|
16
|
-
readonly errors: ValidationError[];
|
|
17
|
-
constructor(errors: ValidationError[]);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Validate a complete application manifest.
|
|
21
|
-
*/
|
|
22
|
-
export declare const validateManifest: (manifest: Omit<ApplicationManifest, "sources">) => ValidationResult;
|