@xxmachina/common 19.0.0-preview.9 → 19.1.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/_shared/auth/index.d.ts +8 -1
- package/_shared/auth/passports/anonymous/index.d.ts +8 -1
- package/_shared/auth/passports/firebase/index.d.ts +19 -2
- package/_shared/auth/passports/internal/index.d.ts +17 -1
- package/_shared/auth/passports/msal/index.d.ts +26 -2
- package/_shared/meta/index.d.ts +8 -0
- package/_shared/meta/redis/index.d.ts +39 -2
- package/auth/index.d.ts +16 -1
- package/azure-auth/index.d.ts +41 -2
- package/domain/builder/index.d.ts +81 -0
- package/domain/builder/screen-item/index.d.ts +7 -1
- package/domain/index.d.ts +2 -1
- package/domain/models/index.d.ts +377 -13
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs +20 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs +41 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs +34 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs +49 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth.mjs +25 -0
- package/fesm2022/xxmachina-common-_shared-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs +99 -0
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-meta.mjs +26 -0
- package/fesm2022/xxmachina-common-_shared-meta.mjs.map +1 -0
- package/fesm2022/xxmachina-common-auth.mjs +17 -0
- package/fesm2022/xxmachina-common-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-azure-auth.mjs +160 -0
- package/fesm2022/xxmachina-common-azure-auth.mjs.map +1 -0
- package/{domain/builder/screen-item/screen-item.builder.js → fesm2022/xxmachina-common-domain-builder-screen-item.mjs} +10 -11
- package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs +494 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-models.mjs +842 -0
- package/fesm2022/xxmachina-common-domain-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain.mjs +7 -0
- package/fesm2022/xxmachina-common-domain.mjs.map +1 -0
- package/fesm2022/xxmachina-common-firebase-auth.mjs +36 -0
- package/fesm2022/xxmachina-common-firebase-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-converters-google.mjs +39 -0
- package/fesm2022/xxmachina-common-infra-converters-google.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs +13 -0
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs +61 -0
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-resend.mjs +10 -0
- package/fesm2022/xxmachina-common-infra-external-resend.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external.mjs +36 -0
- package/fesm2022/xxmachina-common-infra-external.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs +34 -0
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs +20 -0
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs +18 -0
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs +74 -0
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs +41 -0
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs +113 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra.mjs +378 -0
- package/fesm2022/xxmachina-common-infra.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-builders.mjs +79 -0
- package/fesm2022/xxmachina-common-invoice-domain-builders.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-models.mjs +428 -0
- package/fesm2022/xxmachina-common-invoice-domain-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-resolvers.mjs +41 -0
- package/fesm2022/xxmachina-common-invoice-domain-resolvers.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain.mjs +8 -0
- package/fesm2022/xxmachina-common-invoice-domain.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-contract.mjs +27 -0
- package/fesm2022/xxmachina-common-invoice-usecase-contract.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs +191 -0
- package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-order.mjs +36 -0
- package/fesm2022/xxmachina-common-invoice-usecase-order.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs +36 -0
- package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-graphql.mjs +60 -0
- package/fesm2022/xxmachina-common-services-graphql.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-query-config.mjs +44 -0
- package/fesm2022/xxmachina-common-services-query-config.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-query.mjs +65 -0
- package/fesm2022/xxmachina-common-services-query.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-speech.mjs +178 -0
- package/fesm2022/xxmachina-common-services-speech.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-transformer.mjs +27 -0
- package/fesm2022/xxmachina-common-services-transformer.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-firestore.mjs +33 -0
- package/fesm2022/xxmachina-common-stores-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-hasura.mjs +32 -0
- package/fesm2022/xxmachina-common-stores-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-inmemory.mjs +102 -0
- package/fesm2022/xxmachina-common-stores-inmemory.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores.mjs +16 -0
- package/fesm2022/xxmachina-common-stores.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-assistant.mjs +67 -0
- package/fesm2022/xxmachina-common-usecase-assistant.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-database.mjs +95 -0
- package/fesm2022/xxmachina-common-usecase-database.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-graphql.mjs +51 -0
- package/fesm2022/xxmachina-common-usecase-graphql.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-link.mjs +26 -0
- package/fesm2022/xxmachina-common-usecase-link.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-project.mjs +35 -0
- package/fesm2022/xxmachina-common-usecase-project.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-spec.mjs +45 -0
- package/fesm2022/xxmachina-common-usecase-spec.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase.mjs +198 -0
- package/fesm2022/xxmachina-common-usecase.mjs.map +1 -0
- package/{utils/crypto.js → fesm2022/xxmachina-common-utils-crypto.mjs} +10 -12
- package/fesm2022/xxmachina-common-utils-crypto.mjs.map +1 -0
- package/{utils/extract-display-fields.js → fesm2022/xxmachina-common-utils.mjs} +7 -4
- package/fesm2022/xxmachina-common-utils.mjs.map +1 -0
- package/fesm2022/xxmachina-common.mjs +6 -0
- package/fesm2022/xxmachina-common.mjs.map +1 -0
- package/firebase-auth/index.d.ts +6 -0
- package/index.d.ts +1 -0
- package/infra/converters/google/index.d.ts +17 -0
- package/infra/external/data-connect/index.d.ts +7 -0
- package/infra/external/index.d.ts +24 -0
- package/infra/external/quick-js/index.d.ts +24 -0
- package/infra/external/resend/index.d.ts +16 -0
- package/infra/index.d.ts +218 -0
- package/infra/query/firestore/index.d.ts +20 -0
- package/infra/query/hasura/index.d.ts +9 -0
- package/infra/repository/dataconnect/index.d.ts +28 -0
- package/infra/repository/firestore/index.d.ts +42 -0
- package/infra/repository/hasura/index.d.ts +24 -0
- package/infra/repository/notion/index.d.ts +101 -0
- package/invoice/domain/builders/index.d.ts +31 -0
- package/invoice/domain/index.d.ts +3 -0
- package/invoice/domain/models/index.d.ts +78 -0
- package/{domain/resolvers/invoice.resolver.d.ts → invoice/domain/resolvers/index.d.ts} +6 -2
- package/invoice/usecase/contract/index.d.ts +14 -0
- package/invoice/usecase/invoice/index.d.ts +34 -0
- package/invoice/usecase/order/index.d.ts +16 -0
- package/invoice/usecase/partner/index.d.ts +16 -0
- package/package.json +238 -14
- package/services/graphql/index.d.ts +32 -0
- package/services/query/config/index.d.ts +18 -0
- package/services/query/index.d.ts +29 -0
- package/services/speech/index.d.ts +37 -0
- package/services/transformer/index.d.ts +14 -0
- package/stores/firestore/index.d.ts +17 -0
- package/stores/hasura/index.d.ts +17 -0
- package/stores/index.d.ts +22 -40
- package/stores/inmemory/index.d.ts +33 -0
- package/usecase/assistant/index.d.ts +18 -1
- package/usecase/database/index.d.ts +39 -1
- package/usecase/graphql/index.d.ts +17 -1
- package/usecase/index.d.ts +73 -1
- package/usecase/link/index.d.ts +13 -1
- package/usecase/project/index.d.ts +16 -1
- package/usecase/spec/index.d.ts +17 -1
- package/utils/crypto/index.d.ts +9 -0
- package/utils/index.d.ts +5 -1
- package/README.md +0 -11
- package/_shared/auth/auth.module.d.ts +0 -6
- package/_shared/auth/auth.module.js +0 -22
- package/_shared/auth/auth.module.js.map +0 -1
- package/_shared/auth/index.js +0 -5
- package/_shared/auth/index.js.map +0 -1
- package/_shared/auth/passports/anonymous/anonymous.strategy.d.ts +0 -6
- package/_shared/auth/passports/anonymous/anonymous.strategy.js +0 -19
- package/_shared/auth/passports/anonymous/anonymous.strategy.js.map +0 -1
- package/_shared/auth/passports/anonymous/index.js +0 -5
- package/_shared/auth/passports/anonymous/index.js.map +0 -1
- package/_shared/auth/passports/firebase/firebase.guard.d.ts +0 -6
- package/_shared/auth/passports/firebase/firebase.guard.js +0 -23
- package/_shared/auth/passports/firebase/firebase.guard.js.map +0 -1
- package/_shared/auth/passports/firebase/firebase.strategy.d.ts +0 -10
- package/_shared/auth/passports/firebase/firebase.strategy.js +0 -22
- package/_shared/auth/passports/firebase/firebase.strategy.js.map +0 -1
- package/_shared/auth/passports/firebase/index.js +0 -6
- package/_shared/auth/passports/firebase/index.js.map +0 -1
- package/_shared/auth/passports/internal/index.js +0 -5
- package/_shared/auth/passports/internal/index.js.map +0 -1
- package/_shared/auth/passports/internal/internal.strategy.d.ts +0 -14
- package/_shared/auth/passports/internal/internal.strategy.js +0 -33
- package/_shared/auth/passports/internal/internal.strategy.js.map +0 -1
- package/_shared/auth/passports/msal/index.js +0 -6
- package/_shared/auth/passports/msal/index.js.map +0 -1
- package/_shared/auth/passports/msal/msal.guard.d.ts +0 -4
- package/_shared/auth/passports/msal/msal.guard.js +0 -13
- package/_shared/auth/passports/msal/msal.guard.js.map +0 -1
- package/_shared/auth/passports/msal/msal.strategy.d.ts +0 -17
- package/_shared/auth/passports/msal/msal.strategy.js +0 -43
- package/_shared/auth/passports/msal/msal.strategy.js.map +0 -1
- package/_shared/meta/decorators.d.ts +0 -4
- package/_shared/meta/decorators.js +0 -25
- package/_shared/meta/decorators.js.map +0 -1
- package/_shared/meta/redis/index.js +0 -6
- package/_shared/meta/redis/index.js.map +0 -1
- package/_shared/meta/redis/redis.config.d.ts +0 -9
- package/_shared/meta/redis/redis.config.js +0 -10
- package/_shared/meta/redis/redis.config.js.map +0 -1
- package/_shared/meta/redis/redis.repository.d.ts +0 -23
- package/_shared/meta/redis/redis.repository.js +0 -108
- package/_shared/meta/redis/redis.repository.js.map +0 -1
- package/auth/auth.service.d.ts +0 -10
- package/auth/auth.service.js +0 -12
- package/auth/auth.service.js.map +0 -1
- package/auth/index.js +0 -5
- package/auth/index.js.map +0 -1
- package/azure-auth/auth.di.d.ts +0 -4
- package/azure-auth/auth.di.js +0 -56
- package/azure-auth/auth.di.js.map +0 -1
- package/azure-auth/auth.service.d.ts +0 -32
- package/azure-auth/auth.service.js +0 -115
- package/azure-auth/auth.service.js.map +0 -1
- package/azure-auth/index.js +0 -6
- package/azure-auth/index.js.map +0 -1
- package/domain/builder/command/command.builder.d.ts +0 -5
- package/domain/builder/command/command.builder.js +0 -30
- package/domain/builder/command/command.builder.js.map +0 -1
- package/domain/builder/command/index.d.ts +0 -1
- package/domain/builder/command/index.js +0 -5
- package/domain/builder/command/index.js.map +0 -1
- package/domain/builder/command-action/command-action.builder.d.ts +0 -40
- package/domain/builder/command-action/command-action.builder.js +0 -139
- package/domain/builder/command-action/command-action.builder.js.map +0 -1
- package/domain/builder/command-action/index.d.ts +0 -1
- package/domain/builder/command-action/index.js +0 -5
- package/domain/builder/command-action/index.js.map +0 -1
- package/domain/builder/er/er.builder.d.ts +0 -19
- package/domain/builder/er/er.builder.js +0 -112
- package/domain/builder/er/er.builder.js.map +0 -1
- package/domain/builder/er/index.d.ts +0 -1
- package/domain/builder/er/index.js +0 -5
- package/domain/builder/er/index.js.map +0 -1
- package/domain/builder/screen-item/index.js +0 -5
- package/domain/builder/screen-item/index.js.map +0 -1
- package/domain/builder/screen-item/screen-item.builder.d.ts +0 -5
- package/domain/builder/screen-item/screen-item.builder.js.map +0 -1
- package/domain/index.js +0 -5
- package/domain/index.js.map +0 -1
- package/domain/invoice/builders/email/email.builder.d.ts +0 -18
- package/domain/invoice/builders/email/email.builder.js +0 -29
- package/domain/invoice/builders/email/email.builder.js.map +0 -1
- package/domain/invoice/builders/email/index.d.ts +0 -1
- package/domain/invoice/builders/email/index.js +0 -5
- package/domain/invoice/builders/email/index.js.map +0 -1
- package/domain/invoice/builders/message/index.d.ts +0 -1
- package/domain/invoice/builders/message/index.js +0 -5
- package/domain/invoice/builders/message/index.js.map +0 -1
- package/domain/invoice/builders/message/message.builder.d.ts +0 -6
- package/domain/invoice/builders/message/message.builder.js +0 -43
- package/domain/invoice/builders/message/message.builder.js.map +0 -1
- package/domain/invoice/builders/title/index.d.ts +0 -1
- package/domain/invoice/builders/title/index.js +0 -5
- package/domain/invoice/builders/title/index.js.map +0 -1
- package/domain/invoice/builders/title/title.builder.d.ts +0 -4
- package/domain/invoice/builders/title/title.builder.js +0 -11
- package/domain/invoice/builders/title/title.builder.js.map +0 -1
- package/domain/invoice/models/backoffice/contract.d.ts +0 -10
- package/domain/invoice/models/backoffice/contract.js +0 -50
- package/domain/invoice/models/backoffice/contract.js.map +0 -1
- package/domain/invoice/models/backoffice/index.d.ts +0 -5
- package/domain/invoice/models/backoffice/index.js +0 -9
- package/domain/invoice/models/backoffice/index.js.map +0 -1
- package/domain/invoice/models/backoffice/invoice-mail.d.ts +0 -8
- package/domain/invoice/models/backoffice/invoice-mail.js +0 -7
- package/domain/invoice/models/backoffice/invoice-mail.js.map +0 -1
- package/domain/invoice/models/backoffice/invoice.d.ts +0 -19
- package/domain/invoice/models/backoffice/invoice.js +0 -91
- package/domain/invoice/models/backoffice/invoice.js.map +0 -1
- package/domain/invoice/models/backoffice/order.d.ts +0 -26
- package/domain/invoice/models/backoffice/order.js +0 -157
- package/domain/invoice/models/backoffice/order.js.map +0 -1
- package/domain/invoice/models/backoffice/partner.d.ts +0 -17
- package/domain/invoice/models/backoffice/partner.js +0 -96
- package/domain/invoice/models/backoffice/partner.js.map +0 -1
- package/domain/invoice/models/index.d.ts +0 -1
- package/domain/invoice/models/index.js +0 -5
- package/domain/invoice/models/index.js.map +0 -1
- package/domain/models/agent/assistant.d.ts +0 -9
- package/domain/models/agent/assistant.js +0 -31
- package/domain/models/agent/assistant.js.map +0 -1
- package/domain/models/agent/index.d.ts +0 -1
- package/domain/models/agent/index.js +0 -5
- package/domain/models/agent/index.js.map +0 -1
- package/domain/models/bookmarklet/bookmarklet.d.ts +0 -9
- package/domain/models/bookmarklet/bookmarklet.js +0 -34
- package/domain/models/bookmarklet/bookmarklet.js.map +0 -1
- package/domain/models/bookmarklet/index.d.ts +0 -1
- package/domain/models/bookmarklet/index.js +0 -5
- package/domain/models/bookmarklet/index.js.map +0 -1
- package/domain/models/calendar-utils.d.ts +0 -5
- package/domain/models/calendar-utils.js +0 -43
- package/domain/models/calendar-utils.js.map +0 -1
- package/domain/models/command/command.d.ts +0 -18
- package/domain/models/command/command.helper.d.ts +0 -4
- package/domain/models/command/command.helper.js +0 -14
- package/domain/models/command/command.helper.js.map +0 -1
- package/domain/models/command/command.js +0 -40
- package/domain/models/command/command.js.map +0 -1
- package/domain/models/command/index.d.ts +0 -2
- package/domain/models/command/index.js +0 -6
- package/domain/models/command/index.js.map +0 -1
- package/domain/models/database/database.d.ts +0 -4
- package/domain/models/database/database.js +0 -7
- package/domain/models/database/database.js.map +0 -1
- package/domain/models/database/index.d.ts +0 -1
- package/domain/models/database/index.js +0 -5
- package/domain/models/database/index.js.map +0 -1
- package/domain/models/endpoint/endpoint.helper.d.ts +0 -4
- package/domain/models/endpoint/endpoint.helper.js +0 -21
- package/domain/models/endpoint/endpoint.helper.js.map +0 -1
- package/domain/models/endpoint/index.d.ts +0 -1
- package/domain/models/endpoint/index.js +0 -5
- package/domain/models/endpoint/index.js.map +0 -1
- package/domain/models/index.js +0 -12
- package/domain/models/index.js.map +0 -1
- package/domain/models/links/google/google.d.ts +0 -12
- package/domain/models/links/google/google.js +0 -47
- package/domain/models/links/google/google.js.map +0 -1
- package/domain/models/links/google/index.d.ts +0 -1
- package/domain/models/links/google/index.js +0 -5
- package/domain/models/links/google/index.js.map +0 -1
- package/domain/models/openapi/index.d.ts +0 -2
- package/domain/models/openapi/index.js +0 -6
- package/domain/models/openapi/index.js.map +0 -1
- package/domain/models/openapi/openapi.d.ts +0 -32
- package/domain/models/openapi/openapi.js +0 -87
- package/domain/models/openapi/openapi.js.map +0 -1
- package/domain/models/openapi/openapi.schema.d.ts +0 -76
- package/domain/models/openapi/openapi.schema.js +0 -3
- package/domain/models/openapi/openapi.schema.js.map +0 -1
- package/domain/models/operators/assistancts/base.d.ts +0 -5
- package/domain/models/operators/assistancts/base.js +0 -13
- package/domain/models/operators/assistancts/base.js.map +0 -1
- package/domain/models/operators/assistancts/index.d.ts +0 -1
- package/domain/models/operators/assistancts/index.js +0 -5
- package/domain/models/operators/assistancts/index.js.map +0 -1
- package/domain/models/operators/base.d.ts +0 -13
- package/domain/models/operators/base.js +0 -10
- package/domain/models/operators/base.js.map +0 -1
- package/domain/models/operators/index.d.ts +0 -4
- package/domain/models/operators/index.js +0 -8
- package/domain/models/operators/index.js.map +0 -1
- package/domain/models/operators/systems/base.d.ts +0 -5
- package/domain/models/operators/systems/base.js +0 -3
- package/domain/models/operators/systems/base.js.map +0 -1
- package/domain/models/operators/systems/graphql.d.ts +0 -5
- package/domain/models/operators/systems/graphql.js +0 -3
- package/domain/models/operators/systems/graphql.js.map +0 -1
- package/domain/models/operators/systems/index.d.ts +0 -3
- package/domain/models/operators/systems/index.js +0 -7
- package/domain/models/operators/systems/index.js.map +0 -1
- package/domain/models/operators/systems/rest.d.ts +0 -6
- package/domain/models/operators/systems/rest.js +0 -3
- package/domain/models/operators/systems/rest.js.map +0 -1
- package/domain/models/operators/workflows/index.d.ts +0 -1
- package/domain/models/operators/workflows/index.js +0 -5
- package/domain/models/operators/workflows/index.js.map +0 -1
- package/domain/models/operators/workflows/workflow.d.ts +0 -9
- package/domain/models/operators/workflows/workflow.js +0 -3
- package/domain/models/operators/workflows/workflow.js.map +0 -1
- package/domain/models/project.d.ts +0 -22
- package/domain/models/project.js +0 -9
- package/domain/models/project.js.map +0 -1
- package/domain/models/query/index.d.ts +0 -2
- package/domain/models/query/index.js +0 -6
- package/domain/models/query/index.js.map +0 -1
- package/domain/models/query/query.d.ts +0 -27
- package/domain/models/query/query.helper.d.ts +0 -23
- package/domain/models/query/query.helper.js +0 -172
- package/domain/models/query/query.helper.js.map +0 -1
- package/domain/models/query/query.js +0 -122
- package/domain/models/query/query.js.map +0 -1
- package/domain/models/resource/index.d.ts +0 -2
- package/domain/models/resource/index.js +0 -6
- package/domain/models/resource/index.js.map +0 -1
- package/domain/models/resource/resource.d.ts +0 -15
- package/domain/models/resource/resource.helper.d.ts +0 -4
- package/domain/models/resource/resource.helper.js +0 -16
- package/domain/models/resource/resource.helper.js.map +0 -1
- package/domain/models/resource/resource.js +0 -73
- package/domain/models/resource/resource.js.map +0 -1
- package/domain/models/scheduler/index.d.ts +0 -1
- package/domain/models/scheduler/index.js +0 -5
- package/domain/models/scheduler/index.js.map +0 -1
- package/domain/models/scheduler/schedule.d.ts +0 -23
- package/domain/models/scheduler/schedule.js +0 -89
- package/domain/models/scheduler/schedule.js.map +0 -1
- package/domain/models/screen-item/index.d.ts +0 -1
- package/domain/models/screen-item/index.js +0 -5
- package/domain/models/screen-item/index.js.map +0 -1
- package/domain/models/screen-item/screen-item.d.ts +0 -9
- package/domain/models/screen-item/screen-item.js +0 -3
- package/domain/models/screen-item/screen-item.js.map +0 -1
- package/domain/models/spec.d.ts +0 -7
- package/domain/models/spec.js +0 -3
- package/domain/models/spec.js.map +0 -1
- package/domain/resolvers/index.d.ts +0 -1
- package/domain/resolvers/index.js +0 -5
- package/domain/resolvers/index.js.map +0 -1
- package/domain/resolvers/invoice.resolver.js +0 -31
- package/domain/resolvers/invoice.resolver.js.map +0 -1
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.d.ts +0 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js +0 -1
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js.map +0 -1
- package/infrastructure/converters/google/google.converter.d.ts +0 -9
- package/infrastructure/converters/google/google.converter.js +0 -27
- package/infrastructure/converters/google/google.converter.js.map +0 -1
- package/infrastructure/converters/google/index.d.ts +0 -1
- package/infrastructure/converters/google/index.js +0 -5
- package/infrastructure/converters/google/index.js.map +0 -1
- package/infrastructure/external/data-connect/data-connect.service.d.ts +0 -4
- package/infrastructure/external/data-connect/data-connect.service.impl.d.ts +0 -7
- package/infrastructure/external/data-connect/data-connect.service.impl.js +0 -20
- package/infrastructure/external/data-connect/data-connect.service.impl.js.map +0 -1
- package/infrastructure/external/data-connect/data-connect.service.js +0 -11
- package/infrastructure/external/data-connect/data-connect.service.js.map +0 -1
- package/infrastructure/external/data-connect/index.d.ts +0 -1
- package/infrastructure/external/data-connect/index.js +0 -5
- package/infrastructure/external/data-connect/index.js.map +0 -1
- package/infrastructure/external/external.config.d.ts +0 -7
- package/infrastructure/external/external.config.js +0 -13
- package/infrastructure/external/external.config.js.map +0 -1
- package/infrastructure/external/external.service.d.ts +0 -8
- package/infrastructure/external/external.service.js +0 -23
- package/infrastructure/external/external.service.js.map +0 -1
- package/infrastructure/external/index.d.ts +0 -2
- package/infrastructure/external/index.js +0 -6
- package/infrastructure/external/index.js.map +0 -1
- package/infrastructure/external/quick-js/index.d.ts +0 -1
- package/infrastructure/external/quick-js/index.js +0 -5
- package/infrastructure/external/quick-js/index.js.map +0 -1
- package/infrastructure/external/quick-js/quick-js.service.d.ts +0 -7
- package/infrastructure/external/quick-js/quick-js.service.js +0 -44
- package/infrastructure/external/quick-js/quick-js.service.js.map +0 -1
- package/infrastructure/external/resend/index.d.ts +0 -1
- package/infrastructure/external/resend/index.js +0 -5
- package/infrastructure/external/resend/index.js.map +0 -1
- package/infrastructure/external/resend/resend.service.d.ts +0 -9
- package/infrastructure/external/resend/resend.service.impl.d.ts +0 -17
- package/infrastructure/external/resend/resend.service.impl.js +0 -27
- package/infrastructure/external/resend/resend.service.impl.js.map +0 -1
- package/infrastructure/external/resend/resend.service.js +0 -6
- package/infrastructure/external/resend/resend.service.js.map +0 -1
- package/infrastructure/index.d.ts +0 -2
- package/infrastructure/index.js +0 -6
- package/infrastructure/index.js.map +0 -1
- package/infrastructure/infrastructure.config.d.ts +0 -16
- package/infrastructure/infrastructure.config.js +0 -12
- package/infrastructure/infrastructure.config.js.map +0 -1
- package/infrastructure/infrastructure.service.d.ts +0 -7
- package/infrastructure/infrastructure.service.js +0 -20
- package/infrastructure/infrastructure.service.js.map +0 -1
- package/infrastructure/query/firestore/query/index.d.ts +0 -1
- package/infrastructure/query/firestore/query/index.js +0 -5
- package/infrastructure/query/firestore/query/index.js.map +0 -1
- package/infrastructure/query/firestore/query/query.query.d.ts +0 -6
- package/infrastructure/query/firestore/query/query.query.js +0 -20
- package/infrastructure/query/firestore/query/query.query.js.map +0 -1
- package/infrastructure/query/firestore/resource/index.d.ts +0 -1
- package/infrastructure/query/firestore/resource/index.js +0 -5
- package/infrastructure/query/firestore/resource/index.js.map +0 -1
- package/infrastructure/query/firestore/resource/resource.query.d.ts +0 -6
- package/infrastructure/query/firestore/resource/resource.query.js +0 -20
- package/infrastructure/query/firestore/resource/resource.query.js.map +0 -1
- package/infrastructure/query/hasura/resource/index.d.ts +0 -1
- package/infrastructure/query/hasura/resource/index.js +0 -5
- package/infrastructure/query/hasura/resource/index.js.map +0 -1
- package/infrastructure/query/hasura/resource/resource.query.d.ts +0 -3
- package/infrastructure/query/hasura/resource/resource.query.js +0 -14
- package/infrastructure/query/hasura/resource/resource.query.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/index.d.ts +0 -1
- package/infrastructure/repository/dataconnect/invoice/index.js +0 -5
- package/infrastructure/repository/dataconnect/invoice/index.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.d.ts +0 -4
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.d.ts +0 -10
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js +0 -54
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js +0 -11
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/index.d.ts +0 -1
- package/infrastructure/repository/dataconnect/order/index.js +0 -5
- package/infrastructure/repository/dataconnect/order/index.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/order.repository.d.ts +0 -4
- package/infrastructure/repository/dataconnect/order/order.repository.impl.d.ts +0 -14
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js +0 -74
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/order.repository.js +0 -11
- package/infrastructure/repository/dataconnect/order/order.repository.js.map +0 -1
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js +0 -20
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js.map +0 -1
- package/infrastructure/repository/firestore/bookmarklet/index.d.ts +0 -1
- package/infrastructure/repository/firestore/bookmarklet/index.js +0 -5
- package/infrastructure/repository/firestore/bookmarklet/index.js.map +0 -1
- package/infrastructure/repository/firestore/firestore.repository.d.ts +0 -7
- package/infrastructure/repository/firestore/firestore.repository.js +0 -20
- package/infrastructure/repository/firestore/firestore.repository.js.map +0 -1
- package/infrastructure/repository/firestore/index.d.ts +0 -1
- package/infrastructure/repository/firestore/index.js +0 -5
- package/infrastructure/repository/firestore/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/google/google.repository.d.ts +0 -7
- package/infrastructure/repository/firestore/link/google/google.repository.js +0 -19
- package/infrastructure/repository/firestore/link/google/google.repository.js.map +0 -1
- package/infrastructure/repository/firestore/link/google/index.d.ts +0 -1
- package/infrastructure/repository/firestore/link/google/index.js +0 -5
- package/infrastructure/repository/firestore/link/google/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/index.d.ts +0 -1
- package/infrastructure/repository/firestore/link/index.js +0 -5
- package/infrastructure/repository/firestore/link/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/link.repository.d.ts +0 -5
- package/infrastructure/repository/firestore/link/link.repository.js +0 -17
- package/infrastructure/repository/firestore/link/link.repository.js.map +0 -1
- package/infrastructure/repository/firestore/query/index.d.ts +0 -1
- package/infrastructure/repository/firestore/query/index.js +0 -5
- package/infrastructure/repository/firestore/query/index.js.map +0 -1
- package/infrastructure/repository/firestore/query/query.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/query/query.repository.js +0 -20
- package/infrastructure/repository/firestore/query/query.repository.js.map +0 -1
- package/infrastructure/repository/firestore/resource/index.d.ts +0 -1
- package/infrastructure/repository/firestore/resource/index.js +0 -5
- package/infrastructure/repository/firestore/resource/index.js.map +0 -1
- package/infrastructure/repository/firestore/resource/resource.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/resource/resource.repository.js +0 -20
- package/infrastructure/repository/firestore/resource/resource.repository.js.map +0 -1
- package/infrastructure/repository/hasura/query/index.d.ts +0 -1
- package/infrastructure/repository/hasura/query/index.js +0 -5
- package/infrastructure/repository/hasura/query/index.js.map +0 -1
- package/infrastructure/repository/hasura/query/query.repository.d.ts +0 -8
- package/infrastructure/repository/hasura/query/query.repository.js +0 -23
- package/infrastructure/repository/hasura/query/query.repository.js.map +0 -1
- package/infrastructure/repository/hasura/resource/index.d.ts +0 -1
- package/infrastructure/repository/hasura/resource/index.js +0 -5
- package/infrastructure/repository/hasura/resource/index.js.map +0 -1
- package/infrastructure/repository/hasura/resource/resource.repository.d.ts +0 -8
- package/infrastructure/repository/hasura/resource/resource.repository.js +0 -23
- package/infrastructure/repository/hasura/resource/resource.repository.js.map +0 -1
- package/infrastructure/repository/index.d.ts +0 -2
- package/infrastructure/repository/index.js +0 -6
- package/infrastructure/repository/index.js.map +0 -1
- package/infrastructure/repository/notion/contract/contract.config.d.ts +0 -9
- package/infrastructure/repository/notion/contract/contract.config.js +0 -10
- package/infrastructure/repository/notion/contract/contract.config.js.map +0 -1
- package/infrastructure/repository/notion/contract/contract.repository.d.ts +0 -8
- package/infrastructure/repository/notion/contract/contract.repository.js +0 -22
- package/infrastructure/repository/notion/contract/contract.repository.js.map +0 -1
- package/infrastructure/repository/notion/contract/index.d.ts +0 -2
- package/infrastructure/repository/notion/contract/index.js +0 -6
- package/infrastructure/repository/notion/contract/index.js.map +0 -1
- package/infrastructure/repository/notion/index.d.ts +0 -2
- package/infrastructure/repository/notion/index.js +0 -6
- package/infrastructure/repository/notion/index.js.map +0 -1
- package/infrastructure/repository/notion/invoice/index.d.ts +0 -2
- package/infrastructure/repository/notion/invoice/index.js +0 -6
- package/infrastructure/repository/notion/invoice/index.js.map +0 -1
- package/infrastructure/repository/notion/invoice/invoice.config.d.ts +0 -9
- package/infrastructure/repository/notion/invoice/invoice.config.js +0 -10
- package/infrastructure/repository/notion/invoice/invoice.config.js.map +0 -1
- package/infrastructure/repository/notion/invoice/invoice.repository.d.ts +0 -8
- package/infrastructure/repository/notion/invoice/invoice.repository.js +0 -22
- package/infrastructure/repository/notion/invoice/invoice.repository.js.map +0 -1
- package/infrastructure/repository/notion/notion.config.d.ts +0 -17
- package/infrastructure/repository/notion/notion.config.js +0 -18
- package/infrastructure/repository/notion/notion.config.js.map +0 -1
- package/infrastructure/repository/notion/notion.repository.d.ts +0 -11
- package/infrastructure/repository/notion/notion.repository.js +0 -26
- package/infrastructure/repository/notion/notion.repository.js.map +0 -1
- package/infrastructure/repository/notion/order/index.d.ts +0 -1
- package/infrastructure/repository/notion/order/index.js +0 -5
- package/infrastructure/repository/notion/order/index.js.map +0 -1
- package/infrastructure/repository/notion/order/order.config.d.ts +0 -9
- package/infrastructure/repository/notion/order/order.config.js +0 -10
- package/infrastructure/repository/notion/order/order.config.js.map +0 -1
- package/infrastructure/repository/notion/order/order.repository.d.ts +0 -8
- package/infrastructure/repository/notion/order/order.repository.js +0 -22
- package/infrastructure/repository/notion/order/order.repository.js.map +0 -1
- package/infrastructure/repository/notion/partner/index.d.ts +0 -2
- package/infrastructure/repository/notion/partner/index.js +0 -6
- package/infrastructure/repository/notion/partner/index.js.map +0 -1
- package/infrastructure/repository/notion/partner/partner.config.d.ts +0 -9
- package/infrastructure/repository/notion/partner/partner.config.js +0 -10
- package/infrastructure/repository/notion/partner/partner.config.js.map +0 -1
- package/infrastructure/repository/notion/partner/partner.repository.d.ts +0 -8
- package/infrastructure/repository/notion/partner/partner.repository.js +0 -22
- package/infrastructure/repository/notion/partner/partner.repository.js.map +0 -1
- package/infrastructure/repository/redis/index.d.ts +0 -2
- package/infrastructure/repository/redis/index.js +0 -6
- package/infrastructure/repository/redis/index.js.map +0 -1
- package/infrastructure/repository/redis/operator/index.d.ts +0 -1
- package/infrastructure/repository/redis/operator/index.js +0 -5
- package/infrastructure/repository/redis/operator/index.js.map +0 -1
- package/infrastructure/repository/redis/operator/operator.repository.d.ts +0 -5
- package/infrastructure/repository/redis/operator/operator.repository.js +0 -17
- package/infrastructure/repository/redis/operator/operator.repository.js.map +0 -1
- package/infrastructure/repository/redis/project/index.d.ts +0 -1
- package/infrastructure/repository/redis/project/index.js +0 -5
- package/infrastructure/repository/redis/project/index.js.map +0 -1
- package/infrastructure/repository/redis/project/project.repository.d.ts +0 -19
- package/infrastructure/repository/redis/project/project.repository.js +0 -33
- package/infrastructure/repository/redis/project/project.repository.js.map +0 -1
- package/infrastructure/repository/redis/redis.config.d.ts +0 -8
- package/infrastructure/repository/redis/redis.config.js +0 -10
- package/infrastructure/repository/redis/redis.config.js.map +0 -1
- package/infrastructure/repository/redis/redis.service.d.ts +0 -10
- package/infrastructure/repository/redis/redis.service.js +0 -22
- package/infrastructure/repository/redis/redis.service.js.map +0 -1
- package/infrastructure/repository/redis/spec/index.d.ts +0 -1
- package/infrastructure/repository/redis/spec/index.js +0 -5
- package/infrastructure/repository/redis/spec/index.js.map +0 -1
- package/infrastructure/repository/redis/spec/spec.repository.d.ts +0 -17
- package/infrastructure/repository/redis/spec/spec.repository.js +0 -94
- package/infrastructure/repository/redis/spec/spec.repository.js.map +0 -1
- package/infrastructure/repository/redis/system/index.d.ts +0 -1
- package/infrastructure/repository/redis/system/index.js +0 -5
- package/infrastructure/repository/redis/system/index.js.map +0 -1
- package/infrastructure/repository/redis/system/system.repository.d.ts +0 -3
- package/infrastructure/repository/redis/system/system.repository.js +0 -15
- package/infrastructure/repository/redis/system/system.repository.js.map +0 -1
- package/infrastructure/repository/repository.config.d.ts +0 -16
- package/infrastructure/repository/repository.config.js +0 -12
- package/infrastructure/repository/repository.config.js.map +0 -1
- package/infrastructure/repository/repository.service.d.ts +0 -8
- package/infrastructure/repository/repository.service.js +0 -20
- package/infrastructure/repository/repository.service.js.map +0 -1
- package/stores/index.js +0 -66
- package/stores/index.js.map +0 -1
- package/usecase/assistant/assistant.service.d.ts +0 -12
- package/usecase/assistant/assistant.service.js +0 -72
- package/usecase/assistant/assistant.service.js.map +0 -1
- package/usecase/assistant/index.js +0 -5
- package/usecase/assistant/index.js.map +0 -1
- package/usecase/database/database.service.d.ts +0 -31
- package/usecase/database/database.service.js +0 -103
- package/usecase/database/database.service.js.map +0 -1
- package/usecase/database/index.js +0 -5
- package/usecase/database/index.js.map +0 -1
- package/usecase/graphql/graphql.service.d.ts +0 -9
- package/usecase/graphql/graphql.service.js +0 -49
- package/usecase/graphql/graphql.service.js.map +0 -1
- package/usecase/graphql/index.js +0 -5
- package/usecase/graphql/index.js.map +0 -1
- package/usecase/index.js +0 -5
- package/usecase/index.js.map +0 -1
- package/usecase/invoice/index.d.ts +0 -1
- package/usecase/invoice/index.js +0 -5
- package/usecase/invoice/index.js.map +0 -1
- package/usecase/invoice/invoice.service.d.ts +0 -27
- package/usecase/invoice/invoice.service.js +0 -69
- package/usecase/invoice/invoice.service.js.map +0 -1
- package/usecase/link/index.js +0 -5
- package/usecase/link/index.js.map +0 -1
- package/usecase/link/link.service.d.ts +0 -7
- package/usecase/link/link.service.js +0 -20
- package/usecase/link/link.service.js.map +0 -1
- package/usecase/order/index.d.ts +0 -1
- package/usecase/order/index.js +0 -5
- package/usecase/order/index.js.map +0 -1
- package/usecase/order/order.service.d.ts +0 -6
- package/usecase/order/order.service.js +0 -27
- package/usecase/order/order.service.js.map +0 -1
- package/usecase/project/index.js +0 -5
- package/usecase/project/index.js.map +0 -1
- package/usecase/project/project.service.d.ts +0 -10
- package/usecase/project/project.service.js +0 -37
- package/usecase/project/project.service.js.map +0 -1
- package/usecase/spec/index.js +0 -5
- package/usecase/spec/index.js.map +0 -1
- package/usecase/spec/spec.service.d.ts +0 -11
- package/usecase/spec/spec.service.js +0 -49
- package/usecase/spec/spec.service.js.map +0 -1
- package/usecase/usecase.service.d.ts +0 -12
- package/usecase/usecase.service.js +0 -24
- package/usecase/usecase.service.js.map +0 -1
- package/utils/crypto.d.ts +0 -7
- package/utils/crypto.js.map +0 -1
- package/utils/extract-display-fields.d.ts +0 -2
- package/utils/extract-display-fields.js.map +0 -1
- package/utils/index.js +0 -5
- package/utils/index.js.map +0 -1
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RedisRepository = exports.Converter = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@angular/core");
|
|
6
|
-
const redis_config_1 = require("./redis.config");
|
|
7
|
-
const lodash_es_1 = require("lodash-es");
|
|
8
|
-
class Converter {
|
|
9
|
-
fromRedis(record) {
|
|
10
|
-
return Object.assign({}, record);
|
|
11
|
-
}
|
|
12
|
-
toRedis(entity) {
|
|
13
|
-
return Object.assign({}, entity);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.Converter = Converter;
|
|
17
|
-
function safeCreateClient(params) {
|
|
18
|
-
// try {
|
|
19
|
-
// return createClient(params);
|
|
20
|
-
// } catch (error) {
|
|
21
|
-
// console.error(error);
|
|
22
|
-
// }
|
|
23
|
-
}
|
|
24
|
-
let RedisRepository = class RedisRepository {
|
|
25
|
-
constructor(config) {
|
|
26
|
-
this.config = config;
|
|
27
|
-
this.converter = new Converter();
|
|
28
|
-
this.client = safeCreateClient({
|
|
29
|
-
url: this.config.url,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
init() {
|
|
33
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
var _a;
|
|
35
|
-
try {
|
|
36
|
-
if (!((_a = this.client) === null || _a === void 0 ? void 0 : _a.isOpen))
|
|
37
|
-
yield this.client.connect();
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
console.error(error);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
list() {
|
|
45
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
yield this.init();
|
|
47
|
-
const keys = yield this.client.keys(`${this.entityName}:*`)
|
|
48
|
-
.then((keys) => keys.map(key => key.slice(this.entityName.length + 1)));
|
|
49
|
-
const entities = yield Promise.all(keys.map(key => this.get(key)));
|
|
50
|
-
return entities;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
get(id) {
|
|
54
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
yield this.init();
|
|
56
|
-
const key = this.getKey(id);
|
|
57
|
-
const entity = yield this.client.hGetAll(key);
|
|
58
|
-
return this.converter.fromRedis(Object.assign(Object.assign({}, entity), { id }));
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
create(entity) {
|
|
62
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
yield this.init();
|
|
64
|
-
const key = this.getKey(entity.id);
|
|
65
|
-
if (yield this.client.exists(key))
|
|
66
|
-
throw new Error(`Entity ${key} already exists`);
|
|
67
|
-
const record = (0, lodash_es_1.omit)(this.converter.toRedis(entity), 'id');
|
|
68
|
-
console.debug('create', key, record);
|
|
69
|
-
yield this.client.hSet(key, record);
|
|
70
|
-
return entity;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
update(entity) {
|
|
74
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
yield this.init();
|
|
76
|
-
const key = this.getKey(entity.id);
|
|
77
|
-
if (!(yield this.client.exists(key)))
|
|
78
|
-
throw new Error(`Entity ${key} does not exist`);
|
|
79
|
-
yield this.client.hSet(key, (0, lodash_es_1.omit)(this.converter.toRedis(entity), 'id'));
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
delete(id) {
|
|
83
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
yield this.init();
|
|
85
|
-
const key = this.getKey(id);
|
|
86
|
-
if (!(yield this.client.exists(key)))
|
|
87
|
-
throw new Error(`Entity ${id} does not exist`);
|
|
88
|
-
yield this.client.del(key);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
deleteAll() {
|
|
92
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
yield this.init();
|
|
94
|
-
const keys = yield this.client.keys(`${this.entityName}:*`);
|
|
95
|
-
yield Promise.all(keys.map(key => this.client.del(key)));
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
getKey(id) {
|
|
99
|
-
return `${this.entityName}:${id}`;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
exports.RedisRepository = RedisRepository;
|
|
103
|
-
exports.RedisRepository = RedisRepository = tslib_1.__decorate([
|
|
104
|
-
(0, core_1.Injectable)({ providedIn: 'root' }),
|
|
105
|
-
tslib_1.__param(0, (0, core_1.Inject)(redis_config_1.REDIS_CONFIG)),
|
|
106
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
107
|
-
], RedisRepository);
|
|
108
|
-
//# sourceMappingURL=redis.repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redis.repository.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/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C,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAU9B,mBAAA,IAAA,aAAM,EAAC,2BAAY,CAAC,CAAA;;GATH,eAAe,CAoEpC"}
|
package/auth/auth.service.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Signal } from "@angular/core";
|
|
2
|
-
import { Observable } from "rxjs";
|
|
3
|
-
export declare abstract class AuthService {
|
|
4
|
-
abstract readonly auth$: Observable<any>;
|
|
5
|
-
abstract readonly auth: Signal<any>;
|
|
6
|
-
abstract readonly accessToken$: Observable<string>;
|
|
7
|
-
abstract readonly accessToken: Signal<string>;
|
|
8
|
-
abstract signIn(): Promise<any>;
|
|
9
|
-
abstract signOut(): Promise<void>;
|
|
10
|
-
}
|
package/auth/auth.service.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuthService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@angular/core");
|
|
6
|
-
let AuthService = class AuthService {
|
|
7
|
-
};
|
|
8
|
-
exports.AuthService = AuthService;
|
|
9
|
-
exports.AuthService = AuthService = tslib_1.__decorate([
|
|
10
|
-
(0, core_1.Injectable)()
|
|
11
|
-
], AuthService);
|
|
12
|
-
//# sourceMappingURL=auth.service.js.map
|
package/auth/auth.service.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/auth/auth.service.ts"],"names":[],"mappings":";;;;AAAA,wCAAmD;AAI5C,IAAe,WAAW,GAA1B,MAAe,WAAW;CAQhC,CAAA;AARqB,kCAAW;sBAAX,WAAW;IADhC,IAAA,iBAAU,GAAE;GACS,WAAW,CAQhC"}
|
package/auth/index.js
DELETED
package/auth/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/auth/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B"}
|
package/azure-auth/auth.di.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders } from "@angular/core";
|
|
2
|
-
import { AzureAuthConfig } from "./auth.service";
|
|
3
|
-
export declare function provideAppInitializer(useValue: () => void): EnvironmentProviders;
|
|
4
|
-
export declare function provideAzureAuth(config: AzureAuthConfig): EnvironmentProviders;
|
package/azure-auth/auth.di.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.provideAppInitializer = provideAppInitializer;
|
|
4
|
-
exports.provideAzureAuth = provideAzureAuth;
|
|
5
|
-
const core_1 = require("@angular/core");
|
|
6
|
-
const msal_angular_1 = require("@azure/msal-angular");
|
|
7
|
-
const msal_browser_1 = require("@azure/msal-browser");
|
|
8
|
-
const core_2 = require("@ng-atomic/core");
|
|
9
|
-
const app_1 = require("@ng-atomic/components/frames/app");
|
|
10
|
-
const auth_1 = require("@xxmachina/common/auth");
|
|
11
|
-
const auth_service_1 = require("./auth.service");
|
|
12
|
-
const auth_service_2 = require("./auth.service");
|
|
13
|
-
function provideAppInitializer(useValue) {
|
|
14
|
-
return (0, core_1.makeEnvironmentProviders)([
|
|
15
|
-
{
|
|
16
|
-
provide: core_1.ENVIRONMENT_INITIALIZER,
|
|
17
|
-
useValue,
|
|
18
|
-
multi: true,
|
|
19
|
-
},
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
function provideAzureAuth(config) {
|
|
23
|
-
return (0, core_1.makeEnvironmentProviders)([
|
|
24
|
-
(0, core_1.importProvidersFrom)(msal_angular_1.MsalModule.forRoot(new msal_browser_1.PublicClientApplication(config === null || config === void 0 ? void 0 : config.configuration), {
|
|
25
|
-
interactionType: msal_browser_1.InteractionType.Redirect,
|
|
26
|
-
authRequest: {
|
|
27
|
-
scopes: config.scopes,
|
|
28
|
-
},
|
|
29
|
-
}, {
|
|
30
|
-
interactionType: msal_browser_1.InteractionType.Redirect,
|
|
31
|
-
protectedResourceMap: new Map([
|
|
32
|
-
['https://graph.microsoft.com/v1.0/me', config.scopes],
|
|
33
|
-
]),
|
|
34
|
-
})),
|
|
35
|
-
{ provide: auth_service_2.AZURE_AUTH_CONFIG, useValue: config },
|
|
36
|
-
{ provide: auth_1.AuthService, useClass: auth_service_1.AzureAuthService },
|
|
37
|
-
provideAppInitializer(() => { (0, core_1.inject)(auth_1.AuthService); }),
|
|
38
|
-
(0, core_2.provideEffect)(app_1.AppFrameStore.ActionId.SIGN_IN_WITH_MICROSOFT, () => {
|
|
39
|
-
const auth = (0, core_1.inject)(auth_1.AuthService);
|
|
40
|
-
return () => {
|
|
41
|
-
console.debug('auth:', auth);
|
|
42
|
-
if (!auth.auth()) {
|
|
43
|
-
auth.signIn();
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
console.log('既にログイン済みです。');
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}),
|
|
50
|
-
(0, core_2.provideEffect)(app_1.AppFrameStore.ActionId.SIGN_OUT, () => {
|
|
51
|
-
const auth = (0, core_1.inject)(auth_1.AuthService);
|
|
52
|
-
return () => auth.signOut();
|
|
53
|
-
}),
|
|
54
|
-
]);
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=auth.di.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.di.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/azure-auth/auth.di.ts"],"names":[],"mappings":";;AASA,sDAQC;AAGD,4CAgCC;AApDD,wCAAqI;AACrI,sDAAiD;AACjD,sDAA+E;AAC/E,0CAAgD;AAChD,0DAAiE;AACjE,iDAAqD;AACrD,iDAAkD;AAClD,iDAAoE;AAEpE,SAAgB,qBAAqB,CAAC,QAAoB;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AAC,CAAA;QACH,CAAC,CAAC;QACF,IAAA,oBAAa,EAAC,mBAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;YAClD,MAAM,IAAI,GAAG,IAAA,aAAM,EAAC,kBAAW,CAAC,CAAC;YACjC,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAC9B,CAAC,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from "@angular/core";
|
|
2
|
-
import { Observable, ReplaySubject } from "rxjs";
|
|
3
|
-
import { MsalService } from '@azure/msal-angular';
|
|
4
|
-
import { AccountInfo, Configuration } from '@azure/msal-browser';
|
|
5
|
-
import { HttpClient } from "@angular/common/http";
|
|
6
|
-
declare abstract class AuthService {
|
|
7
|
-
abstract readonly auth$: Observable<any>;
|
|
8
|
-
abstract readonly accessToken$: Observable<string>;
|
|
9
|
-
abstract signIn(): Promise<any>;
|
|
10
|
-
abstract signOut(): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
export interface AzureAuthConfig {
|
|
13
|
-
configuration: Configuration;
|
|
14
|
-
scopes: string[];
|
|
15
|
-
}
|
|
16
|
-
export declare const AZURE_AUTH_CONFIG: InjectionToken<AzureAuthConfig>;
|
|
17
|
-
export declare class AzureAuthService extends AuthService {
|
|
18
|
-
msal: MsalService;
|
|
19
|
-
protected readonly config: AzureAuthConfig;
|
|
20
|
-
readonly auth$: ReplaySubject<AccountInfo>;
|
|
21
|
-
readonly auth: import("@angular/core").Signal<AccountInfo>;
|
|
22
|
-
readonly accessToken: import("@angular/core").WritableSignal<any>;
|
|
23
|
-
readonly accessToken$: Observable<any>;
|
|
24
|
-
readonly http: HttpClient;
|
|
25
|
-
constructor(msal: MsalService);
|
|
26
|
-
initialize(): Promise<void>;
|
|
27
|
-
signIn(): Promise<any>;
|
|
28
|
-
signOut(): Promise<void>;
|
|
29
|
-
protected updateAccessToken(scopes?: string[]): Promise<void>;
|
|
30
|
-
acquireAccessToken(scopes?: string[]): Promise<string>;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AzureAuthService = exports.AZURE_AUTH_CONFIG = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@angular/core");
|
|
6
|
-
const rxjs_interop_1 = require("@angular/core/rxjs-interop");
|
|
7
|
-
const rxjs_1 = require("rxjs");
|
|
8
|
-
const msal_angular_1 = require("@azure/msal-angular");
|
|
9
|
-
const http_1 = require("@angular/common/http");
|
|
10
|
-
class AuthService {
|
|
11
|
-
}
|
|
12
|
-
exports.AZURE_AUTH_CONFIG = new core_1.InjectionToken('[@xxmachina/common] AZURE_AUTH_CONFIG');
|
|
13
|
-
let AzureAuthService = class AzureAuthService extends AuthService {
|
|
14
|
-
constructor(msal) {
|
|
15
|
-
super();
|
|
16
|
-
this.msal = msal;
|
|
17
|
-
this.config = (0, core_1.inject)(exports.AZURE_AUTH_CONFIG);
|
|
18
|
-
this.auth$ = new rxjs_1.ReplaySubject(1);
|
|
19
|
-
this.auth = (0, rxjs_interop_1.toSignal)(this.auth$);
|
|
20
|
-
this.accessToken = (0, core_1.signal)(null);
|
|
21
|
-
this.accessToken$ = (0, rxjs_interop_1.toObservable)(this.accessToken);
|
|
22
|
-
this.http = (0, core_1.inject)(http_1.HttpClient);
|
|
23
|
-
this.initialize().then(() => {
|
|
24
|
-
const account = this.msal.instance.getActiveAccount();
|
|
25
|
-
if (account) {
|
|
26
|
-
this.auth$.next(account);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
this.auth$.next(null);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
(0, rxjs_1.interval)(1000 * 60 * 5).pipe((0, rxjs_1.startWith)(null), (0, rxjs_1.switchMap)(() => this.auth$.pipe((0, rxjs_1.filter)((auth) => !!auth), (0, rxjs_1.take)(1))), (0, rxjs_1.filter)(() => !!this.auth())).subscribe(() => {
|
|
33
|
-
this.updateAccessToken();
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
initialize() {
|
|
37
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
yield (0, rxjs_1.lastValueFrom)(this.msal.initialize()).then(() => {
|
|
39
|
-
return this.msal.instance.handleRedirectPromise().then((response) => {
|
|
40
|
-
if (response !== null) {
|
|
41
|
-
this.msal.instance.setActiveAccount(response.account);
|
|
42
|
-
}
|
|
43
|
-
}).catch((error) => {
|
|
44
|
-
console.error('リダイレクト処理エラー:', error);
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
signIn() {
|
|
50
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
try {
|
|
52
|
-
const result = yield (0, rxjs_1.lastValueFrom)(this.msal.loginPopup({
|
|
53
|
-
scopes: this.config.scopes,
|
|
54
|
-
}));
|
|
55
|
-
this.msal.instance.setActiveAccount(result.account);
|
|
56
|
-
this.auth$.next(result.account);
|
|
57
|
-
console.debug('Sign-in result:', result);
|
|
58
|
-
yield this.acquireAccessToken();
|
|
59
|
-
return result.account;
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
console.error('Sign-in failed:', error);
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
signOut() {
|
|
68
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
try {
|
|
70
|
-
this.msal.instance.setActiveAccount(null);
|
|
71
|
-
this.auth$.next(null);
|
|
72
|
-
this.accessToken.set(null);
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
console.error('Sign-out failed:', error);
|
|
76
|
-
throw error;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
updateAccessToken() {
|
|
81
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (scopes = this.config.scopes) {
|
|
82
|
-
try {
|
|
83
|
-
const accessToken = yield this.acquireAccessToken(scopes);
|
|
84
|
-
this.accessToken.set(accessToken);
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
console.error('Failed to acquire access token:', error);
|
|
88
|
-
this.accessToken.set(null);
|
|
89
|
-
throw error;
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
acquireAccessToken() {
|
|
94
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (scopes = this.config.scopes) {
|
|
95
|
-
const account = this.msal.instance.getActiveAccount();
|
|
96
|
-
if (!account)
|
|
97
|
-
throw new Error('No active account found.');
|
|
98
|
-
return (0, rxjs_1.lastValueFrom)(this.msal.acquireTokenSilent({
|
|
99
|
-
account,
|
|
100
|
-
scopes,
|
|
101
|
-
forceRefresh: true,
|
|
102
|
-
})).then((response) => {
|
|
103
|
-
this.auth$.next(response.account);
|
|
104
|
-
console.debug('[AzureAuthService] response:', response);
|
|
105
|
-
return response.accessToken;
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
exports.AzureAuthService = AzureAuthService;
|
|
111
|
-
exports.AzureAuthService = AzureAuthService = tslib_1.__decorate([
|
|
112
|
-
(0, core_1.Injectable)({ providedIn: 'root' }),
|
|
113
|
-
tslib_1.__metadata("design:paramtypes", [msal_angular_1.MsalService])
|
|
114
|
-
], AzureAuthService);
|
|
115
|
-
//# sourceMappingURL=auth.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/azure-auth/auth.service.ts"],"names":[],"mappings":";;;;AAAA,wCAA2E;AAC3E,6DAAoE;AACpE,+BAA8G;AAC9G,sDAAkD;AAElD,+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I,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAC1D,OAAO,IAAA,oBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC;gBAChD,OAAO;gBACP,MAAM;gBACN,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACpB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAClC,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,QAAQ,CAAC,CAAC;gBACxD,OAAO,QAAQ,CAAC,WAAW,CAAA;YAC7B,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAA;AA/FY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;6CASR,0BAAW;GARzB,gBAAgB,CA+F5B"}
|
package/azure-auth/index.js
DELETED
package/azure-auth/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/azure-auth/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,yDAA+B"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommandBuilder = void 0;
|
|
4
|
-
class CommandBuilder {
|
|
5
|
-
buildFromOpenApi(openApi) {
|
|
6
|
-
return Object.keys(openApi.getPaths()).flatMap((path) => {
|
|
7
|
-
return openApi.getMethods(path).map((method, index) => {
|
|
8
|
-
var _a, _b, _c, _d;
|
|
9
|
-
return ({
|
|
10
|
-
id: (_a = openApi.getOperationId(path, method)) !== null && _a !== void 0 ? _a : `cmd-${index}`,
|
|
11
|
-
name: (_b = openApi.getSummary(path, method)) !== null && _b !== void 0 ? _b : '',
|
|
12
|
-
description: (_c = openApi.getDescription(path, method)) !== null && _c !== void 0 ? _c : '',
|
|
13
|
-
type: 'webApiRequest',
|
|
14
|
-
webApiRequest: {
|
|
15
|
-
path: path,
|
|
16
|
-
method: method.toLocaleUpperCase(),
|
|
17
|
-
contentType: openApi.getContentType(path, method),
|
|
18
|
-
responseContentType: openApi.getResponseContentType(path, method),
|
|
19
|
-
bodySchema: openApi.getRequestBodySchema(path, method),
|
|
20
|
-
serverUrl: openApi.getServerUrl(),
|
|
21
|
-
apiJsonUrl: openApi.apiJsonUrl,
|
|
22
|
-
security: (_d = openApi.getSecurity(path, method)) !== null && _d !== void 0 ? _d : [],
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.CommandBuilder = CommandBuilder;
|
|
30
|
-
//# sourceMappingURL=command.builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.builder.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/domain/builder/command/command.builder.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IACzB,gBAAgB,CAAC,OAAgB;QAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACtD,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAa,EAAE,EAAE;;gBAAC,OAAA,CAAC;oBAC9D,EAAE,EAAE,MAAA,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,mCAAI,OAAO,KAAK,EAAE;oBAC1D,IAAI,EAAE,MAAA,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,mCAAI,EAAE;oBAC5C,WAAW,EAAE,MAAA,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,mCAAI,EAAE;oBACvD,IAAI,EAAE,eAAwB;oBAC9B,aAAa,EAAE;wBACb,IAAI,EAAE,IAAI;wBACV,MAAM,EAAE,MAAM,CAAC,iBAAiB,EAAE;wBAClC,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAA+C;wBAC/F,mBAAmB,EAAE,OAAO,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAA2C;wBAC3G,UAAU,EAAE,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC;wBACtD,SAAS,EAAE,OAAO,CAAC,YAAY,EAAE;wBACjC,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,QAAQ,EAAE,MAAA,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,mCAAI,EAAE;qBAClD;iBACF,CAAC,CAAA;aAAA,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AArBD,wCAqBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './command.builder';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/domain/builder/command/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Action, CreateActionsOptions } from '@ng-atomic/core';
|
|
2
|
-
import { NavigationExtras } from '@angular/router';
|
|
3
|
-
import { Command } from "../../models";
|
|
4
|
-
export declare enum ActionId {
|
|
5
|
-
NAVIGATE_TO_COMMAND_PAGE = "[@xxmachina/common] Navigate To Command Page",
|
|
6
|
-
EXECUTE_COMMAND = "[@xxmachina/common] Execute Command"
|
|
7
|
-
}
|
|
8
|
-
export interface CommandActionFactoryOptions extends CreateActionsOptions {
|
|
9
|
-
queryId?: string;
|
|
10
|
-
confirm?: () => Promise<boolean> | boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface CommandActionPayload<P> {
|
|
13
|
-
command: any;
|
|
14
|
-
body: P;
|
|
15
|
-
options?: {
|
|
16
|
-
confirm?: () => Promise<boolean> | boolean;
|
|
17
|
-
queryId?: string;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export declare class CommandActionsBuilder {
|
|
21
|
-
private commands;
|
|
22
|
-
private options;
|
|
23
|
-
private item;
|
|
24
|
-
private filterIds;
|
|
25
|
-
private autoIds;
|
|
26
|
-
setCommands(commands: Command[]): CommandActionsBuilder;
|
|
27
|
-
setOptions(options: Partial<CommandActionFactoryOptions>): CommandActionsBuilder;
|
|
28
|
-
setItem(item: any): CommandActionsBuilder;
|
|
29
|
-
setFilterIds(filterIds?: (string | {
|
|
30
|
-
id: string;
|
|
31
|
-
auto: boolean;
|
|
32
|
-
})[]): CommandActionsBuilder;
|
|
33
|
-
setAutoIds(autoIds: string[]): CommandActionsBuilder;
|
|
34
|
-
private applyFilter;
|
|
35
|
-
buildAction(id: string): Action;
|
|
36
|
-
buildActions(item?: any, navigationExtras?: NavigationExtras, overwrite?: Partial<Action>): Action[];
|
|
37
|
-
buildItemActions<T>(): (item: T) => Action[];
|
|
38
|
-
}
|
|
39
|
-
export declare function createCommandNavigateAction(command: Command, navigationExtras?: NavigationExtras, item?: any, options?: CommandActionFactoryOptions, overwrite?: Partial<Action>): Action | null;
|
|
40
|
-
export declare function createCommandExecutionAction(command: Command, item?: any, options?: CommandActionFactoryOptions, overwrite?: Partial<Action>): Action | null;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommandActionsBuilder = exports.ActionId = void 0;
|
|
4
|
-
exports.createCommandNavigateAction = createCommandNavigateAction;
|
|
5
|
-
exports.createCommandExecutionAction = createCommandExecutionAction;
|
|
6
|
-
const core_1 = require("@ng-atomic/core");
|
|
7
|
-
const flat_1 = require("flat");
|
|
8
|
-
const lodash_es_1 = require("lodash-es");
|
|
9
|
-
const app_1 = require("@ng-atomic/components/frames/app");
|
|
10
|
-
var ActionId;
|
|
11
|
-
(function (ActionId) {
|
|
12
|
-
ActionId["NAVIGATE_TO_COMMAND_PAGE"] = "[@xxmachina/common] Navigate To Command Page";
|
|
13
|
-
ActionId["EXECUTE_COMMAND"] = "[@xxmachina/common] Execute Command";
|
|
14
|
-
})(ActionId || (exports.ActionId = ActionId = {}));
|
|
15
|
-
class CommandActionsBuilder {
|
|
16
|
-
constructor() {
|
|
17
|
-
this.commands = [];
|
|
18
|
-
this.options = {};
|
|
19
|
-
this.item = null;
|
|
20
|
-
this.filterIds = null;
|
|
21
|
-
this.autoIds = [];
|
|
22
|
-
}
|
|
23
|
-
setCommands(commands) {
|
|
24
|
-
const newFactory = new CommandActionsBuilder();
|
|
25
|
-
newFactory.commands = [...commands];
|
|
26
|
-
newFactory.options = Object.assign({}, this.options);
|
|
27
|
-
newFactory.item = this.item;
|
|
28
|
-
newFactory.filterIds = this.filterIds;
|
|
29
|
-
newFactory.autoIds = this.autoIds;
|
|
30
|
-
return newFactory;
|
|
31
|
-
}
|
|
32
|
-
setOptions(options) {
|
|
33
|
-
const newFactory = new CommandActionsBuilder();
|
|
34
|
-
newFactory.commands = [...this.commands];
|
|
35
|
-
newFactory.options = Object.assign(Object.assign({}, this.options), options);
|
|
36
|
-
newFactory.item = this.item;
|
|
37
|
-
newFactory.filterIds = this.filterIds;
|
|
38
|
-
newFactory.autoIds = this.autoIds;
|
|
39
|
-
return newFactory;
|
|
40
|
-
}
|
|
41
|
-
setItem(item) {
|
|
42
|
-
const newFactory = new CommandActionsBuilder();
|
|
43
|
-
newFactory.commands = [...this.commands];
|
|
44
|
-
newFactory.options = Object.assign({}, this.options);
|
|
45
|
-
newFactory.item = item;
|
|
46
|
-
newFactory.filterIds = this.filterIds;
|
|
47
|
-
newFactory.autoIds = this.autoIds;
|
|
48
|
-
return newFactory;
|
|
49
|
-
}
|
|
50
|
-
setFilterIds(filterIds = []) {
|
|
51
|
-
const newFactory = new CommandActionsBuilder();
|
|
52
|
-
newFactory.commands = [...this.commands];
|
|
53
|
-
newFactory.options = Object.assign({}, this.options);
|
|
54
|
-
newFactory.item = this.item;
|
|
55
|
-
newFactory.filterIds = filterIds.map((id) => typeof id === 'string' ? id : id.id);
|
|
56
|
-
newFactory.autoIds = filterIds.filter((id) => typeof id !== 'string' && id.auto).map((id) => id.id);
|
|
57
|
-
return newFactory;
|
|
58
|
-
}
|
|
59
|
-
setAutoIds(autoIds) {
|
|
60
|
-
const newFactory = new CommandActionsBuilder();
|
|
61
|
-
newFactory.commands = [...this.commands];
|
|
62
|
-
newFactory.options = Object.assign({}, this.options);
|
|
63
|
-
newFactory.item = this.item;
|
|
64
|
-
newFactory.filterIds = [...this.filterIds];
|
|
65
|
-
newFactory.autoIds = autoIds;
|
|
66
|
-
return newFactory;
|
|
67
|
-
}
|
|
68
|
-
applyFilter(commands) {
|
|
69
|
-
if (!this.filterIds)
|
|
70
|
-
return commands;
|
|
71
|
-
return this.filterIds.map((id) => commands.find((command) => command.id === id))
|
|
72
|
-
.filter((command) => !!command);
|
|
73
|
-
}
|
|
74
|
-
buildAction(id) {
|
|
75
|
-
const command = this.commands.find((command) => command.id === id);
|
|
76
|
-
if (!command)
|
|
77
|
-
throw new Error(`Command not found: ${id}`);
|
|
78
|
-
const actionId = this.autoIds.includes(command.id)
|
|
79
|
-
? ActionId.EXECUTE_COMMAND
|
|
80
|
-
: ActionId.NAVIGATE_TO_COMMAND_PAGE;
|
|
81
|
-
const creator = (0, core_1.createAction)(actionId, command.webApiRequest.bodySchema, Object.assign({ name: command.name, icon: this.options.icon || 'default' }, this.options));
|
|
82
|
-
return creator.create({
|
|
83
|
-
command,
|
|
84
|
-
body: this.item,
|
|
85
|
-
options: {
|
|
86
|
-
queryId: this.options.queryId,
|
|
87
|
-
confirm: this.options.confirm,
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
buildActions(item, navigationExtras = {}, overwrite = {}) {
|
|
92
|
-
const filteredCommands = this.applyFilter(this.commands);
|
|
93
|
-
return filteredCommands.map((command) => {
|
|
94
|
-
if (this.autoIds.includes(command.id)) {
|
|
95
|
-
return (0, core_1.createAction)(ActionId.EXECUTE_COMMAND, command.webApiRequest.bodySchema, {
|
|
96
|
-
name: command.name,
|
|
97
|
-
icon: this.options.icon || 'default',
|
|
98
|
-
}).create({
|
|
99
|
-
command,
|
|
100
|
-
body: this.item,
|
|
101
|
-
options: {
|
|
102
|
-
queryId: this.options.queryId,
|
|
103
|
-
confirm: this.options.confirm,
|
|
104
|
-
}
|
|
105
|
-
}, overwrite);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
const data = (0, lodash_es_1.omitBy)((0, flat_1.flatten)({ data: this.item, queryId: this.options.queryId }), value => typeof value === 'undefined');
|
|
109
|
-
return (0, app_1.createNavigateAction)(['commands', { skip: true }, command.id, data], navigationExtras, Object.assign({ name: command.name, icon: this.options.icon }, overwrite));
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
buildItemActions() {
|
|
114
|
-
return (item) => this.setItem(item).buildActions();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
exports.CommandActionsBuilder = CommandActionsBuilder;
|
|
118
|
-
function createCommandNavigateAction(command, navigationExtras = {}, item = {}, options = {}, overwrite = {}) {
|
|
119
|
-
if (!command)
|
|
120
|
-
return null;
|
|
121
|
-
return new CommandActionsBuilder()
|
|
122
|
-
.setItem(item)
|
|
123
|
-
.setCommands([command])
|
|
124
|
-
.setOptions(options)
|
|
125
|
-
.setFilterIds([command.id])
|
|
126
|
-
.buildActions(item, navigationExtras, overwrite)[0];
|
|
127
|
-
}
|
|
128
|
-
function createCommandExecutionAction(command, item = {}, options = {}, overwrite = {}) {
|
|
129
|
-
if (!command)
|
|
130
|
-
return null;
|
|
131
|
-
return new CommandActionsBuilder()
|
|
132
|
-
.setItem(item)
|
|
133
|
-
.setCommands([command])
|
|
134
|
-
.setOptions(options)
|
|
135
|
-
.setFilterIds([command.id])
|
|
136
|
-
.setAutoIds([command.id])
|
|
137
|
-
.buildActions(item, undefined, overwrite)[0];
|
|
138
|
-
}
|
|
139
|
-
//# sourceMappingURL=command-action.builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-action.builder.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/domain/builder/command-action/command-action.builder.ts"],"names":[],"mappings":";;;AAuJA,kEAcC;AAED,oEAcC;AArLD,0CAA6E;AAC7E,+BAA+B;AAC/B,yCAAmC;AACnC,0DAAwE;AAIxE,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,qFAAyE,CAAA;IACzE,mEAAuD,CAAA;AACzD,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB;AAgBD,MAAa,qBAAqB;IAAlC;QACU,aAAQ,GAAc,EAAE,CAAC;QACzB,YAAO,GAAgC,EAAE,CAAC;QAC1C,SAAI,GAAQ,IAAI,CAAC;QACjB,cAAS,GAAoB,IAAI,CAAC;QAClC,YAAO,GAAa,EAAE,CAAC;IAqHjC,CAAC;IAnHC,WAAW,CAAC,QAAmB;QAC7B,MAAM,UAAU,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAC/C,UAAU,CAAC,QAAQ,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;QACpC,UAAU,CAAC,OAAO,qBAAQ,IAAI,CAAC,OAAO,CAAE,CAAC;QACzC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAC5B,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACtC,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAClC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,UAAU,CAAC,OAA6C;QACtD,MAAM,UAAU,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAC/C,UAAU,CAAC,QAAQ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