@solidxai/core 0.1.13-beta.9 → 0.1.14-beta.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/CHANGELOG.md +9244 -0
- package/README.md +19 -0
- package/dist/commands/run-tests.command.d.ts +2 -0
- package/dist/commands/run-tests.command.d.ts.map +1 -1
- package/dist/commands/run-tests.command.js +20 -3
- package/dist/commands/run-tests.command.js.map +1 -1
- package/dist/config/cache.options.d.ts.map +1 -1
- package/dist/config/cache.options.js +2 -2
- package/dist/config/cache.options.js.map +1 -1
- package/dist/constants/error-messages.d.ts +7 -0
- package/dist/constants/error-messages.d.ts.map +1 -1
- package/dist/constants/error-messages.js +7 -0
- package/dist/constants/error-messages.js.map +1 -1
- package/dist/constants/media-file-types.d.ts +17 -0
- package/dist/constants/media-file-types.d.ts.map +1 -1
- package/dist/constants/media-file-types.js +129 -22
- package/dist/constants/media-file-types.js.map +1 -1
- package/dist/constants/success-messages.d.ts +3 -0
- package/dist/constants/success-messages.d.ts.map +1 -1
- package/dist/constants/success-messages.js +3 -0
- package/dist/constants/success-messages.js.map +1 -1
- package/dist/controllers/authentication.controller.d.ts +1 -1
- package/dist/controllers/authentication.controller.d.ts.map +1 -1
- package/dist/controllers/authentication.controller.js +4 -3
- package/dist/controllers/authentication.controller.js.map +1 -1
- package/dist/controllers/field-metadata.controller.d.ts +6 -2
- package/dist/controllers/field-metadata.controller.d.ts.map +1 -1
- package/dist/controllers/mpin-authentication.controller.d.ts +44 -0
- package/dist/controllers/mpin-authentication.controller.d.ts.map +1 -0
- package/dist/controllers/mpin-authentication.controller.js +102 -0
- package/dist/controllers/mpin-authentication.controller.js.map +1 -0
- package/dist/controllers/view-metadata.controller.d.ts +4 -0
- package/dist/controllers/view-metadata.controller.d.ts.map +1 -1
- package/dist/dtos/change-mpin.dto.d.ts +6 -0
- package/dist/dtos/change-mpin.dto.d.ts.map +1 -0
- package/dist/dtos/change-mpin.dto.js +39 -0
- package/dist/dtos/change-mpin.dto.js.map +1 -0
- package/dist/dtos/create-field-metadata.dto.d.ts +3 -6
- package/dist/dtos/create-field-metadata.dto.d.ts.map +1 -1
- package/dist/dtos/create-field-metadata.dto.js +15 -10
- package/dist/dtos/create-field-metadata.dto.js.map +1 -1
- package/dist/dtos/create-model-sequence.dto.d.ts +1 -1
- package/dist/dtos/create-model-sequence.dto.d.ts.map +1 -1
- package/dist/dtos/create-model-sequence.dto.js +1 -1
- package/dist/dtos/create-model-sequence.dto.js.map +1 -1
- package/dist/dtos/mpin-login.dto.d.ts +5 -0
- package/dist/dtos/mpin-login.dto.d.ts.map +1 -0
- package/dist/dtos/mpin-login.dto.js +33 -0
- package/dist/dtos/mpin-login.dto.js.map +1 -0
- package/dist/dtos/setup-mpin.dto.d.ts +7 -0
- package/dist/dtos/setup-mpin.dto.d.ts.map +1 -0
- package/dist/dtos/setup-mpin.dto.js +47 -0
- package/dist/dtos/setup-mpin.dto.js.map +1 -0
- package/dist/entities/dashboard-user-layout.entity.js +2 -2
- package/dist/entities/dashboard-user-layout.entity.js.map +1 -1
- package/dist/entities/field-metadata.entity.d.ts +1 -0
- package/dist/entities/field-metadata.entity.d.ts.map +1 -1
- package/dist/entities/field-metadata.entity.js +5 -1
- package/dist/entities/field-metadata.entity.js.map +1 -1
- package/dist/entities/user-device-credential.entity.d.ts +18 -0
- package/dist/entities/user-device-credential.entity.d.ts.map +1 -0
- package/dist/entities/user-device-credential.entity.js +91 -0
- package/dist/entities/user-device-credential.entity.js.map +1 -0
- package/dist/entities/user.entity.js +2 -2
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/entities/view-metadata.entity.js.map +1 -1
- package/dist/entities/workflow-execution-artifact.entity.d.ts.map +1 -1
- package/dist/entities/workflow-execution-artifact.entity.js +4 -3
- package/dist/entities/workflow-execution-artifact.entity.js.map +1 -1
- package/dist/entities/workflow-execution-log.entity.d.ts.map +1 -1
- package/dist/entities/workflow-execution-log.entity.js +4 -3
- package/dist/entities/workflow-execution-log.entity.js.map +1 -1
- package/dist/entities/workflow-execution.entity.d.ts.map +1 -1
- package/dist/entities/workflow-execution.entity.js +3 -2
- package/dist/entities/workflow-execution.entity.js.map +1 -1
- package/dist/entities/workflow-secret.entity.d.ts.map +1 -1
- package/dist/entities/workflow-secret.entity.js +3 -2
- package/dist/entities/workflow-secret.entity.js.map +1 -1
- package/dist/entities/workflow-step-execution.entity.d.ts.map +1 -1
- package/dist/entities/workflow-step-execution.entity.js +3 -2
- package/dist/entities/workflow-step-execution.entity.js.map +1 -1
- package/dist/entities/workflow-trigger-execution.entity.d.ts.map +1 -1
- package/dist/entities/workflow-trigger-execution.entity.js +6 -5
- package/dist/entities/workflow-trigger-execution.entity.js.map +1 -1
- package/dist/filters/http-exception.filter.d.ts.map +1 -1
- package/dist/filters/http-exception.filter.js +5 -1
- package/dist/filters/http-exception.filter.js.map +1 -1
- package/dist/helpers/bootstrap.helper.d.ts +5 -2
- package/dist/helpers/bootstrap.helper.d.ts.map +1 -1
- package/dist/helpers/bootstrap.helper.js +7 -3
- package/dist/helpers/bootstrap.helper.js.map +1 -1
- package/dist/helpers/field-crud-managers/LongTextFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/LongTextFieldCrudManager.js +3 -2
- package/dist/helpers/field-crud-managers/LongTextFieldCrudManager.js.map +1 -1
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.d.ts +8 -0
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.js +61 -76
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.js.map +1 -1
- package/dist/helpers/field-crud-managers/ShortTextFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/ShortTextFieldCrudManager.js +3 -2
- package/dist/helpers/field-crud-managers/ShortTextFieldCrudManager.js.map +1 -1
- package/dist/helpers/field-crud-managers/textFieldCrudManagerUtils.d.ts +3 -0
- package/dist/helpers/field-crud-managers/textFieldCrudManagerUtils.d.ts.map +1 -0
- package/dist/helpers/field-crud-managers/textFieldCrudManagerUtils.js +17 -0
- package/dist/helpers/field-crud-managers/textFieldCrudManagerUtils.js.map +1 -0
- package/dist/helpers/file-download.helper.d.ts.map +1 -1
- package/dist/helpers/file-download.helper.js +6 -1
- package/dist/helpers/file-download.helper.js.map +1 -1
- package/dist/helpers/security.helper.d.ts +5 -1
- package/dist/helpers/security.helper.d.ts.map +1 -1
- package/dist/helpers/security.helper.js +15 -4
- package/dist/helpers/security.helper.js.map +1 -1
- package/dist/helpers/solid-core-error-codes-provider.service.d.ts.map +1 -1
- package/dist/helpers/solid-core-error-codes-provider.service.js +45 -0
- package/dist/helpers/solid-core-error-codes-provider.service.js.map +1 -1
- package/dist/helpers/solid-microservice-adapter.service.d.ts.map +1 -1
- package/dist/helpers/solid-microservice-adapter.service.js +1 -1
- package/dist/helpers/solid-microservice-adapter.service.js.map +1 -1
- package/dist/helpers/typeorm-db-helper.d.ts.map +1 -1
- package/dist/helpers/typeorm-db-helper.js +9 -0
- package/dist/helpers/typeorm-db-helper.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/active-user-data.interface.d.ts +1 -0
- package/dist/interfaces/active-user-data.interface.d.ts.map +1 -1
- package/dist/interfaces/active-user-data.interface.js.map +1 -1
- package/dist/repository/user-device-credential.repository.d.ts +12 -0
- package/dist/repository/user-device-credential.repository.d.ts.map +1 -0
- package/dist/repository/user-device-credential.repository.js +34 -0
- package/dist/repository/user-device-credential.repository.js.map +1 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +7 -3
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +168 -2
- package/dist/services/api-key.service.d.ts.map +1 -1
- package/dist/services/api-key.service.js +1 -1
- package/dist/services/api-key.service.js.map +1 -1
- package/dist/services/authentication.service.d.ts +5 -4
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +50 -19
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/chatter-message.service.d.ts +5 -1
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +48 -13
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/crud-helper.service.d.ts +1 -2
- package/dist/services/crud-helper.service.d.ts.map +1 -1
- package/dist/services/crud-helper.service.js +2 -16
- package/dist/services/crud-helper.service.js.map +1 -1
- package/dist/services/crud.service.d.ts.map +1 -1
- package/dist/services/crud.service.js +4 -2
- package/dist/services/crud.service.js.map +1 -1
- package/dist/services/draft-publish-helper.service.d.ts +1 -0
- package/dist/services/draft-publish-helper.service.d.ts.map +1 -1
- package/dist/services/draft-publish-helper.service.js +38 -4
- package/dist/services/draft-publish-helper.service.js.map +1 -1
- package/dist/services/field-metadata.service.d.ts +6 -2
- package/dist/services/field-metadata.service.d.ts.map +1 -1
- package/dist/services/field-metadata.service.js +5 -1
- package/dist/services/field-metadata.service.js.map +1 -1
- package/dist/services/media-storage.utils.d.ts +1 -0
- package/dist/services/media-storage.utils.d.ts.map +1 -1
- package/dist/services/media-storage.utils.js +12 -1
- package/dist/services/media-storage.utils.js.map +1 -1
- package/dist/services/media.service.d.ts.map +1 -1
- package/dist/services/media.service.js +1 -0
- package/dist/services/media.service.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +9 -1
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/services/mpin.service.d.ts +67 -0
- package/dist/services/mpin.service.d.ts.map +1 -0
- package/dist/services/mpin.service.js +282 -0
- package/dist/services/mpin.service.js.map +1 -0
- package/dist/services/refresh-token-ids-storage.service.d.ts +25 -6
- package/dist/services/refresh-token-ids-storage.service.d.ts.map +1 -1
- package/dist/services/refresh-token-ids-storage.service.js +80 -42
- package/dist/services/refresh-token-ids-storage.service.js.map +1 -1
- package/dist/services/setting.service.d.ts.map +1 -1
- package/dist/services/setting.service.js +6 -1
- package/dist/services/setting.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +202 -6
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +114 -3
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/dist/services/view-metadata.service.d.ts +4 -0
- package/dist/services/view-metadata.service.d.ts.map +1 -1
- package/dist/services/view-metadata.service.js +2 -0
- package/dist/services/view-metadata.service.js.map +1 -1
- package/dist/solid-core.module.d.ts +1 -3
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +14 -39
- package/dist/solid-core.module.js.map +1 -1
- package/dist/testing/reporter/console-reporter.d.ts +3 -0
- package/dist/testing/reporter/console-reporter.d.ts.map +1 -1
- package/dist/testing/reporter/console-reporter.js +2 -0
- package/dist/testing/reporter/console-reporter.js.map +1 -1
- package/dist/testing/reporter/progress-reporter.d.ts +64 -0
- package/dist/testing/reporter/progress-reporter.d.ts.map +1 -0
- package/dist/testing/reporter/progress-reporter.js +224 -0
- package/dist/testing/reporter/progress-reporter.js.map +1 -0
- package/dist/testing/reporter/reporter.types.d.ts +3 -0
- package/dist/testing/reporter/reporter.types.d.ts.map +1 -1
- package/dist/testing/reporter/reporter.types.js.map +1 -1
- package/dist/testing/runner/run-from-metadata.d.ts.map +1 -1
- package/dist/testing/runner/run-from-metadata.js +1 -0
- package/dist/testing/runner/run-from-metadata.js.map +1 -1
- package/dist/theme/theme-registry.d.ts +14 -0
- package/dist/theme/theme-registry.d.ts.map +1 -0
- package/dist/theme/theme-registry.js +147 -0
- package/dist/theme/theme-registry.js.map +1 -0
- package/package.json +2 -2
- package/src/commands/run-tests.command.ts +17 -3
- package/src/config/cache.options.ts +9 -1
- package/src/constants/error-messages.ts +14 -0
- package/src/constants/media-file-types.ts +182 -19
- package/src/constants/success-messages.ts +5 -0
- package/src/controllers/authentication.controller.ts +5 -2
- package/src/controllers/mpin-authentication.controller.ts +67 -0
- package/src/dtos/change-mpin.dto.ts +18 -0
- package/src/dtos/create-field-metadata.dto.ts +17 -9
- package/src/dtos/create-model-sequence.dto.ts +1 -1
- package/src/dtos/mpin-login.dto.ts +24 -0
- package/src/dtos/setup-mpin.dto.ts +51 -0
- package/src/entities/dashboard-user-layout.entity.ts +2 -2
- package/src/entities/field-metadata.entity.ts +3 -0
- package/src/entities/user-device-credential.entity.ts +130 -0
- package/src/entities/user.entity.ts +2 -2
- package/src/entities/view-metadata.entity.ts +2 -2
- package/src/entities/workflow-execution-artifact.entity.ts +4 -3
- package/src/entities/workflow-execution-log.entity.ts +4 -3
- package/src/entities/workflow-execution.entity.ts +3 -2
- package/src/entities/workflow-secret.entity.ts +3 -2
- package/src/entities/workflow-step-execution.entity.ts +3 -2
- package/src/entities/workflow-trigger-execution.entity.ts +6 -5
- package/src/filters/http-exception.filter.ts +11 -1
- package/src/helpers/bootstrap.helper.ts +43 -6
- package/src/helpers/field-crud-managers/LongTextFieldCrudManager.ts +3 -2
- package/src/helpers/field-crud-managers/MediaFieldCrudManager.ts +83 -96
- package/src/helpers/field-crud-managers/ShortTextFieldCrudManager.ts +3 -2
- package/src/helpers/field-crud-managers/textFieldCrudManagerUtils.ts +14 -0
- package/src/helpers/file-download.helper.ts +15 -1
- package/src/helpers/security.helper.ts +35 -8
- package/src/helpers/solid-core-error-codes-provider.service.ts +53 -0
- package/src/helpers/solid-microservice-adapter.service.ts +6 -1
- package/src/helpers/typeorm-db-helper.ts +12 -1
- package/src/index.ts +6 -0
- package/src/interfaces/active-user-data.interface.ts +9 -0
- package/src/repository/user-device-credential.repository.ts +17 -0
- package/src/seeders/module-metadata-seeder.service.ts +11 -3
- package/src/seeders/seed-data/solid-core-metadata.json +168 -2
- package/src/services/api-key.service.ts +13 -1
- package/src/services/authentication.service.ts +127 -36
- package/src/services/chatter-message.service.ts +78 -15
- package/src/services/crud-helper.service.ts +19 -16
- package/src/services/crud.service.ts +5 -2
- package/src/services/draft-publish-helper.service.ts +56 -4
- package/src/services/field-metadata.service.ts +6 -2
- package/src/services/media-storage.utils.ts +26 -1
- package/src/services/media.service.ts +1 -0
- package/src/services/module-metadata.service.ts +10 -1
- package/src/services/mpin.service.ts +447 -0
- package/src/services/refresh-token-ids-storage.service.ts +229 -90
- package/src/services/setting.service.ts +8 -1
- package/src/services/settings/default-settings-provider.service.ts +119 -3
- package/src/services/view-metadata.service.ts +4 -0
- package/src/solid-core.module.ts +26 -12
- package/src/testing/README.md +2 -1
- package/src/testing/reporter/console-reporter.ts +4 -0
- package/src/testing/reporter/progress-reporter.ts +251 -0
- package/src/testing/reporter/reporter.types.ts +3 -0
- package/src/testing/runner/run-from-metadata.ts +1 -0
- package/src/theme/theme-registry.ts +181 -0
- package/CLAUDE.md +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAyD;AACzD,qCAAoG;AACpG,iEAAiE;AACjE,2EAAyE;AACzE,+DAA6D;AAC7D,yDAAoD;AAsB7C,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,4BAAY;IAA/B;;QA2BH,wBAAmB,GAAY,IAAI,CAAC;QAIpC,sBAAiB,GAAW,OAAO,CAAC;QAiEpC,WAAM,GAAY,IAAI,CAAC;QAyFvB,wBAAmB,GAAW,CAAC,CAAC;QAOhC,+BAA0B,GAAY,KAAK,CAAC;KAM/C;;2UA3KkC,IAAI,yhCAqEjB,IAAI,ysDAgGgB,KAAK;;CAM9C,CAAA;AAtMY,oBAAI;AAIb;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,0BAAM,GAAE;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EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;IAChF,IAAA,2BAAO,GAAE;GACG,IAAI,CAsMhB","sourcesContent":["import { CommonEntity } from \"src/entities/common.entity\"\nimport { Entity, Column, Index, JoinTable, ManyToMany, OneToMany, TableInheritance } from \"typeorm\";\nimport { RoleMetadata } from 'src/entities/role-metadata.entity';\nimport { UserViewMetadata } from 'src/entities/user-view-metadata.entity'\nimport { UserApiKey } from 'src/entities/user-api-key.entity'\nimport { Exclude, Expose } from \"class-transformer\";\n\n/**\n * Serialization is locked down twice over, and both halves are load-bearing:\n *\n * - The class-level `@Exclude()` below makes User itself an allowlist: only `@Expose()`d\n * properties are serialized.\n * - Every other property additionally carries its own `@Exclude()`. That looks redundant\n * here, and for `User` it is - but class-transformer resolves the *class-level* strategy\n * with a direct lookup on the exact constructor (MetadataStorage.getStrategy), so a\n * subclass inherits nothing and falls back to `exposeAll`. Since this entity is a\n * `@TableInheritance` root that consuming projects extend (see\n * IExtensionUserCreationProvider), an extension user that forgets its own `@Exclude()`\n * would otherwise serialize the password hash and every OAuth/verification token.\n * Property-level metadata *is* walked up the prototype chain, so the per-property\n * decorators are what actually protect subclasses.\n *\n * Keep both. Adding a new column? Give it `@Expose()` or `@Exclude()` - never neither.\n */\n@Entity(\"ss_user\")\n@TableInheritance({ column: { type: \"varchar\", name: \"type\", default: \"User\" } })\n@Exclude()\nexport class User extends CommonEntity {\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n fullName: string;\n\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n @Expose()\n username: string;\n\n @Index({ unique: true })\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n email: string;\n\n @Index({ unique: true })\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n mobile: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n password: string;\n\n @Column({ nullable: true, default: true })\n @Expose()\n forcePasswordChange: boolean = true;\n\n @Column({ type: \"varchar\", default: \"local\" })\n @Exclude()\n lastLoginProvider: string = \"local\";\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n accessCode: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n googleAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n googleId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n googleProfilePicture: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n facebookId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n facebookAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n facebookProfilePicture: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n appleId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n appleAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftProfilePicture: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftActiveDirectoryId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftActiveDirectoryAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftActiveDirectoryProfilePicture: string;\n\n @Index()\n @Column({ default: true })\n @Expose()\n active: boolean = true;\n\n @Column({ nullable: true })\n @Exclude()\n forgotPasswordConfirmedAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n verificationTokenOnForgotPassword: string;\n\n @Column({ nullable: true })\n @Exclude()\n verificationTokenOnForgotPasswordExpiresAt: Date;\n\n @Column({ nullable: true })\n @Exclude()\n emailVerifiedOnRegistrationAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n emailVerificationTokenOnRegistration: string;\n\n @Column({ nullable: true })\n @Exclude()\n emailVerificationTokenOnRegistrationExpiresAt: Date;\n\n @Column({ nullable: true })\n @Exclude()\n mobileVerifiedOnRegistrationAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n mobileVerificationTokenOnRegistration: string;\n\n @Column({ nullable: true })\n @Exclude()\n mobileVerificationTokenOnRegistrationExpiresAt: Date;\n\n @Column({ nullable: true })\n @Exclude()\n emailVerifiedOnLoginAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n emailVerificationTokenOnLogin: string;\n\n @Column({ nullable: true })\n @Exclude()\n emailVerificationTokenOnLoginExpiresAt: Date;\n\n @Column({ nullable: true })\n @Exclude()\n mobileVerifiedOnLoginAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n mobileVerificationTokenOnLogin: string;\n\n @Column({ nullable: true })\n @Exclude()\n mobileVerificationTokenOnLoginExpiresAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n customPayload: string;\n\n @ManyToMany(() => RoleMetadata, roleMetadata => roleMetadata.users, { cascade: true })\n @JoinTable()\n @Expose()\n roles: RoleMetadata[];\n\n @OneToMany(() => UserViewMetadata, userViewMetadata => userViewMetadata.user, { cascade: true })\n @Exclude()\n userViewMetadata: UserViewMetadata[];\n\n @Exclude()\n @Column({ type: \"varchar\", default: \"bcrypt\" })\n passwordScheme: string;\n\n @Exclude()\n @Column({ type: \"int\", default: 1 })\n passwordSchemeVersion: number;\n\n @Exclude()\n @Column({ nullable: true })\n rehashedAt: Date;\n\n @Expose()\n @Column({ type: \"int\", default: 0 })\n failedLoginAttempts: number = 0;\n\n @Expose()\n _media: any;\n\n @Column({ default: false })\n @Expose()\n isAllowedToGenerateApiKeys: boolean = false;\n\n @OneToMany(() => UserApiKey, key => key.user)\n @Expose()\n apiKeys: UserApiKey[];\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"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AI,EAAE,CAAC;8BACf,IAAI;wCAAC;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;iDACJ;AAGhC;IADC,IAAA,0BAAM,GAAE;;oCACG;AAIZ;IAFC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1B,IAAA,0BAAM,GAAE;;wDACmC;AAI5C;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAU,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;IAC5C,IAAA,0BAAM,GAAE;;qCACa;eApMb,IAAI;IAHhB,IAAA,gBAAM,EAAC,SAAS,CAAC;IACjB,IAAA,0BAAgB,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;IAChF,IAAA,2BAAO,GAAE;GACG,IAAI,CAsMhB","sourcesContent":["import { CommonEntity } from \"src/entities/common.entity\"\nimport { Entity, Column, Index, JoinTable, ManyToMany, OneToMany, TableInheritance } from \"typeorm\";\nimport { RoleMetadata } from 'src/entities/role-metadata.entity';\nimport { UserViewMetadata } from 'src/entities/user-view-metadata.entity'\nimport { UserApiKey } from 'src/entities/user-api-key.entity'\nimport { Exclude, Expose } from \"class-transformer\";\n\n/**\n * Serialization is locked down twice over, and both halves are load-bearing:\n *\n * - The class-level `@Exclude()` below makes User itself an allowlist: only `@Expose()`d\n * properties are serialized.\n * - Every other property additionally carries its own `@Exclude()`. That looks redundant\n * here, and for `User` it is - but class-transformer resolves the *class-level* strategy\n * with a direct lookup on the exact constructor (MetadataStorage.getStrategy), so a\n * subclass inherits nothing and falls back to `exposeAll`. Since this entity is a\n * `@TableInheritance` root that consuming projects extend (see\n * IExtensionUserCreationProvider), an extension user that forgets its own `@Exclude()`\n * would otherwise serialize the password hash and every OAuth/verification token.\n * Property-level metadata *is* walked up the prototype chain, so the per-property\n * decorators are what actually protect subclasses.\n *\n * Keep both. Adding a new column? Give it `@Expose()` or `@Exclude()` - never neither.\n */\n@Entity(\"ss_user\")\n@TableInheritance({ column: { type: \"varchar\", name: \"type\", default: \"User\" } })\n@Exclude()\nexport class User extends CommonEntity {\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n fullName: string;\n\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n @Expose()\n username: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n email: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n mobile: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n password: string;\n\n @Column({ nullable: true, default: true })\n @Expose()\n forcePasswordChange: boolean = true;\n\n @Column({ type: \"varchar\", default: \"local\" })\n @Exclude()\n lastLoginProvider: string = \"local\";\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n accessCode: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n googleAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n googleId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n googleProfilePicture: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n facebookId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n facebookAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n facebookProfilePicture: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n appleId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n appleAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftProfilePicture: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftActiveDirectoryId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftActiveDirectoryAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n microsoftActiveDirectoryProfilePicture: string;\n\n @Index()\n @Column({ default: true })\n @Expose()\n active: boolean = true;\n\n @Column({ nullable: true })\n @Exclude()\n forgotPasswordConfirmedAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n verificationTokenOnForgotPassword: string;\n\n @Column({ nullable: true })\n @Exclude()\n verificationTokenOnForgotPasswordExpiresAt: Date;\n\n @Column({ nullable: true })\n @Exclude()\n emailVerifiedOnRegistrationAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n emailVerificationTokenOnRegistration: string;\n\n @Column({ nullable: true })\n @Exclude()\n emailVerificationTokenOnRegistrationExpiresAt: Date;\n\n @Column({ nullable: true })\n @Exclude()\n mobileVerifiedOnRegistrationAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n mobileVerificationTokenOnRegistration: string;\n\n @Column({ nullable: true })\n @Exclude()\n mobileVerificationTokenOnRegistrationExpiresAt: Date;\n\n @Column({ nullable: true })\n @Exclude()\n emailVerifiedOnLoginAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n emailVerificationTokenOnLogin: string;\n\n @Column({ nullable: true })\n @Exclude()\n emailVerificationTokenOnLoginExpiresAt: Date;\n\n @Column({ nullable: true })\n @Exclude()\n mobileVerifiedOnLoginAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Exclude()\n mobileVerificationTokenOnLogin: string;\n\n @Column({ nullable: true })\n @Exclude()\n mobileVerificationTokenOnLoginExpiresAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n customPayload: string;\n\n @ManyToMany(() => RoleMetadata, roleMetadata => roleMetadata.users, { cascade: true })\n @JoinTable()\n @Expose()\n roles: RoleMetadata[];\n\n @OneToMany(() => UserViewMetadata, userViewMetadata => userViewMetadata.user, { cascade: true })\n @Exclude()\n userViewMetadata: UserViewMetadata[];\n\n @Exclude()\n @Column({ type: \"varchar\", default: \"bcrypt\" })\n passwordScheme: string;\n\n @Exclude()\n @Column({ type: \"int\", default: 1 })\n passwordSchemeVersion: number;\n\n @Exclude()\n @Column({ nullable: true })\n rehashedAt: Date;\n\n @Expose()\n @Column({ type: \"int\", default: 0 })\n failedLoginAttempts: number = 0;\n\n @Expose()\n _media: any;\n\n @Column({ default: false })\n @Expose()\n isAllowedToGenerateApiKeys: boolean = false;\n\n @OneToMany(() => UserApiKey, key => key.user)\n @Expose()\n apiKeys: UserApiKey[];\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-metadata.entity.js","sourceRoot":"","sources":["../../src/entities/view-metadata.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAyD;AACzD,qCAAkF;AAElF,qEAAqE;AACrE,mEAAmE;AACnE,2EAAyE;AAGlE,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAY;IAAvC;;QAeH,YAAO,GAAQ,IAAI,CAAC;KAkBvB;;;;CAAA,CAAA;AAjCY,oCAAY;AAGrB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;;0CAC5B;AAIb;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;iDAC9B;AAIpB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;0CAC7B;AAIb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACtB;AAIpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CAC7B;AAKZ;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACpD,IAAA,oBAAU,EAAC,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACnC,uCAAc;4CAAC;AAKvB;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnD,IAAA,oBAAU,EAAC,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACpC,qCAAa;2CAAC;AAGrB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAAgB,EAAE,gBAAgB,CAAC,EAAE,CAAC,gBAAgB,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;sDACnE;uBAhC5B,YAAY;IADxB,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,YAAY,CAiCxB","sourcesContent":["import { CommonEntity } from \"src/entities/common.entity\"\nimport { Entity, Column, ManyToOne, Index, JoinColumn, OneToMany } from \"typeorm\";\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\nimport { ModuleMetadata } from 'src/entities/module-metadata.entity';\nimport { ModelMetadata } from 'src/entities/model-metadata.entity';\nimport { UserViewMetadata } from 'src/entities/user-view-metadata.entity'\n\n@Entity(\"ss_view_metadata\")\nexport class ViewMetadata extends CommonEntity {\n @Index({ unique: true })\n @Column({ name: \"name\", type: \"varchar\"})\n name: string;\n\n @Index()\n @Column({ name: \"display_name\", type: \"varchar\" })\n displayName: string;\n\n @Index()\n @Column({ name: \"type\", type: \"varchar\" })\n type: string;\n\n //TODO: To make this truly cross db compatible, we should avoid setting a db type\n @Column({ name: \"context\", type: \"text\" })\n context: any = \"{}\";\n\n //TODO: To make this truly cross db compatible, we should avoid setting a db type\n @Column({ name: \"layout\", type: \"text\" })\n layout: any;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { nullable: false })\n @JoinColumn({ referencedColumnName: 'id' })\n module: ModuleMetadata;\n\n @Index()\n @ManyToOne(() => ModelMetadata, { nullable: false })\n @JoinColumn({ referencedColumnName: 'id' })\n model: ModelMetadata;\n\n @OneToMany(() => UserViewMetadata, userViewMetadata => userViewMetadata.viewMetadata, { cascade: true })\n userViewMetadata: UserViewMetadata[];\n}"]}
|
|
1
|
+
{"version":3,"file":"view-metadata.entity.js","sourceRoot":"","sources":["../../src/entities/view-metadata.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAyD;AACzD,qCAAkF;AAElF,qEAAqE;AACrE,mEAAmE;AACnE,2EAAyE;AAGlE,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAY;IAAvC;;QAeH,YAAO,GAAQ,IAAI,CAAC;KAkBvB;;;;CAAA,CAAA;AAjCY,oCAAY;AAGrB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;;0CAC5B;AAIb;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;iDAC9B;AAIpB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;0CAC7B;AAIb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACtB;AAIpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CAC7B;AAKZ;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACpD,IAAA,oBAAU,EAAC,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACnC,uCAAc;4CAAC;AAKvB;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnD,IAAA,oBAAU,EAAC,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACpC,qCAAa;2CAAC;AAGrB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAAgB,EAAE,gBAAgB,CAAC,EAAE,CAAC,gBAAgB,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;sDACnE;uBAhC5B,YAAY;IADxB,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,YAAY,CAiCxB","sourcesContent":["import { CommonEntity } from \"src/entities/common.entity\"\nimport { Entity, Column, ManyToOne, Index, JoinColumn, OneToMany } from \"typeorm\";\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\nimport { ModuleMetadata } from 'src/entities/module-metadata.entity';\nimport { ModelMetadata } from 'src/entities/model-metadata.entity';\nimport { UserViewMetadata } from 'src/entities/user-view-metadata.entity'\n\n@Entity(\"ss_view_metadata\")\nexport class ViewMetadata extends CommonEntity {\n @Index({ unique: true })\n @Column({ name: \"name\", type: \"varchar\"})\n name: string;\n\n @Index()\n @Column({ name: \"display_name\", type: \"varchar\" })\n displayName: string;\n\n @Index()\n @Column({ name: \"type\", type: \"varchar\" })\n type: string;\n\n // TODO: To make this truly cross db compatible, we should avoid setting a db type \n @Column({ name: \"context\", type: \"text\" })\n context: any = \"{}\";\n\n // TODO: To make this truly cross db compatible, we should avoid setting a db type\n @Column({ name: \"layout\", type: \"text\" })\n layout: any;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { nullable: false })\n @JoinColumn({ referencedColumnName: 'id' })\n module: ModuleMetadata;\n\n @Index()\n @ManyToOne(() => ModelMetadata, { nullable: false })\n @JoinColumn({ referencedColumnName: 'id' })\n model: ModelMetadata;\n\n @OneToMany(() => UserViewMetadata, userViewMetadata => userViewMetadata.viewMetadata, { cascade: true })\n userViewMetadata: UserViewMetadata[];\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-execution-artifact.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-execution-artifact.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"workflow-execution-artifact.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-execution-artifact.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAGxE,qBACa,yBAA0B,SAAQ,YAAY;IAGvD,WAAW,EAAE,MAAM,CAAC;IAKpB,iBAAiB,EAAE,iBAAiB,CAAC;IAKrC,qBAAqB,EAAE,qBAAqB,CAAC;IAI7C,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,CAAC;IAIpB,YAAY,EAAE,MAAM,CAAa;IAIjC,MAAM,EAAE,MAAM,CAAC;IAIf,QAAQ,EAAE,MAAM,CAAC;IAIjB,kBAAkB,EAAE,MAAM,CAAC;IAG3B,GAAG,EAAE,MAAM,CAAC;IAIZ,QAAQ,EAAE,MAAM,CAAC;IAIjB,QAAQ,EAAE,MAAM,CAAC;IAGjB,SAAS,EAAE,MAAM,CAAC;IAIlB,QAAQ,EAAE,MAAM,CAAC;IAIjB,UAAU,EAAE,IAAI,CAAC;IAGjB,OAAO,EAAE,GAAG,CAAC;IAGb,QAAQ,EAAE,GAAG,CAAC;CACjB"}
|
|
@@ -15,6 +15,7 @@ const common_entity_1 = require("./common.entity");
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const workflow_execution_entity_1 = require("./workflow-execution.entity");
|
|
17
17
|
const workflow_step_execution_entity_1 = require("./workflow-step-execution.entity");
|
|
18
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
18
19
|
let WorkflowExecutionArtifact = class WorkflowExecutionArtifact extends common_entity_1.CommonEntity {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
|
@@ -32,13 +33,13 @@ __decorate([
|
|
|
32
33
|
], WorkflowExecutionArtifact.prototype, "artifactKey", void 0);
|
|
33
34
|
__decorate([
|
|
34
35
|
(0, typeorm_1.Index)(),
|
|
35
|
-
(0, typeorm_1.ManyToOne)(() => workflow_execution_entity_1.WorkflowExecution, {
|
|
36
|
+
(0, typeorm_1.ManyToOne)(() => workflow_execution_entity_1.WorkflowExecution, { nullable: false }),
|
|
36
37
|
(0, typeorm_1.JoinColumn)(),
|
|
37
38
|
__metadata("design:type", workflow_execution_entity_1.WorkflowExecution)
|
|
38
39
|
], WorkflowExecutionArtifact.prototype, "workflowExecution", void 0);
|
|
39
40
|
__decorate([
|
|
40
41
|
(0, typeorm_1.Index)(),
|
|
41
|
-
(0, typeorm_1.ManyToOne)(() => workflow_step_execution_entity_1.WorkflowStepExecution, {
|
|
42
|
+
(0, typeorm_1.ManyToOne)(() => workflow_step_execution_entity_1.WorkflowStepExecution, { nullable: true }),
|
|
42
43
|
(0, typeorm_1.JoinColumn)(),
|
|
43
44
|
__metadata("design:type", workflow_step_execution_entity_1.WorkflowStepExecution)
|
|
44
45
|
], WorkflowExecutionArtifact.prototype, "workflowStepExecution", void 0);
|
|
@@ -96,7 +97,7 @@ __decorate([
|
|
|
96
97
|
], WorkflowExecutionArtifact.prototype, "checksum", void 0);
|
|
97
98
|
__decorate([
|
|
98
99
|
(0, typeorm_1.Index)(),
|
|
99
|
-
(0, typeorm_1.Column)({
|
|
100
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
100
101
|
__metadata("design:type", Date)
|
|
101
102
|
], WorkflowExecutionArtifact.prototype, "producedAt", void 0);
|
|
102
103
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-execution-artifact.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-execution-artifact.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,2EAAgE;AAChE,qFAAwE;
|
|
1
|
+
{"version":3,"file":"workflow-execution-artifact.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-execution-artifact.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,2EAAgE;AAChE,qFAAwE;AACxE,oEAA8D;AAGvD,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,4BAAY;IAApD;;QAwBH,iBAAY,GAAW,SAAS,CAAC;KAyCpC;;;;CAAA,CAAA;AAjEY,8DAAyB;AAGlC;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;8DACR;AAKpB;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAA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eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DAC3B;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACzB;AAIlB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DAC3B;AAIjB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,CAAC;8BAC7C,IAAI;6DAAC;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACnC;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DAClC;oCAhEL,yBAAyB;IADrC,IAAA,gBAAM,EAAC,gCAAgC,CAAC;GAC5B,yBAAyB,CAiErC","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, ManyToOne } from 'typeorm';\nimport { WorkflowExecution } from './workflow-execution.entity';\nimport { WorkflowStepExecution } from './workflow-step-execution.entity'\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_workflow_execution_artifact')\nexport class WorkflowExecutionArtifact extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n artifactKey: string;\n\n @Index()\n @ManyToOne(() => WorkflowExecution, { nullable: false })\n @JoinColumn()\n workflowExecution: WorkflowExecution;\n\n @Index()\n @ManyToOne(() => WorkflowStepExecution, { nullable: true })\n @JoinColumn()\n workflowStepExecution: WorkflowStepExecution;\n\n @Index()\n @Column({ type: \"varchar\" })\n name: string;\n\n @Column({ type: \"text\", nullable: true })\n description: string;\n\n @Index()\n @Column({ type: \"varchar\", default: \"payload\" })\n artifactType: string = \"payload\";\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n nodeId: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n nodeType: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n storageProviderKey: string;\n\n @Column({ type: \"text\", nullable: true })\n uri: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n fileName: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n mimeType: string;\n\n @Column({ type: \"bigint\", nullable: true })\n sizeBytes: bigint;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n checksum: string;\n\n @Index()\n @Column({ nullable: true, ...getColumnType('datetime') })\n producedAt: Date;\n\n @Column({ type: \"simple-json\", nullable: true })\n payload: any;\n\n @Column({ type: \"simple-json\", nullable: true })\n metadata: any;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-execution-log.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-execution-log.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"workflow-execution-log.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-execution-log.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAGxE,qBACa,oBAAqB,SAAQ,YAAY;IAGlD,MAAM,EAAE,MAAM,CAAC;IAKf,iBAAiB,EAAE,iBAAiB,CAAC;IAKrC,qBAAqB,EAAE,qBAAqB,CAAC;IAI7C,KAAK,EAAE,MAAM,CAAU;IAGvB,OAAO,EAAE,MAAM,CAAC;IAIhB,SAAS,EAAE,MAAM,CAAC;IAIlB,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,EAAE,MAAM,CAAC;IAIf,QAAQ,EAAE,MAAM,CAAC;IAIjB,cAAc,EAAE,MAAM,CAAC;IAIvB,UAAU,EAAE,IAAI,CAAC;IAGjB,OAAO,EAAE,GAAG,CAAC;IAGb,QAAQ,EAAE,GAAG,CAAC;CACjB"}
|
|
@@ -15,6 +15,7 @@ const common_entity_1 = require("./common.entity");
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const workflow_execution_entity_1 = require("./workflow-execution.entity");
|
|
17
17
|
const workflow_step_execution_entity_1 = require("./workflow-step-execution.entity");
|
|
18
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
18
19
|
let WorkflowExecutionLog = class WorkflowExecutionLog extends common_entity_1.CommonEntity {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
|
@@ -32,13 +33,13 @@ __decorate([
|
|
|
32
33
|
], WorkflowExecutionLog.prototype, "logKey", void 0);
|
|
33
34
|
__decorate([
|
|
34
35
|
(0, typeorm_1.Index)(),
|
|
35
|
-
(0, typeorm_1.ManyToOne)(() => workflow_execution_entity_1.WorkflowExecution, {
|
|
36
|
+
(0, typeorm_1.ManyToOne)(() => workflow_execution_entity_1.WorkflowExecution, { nullable: false }),
|
|
36
37
|
(0, typeorm_1.JoinColumn)(),
|
|
37
38
|
__metadata("design:type", workflow_execution_entity_1.WorkflowExecution)
|
|
38
39
|
], WorkflowExecutionLog.prototype, "workflowExecution", void 0);
|
|
39
40
|
__decorate([
|
|
40
41
|
(0, typeorm_1.Index)(),
|
|
41
|
-
(0, typeorm_1.ManyToOne)(() => workflow_step_execution_entity_1.WorkflowStepExecution, {
|
|
42
|
+
(0, typeorm_1.ManyToOne)(() => workflow_step_execution_entity_1.WorkflowStepExecution, { nullable: true }),
|
|
42
43
|
(0, typeorm_1.JoinColumn)(),
|
|
43
44
|
__metadata("design:type", workflow_step_execution_entity_1.WorkflowStepExecution)
|
|
44
45
|
], WorkflowExecutionLog.prototype, "workflowStepExecution", void 0);
|
|
@@ -78,7 +79,7 @@ __decorate([
|
|
|
78
79
|
], WorkflowExecutionLog.prototype, "sequenceNumber", void 0);
|
|
79
80
|
__decorate([
|
|
80
81
|
(0, typeorm_1.Index)(),
|
|
81
|
-
(0, typeorm_1.Column)({
|
|
82
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
82
83
|
__metadata("design:type", Date)
|
|
83
84
|
], WorkflowExecutionLog.prototype, "occurredAt", void 0);
|
|
84
85
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-execution-log.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-execution-log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,2EAAgE;AAChE,qFAAwE;
|
|
1
|
+
{"version":3,"file":"workflow-execution-log.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-execution-log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,2EAAgE;AAChE,qFAAwE;AACxE,oEAA8D;AAGvD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,4BAAY;IAA/C;;QAiBH,UAAK,GAAW,MAAM,CAAC;KAkC1B;;;;CAAA,CAAA;AAnDY,oDAAoB;AAG7B;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;oDACb;AAKf;IAHC,IAAA,eAAK,GAAE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U,CAAC,EAAE,CAAC;8BAC7B,IAAI;wDAAC;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACnC;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAClC;+BAlDL,oBAAoB;IADhC,IAAA,gBAAM,EAAC,2BAA2B,CAAC;GACvB,oBAAoB,CAmDhC","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, ManyToOne } from 'typeorm';\nimport { WorkflowExecution } from './workflow-execution.entity';\nimport { WorkflowStepExecution } from './workflow-step-execution.entity'\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_workflow_execution_log')\nexport class WorkflowExecutionLog extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n logKey: string;\n\n @Index()\n @ManyToOne(() => WorkflowExecution, { nullable: false })\n @JoinColumn()\n workflowExecution: WorkflowExecution;\n\n @Index()\n @ManyToOne(() => WorkflowStepExecution, { nullable: true })\n @JoinColumn()\n workflowStepExecution: WorkflowStepExecution;\n\n @Index()\n @Column({ type: \"varchar\", default: \"info\" })\n level: string = \"info\";\n\n @Column({ type: \"text\" })\n message: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n eventType: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n source: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n nodeId: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n nodeType: string;\n\n @Index()\n @Column({ type: \"integer\", nullable: true })\n sequenceNumber: number;\n\n @Index()\n @Column({ ...getColumnType('datetime') })\n occurredAt: Date;\n\n @Column({ type: \"simple-json\", nullable: true })\n context: any;\n\n @Column({ type: \"simple-json\", nullable: true })\n metadata: any;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-execution.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-execution.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-execution.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-execution.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,qBACa,iBAAkB,SAAQ,YAAY;IAG/C,mBAAmB,EAAE,MAAM,CAAC;IAK5B,kBAAkB,EAAE,kBAAkB,CAAC;IAIvC,WAAW,EAAE,MAAM,CAAC;IAGpB,mBAAmB,EAAE,MAAM,CAAC;IAI5B,MAAM,EAAE,MAAM,CAAa;IAI3B,WAAW,EAAE,MAAM,CAAY;IAI/B,SAAS,EAAE,IAAI,CAAC;IAIhB,UAAU,EAAE,IAAI,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAGnB,YAAY,EAAE,GAAG,CAAC;IAMlB,aAAa,EAAE,GAAG,CAAC;IAGnB,iBAAiB,EAAE,MAAM,CAAC;IAI1B,kBAAkB,EAAE,MAAM,CAAC;IAG3B,kBAAkB,EAAE,MAAM,CAAC;IAG3B,YAAY,EAAE,MAAM,CAAC;IAGrB,YAAY,EAAE,GAAG,CAAC;IAIlB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAGhD,qBAAqB,EAAE,oBAAoB,EAAE,CAAC;IAG9C,0BAA0B,EAAE,yBAAyB,EAAE,CAAC;CAC3D"}
|
|
@@ -17,6 +17,7 @@ const workflow_definition_entity_1 = require("./workflow-definition.entity");
|
|
|
17
17
|
const workflow_step_execution_entity_1 = require("./workflow-step-execution.entity");
|
|
18
18
|
const workflow_execution_log_entity_1 = require("./workflow-execution-log.entity");
|
|
19
19
|
const workflow_execution_artifact_entity_1 = require("./workflow-execution-artifact.entity");
|
|
20
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
20
21
|
let WorkflowExecution = class WorkflowExecution extends common_entity_1.CommonEntity {
|
|
21
22
|
constructor() {
|
|
22
23
|
super(...arguments);
|
|
@@ -60,12 +61,12 @@ __decorate([
|
|
|
60
61
|
], WorkflowExecution.prototype, "triggerType", void 0);
|
|
61
62
|
__decorate([
|
|
62
63
|
(0, typeorm_1.Index)(),
|
|
63
|
-
(0, typeorm_1.Column)({
|
|
64
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
64
65
|
__metadata("design:type", Date)
|
|
65
66
|
], WorkflowExecution.prototype, "startedAt", void 0);
|
|
66
67
|
__decorate([
|
|
67
68
|
(0, typeorm_1.Index)(),
|
|
68
|
-
(0, typeorm_1.Column)({
|
|
69
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
69
70
|
__metadata("design:type", Date)
|
|
70
71
|
], WorkflowExecution.prototype, "finishedAt", void 0);
|
|
71
72
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-execution.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-execution.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAkF;AAClF,6EAAiE;AACjE,qFAAyE;AACzE,mFAAuE;AACvE,6FAAiF;
|
|
1
|
+
{"version":3,"file":"workflow-execution.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-execution.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAkF;AAClF,6EAAiE;AACjE,qFAAyE;AACzE,mFAAuE;AACvE,6FAAiF;AACjF,oEAA8D;AAGvD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,4BAAY;IAA5C;;QAmBH,WAAM,GAAW,SAAS,CAAC;QAI3B,gBAAW,GAAW,QAAQ,CAAC;KAkDlC;;;;CAAA,CAAA;AAzEY,8CAAiB;AAG1B;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;8DACA;AAK5B;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+CAAkB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7E,IAAA,oBAAU,GAAE;8BACO,+CAAkB;6DAAC;AAIvC;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sDACR;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DAChB;AAI5B;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;;iDACrB;AAI3B;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE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C,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACjB;AAG1B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sDAAqB,EAAE,qBAAqB,CAAC,EAAE,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iEAC5E;AAGhD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oDAAoB,EAAE,oBAAoB,CAAC,EAAE,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gEAC3E;AAG9C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8DAAyB,EAAE,yBAAyB,CAAC,EAAE,CAAC,yBAAyB,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;qEAChF;4BAxE/C,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,uBAAuB,CAAC;GACnB,iBAAiB,CAyE7B","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm';\nimport { WorkflowDefinition } from './workflow-definition.entity'\nimport { WorkflowStepExecution } from './workflow-step-execution.entity';\nimport { WorkflowExecutionLog } from './workflow-execution-log.entity';\nimport { WorkflowExecutionArtifact } from './workflow-execution-artifact.entity';\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_workflow_execution')\nexport class WorkflowExecution extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n executionIdentifier: string;\n\n @Index()\n @ManyToOne(() => WorkflowDefinition, { onDelete: \"CASCADE\", nullable: false })\n @JoinColumn()\n workflowDefinition: WorkflowDefinition;\n\n @Index()\n @Column({ type: \"varchar\" })\n workflowKey: string;\n\n @Column({ type: \"varchar\", nullable: true })\n workflowDisplayName: string;\n\n @Index()\n @Column({ type: \"varchar\", default: \"created\" })\n status: string = \"created\";\n\n @Index()\n @Column({ type: \"varchar\", default: \"manual\" })\n triggerType: string = \"manual\";\n\n @Index()\n @Column({ nullable: true, ...getColumnType('datetime') })\n startedAt: Date;\n\n @Index()\n @Column({ nullable: true, ...getColumnType('datetime') })\n finishedAt: Date;\n\n @Column({ type: \"bigint\", nullable: true })\n durationMs: bigint;\n\n @Column({ type: \"simple-json\", nullable: true })\n inputPayload: any;\n\n // Retained for schema/backward compatibility only. Combined workflow output\n // is no longer persisted here because large loops can make this payload\n // duplicate all step outputs and cause OOMs; use step execution outputs.\n @Column({ type: \"simple-json\", nullable: true })\n outputPayload: any;\n\n @Column({ type: \"varchar\", nullable: true })\n definitionVersion: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n definitionChecksum: string;\n\n @Column({ name: \"definition_snapshot\", type: \"text\", nullable: true})\n definitionSnapshot: string;\n\n @Column({ type: \"text\", nullable: true })\n errorSummary: string;\n\n @Column({ type: \"simple-json\", nullable: true })\n errorDetails: any;\n\n @Index()\n @Column({ type: \"bigint\", nullable: true })\n requestedByUserId: bigint;\n\n @OneToMany(() => WorkflowStepExecution, workflowStepExecution => workflowStepExecution.workflowExecution, { cascade: true })\n workflowStepExecutions: WorkflowStepExecution[];\n\n @OneToMany(() => WorkflowExecutionLog, workflowExecutionLog => workflowExecutionLog.workflowExecution, { cascade: true })\n workflowExecutionLogs: WorkflowExecutionLog[];\n\n @OneToMany(() => WorkflowExecutionArtifact, workflowExecutionArtifact => workflowExecutionArtifact.workflowExecution, { cascade: true })\n workflowExecutionArtifacts: WorkflowExecutionArtifact[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-secret.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-secret.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-secret.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-secret.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI1D,qBACa,cAAe,SAAQ,YAAY;IAG5C,GAAG,EAAE,MAAM,CAAC;IAIZ,WAAW,EAAE,MAAM,CAAC;IAGpB,WAAW,EAAE,MAAM,CAAC;IAGpB,KAAK,EAAE,MAAM,CAAC;IAId,SAAS,EAAE,MAAM,CAAY;IAI7B,MAAM,EAAE,MAAM,CAAY;IAG1B,aAAa,EAAE,IAAI,CAAC;IAGpB,cAAc,EAAE,IAAI,CAAC;CACxB"}
|
|
@@ -13,6 +13,7 @@ exports.WorkflowSecret = void 0;
|
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const common_entity_1 = require("./common.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
16
17
|
let WorkflowSecret = class WorkflowSecret extends common_entity_1.CommonEntity {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
@@ -53,11 +54,11 @@ __decorate([
|
|
|
53
54
|
__metadata("design:type", String)
|
|
54
55
|
], WorkflowSecret.prototype, "status", void 0);
|
|
55
56
|
__decorate([
|
|
56
|
-
(0, typeorm_1.Column)({
|
|
57
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
57
58
|
__metadata("design:type", Date)
|
|
58
59
|
], WorkflowSecret.prototype, "lastRotatedAt", void 0);
|
|
59
60
|
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({
|
|
61
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
61
62
|
__metadata("design:type", Date)
|
|
62
63
|
], WorkflowSecret.prototype, "lastAccessedAt", void 0);
|
|
63
64
|
exports.WorkflowSecret = WorkflowSecret = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-secret.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-secret.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAgD;
|
|
1
|
+
{"version":3,"file":"workflow-secret.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-secret.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAgD;AAChD,oEAA8D;AAGvD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAY;IAAzC;;QAiBH,cAAS,GAAW,QAAQ,CAAC;QAI7B,WAAM,GAAW,QAAQ,CAAC;KAO7B;;;;CAAA,CAAA;AA5BY,wCAAc;AAGvB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;2CAChB;AAIZ;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;mDACR;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACrB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACX;AAId;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;iDAClB;AAI7B;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;8CACrB;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,CAAC;8BAC1C,IAAI;qDAAC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,CAAC;8BACzC,IAAI;sDAAC;yBA3BZ,cAAc;IAD1B,IAAA,gBAAM,EAAC,oBAAoB,CAAC;GAChB,cAAc,CA4B1B","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index } from 'typeorm';\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_workflow_secret')\nexport class WorkflowSecret extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n key: string;\n\n @Index()\n @Column({ type: \"varchar\" })\n displayName: string;\n\n @Column({ type: \"text\", nullable: true })\n description: string;\n\n @Column({ type: \"text\" })\n value: string;\n\n @Index()\n @Column({ type: \"varchar\", default: \"string\" })\n valueType: string = \"string\";\n\n @Index()\n @Column({ type: \"varchar\", default: \"active\" })\n status: string = \"active\";\n\n @Column({ nullable: true, ...getColumnType('datetime') })\n lastRotatedAt: Date;\n\n @Column({ nullable: true, ...getColumnType('datetime') })\n lastAccessedAt: Date;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-step-execution.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-step-execution.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"workflow-step-execution.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-step-execution.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAG/D,qBACa,qBAAsB,SAAQ,YAAY;IAGnD,gBAAgB,EAAE,MAAM,CAAC;IAKzB,iBAAiB,EAAE,iBAAiB,CAAC;IAIrC,MAAM,EAAE,MAAM,CAAC;IAGf,QAAQ,EAAE,MAAM,CAAC;IAIjB,QAAQ,EAAE,MAAM,CAAU;IAI1B,QAAQ,EAAE,MAAM,CAAC;IAIjB,MAAM,EAAE,MAAM,CAAa;IAI3B,aAAa,EAAE,MAAM,CAAK;IAG1B,UAAU,EAAE,MAAM,CAAK;IAGvB,UAAU,EAAE,MAAM,CAAC;IAInB,YAAY,EAAE,MAAM,CAAC;IAIrB,sBAAsB,EAAE,MAAM,CAAC;IAI/B,cAAc,EAAE,MAAM,CAAC;IAIvB,SAAS,EAAE,IAAI,CAAC;IAIhB,UAAU,EAAE,IAAI,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAGnB,SAAS,EAAE,MAAM,CAAC;IAGlB,YAAY,EAAE,GAAG,CAAC;IAGlB,aAAa,EAAE,GAAG,CAAC;IAGnB,cAAc,EAAE,GAAG,CAAC;IAGpB,YAAY,EAAE,GAAG,CAAC;IAGlB,YAAY,EAAE,MAAM,CAAC;IAGrB,YAAY,EAAE,GAAG,CAAC;CACrB"}
|
|
@@ -14,6 +14,7 @@ const openapi = require("@nestjs/swagger");
|
|
|
14
14
|
const common_entity_1 = require("./common.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const workflow_execution_entity_1 = require("./workflow-execution.entity");
|
|
17
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
17
18
|
let WorkflowStepExecution = class WorkflowStepExecution extends common_entity_1.CommonEntity {
|
|
18
19
|
constructor() {
|
|
19
20
|
super(...arguments);
|
|
@@ -92,12 +93,12 @@ __decorate([
|
|
|
92
93
|
], WorkflowStepExecution.prototype, "sequenceNumber", void 0);
|
|
93
94
|
__decorate([
|
|
94
95
|
(0, typeorm_1.Index)(),
|
|
95
|
-
(0, typeorm_1.Column)({
|
|
96
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
96
97
|
__metadata("design:type", Date)
|
|
97
98
|
], WorkflowStepExecution.prototype, "startedAt", void 0);
|
|
98
99
|
__decorate([
|
|
99
100
|
(0, typeorm_1.Index)(),
|
|
100
|
-
(0, typeorm_1.Column)({
|
|
101
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
101
102
|
__metadata("design:type", Date)
|
|
102
103
|
], WorkflowStepExecution.prototype, "finishedAt", void 0);
|
|
103
104
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-step-execution.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-step-execution.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,2EAA+D;
|
|
1
|
+
{"version":3,"file":"workflow-step-execution.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-step-execution.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,2EAA+D;AAC/D,oEAA8D;AAGvD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,4BAAY;IAAhD;;QAmBH,aAAQ,GAAW,MAAM,CAAC;QAQ1B,WAAM,GAAW,SAAS,CAAC;QAI3B,kBAAa,GAAW,CAAC,CAAC;QAG1B,eAAU,GAAW,CAAC,CAAC;KAgD1B;;;;CAAA,CAAA;AAlFY,sDAAqB;AAG9B;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;+DACH;AAKzB;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAiB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAA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E,CAAC;;2DAC9B;gCAjFT,qBAAqB;IADjC,IAAA,gBAAM,EAAC,4BAA4B,CAAC;GACxB,qBAAqB,CAkFjC","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, ManyToOne } from 'typeorm';\nimport { WorkflowExecution } from './workflow-execution.entity'\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_workflow_step_execution')\nexport class WorkflowStepExecution extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n stepExecutionKey: string;\n\n @Index()\n @ManyToOne(() => WorkflowExecution, { onDelete: \"CASCADE\", nullable: false })\n @JoinColumn()\n workflowExecution: WorkflowExecution;\n\n @Index()\n @Column({ type: \"varchar\" })\n nodeId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n nodeName: string;\n\n @Index()\n @Column({ type: \"varchar\", default: \"task\" })\n nodeKind: string = \"task\";\n\n @Index()\n @Column({ type: \"varchar\" })\n nodeType: string;\n\n @Index()\n @Column({ type: \"varchar\", default: \"created\" })\n status: string = \"created\";\n\n @Index()\n @Column({ type: \"integer\", default: 1 })\n attemptNumber: number = 1;\n\n @Column({ type: \"integer\", nullable: true, default: 0 })\n retryCount: number = 0;\n\n @Column({ type: \"integer\", nullable: true })\n maxRetries: number;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n parentNodeId: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n parentStepExecutionKey: string;\n\n @Index()\n @Column({ type: \"integer\", nullable: true })\n sequenceNumber: number;\n\n @Index()\n @Column({ nullable: true, ...getColumnType('datetime') })\n startedAt: Date;\n\n @Index()\n @Column({ nullable: true, ...getColumnType('datetime') })\n finishedAt: Date;\n\n @Column({ type: \"bigint\", nullable: true })\n durationMs: bigint;\n\n @Column({ type: \"bigint\", nullable: true })\n timeoutMs: bigint;\n\n @Column({ type: \"simple-json\", nullable: true })\n inputPayload: any;\n\n @Column({ type: \"simple-json\", nullable: true })\n outputPayload: any;\n\n @Column({ type: \"simple-json\", nullable: true })\n runtimeContext: any;\n\n @Column({ type: \"simple-json\", nullable: true })\n nodeSnapshot: any;\n\n @Column({ type: \"text\", nullable: true })\n errorSummary: string;\n\n @Column({ type: \"simple-json\", nullable: true })\n errorDetails: any;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-trigger-execution.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-trigger-execution.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"workflow-trigger-execution.entity.d.ts","sourceRoot":"","sources":["../../src/entities/workflow-trigger-execution.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAG/D,qBACa,wBAAyB,SAAQ,YAAY;IAGtD,mBAAmB,EAAE,MAAM,CAAC;IAK5B,kBAAkB,EAAE,kBAAkB,CAAC;IAKvC,iBAAiB,EAAE,iBAAiB,CAAC;IAIrC,SAAS,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IAIpB,WAAW,EAAE,MAAM,CAAC;IAIpB,MAAM,EAAE,MAAM,CAAc;IAI5B,OAAO,EAAE,OAAO,CAAS;IAIzB,OAAO,EAAE,IAAI,CAAC;IAId,SAAS,EAAE,IAAI,CAAC;IAIhB,UAAU,EAAE,IAAI,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAInB,MAAM,EAAE,MAAM,CAAC;IAIf,aAAa,EAAE,MAAM,CAAC;IAItB,cAAc,EAAE,MAAM,CAAC;IAGvB,OAAO,EAAE,GAAG,CAAC;IAGb,eAAe,EAAE,GAAG,CAAC;IAGrB,YAAY,EAAE,MAAM,CAAC;IAGrB,YAAY,EAAE,GAAG,CAAC;IAGlB,QAAQ,EAAE,GAAG,CAAC;CACjB"}
|
|
@@ -15,6 +15,7 @@ const common_entity_1 = require("./common.entity");
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const workflow_definition_entity_1 = require("./workflow-definition.entity");
|
|
17
17
|
const workflow_execution_entity_1 = require("./workflow-execution.entity");
|
|
18
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
18
19
|
let WorkflowTriggerExecution = class WorkflowTriggerExecution extends common_entity_1.CommonEntity {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
|
@@ -33,13 +34,13 @@ __decorate([
|
|
|
33
34
|
], WorkflowTriggerExecution.prototype, "triggerExecutionKey", void 0);
|
|
34
35
|
__decorate([
|
|
35
36
|
(0, typeorm_1.Index)(),
|
|
36
|
-
(0, typeorm_1.ManyToOne)(() => workflow_definition_entity_1.WorkflowDefinition, {
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => workflow_definition_entity_1.WorkflowDefinition, { nullable: false }),
|
|
37
38
|
(0, typeorm_1.JoinColumn)(),
|
|
38
39
|
__metadata("design:type", workflow_definition_entity_1.WorkflowDefinition)
|
|
39
40
|
], WorkflowTriggerExecution.prototype, "workflowDefinition", void 0);
|
|
40
41
|
__decorate([
|
|
41
42
|
(0, typeorm_1.Index)(),
|
|
42
|
-
(0, typeorm_1.ManyToOne)(() => workflow_execution_entity_1.WorkflowExecution, {
|
|
43
|
+
(0, typeorm_1.ManyToOne)(() => workflow_execution_entity_1.WorkflowExecution, { nullable: true }),
|
|
43
44
|
(0, typeorm_1.JoinColumn)(),
|
|
44
45
|
__metadata("design:type", workflow_execution_entity_1.WorkflowExecution)
|
|
45
46
|
], WorkflowTriggerExecution.prototype, "workflowExecution", void 0);
|
|
@@ -69,17 +70,17 @@ __decorate([
|
|
|
69
70
|
], WorkflowTriggerExecution.prototype, "matched", void 0);
|
|
70
71
|
__decorate([
|
|
71
72
|
(0, typeorm_1.Index)(),
|
|
72
|
-
(0, typeorm_1.Column)({
|
|
73
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
73
74
|
__metadata("design:type", Date)
|
|
74
75
|
], WorkflowTriggerExecution.prototype, "firedAt", void 0);
|
|
75
76
|
__decorate([
|
|
76
77
|
(0, typeorm_1.Index)(),
|
|
77
|
-
(0, typeorm_1.Column)({
|
|
78
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
78
79
|
__metadata("design:type", Date)
|
|
79
80
|
], WorkflowTriggerExecution.prototype, "startedAt", void 0);
|
|
80
81
|
__decorate([
|
|
81
82
|
(0, typeorm_1.Index)(),
|
|
82
|
-
(0, typeorm_1.Column)({
|
|
83
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('datetime') }),
|
|
83
84
|
__metadata("design:type", Date)
|
|
84
85
|
], WorkflowTriggerExecution.prototype, "finishedAt", void 0);
|
|
85
86
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-trigger-execution.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-trigger-execution.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,6EAAkE;AAClE,2EAA+D;
|
|
1
|
+
{"version":3,"file":"workflow-trigger-execution.entity.js","sourceRoot":"","sources":["../../src/entities/workflow-trigger-execution.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAuE;AACvE,6EAAkE;AAClE,2EAA+D;AAC/D,oEAA8D;AAGvD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,S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,IAAI,EAAE,CAAC;;8DAC9B;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DAClC;mCA1EL,wBAAwB;IADpC,IAAA,gBAAM,EAAC,+BAA+B,CAAC;GAC3B,wBAAwB,CA2EpC","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, ManyToOne } from 'typeorm';\nimport { WorkflowDefinition } from './workflow-definition.entity';\nimport { WorkflowExecution } from './workflow-execution.entity'\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_workflow_trigger_execution')\nexport class WorkflowTriggerExecution extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n triggerExecutionKey: string;\n\n @Index()\n @ManyToOne(() => WorkflowDefinition, { nullable: false })\n @JoinColumn()\n workflowDefinition: WorkflowDefinition;\n\n @Index()\n @ManyToOne(() => WorkflowExecution, { nullable: true })\n @JoinColumn()\n workflowExecution: WorkflowExecution;\n\n @Index()\n @Column({ type: \"varchar\" })\n triggerId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n triggerName: string;\n\n @Index()\n @Column({ type: \"varchar\" })\n triggerType: string;\n\n @Index()\n @Column({ type: \"varchar\", default: \"received\" })\n status: string = \"received\";\n\n @Index()\n @Column({ nullable: true, default: false })\n matched: boolean = false;\n\n @Index()\n @Column({ ...getColumnType('datetime') })\n firedAt: Date;\n\n @Index()\n @Column({ nullable: true, ...getColumnType('datetime') })\n startedAt: Date;\n\n @Index()\n @Column({ nullable: true, ...getColumnType('datetime') })\n finishedAt: Date;\n\n @Column({ type: \"bigint\", nullable: true })\n durationMs: bigint;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n source: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n correlationId: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n idempotencyKey: string;\n\n @Column({ type: \"simple-json\", nullable: true })\n payload: any;\n\n @Column({ type: \"simple-json\", nullable: true })\n triggerSnapshot: any;\n\n @Column({ type: \"text\", nullable: true })\n errorSummary: string;\n\n @Column({ type: \"simple-json\", nullable: true })\n errorDetails: any;\n\n @Column({ type: \"simple-json\", nullable: true })\n metadata: any;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-exception.filter.d.ts","sourceRoot":"","sources":["../../src/filters/http-exception.filter.ts"],"names":[],"mappings":"AACA,OAAO,EACH,eAAe,EAEf,aAAa,EAIhB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAItE,qBAEa,mBAAoB,YAAW,eAAe;IAG3C,OAAO,CAAC,QAAQ,CAAC,WAAW;IAFxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;gBAElC,WAAW,EAAE,kBAAkB;IAI5D,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"http-exception.filter.d.ts","sourceRoot":"","sources":["../../src/filters/http-exception.filter.ts"],"names":[],"mappings":"AACA,OAAO,EACH,eAAe,EAEf,aAAa,EAIhB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAItE,qBAEa,mBAAoB,YAAW,eAAe;IAG3C,OAAO,CAAC,QAAQ,CAAC,WAAW;IAFxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;gBAElC,WAAW,EAAE,kBAAkB;IAI5D,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa;CAoD5C"}
|
|
@@ -26,10 +26,14 @@ let HttpExceptionFilter = HttpExceptionFilter_1 = class HttpExceptionFilter {
|
|
|
26
26
|
const request = ctx.getRequest();
|
|
27
27
|
const isHttp = exception instanceof common_1.HttpException;
|
|
28
28
|
const explicitStatus = isHttp ? exception.getStatus() : undefined;
|
|
29
|
+
const rawStatus = exception?.status ?? exception?.statusCode;
|
|
30
|
+
const derivedStatus = typeof rawStatus === 'number' && rawStatus >= 400 && rawStatus < 600
|
|
31
|
+
? rawStatus
|
|
32
|
+
: undefined;
|
|
29
33
|
const code = this.errorMapper.mapException(exception);
|
|
30
34
|
const defaultStatus = this.errorMapper.getHttpStatus(code);
|
|
31
35
|
const message = code === 'solidx-unknown-error' ? `${exception?.message}` : this.errorMapper.getMessage(code);
|
|
32
|
-
const status = explicitStatus ?? defaultStatus ?? 500;
|
|
36
|
+
const status = explicitStatus ?? derivedStatus ?? defaultStatus ?? 500;
|
|
33
37
|
this.logger.error(`[${status} ${logging_interceptor_1.HttpStatusCodeMessages[status] || 'Internal Server Error'}] ${request?.method} ${request?.url} - ${exception?.message || message} [code=${code}]`);
|
|
34
38
|
if (exception?.stack) {
|
|
35
39
|
this.logger.error(exception.stack);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-exception.filter.js","sourceRoot":"","sources":["../../src/filters/http-exception.filter.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,2CAOwB;AAExB,6EAA6E;AAC7E,0EAAsE;AAM/D,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAG5B,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;QAF3C,WAAM,GAAG,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;QAG3D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,SAAc,EAAE,IAAmB;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAY,CAAC;QAC7C,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAW,CAAC;QAE1C,MAAM,MAAM,GAAG,SAAS,YAAY,sBAAa,CAAC;QA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D,MAAM,OAAO,GAAG,IAAI,KAAK,sBAAsB,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAI9G,MAAM,MAAM,GAAG,cAAc,IAAI,aAAa,IAAI,aAAa,IAAI,GAAG,CAAC;QAGvE,IAAI,CAAC,MAAM,CAAC,KAAK,CACb,IAAI,MAAM,IAAI,4CAAsB,CAAC,MAAM,CAAC,IAAI,uBAAuB,KAAK,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,GAAG,MAAM,SAAS,EAAE,OAAO,IAAI,OAAO,UAAU,IAAI,GAAG,CAClK,CAAC;QACF,IAAI,SAAS,EAAE,KAAK,EAAE,CAAC;YACnB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QAGD,MAAM,KAAK,GACP,CAAC,MAAM,IAAK,SAAS,CAAC,WAAW,EAAE,EAAU,CAAC;YAC9C,SAAS,EAAE,QAAQ;YACnB,EAAE,CAAC;QAGP,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;YACzB,UAAU,EAAE,MAAM;YAClB,iBAAiB,EAAE,4CAAsB,CAAC,MAAM,CAAC,IAAI,uBAAuB;YAE5E,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,OAAO;YAGd,IAAI,EAAE,KAAK;SACd,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA3DY,kDAAmB;8BAAnB,mBAAmB;IAF/B,IAAA,cAAK,GAAE;IACP,IAAA,mBAAU,GAAE;qCAIiC,yCAAkB;GAHnD,mBAAmB,CA2D/B","sourcesContent":["// src/common/filters/http-exception.filter.ts\nimport {\n ExceptionFilter,\n Catch,\n ArgumentsHost,\n Logger,\n Injectable,\n HttpException,\n} from '@nestjs/common';\nimport { Response, Request } from 'express';\nimport { HttpStatusCodeMessages } from '../interceptors/logging.interceptor';\nimport { ErrorMapperService } from 'src/helpers/error-mapper.service';\nimport { ErrorCode } from 'src/interfaces';\n\n\n@Catch()\n@Injectable()\nexport class HttpExceptionFilter implements ExceptionFilter {\n private readonly logger = new Logger(HttpExceptionFilter.name);\n\n constructor(private readonly errorMapper: ErrorMapperService) {\n this.logger.debug('HttpExceptionFilter initialized');\n }\n\n catch(exception: any, host: ArgumentsHost) {\n const ctx = host.switchToHttp();\n const response = ctx.getResponse<Response>();\n const request = ctx.getRequest<Request>();\n\n const isHttp = exception instanceof HttpException;\n const explicitStatus = isHttp ? exception.getStatus() : undefined;\n\n // Errors from http-errors-style libraries (e.g. body-parser's PayloadTooLargeError)\n // are plain Errors carrying their own status. Honour it rather than collapsing to 500.\n const rawStatus = exception?.status ?? exception?.statusCode;\n const derivedStatus =\n typeof rawStatus === 'number' && rawStatus >= 400 && rawStatus < 600\n ? rawStatus\n : undefined;\n\n // Canonical code + static message\n const code: ErrorCode = this.errorMapper.mapException(exception);\n const defaultStatus = this.errorMapper.getHttpStatus(code);\n const message = code === 'solidx-unknown-error' ? `${exception?.message}` : this.errorMapper.getMessage(code);\n\n // derivedStatus must precede defaultStatus: getHttpStatus() returns a hard 500\n // for unmatched codes, so it is never undefined and would always win otherwise.\n const status = explicitStatus ?? derivedStatus ?? defaultStatus ?? 500;\n\n // Logging\n this.logger.error(\n `[${status} ${HttpStatusCodeMessages[status] || 'Internal Server Error'}] ${request?.method} ${request?.url} - ${exception?.message || message} [code=${code}]`,\n );\n if (exception?.stack) {\n this.logger.error(exception.stack);\n }\n\n // Preserve any extra data the exception carried (optional)\n const extra =\n (isHttp && (exception.getResponse?.() as any)) ??\n exception?.response ??\n {};\n\n // Keep your legacy shape; add canonical code\n response.status(status).json({\n statusCode: status,\n statusCodeMessage: HttpStatusCodeMessages[status] || 'Internal Server Error',\n // Keeping this for backward compatibility..\n message: message,\n errorCode: code,\n error: message,\n // We can make this conditional based on whether we are running in prod mode or dev mode...\n // errorStack: exception.stack,\n data: extra,\n });\n }\n}"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NestExpressApplication } from '@nestjs/platform-express';
|
|
2
|
+
import { PermissionsPolicyConfig, SolidSecurityOptions } from './security.helper';
|
|
2
3
|
export interface SolidSwaggerOptions {
|
|
3
4
|
title?: string;
|
|
4
5
|
description?: string;
|
|
@@ -8,8 +9,10 @@ export interface SolidBootstrapOptions {
|
|
|
8
9
|
globalPrefix?: string;
|
|
9
10
|
swagger?: SolidSwaggerOptions | false;
|
|
10
11
|
permissionsPolicyOverrides?: Partial<PermissionsPolicyConfig>;
|
|
12
|
+
security?: SolidSecurityOptions;
|
|
11
13
|
verboseBootstrap?: boolean;
|
|
14
|
+
bodyLimit?: string;
|
|
12
15
|
}
|
|
13
|
-
export declare function bootstrapSolidApp(appModuleFactory: () => Promise<any>, options?: SolidBootstrapOptions): Promise<
|
|
16
|
+
export declare function bootstrapSolidApp(appModuleFactory: () => Promise<any>, options?: SolidBootstrapOptions): Promise<NestExpressApplication>;
|
|
14
17
|
export declare function bootstrapSolidCli(appModuleFactory: () => Promise<any>): Promise<void>;
|
|
15
18
|
//# sourceMappingURL=bootstrap.helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/bootstrap.helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/bootstrap.helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAGL,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAyB3B,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IAEpC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC;IAEtC,0BAA0B,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAE9D,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAEhC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAU3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EACpC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC,CAgJjC;AAgBD,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC,CAwCf"}
|
|
@@ -36,10 +36,11 @@ function registerGlobalProcessHandlers() {
|
|
|
36
36
|
}
|
|
37
37
|
async function bootstrapSolidApp(appModuleFactory, options = {}) {
|
|
38
38
|
registerGlobalProcessHandlers();
|
|
39
|
-
const { globalPrefix = 'api', swagger = {}, permissionsPolicyOverrides = {}, verboseBootstrap = false } = options;
|
|
39
|
+
const { globalPrefix = 'api', swagger = {}, permissionsPolicyOverrides = {}, security = {}, verboseBootstrap = false, bodyLimit = '10mb', } = options;
|
|
40
40
|
const startTime = Date.now();
|
|
41
41
|
const appModule = await appModuleFactory();
|
|
42
42
|
const app = await core_1.NestFactory.create(appModule, {
|
|
43
|
+
bodyParser: false,
|
|
43
44
|
logger: nest_winston_1.WinstonModule.createLogger({ ...(0, winston_logger_1.createWinstonLoggerConfig)(), level: verboseBootstrap ? 'debug' : 'error' }),
|
|
44
45
|
});
|
|
45
46
|
const apiEnabled = (0, environment_helper_1.parseBooleanEnv)('API_ENABLED', true);
|
|
@@ -48,11 +49,11 @@ async function bootstrapSolidApp(appModuleFactory, options = {}) {
|
|
|
48
49
|
app
|
|
49
50
|
.get(nest_winston_1.WINSTON_MODULE_NEST_PROVIDER)
|
|
50
51
|
.log('API server disabled via API_ENABLED=false. Skipping HTTP listen.', 'Bootstrap');
|
|
51
|
-
return;
|
|
52
|
+
return app;
|
|
52
53
|
}
|
|
53
54
|
const server = app.getHttpAdapter().getInstance();
|
|
54
55
|
server.get('/', (_req, res) => res.status(200).send('SOLID OK'));
|
|
55
|
-
app.use((0, helmet_1.default)((0, security_helper_1.buildDefaultSecurityHeaderOptions)()));
|
|
56
|
+
app.use((0, helmet_1.default)((0, security_helper_1.buildDefaultSecurityHeaderOptions)(security)));
|
|
56
57
|
const isSwaggerPath = (path) => path === '/docs' ||
|
|
57
58
|
path === '/docs/' ||
|
|
58
59
|
path.startsWith('/docs/') ||
|
|
@@ -82,6 +83,8 @@ async function bootstrapSolidApp(appModuleFactory, options = {}) {
|
|
|
82
83
|
}
|
|
83
84
|
next();
|
|
84
85
|
});
|
|
86
|
+
app.useBodyParser('json', { limit: bodyLimit });
|
|
87
|
+
app.useBodyParser('urlencoded', { limit: bodyLimit, extended: true });
|
|
85
88
|
app.useGlobalPipes(new common_1.ValidationPipe({
|
|
86
89
|
transform: true,
|
|
87
90
|
transformOptions: { enableImplicitConversion: true },
|
|
@@ -116,6 +119,7 @@ async function bootstrapSolidApp(appModuleFactory, options = {}) {
|
|
|
116
119
|
app.useLogger(app.get(nest_winston_1.WINSTON_MODULE_NEST_PROVIDER));
|
|
117
120
|
const elapsed = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
118
121
|
process.stdout.write(`\x1b[32mServer started on port ${port} in ${elapsed}s\x1b[0m\n`);
|
|
122
|
+
return app;
|
|
119
123
|
}
|
|
120
124
|
async function bootstrapSolidCli(appModuleFactory) {
|
|
121
125
|
registerGlobalProcessHandlers();
|