@xxmachina/common 19.0.0-preview.2 → 19.0.0-preview.20
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/meta/index.d.ts +1 -0
- package/_shared/meta/redis/redis.repository.d.ts +6 -3
- package/auth/auth.service.d.ts +3 -0
- package/azure-auth/auth.service.d.ts +3 -0
- package/domain/builder/command/command.builder.d.ts +1 -2
- package/domain/builder/command-action/command-action.builder.d.ts +1 -1
- package/domain/builder/index.d.ts +4 -0
- package/domain/builder/screen-item/screen-item.builder.d.ts +2 -2
- package/domain/index.d.ts +2 -1
- package/domain/models/index.d.ts +8 -2
- package/domain/models/links/index.d.ts +1 -0
- package/{domain/invoice → domain-invoice}/builders/email/email.builder.d.ts +1 -1
- package/domain-invoice/builders/index.d.ts +3 -0
- package/{domain/invoice → domain-invoice}/builders/message/message.builder.d.ts +1 -1
- package/{domain/invoice → domain-invoice}/builders/title/title.builder.d.ts +1 -1
- package/domain-invoice/index.d.ts +3 -0
- package/{domain/invoice → domain-invoice}/models/backoffice/invoice.d.ts +1 -1
- package/{domain/invoice → domain-invoice}/models/backoffice/order.d.ts +1 -1
- package/{domain/invoice → domain-invoice}/models/backoffice/partner.d.ts +1 -1
- package/{domain → domain-invoice}/resolvers/invoice.resolver.d.ts +1 -1
- 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 +470 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-invoice-builders.mjs +70 -0
- package/fesm2022/xxmachina-common-domain-invoice-builders.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-invoice-models.mjs +427 -0
- package/fesm2022/xxmachina-common-domain-invoice-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-invoice-resolvers.mjs +39 -0
- package/fesm2022/xxmachina-common-domain-invoice-resolvers.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-invoice.mjs +8 -0
- package/fesm2022/xxmachina-common-domain-invoice.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-models.mjs +783 -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-infra-converters-google.mjs +36 -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 +44 -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 +112 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra.mjs +377 -0
- package/fesm2022/xxmachina-common-infra.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.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-invoice.mjs +67 -0
- package/fesm2022/xxmachina-common-usecase-invoice.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-order.mjs +29 -0
- package/fesm2022/xxmachina-common-usecase-order.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/index.d.ts +1 -0
- package/{infrastructure → infra}/converters/google/google.converter.d.ts +4 -1
- package/{infrastructure → infra}/external/external.config.d.ts +2 -2
- package/{infrastructure → infra}/external/external.service.d.ts +4 -1
- package/{infrastructure → infra}/external/quick-js/quick-js.service.d.ts +3 -0
- package/infra/external/resend/resend.service.d.ts +2 -0
- package/{infrastructure → infra}/external/resend/resend.service.impl.d.ts +4 -8
- package/{infrastructure → infra}/infrastructure.config.d.ts +5 -5
- package/{infrastructure → infra}/infrastructure.service.d.ts +3 -0
- package/infra/query/firestore/index.d.ts +2 -0
- package/{infrastructure → infra}/query/firestore/query/query.query.d.ts +3 -0
- package/{infrastructure → infra}/query/firestore/resource/resource.query.d.ts +3 -0
- package/infra/query/hasura/index.d.ts +1 -0
- package/infra/query/hasura/resource/resource.query.d.ts +6 -0
- package/infra/repository/dataconnect/index.d.ts +2 -0
- package/{infrastructure → infra}/repository/dataconnect/invoice/invoice.repository.impl.d.ts +4 -1
- package/{infrastructure → infra}/repository/dataconnect/order/order.repository.impl.d.ts +4 -1
- package/infra/repository/firestore/firestore.repository.d.ts +8 -0
- package/infra/repository/firestore/index.d.ts +3 -0
- package/infra/repository/firestore/link/google/google.repository.d.ts +10 -0
- package/infra/repository/firestore/link/link.repository.d.ts +8 -0
- package/{infrastructure → infra}/repository/firestore/query/query.repository.d.ts +4 -1
- package/{infrastructure → infra}/repository/firestore/resource/resource.repository.d.ts +4 -1
- package/infra/repository/hasura/index.d.ts +2 -0
- package/{infrastructure → infra}/repository/hasura/query/query.repository.d.ts +3 -0
- package/{infrastructure → infra}/repository/hasura/resource/resource.repository.d.ts +3 -0
- package/{infrastructure → infra}/repository/notion/contract/contract.repository.d.ts +4 -1
- package/infra/repository/notion/index.d.ts +6 -0
- package/{infrastructure → infra}/repository/notion/invoice/invoice.repository.d.ts +4 -1
- package/{infrastructure → infra}/repository/notion/notion.repository.d.ts +3 -0
- package/{infrastructure → infra}/repository/notion/order/order.repository.d.ts +4 -1
- package/{infrastructure → infra}/repository/notion/partner/partner.repository.d.ts +4 -1
- package/{infrastructure → infra}/repository/redis/operator/operator.repository.d.ts +3 -0
- package/{infrastructure → infra}/repository/redis/project/project.repository.d.ts +3 -0
- package/{infrastructure → infra}/repository/redis/redis.service.d.ts +3 -0
- package/{infrastructure → infra}/repository/redis/spec/spec.repository.d.ts +5 -3
- package/infra/repository/redis/system/system.repository.d.ts +6 -0
- package/{infrastructure → infra}/repository/repository.config.d.ts +4 -4
- package/{infrastructure → infra}/repository/repository.service.d.ts +3 -0
- package/package.json +199 -13
- package/stores/firestore/firestore.store.d.ts +12 -0
- package/stores/firestore/index.d.ts +1 -0
- package/stores/hasura/hasura.store.d.ts +12 -0
- package/stores/hasura/index.d.ts +1 -0
- package/stores/index.d.ts +4 -28
- package/usecase/assistant/assistant.service.d.ts +4 -1
- package/usecase/database/database.service.d.ts +3 -0
- package/usecase/graphql/graphql.service.d.ts +3 -0
- package/usecase/invoice/invoice.service.d.ts +9 -13
- package/usecase/link/link.service.d.ts +5 -2
- package/usecase/order/order.service.d.ts +5 -2
- package/usecase/project/project.service.d.ts +4 -1
- package/usecase/spec/spec.service.d.ts +4 -1
- package/usecase/usecase.service.d.ts +3 -0
- package/utils/crypto/index.d.ts +1 -0
- package/README.md +0 -11
- 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.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.js +0 -23
- package/_shared/auth/passports/firebase/firebase.guard.js.map +0 -1
- 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.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.js +0 -13
- package/_shared/auth/passports/msal/msal.guard.js.map +0 -1
- 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.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.js +0 -10
- package/_shared/meta/redis/redis.config.js.map +0 -1
- package/_shared/meta/redis/redis.repository.js +0 -108
- package/_shared/meta/redis/redis.repository.js.map +0 -1
- 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.js +0 -56
- package/azure-auth/auth.di.js.map +0 -1
- 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.js +0 -30
- package/domain/builder/command/command.builder.js.map +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.js +0 -139
- package/domain/builder/command-action/command-action.builder.js.map +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.js +0 -112
- package/domain/builder/er/er.builder.js.map +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.js.map +0 -1
- package/domain/index.js +0 -5
- package/domain/index.js.map +0 -1
- 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.js +0 -5
- package/domain/invoice/builders/email/index.js.map +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.js +0 -43
- package/domain/invoice/builders/message/message.builder.js.map +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.js +0 -11
- package/domain/invoice/builders/title/title.builder.js.map +0 -1
- 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.js +0 -9
- package/domain/invoice/models/backoffice/index.js.map +0 -1
- 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.js +0 -91
- package/domain/invoice/models/backoffice/invoice.js.map +0 -1
- 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.js +0 -96
- package/domain/invoice/models/backoffice/partner.js.map +0 -1
- package/domain/invoice/models/index.js +0 -5
- package/domain/invoice/models/index.js.map +0 -1
- package/domain/models/agent/assistant.js +0 -31
- package/domain/models/agent/assistant.js.map +0 -1
- package/domain/models/agent/index.js +0 -5
- package/domain/models/agent/index.js.map +0 -1
- package/domain/models/bookmarklet/bookmarklet.js +0 -34
- package/domain/models/bookmarklet/bookmarklet.js.map +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.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.js +0 -6
- package/domain/models/command/index.js.map +0 -1
- package/domain/models/database/database.js +0 -7
- package/domain/models/database/database.js.map +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.js +0 -21
- package/domain/models/endpoint/endpoint.helper.js.map +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.js +0 -47
- package/domain/models/links/google/google.js.map +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.js +0 -6
- package/domain/models/openapi/index.js.map +0 -1
- package/domain/models/openapi/openapi.js +0 -87
- package/domain/models/openapi/openapi.js.map +0 -1
- 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.js +0 -13
- package/domain/models/operators/assistancts/base.js.map +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.js +0 -10
- package/domain/models/operators/base.js.map +0 -1
- package/domain/models/operators/index.js +0 -8
- package/domain/models/operators/index.js.map +0 -1
- 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.js +0 -3
- package/domain/models/operators/systems/graphql.js.map +0 -1
- 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.js +0 -3
- package/domain/models/operators/systems/rest.js.map +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.js +0 -3
- package/domain/models/operators/workflows/workflow.js.map +0 -1
- package/domain/models/project.js +0 -9
- package/domain/models/project.js.map +0 -1
- package/domain/models/query/index.js +0 -6
- package/domain/models/query/index.js.map +0 -1
- 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.js +0 -6
- package/domain/models/resource/index.js.map +0 -1
- 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.js +0 -5
- package/domain/models/scheduler/index.js.map +0 -1
- package/domain/models/scheduler/schedule.js +0 -89
- package/domain/models/scheduler/schedule.js.map +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.js +0 -3
- package/domain/models/screen-item/screen-item.js.map +0 -1
- package/domain/models/spec.js +0 -3
- package/domain/models/spec.js.map +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.js +0 -27
- package/infrastructure/converters/google/google.converter.js.map +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.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.js +0 -5
- package/infrastructure/external/data-connect/index.js.map +0 -1
- package/infrastructure/external/external.config.js +0 -13
- package/infrastructure/external/external.config.js.map +0 -1
- package/infrastructure/external/external.service.js +0 -23
- package/infrastructure/external/external.service.js.map +0 -1
- package/infrastructure/external/index.js +0 -6
- package/infrastructure/external/index.js.map +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.js +0 -44
- package/infrastructure/external/quick-js/quick-js.service.js.map +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.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.js +0 -6
- package/infrastructure/index.js.map +0 -1
- package/infrastructure/infrastructure.config.js +0 -12
- package/infrastructure/infrastructure.config.js.map +0 -1
- package/infrastructure/infrastructure.service.js +0 -20
- package/infrastructure/infrastructure.service.js.map +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.js +0 -20
- package/infrastructure/query/firestore/query/query.query.js.map +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.js +0 -20
- package/infrastructure/query/firestore/resource/resource.query.js.map +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.js +0 -5
- package/infrastructure/repository/dataconnect/invoice/index.js.map +0 -1
- 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.js +0 -5
- package/infrastructure/repository/dataconnect/order/index.js.map +0 -1
- 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.js +0 -5
- package/infrastructure/repository/firestore/link/google/index.js.map +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.js +0 -5
- package/infrastructure/repository/firestore/query/index.js.map +0 -1
- 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.js +0 -5
- package/infrastructure/repository/firestore/resource/index.js.map +0 -1
- 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.js +0 -5
- package/infrastructure/repository/hasura/query/index.js.map +0 -1
- 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.js +0 -5
- package/infrastructure/repository/hasura/resource/index.js.map +0 -1
- 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.js +0 -6
- package/infrastructure/repository/index.js.map +0 -1
- 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.js +0 -22
- package/infrastructure/repository/notion/contract/contract.repository.js.map +0 -1
- 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.js +0 -6
- package/infrastructure/repository/notion/invoice/index.js.map +0 -1
- 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.js +0 -22
- package/infrastructure/repository/notion/invoice/invoice.repository.js.map +0 -1
- 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.js +0 -26
- package/infrastructure/repository/notion/notion.repository.js.map +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.js +0 -10
- package/infrastructure/repository/notion/order/order.config.js.map +0 -1
- 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.js +0 -6
- package/infrastructure/repository/notion/partner/index.js.map +0 -1
- 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.js +0 -22
- package/infrastructure/repository/notion/partner/partner.repository.js.map +0 -1
- package/infrastructure/repository/redis/index.js +0 -6
- package/infrastructure/repository/redis/index.js.map +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.js +0 -17
- package/infrastructure/repository/redis/operator/operator.repository.js.map +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.js +0 -33
- package/infrastructure/repository/redis/project/project.repository.js.map +0 -1
- 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.js +0 -22
- package/infrastructure/repository/redis/redis.service.js.map +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.js +0 -94
- package/infrastructure/repository/redis/spec/spec.repository.js.map +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.js +0 -12
- package/infrastructure/repository/repository.config.js.map +0 -1
- 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.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.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.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.js +0 -5
- package/usecase/invoice/index.js.map +0 -1
- 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.js +0 -20
- package/usecase/link/link.service.js.map +0 -1
- package/usecase/order/index.js +0 -5
- package/usecase/order/index.js.map +0 -1
- 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.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.js +0 -49
- package/usecase/spec/spec.service.js.map +0 -1
- package/usecase/usecase.service.js +0 -24
- package/usecase/usecase.service.js.map +0 -1
- package/utils/crypto.js.map +0 -1
- package/utils/extract-display-fields.js.map +0 -1
- package/utils/index.js +0 -5
- package/utils/index.js.map +0 -1
- /package/{domain/invoice → domain-invoice}/builders/email/index.d.ts +0 -0
- /package/{domain/invoice → domain-invoice}/builders/message/index.d.ts +0 -0
- /package/{domain/invoice → domain-invoice}/builders/title/index.d.ts +0 -0
- /package/{domain/invoice → domain-invoice}/models/backoffice/contract.d.ts +0 -0
- /package/{domain/invoice → domain-invoice}/models/backoffice/index.d.ts +0 -0
- /package/{domain/invoice → domain-invoice}/models/backoffice/invoice-mail.d.ts +0 -0
- /package/{domain/invoice → domain-invoice}/models/index.d.ts +0 -0
- /package/{domain → domain-invoice}/resolvers/index.d.ts +0 -0
- /package/{infrastructure → infra}/converters/google/index.d.ts +0 -0
- /package/{infrastructure → infra}/external/data-connect/data-connect.service.d.ts +0 -0
- /package/{infrastructure → infra}/external/data-connect/index.d.ts +0 -0
- /package/{infrastructure → infra}/external/index.d.ts +0 -0
- /package/{infrastructure → infra}/external/quick-js/index.d.ts +0 -0
- /package/{infrastructure → infra}/external/resend/index.d.ts +0 -0
- /package/{infrastructure → infra}/index.d.ts +0 -0
- /package/{infrastructure → infra}/query/firestore/query/index.d.ts +0 -0
- /package/{infrastructure → infra}/query/firestore/resource/index.d.ts +0 -0
- /package/{infrastructure → infra}/query/hasura/resource/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/dataconnect/invoice/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/dataconnect/invoice/invoice.repository.d.ts +0 -0
- /package/{infrastructure → infra}/repository/dataconnect/order/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/dataconnect/order/order.repository.d.ts +0 -0
- /package/{infrastructure → infra}/repository/firestore/link/google/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/firestore/link/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/firestore/query/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/firestore/resource/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/hasura/query/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/hasura/resource/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/contract/contract.config.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/contract/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/invoice/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/invoice/invoice.config.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/notion.config.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/order/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/order/order.config.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/partner/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/notion/partner/partner.config.d.ts +0 -0
- /package/{infrastructure → infra}/repository/redis/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/redis/operator/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/redis/project/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/redis/redis.config.d.ts +0 -0
- /package/{infrastructure → infra}/repository/redis/spec/index.d.ts +0 -0
- /package/{infrastructure → infra}/repository/redis/system/index.d.ts +0 -0
- /package/utils/{crypto.d.ts → crypto/crypto.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './decorators';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RedisClientType } from 'redis';
|
|
2
|
-
import { RedisConfig } from
|
|
2
|
+
import { RedisConfig } from './redis.config';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class Converter<E, R> {
|
|
4
5
|
fromRedis(record: R): E;
|
|
5
6
|
toRedis(entity: E): R;
|
|
@@ -7,11 +8,11 @@ export declare class Converter<E, R> {
|
|
|
7
8
|
export declare abstract class RedisRepository<E extends {
|
|
8
9
|
id: string;
|
|
9
10
|
} = any, R extends object = object> {
|
|
10
|
-
private config;
|
|
11
11
|
protected abstract entityName: string;
|
|
12
12
|
protected converter: Converter<E, R>;
|
|
13
|
+
protected config: RedisConfig;
|
|
13
14
|
protected client: RedisClientType;
|
|
14
|
-
constructor(
|
|
15
|
+
constructor();
|
|
15
16
|
init(): Promise<void>;
|
|
16
17
|
list(): Promise<Awaited<E>[]>;
|
|
17
18
|
get(id: string): Promise<E>;
|
|
@@ -20,4 +21,6 @@ export declare abstract class RedisRepository<E extends {
|
|
|
20
21
|
delete(id: string): Promise<void>;
|
|
21
22
|
deleteAll(): Promise<void>;
|
|
22
23
|
getKey(id: string): string;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RedisRepository<any, any>, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RedisRepository<any, any>>;
|
|
23
26
|
}
|
package/auth/auth.service.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Signal } from "@angular/core";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare abstract class AuthService {
|
|
4
5
|
abstract readonly auth$: Observable<any>;
|
|
5
6
|
abstract readonly auth: Signal<any>;
|
|
@@ -7,4 +8,6 @@ export declare abstract class AuthService {
|
|
|
7
8
|
abstract readonly accessToken: Signal<string>;
|
|
8
9
|
abstract signIn(): Promise<any>;
|
|
9
10
|
abstract signOut(): Promise<void>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
10
13
|
}
|
|
@@ -3,6 +3,7 @@ import { Observable, ReplaySubject } from "rxjs";
|
|
|
3
3
|
import { MsalService } from '@azure/msal-angular';
|
|
4
4
|
import { AccountInfo, Configuration } from '@azure/msal-browser';
|
|
5
5
|
import { HttpClient } from "@angular/common/http";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
declare abstract class AuthService {
|
|
7
8
|
abstract readonly auth$: Observable<any>;
|
|
8
9
|
abstract readonly accessToken$: Observable<string>;
|
|
@@ -28,5 +29,7 @@ export declare class AzureAuthService extends AuthService {
|
|
|
28
29
|
signOut(): Promise<void>;
|
|
29
30
|
protected updateAccessToken(scopes?: string[]): Promise<void>;
|
|
30
31
|
acquireAccessToken(scopes?: string[]): Promise<string>;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AzureAuthService, never>;
|
|
33
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AzureAuthService>;
|
|
31
34
|
}
|
|
32
35
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command } from '@xxmachina/common/domain/models
|
|
2
|
-
import { OpenApi } from '../../models';
|
|
1
|
+
import { Command, OpenApi } from '@xxmachina/common/domain/models';
|
|
3
2
|
export declare class CommandBuilder {
|
|
4
3
|
buildFromOpenApi(openApi: OpenApi): Command[];
|
|
5
4
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Action, CreateActionsOptions } from '@ng-atomic/core';
|
|
2
2
|
import { NavigationExtras } from '@angular/router';
|
|
3
|
-
import { Command } from
|
|
3
|
+
import { Command } from '@xxmachina/common/domain/models';
|
|
4
4
|
export declare enum ActionId {
|
|
5
5
|
NAVIGATE_TO_COMMAND_PAGE = "[@xxmachina/common] Navigate To Command Page",
|
|
6
6
|
EXECUTE_COMMAND = "[@xxmachina/common] Execute Command"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScreenItem } from '@xxmachina/common/domain/models
|
|
2
|
-
import { Database } from '
|
|
1
|
+
import { ScreenItem } from '@xxmachina/common/domain/models';
|
|
2
|
+
import { Database } from '@xxmachina/common/domain/models';
|
|
3
3
|
export declare class ScreenItemBuilder {
|
|
4
4
|
build(database: Database): ScreenItem[];
|
|
5
5
|
}
|
package/domain/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@xxmachina/common/domain/builder';
|
|
2
|
+
export * from '@xxmachina/common/domain/models';
|
package/domain/models/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './agent';
|
|
2
|
+
export * from './bookmarklet';
|
|
3
3
|
export * from './command';
|
|
4
|
+
export * from './database';
|
|
5
|
+
export * from './endpoint';
|
|
6
|
+
export * from './links';
|
|
4
7
|
export * from './openapi';
|
|
8
|
+
export * from './operators';
|
|
9
|
+
export * from './project';
|
|
5
10
|
export * from './query';
|
|
6
11
|
export * from './resource';
|
|
12
|
+
export * from './scheduler';
|
|
7
13
|
export * from './screen-item';
|
|
8
14
|
export interface Context {
|
|
9
15
|
id: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './google';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Invoice, Order, Partner } from "@xxmachina/common/domain
|
|
1
|
+
import { Invoice, Order, Partner } from "@xxmachina/common/domain-invoice/models";
|
|
2
2
|
export declare class InvoiceResolver {
|
|
3
3
|
orderMap: Map<string, Order>;
|
|
4
4
|
partnerMap: Map<string, Partner>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { PassportStrategy } from '@nestjs/passport';
|
|
4
|
+
import { Strategy } from 'passport-custom';
|
|
5
|
+
|
|
6
|
+
let AnonymousStrategy = class AnonymousStrategy extends PassportStrategy(Strategy, 'anonymous') {
|
|
7
|
+
async validate(request) {
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
AnonymousStrategy = __decorate([
|
|
12
|
+
Injectable()
|
|
13
|
+
], AnonymousStrategy);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Generated bundle index. Do not edit.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export { AnonymousStrategy };
|
|
20
|
+
//# sourceMappingURL=xxmachina-common-_shared-auth-passports-anonymous.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-_shared-auth-passports-anonymous.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/anonymous/anonymous.strategy.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/anonymous/xxmachina-common-_shared-auth-passports-anonymous.ts"],"sourcesContent":["import { Injectable } from \"@nestjs/common\";\nimport { PassportStrategy } from \"@nestjs/passport\";\nimport { Strategy } from \"passport-custom\";\n\n@Injectable()\nexport class AnonymousStrategy extends PassportStrategy(Strategy, 'anonymous') {\n async validate(request: Request): Promise<any> {\n return {};\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKa,IAAA,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,gBAAgB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;IAC5E,MAAM,QAAQ,CAAC,OAAgB,EAAA;AAC7B,QAAA,OAAO,EAAE;;;AAFA,iBAAiB,GAAA,UAAA,CAAA;AAD7B,IAAA,UAAU;AACE,CAAA,EAAA,iBAAiB,CAI7B;;ACTD;;AAEG;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { AuthGuard, PassportStrategy } from '@nestjs/passport';
|
|
4
|
+
import { GqlExecutionContext } from '@nestjs/graphql';
|
|
5
|
+
import { FirebaseAuthStrategy } from '@tfarras/nestjs-firebase-auth';
|
|
6
|
+
import { ExtractJwt } from 'passport-jwt';
|
|
7
|
+
|
|
8
|
+
let FirebaseAuthGuard = class FirebaseAuthGuard extends AuthGuard('firebase') {
|
|
9
|
+
getRequest(context) {
|
|
10
|
+
const ctx = GqlExecutionContext.create(context);
|
|
11
|
+
const gqlReq = ctx.getContext().req;
|
|
12
|
+
if (gqlReq) {
|
|
13
|
+
gqlReq.body = ctx.getArgs();
|
|
14
|
+
return gqlReq;
|
|
15
|
+
}
|
|
16
|
+
return context.switchToHttp().getRequest();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
FirebaseAuthGuard = __decorate([
|
|
20
|
+
Injectable()
|
|
21
|
+
], FirebaseAuthGuard);
|
|
22
|
+
|
|
23
|
+
let FirebaseStrategy = class FirebaseStrategy extends PassportStrategy(FirebaseAuthStrategy, 'firebase') {
|
|
24
|
+
constructor() {
|
|
25
|
+
super({ extractor: ExtractJwt.fromAuthHeaderAsBearerToken() });
|
|
26
|
+
}
|
|
27
|
+
authenticate(req) {
|
|
28
|
+
return super.authenticate(req);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
FirebaseStrategy = __decorate([
|
|
32
|
+
Injectable(),
|
|
33
|
+
__metadata("design:paramtypes", [])
|
|
34
|
+
], FirebaseStrategy);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Generated bundle index. Do not edit.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
export { FirebaseAuthGuard, FirebaseStrategy };
|
|
41
|
+
//# sourceMappingURL=xxmachina-common-_shared-auth-passports-firebase.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-_shared-auth-passports-firebase.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/firebase.guard.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/firebase.strategy.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/xxmachina-common-_shared-auth-passports-firebase.ts"],"sourcesContent":["import { ExecutionContext, Injectable } from '@nestjs/common';\nimport { AuthGuard } from \"@nestjs/passport\";\nimport { GqlExecutionContext } from '@nestjs/graphql';\n\n@Injectable()\nexport class FirebaseAuthGuard extends AuthGuard('firebase') {\n getRequest(context: ExecutionContext) {\n const ctx = GqlExecutionContext.create(context);\n const gqlReq = ctx.getContext().req;\n\n if (gqlReq) {\n gqlReq.body = ctx.getArgs();\n return gqlReq;\n }\n return context.switchToHttp().getRequest();\n }\n}","import { Injectable } from '@nestjs/common';\nimport { PassportStrategy } from \"@nestjs/passport\";\nimport { FirebaseAuthStrategy } from '@tfarras/nestjs-firebase-auth';\nimport { ExtractJwt } from 'passport-jwt';\nimport { Request } from 'express';\nimport { ParamsDictionary } from 'express-serve-static-core';\nimport { ParsedQs } from 'qs';\n\n@Injectable()\nexport class FirebaseStrategy extends PassportStrategy(FirebaseAuthStrategy, 'firebase') {\n constructor() {\n super({extractor: ExtractJwt.fromAuthHeaderAsBearerToken()});\n }\n\n authenticate(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>): void {\n return super.authenticate(req);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAKa,IAAA,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,SAAS,CAAC,UAAU,CAAC,CAAA;AAC1D,IAAA,UAAU,CAAC,OAAyB,EAAA;QAClC,MAAM,GAAG,GAAG,mBAAmB,CAAC,MAAM,CAAC,OAAO,CAAC;QAC/C,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC,GAAG;QAEnC,IAAI,MAAM,EAAE;AACV,YAAA,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE;AAC3B,YAAA,OAAO,MAAM;;AAEf,QAAA,OAAO,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE;;;AATjC,iBAAiB,GAAA,UAAA,CAAA;AAD7B,IAAA,UAAU;AACE,CAAA,EAAA,iBAAiB,CAW7B;;ACPY,IAAA,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,gBAAgB,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAA;AACtF,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,EAAC,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE,EAAC,CAAC;;AAG9D,IAAA,YAAY,CAAC,GAAuE,EAAA;AAClF,QAAA,OAAO,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;;;AANrB,gBAAgB,GAAA,UAAA,CAAA;AAD5B,IAAA,UAAU,EAAE;;AACA,CAAA,EAAA,gBAAgB,CAQ5B;;ACjBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable, Inject } from '@nestjs/common';
|
|
3
|
+
import { PassportStrategy } from '@nestjs/passport';
|
|
4
|
+
import { Strategy } from 'passport-http-bearer';
|
|
5
|
+
|
|
6
|
+
const INTERNAL_STRATEGY_TOKEN = 'INTERNAL_STRATEGY_TOKEN';
|
|
7
|
+
function provideInternalStrategyToken(token) {
|
|
8
|
+
return {
|
|
9
|
+
provide: INTERNAL_STRATEGY_TOKEN,
|
|
10
|
+
useValue: token,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
let InternalStrategy = class InternalStrategy extends PassportStrategy(Strategy, 'internal') {
|
|
14
|
+
token;
|
|
15
|
+
constructor(token) {
|
|
16
|
+
super();
|
|
17
|
+
this.token = token;
|
|
18
|
+
}
|
|
19
|
+
async validate(token) {
|
|
20
|
+
return token === this.token;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
InternalStrategy = __decorate([
|
|
24
|
+
Injectable(),
|
|
25
|
+
__param(0, Inject(INTERNAL_STRATEGY_TOKEN)),
|
|
26
|
+
__metadata("design:paramtypes", [String])
|
|
27
|
+
], InternalStrategy);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generated bundle index. Do not edit.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export { INTERNAL_STRATEGY_TOKEN, InternalStrategy, provideInternalStrategyToken };
|
|
34
|
+
//# sourceMappingURL=xxmachina-common-_shared-auth-passports-internal.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-_shared-auth-passports-internal.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/internal/internal.strategy.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/internal/xxmachina-common-_shared-auth-passports-internal.ts"],"sourcesContent":["import { Inject, Injectable, InjectionToken } from \"@nestjs/common\";\nimport { PassportStrategy } from \"@nestjs/passport\";\nimport { Strategy } from 'passport-http-bearer';\n\nexport const INTERNAL_STRATEGY_TOKEN: InjectionToken = 'INTERNAL_STRATEGY_TOKEN';\n\nexport function provideInternalStrategyToken(token: string) {\n return {\n provide: INTERNAL_STRATEGY_TOKEN,\n useValue: token,\n };\n}\n\n@Injectable()\nexport class InternalStrategy extends PassportStrategy(Strategy, 'internal') {\n constructor(\n @Inject(INTERNAL_STRATEGY_TOKEN) private token: string,\n ) {\n super();\n }\n\n async validate(token: string): Promise<boolean> {\n return token === this.token;\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIO,MAAM,uBAAuB,GAAmB;AAEjD,SAAU,4BAA4B,CAAC,KAAa,EAAA;IACxD,OAAO;AACL,QAAA,OAAO,EAAE,uBAAuB;AAChC,QAAA,QAAQ,EAAE,KAAK;KAChB;AACH;AAGa,IAAA,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;AAE/B,IAAA,KAAA;AAD3C,IAAA,WAAA,CAC2C,KAAa,EAAA;AAEtD,QAAA,KAAK,EAAE;QAFkC,IAAK,CAAA,KAAA,GAAL,KAAK;;IAKhD,MAAM,QAAQ,CAAC,KAAa,EAAA;AAC1B,QAAA,OAAO,KAAK,KAAK,IAAI,CAAC,KAAK;;;AARlB,gBAAgB,GAAA,UAAA,CAAA;AAD5B,IAAA,UAAU,EAAE;AAGR,IAAA,OAAA,CAAA,CAAA,EAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;;AAFvB,CAAA,EAAA,gBAAgB,CAU5B;;ACxBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable, UnauthorizedException, Inject } from '@nestjs/common';
|
|
3
|
+
import { AuthGuard, PassportStrategy } from '@nestjs/passport';
|
|
4
|
+
import { Strategy } from 'passport-custom';
|
|
5
|
+
import validate from 'validate-azure-ad-token';
|
|
6
|
+
|
|
7
|
+
let MsalAuthGuard = class MsalAuthGuard extends AuthGuard('msal') {
|
|
8
|
+
};
|
|
9
|
+
MsalAuthGuard = __decorate([
|
|
10
|
+
Injectable()
|
|
11
|
+
], MsalAuthGuard);
|
|
12
|
+
|
|
13
|
+
const MSAL_CONFIG = 'MSAL_CONFIG';
|
|
14
|
+
function provideMsalAuth(useFactory) {
|
|
15
|
+
return [
|
|
16
|
+
{ provide: MSAL_CONFIG, useFactory },
|
|
17
|
+
MsalStrategy,
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
let MsalStrategy = class MsalStrategy extends PassportStrategy(Strategy, 'msal') {
|
|
21
|
+
config;
|
|
22
|
+
constructor(config) {
|
|
23
|
+
super();
|
|
24
|
+
this.config = config;
|
|
25
|
+
}
|
|
26
|
+
async validate(req) {
|
|
27
|
+
const token = req.headers.authorization?.split(' ')[1];
|
|
28
|
+
try {
|
|
29
|
+
const decoded = await validate(token, this.config);
|
|
30
|
+
return decoded.payload;
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
console.error('err:', err);
|
|
34
|
+
throw new UnauthorizedException();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
MsalStrategy = __decorate([
|
|
39
|
+
Injectable(),
|
|
40
|
+
__param(0, Inject(MSAL_CONFIG)),
|
|
41
|
+
__metadata("design:paramtypes", [Object])
|
|
42
|
+
], MsalStrategy);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Generated bundle index. Do not edit.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
export { MSAL_CONFIG, MsalAuthGuard, MsalStrategy, provideMsalAuth };
|
|
49
|
+
//# sourceMappingURL=xxmachina-common-_shared-auth-passports-msal.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-_shared-auth-passports-msal.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/msal.guard.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/msal.strategy.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/xxmachina-common-_shared-auth-passports-msal.ts"],"sourcesContent":["import { Injectable } from '@nestjs/common';\nimport { AuthGuard } from \"@nestjs/passport\";\n\n@Injectable()\nexport class MsalAuthGuard extends AuthGuard('msal') { }\n","import { Inject, Injectable, Provider, UnauthorizedException } from '@nestjs/common';\nimport { PassportStrategy } from '@nestjs/passport';\nimport { Strategy } from 'passport-custom';\nimport validate from 'validate-azure-ad-token';\n\nexport const MSAL_CONFIG = 'MSAL_CONFIG';\nexport interface MsalConfig {\n tenantId: string,\n audience: string,\n applicationId: string,\n scopes: string[],\n}\n\nexport function provideMsalAuth(useFactory: () => MsalConfig): Provider[] {\n return [\n { provide: MSAL_CONFIG, useFactory },\n MsalStrategy,\n ];\n}\n\n@Injectable()\nexport class MsalStrategy extends PassportStrategy(Strategy, 'msal') {\n constructor(\n @Inject(MSAL_CONFIG) private readonly config: MsalConfig,\n ) {\n super();\n }\n\n async validate(req: any) {\n const token = req.headers.authorization?.split(' ')[1];\n try {\n const decoded = await validate(token, this.config);\n return decoded.payload;\n } catch (err) {\n console.error('err:', err);\n throw new UnauthorizedException();\n }\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIa,IAAA,aAAa,GAAnB,MAAM,aAAc,SAAQ,SAAS,CAAC,MAAM,CAAC,CAAA;;AAAvC,aAAa,GAAA,UAAA,CAAA;AADzB,IAAA,UAAU;AACE,CAAA,EAAA,aAAa,CAA8B;;ACCjD,MAAM,WAAW,GAAG;AAQrB,SAAU,eAAe,CAAC,UAA4B,EAAA;IAC1D,OAAO;AACL,QAAA,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE;QACpC,YAAY;KACb;AACH;AAGa,IAAA,YAAY,GAAlB,MAAM,YAAa,SAAQ,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AAE1B,IAAA,MAAA;AADxC,IAAA,WAAA,CACwC,MAAkB,EAAA;AAExD,QAAA,KAAK,EAAE;QAF+B,IAAM,CAAA,MAAA,GAAN,MAAM;;IAK9C,MAAM,QAAQ,CAAC,GAAQ,EAAA;AACrB,QAAA,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACtD,QAAA,IAAI;YACF,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;YAClD,OAAO,OAAO,CAAC,OAAO;;QACtB,OAAO,GAAG,EAAE;AACZ,YAAA,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC;YAC1B,MAAM,IAAI,qBAAqB,EAAE;;;;AAd1B,YAAY,GAAA,UAAA,CAAA;AADxB,IAAA,UAAU,EAAE;AAGR,IAAA,OAAA,CAAA,CAAA,EAAA,MAAM,CAAC,WAAW,CAAC,CAAA;;AAFX,CAAA,EAAA,YAAY,CAiBxB;;ACtCD;;AAEG;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { Module } from '@nestjs/common';
|
|
3
|
+
import { PassportModule } from '@nestjs/passport';
|
|
4
|
+
|
|
5
|
+
var AuthModule_1;
|
|
6
|
+
let AuthModule = AuthModule_1 = class AuthModule {
|
|
7
|
+
static forRoot() {
|
|
8
|
+
return { module: AuthModule_1, providers: [] };
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
AuthModule = AuthModule_1 = __decorate([
|
|
12
|
+
Module({
|
|
13
|
+
imports: [PassportModule],
|
|
14
|
+
providers: [],
|
|
15
|
+
exports: [],
|
|
16
|
+
controllers: [],
|
|
17
|
+
})
|
|
18
|
+
], AuthModule);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Generated bundle index. Do not edit.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export { AuthModule };
|
|
25
|
+
//# sourceMappingURL=xxmachina-common-_shared-auth.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-_shared-auth.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/auth/auth.module.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/auth/xxmachina-common-_shared-auth.ts"],"sourcesContent":["import { Module } from \"@nestjs/common\";\nimport { PassportModule } from \"@nestjs/passport\";\n\n@Module({\n imports: [PassportModule],\n providers: [\n ],\n exports: [\n ],\n controllers: [],\n})\nexport class AuthModule {\n static forRoot() {\n return { module: AuthModule, providers: [] }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWa,IAAA,UAAU,GAAhB,YAAA,GAAA,MAAM,UAAU,CAAA;AACrB,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO,EAAE,MAAM,EAAE,YAAU,EAAE,SAAS,EAAE,EAAE,EAAE;;;AAFnC,UAAU,GAAA,YAAA,GAAA,UAAA,CAAA;AARtB,IAAA,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,cAAc,CAAC;AACzB,QAAA,SAAS,EAAE,EACV;AACD,QAAA,OAAO,EAAE,EACR;AACD,QAAA,WAAW,EAAE,EAAE;KAChB;AACY,CAAA,EAAA,UAAU,CAItB;;ACfD;;AAEG;;;;"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injectable } from '@angular/core';
|
|
3
|
+
import { omit } from 'lodash-es';
|
|
4
|
+
|
|
5
|
+
const REDIS_CONFIG = new InjectionToken('[@nx-ddd/redis] Redis Config');
|
|
6
|
+
function provideRedisConfig(config) {
|
|
7
|
+
return { provide: REDIS_CONFIG, useValue: config };
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class Converter {
|
|
11
|
+
fromRedis(record) {
|
|
12
|
+
return { ...record };
|
|
13
|
+
}
|
|
14
|
+
toRedis(entity) {
|
|
15
|
+
return { ...entity };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function safeCreateClient(params) {
|
|
19
|
+
// try {
|
|
20
|
+
// return createClient(params);
|
|
21
|
+
// } catch (error) {
|
|
22
|
+
// console.error(error);
|
|
23
|
+
// }
|
|
24
|
+
}
|
|
25
|
+
class RedisRepository {
|
|
26
|
+
converter = new Converter();
|
|
27
|
+
config = inject(REDIS_CONFIG);
|
|
28
|
+
client = safeCreateClient({
|
|
29
|
+
url: this.config.url,
|
|
30
|
+
});
|
|
31
|
+
constructor() { }
|
|
32
|
+
async init() {
|
|
33
|
+
try {
|
|
34
|
+
if (!this.client?.isOpen)
|
|
35
|
+
await this.client.connect();
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error(error);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async list() {
|
|
42
|
+
await this.init();
|
|
43
|
+
const keys = await this.client.keys(`${this.entityName}:*`)
|
|
44
|
+
.then((keys) => keys.map(key => key.slice(this.entityName.length + 1)));
|
|
45
|
+
const entities = await Promise.all(keys.map(key => this.get(key)));
|
|
46
|
+
return entities;
|
|
47
|
+
}
|
|
48
|
+
async get(id) {
|
|
49
|
+
await this.init();
|
|
50
|
+
const key = this.getKey(id);
|
|
51
|
+
const entity = await this.client.hGetAll(key);
|
|
52
|
+
return this.converter.fromRedis({ ...entity, id });
|
|
53
|
+
}
|
|
54
|
+
async create(entity) {
|
|
55
|
+
await this.init();
|
|
56
|
+
const key = this.getKey(entity.id);
|
|
57
|
+
if (await this.client.exists(key))
|
|
58
|
+
throw new Error(`Entity ${key} already exists`);
|
|
59
|
+
const record = omit(this.converter.toRedis(entity), 'id');
|
|
60
|
+
console.debug('create', key, record);
|
|
61
|
+
await this.client.hSet(key, record);
|
|
62
|
+
return entity;
|
|
63
|
+
}
|
|
64
|
+
async update(entity) {
|
|
65
|
+
await this.init();
|
|
66
|
+
const key = this.getKey(entity.id);
|
|
67
|
+
if (!await this.client.exists(key))
|
|
68
|
+
throw new Error(`Entity ${key} does not exist`);
|
|
69
|
+
await this.client.hSet(key, omit(this.converter.toRedis(entity), 'id'));
|
|
70
|
+
}
|
|
71
|
+
async delete(id) {
|
|
72
|
+
await this.init();
|
|
73
|
+
const key = this.getKey(id);
|
|
74
|
+
if (!await this.client.exists(key))
|
|
75
|
+
throw new Error(`Entity ${id} does not exist`);
|
|
76
|
+
await this.client.del(key);
|
|
77
|
+
}
|
|
78
|
+
async deleteAll() {
|
|
79
|
+
await this.init();
|
|
80
|
+
const keys = await this.client.keys(`${this.entityName}:*`);
|
|
81
|
+
await Promise.all(keys.map(key => this.client.del(key)));
|
|
82
|
+
}
|
|
83
|
+
getKey(id) {
|
|
84
|
+
return `${this.entityName}:${id}`;
|
|
85
|
+
}
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RedisRepository, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
87
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RedisRepository, providedIn: 'root' });
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RedisRepository, decorators: [{
|
|
90
|
+
type: Injectable,
|
|
91
|
+
args: [{ providedIn: 'root' }]
|
|
92
|
+
}], ctorParameters: () => [] });
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Generated bundle index. Do not edit.
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
export { Converter, REDIS_CONFIG, RedisRepository, provideRedisConfig };
|
|
99
|
+
//# sourceMappingURL=xxmachina-common-_shared-meta-redis.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-_shared-meta-redis.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.config.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.repository.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/xxmachina-common-_shared-meta-redis.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface RedisConfig {\n url: string;\n}\n\nexport const REDIS_CONFIG = new InjectionToken<RedisConfig>('[@nx-ddd/redis] Redis Config');\n\nexport function provideRedisConfig(config: RedisConfig) {\n return { provide: REDIS_CONFIG, useValue: config };\n}\n","import { inject, Inject, Injectable } from \"@angular/core\";\nimport { RedisClientType, createClient } from 'redis';\nimport { REDIS_CONFIG, RedisConfig } from './redis.config';\nimport { omit } from 'lodash-es';\n\nexport class Converter<E, R> {\n fromRedis(record: R): E {\n return {...record} as never as E; \n }\n\n toRedis(entity: E): R {\n return {...entity} as never as R;\n }\n}\n\nfunction safeCreateClient(params: {url : string}) {\n // try {\n // return createClient(params);\n // } catch (error) {\n // console.error(error);\n // }\n}\n\n@Injectable({ providedIn: 'root' })\nexport abstract class RedisRepository<E extends {id: string} = any, R extends object = object> {\n protected abstract entityName: string;\n protected converter: Converter<E, R> = new Converter();\n protected config: RedisConfig = inject(REDIS_CONFIG);\n protected client: RedisClientType = safeCreateClient({\n url: this.config.url,\n }) as any;\n\n constructor(\n ) { }\n\n async init() {\n try {\n if (!this.client?.isOpen) await this.client.connect();\n } catch (error) {\n console.error(error);\n }\n }\n\n async list() {\n await this.init();\n const keys = await this.client.keys(`${this.entityName}:*`)\n .then((keys) => keys.map(key => key.slice(this.entityName.length + 1)));\n const entities = await Promise.all(keys.map(key => this.get(key)));\n return entities;\n }\n\n async get(id: string): Promise<E> {\n await this.init();\n const key = this.getKey(id);\n const entity = await this.client.hGetAll(key);\n return this.converter.fromRedis({...entity, id} as any);\n }\n\n async create(entity: E): Promise<E> {\n await this.init();\n const key = this.getKey(entity.id);\n if (await this.client.exists(key)) throw new Error(`Entity ${key} already exists`);\n const record = omit(this.converter.toRedis(entity), 'id') as {};\n console.debug('create', key, record);\n await this.client.hSet(key, record);\n return entity;\n }\n\n async update(entity: any): Promise<void> {\n await this.init();\n const key = this.getKey(entity.id);\n if (!await this.client.exists(key)) throw new Error(`Entity ${key} does not exist`);\n await this.client.hSet(key, omit(this.converter.toRedis(entity), 'id') as {});\n }\n\n async delete(id: string): Promise<void> {\n await this.init();\n const key = this.getKey(id);\n if (!await this.client.exists(key)) throw new Error(`Entity ${id} does not exist`);\n await this.client.del(key);\n }\n\n async deleteAll(): Promise<void> {\n await this.init();\n const keys = await this.client.keys(`${this.entityName}:*`);\n await Promise.all(keys.map(key => this.client.del(key)));\n }\n\n getKey(id: string): string {\n return `${this.entityName}:${id}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
let ObjectType, Field, ID;
|
|
2
|
+
const _decorators = {
|
|
3
|
+
ObjectType: function () {
|
|
4
|
+
return function (target) {
|
|
5
|
+
// return target;
|
|
6
|
+
};
|
|
7
|
+
},
|
|
8
|
+
Field: function () {
|
|
9
|
+
return function (target, propertyKey) {
|
|
10
|
+
// return target;
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
ID: null,
|
|
14
|
+
};
|
|
15
|
+
({ ObjectType, Field, ID } = _decorators);
|
|
16
|
+
// GraphQLのデコレーターをファクトリーメソッドで提供
|
|
17
|
+
function provideNestjsGraphql(_decorators) {
|
|
18
|
+
({ ObjectType, Field, ID } = _decorators);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Generated bundle index. Do not edit.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
export { Field, ID, ObjectType, provideNestjsGraphql };
|
|
26
|
+
//# sourceMappingURL=xxmachina-common-_shared-meta.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-_shared-meta.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/meta/decorators.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/xxmachina-common-_shared-meta.ts"],"sourcesContent":["import type decorators from '@nestjs/graphql';\n\nlet ObjectType, Field, ID;\n\nconst _decorators: Partial<typeof decorators> = {\n ObjectType: function(): ClassDecorator {\n return function (target: any) {\n // return target;\n }\n },\n Field: function(): PropertyDecorator {\n return function (target: any, propertyKey: string | symbol) {\n // return target;\n }\n },\n ID: null,\n};\n({ ObjectType, Field, ID } = _decorators as any);\n\n// GraphQLのデコレーターをファクトリーメソッドで提供\nexport function provideNestjsGraphql(_decorators: typeof decorators) {\n ({ ObjectType, Field, ID } = _decorators);\n}\n\nexport { ObjectType, Field, ID };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAEA,IAAI,UAAU,CAAA,CAAE,KAAK,CAAA,CAAE;AAEvB,MAAM,WAAW,GAA+B;AAC9C,IAAA,UAAU,EAAE,YAAA;AACV,QAAA,OAAO,UAAU,MAAW,EAAA;;AAE5B,SAAC;KACF;AACD,IAAA,KAAK,EAAE,YAAA;QACL,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;;AAE1D,SAAC;KACF;AACD,IAAA,EAAE,EAAE,IAAI;CACT;AACD,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,WAAkB;AAE/C;AACM,SAAU,oBAAoB,CAAC,WAA8B,EAAA;IACjE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,WAAW;AAC1C;;ACtBA;;AAEG;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class AuthService {
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AuthService });
|
|
7
|
+
}
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AuthService, decorators: [{
|
|
9
|
+
type: Injectable
|
|
10
|
+
}] });
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Generated bundle index. Do not edit.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export { AuthService };
|
|
17
|
+
//# sourceMappingURL=xxmachina-common-auth.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-auth.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/auth/auth.service.ts","../../../../../packages/@xxmachina/common/src/lib/auth/xxmachina-common-auth.ts"],"sourcesContent":["import { Injectable, Signal } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\n@Injectable()\nexport abstract class AuthService {\n abstract readonly auth$: Observable<any>;\n abstract readonly auth: Signal<any>;\n abstract readonly accessToken$: Observable<string>;\n abstract readonly accessToken: Signal<string>;\n\n abstract signIn(): Promise<any>;\n abstract signOut(): Promise<void>;\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAIsB,WAAW,CAAA;uGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAX,WAAW,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADhC;;;ACHD;;AAEG;;;;"}
|