@xxmachina/common 19.0.0-preview.29 → 19.0.0-preview.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/_shared/auth/auth.module.js +22 -0
- package/_shared/auth/auth.module.js.map +1 -0
- package/_shared/auth/index.js +5 -0
- package/_shared/auth/index.js.map +1 -0
- package/_shared/auth/passports/anonymous/anonymous.strategy.js +19 -0
- package/_shared/auth/passports/anonymous/anonymous.strategy.js.map +1 -0
- package/_shared/auth/passports/anonymous/index.js +5 -0
- package/_shared/auth/passports/anonymous/index.js.map +1 -0
- package/_shared/auth/passports/firebase/firebase.guard.js +23 -0
- package/_shared/auth/passports/firebase/firebase.guard.js.map +1 -0
- package/_shared/auth/passports/firebase/firebase.strategy.js +22 -0
- package/_shared/auth/passports/firebase/firebase.strategy.js.map +1 -0
- package/_shared/auth/passports/firebase/index.js +6 -0
- package/_shared/auth/passports/firebase/index.js.map +1 -0
- package/_shared/auth/passports/internal/index.js +5 -0
- package/_shared/auth/passports/internal/index.js.map +1 -0
- package/_shared/auth/passports/internal/internal.strategy.js +33 -0
- package/_shared/auth/passports/internal/internal.strategy.js.map +1 -0
- package/_shared/auth/passports/msal/index.js +6 -0
- package/_shared/auth/passports/msal/index.js.map +1 -0
- package/_shared/auth/passports/msal/msal.guard.js +13 -0
- package/_shared/auth/passports/msal/msal.guard.js.map +1 -0
- package/_shared/auth/passports/msal/msal.strategy.js +43 -0
- package/_shared/auth/passports/msal/msal.strategy.js.map +1 -0
- package/_shared/meta/decorators.js +25 -0
- package/_shared/meta/decorators.js.map +1 -0
- package/_shared/meta/redis/index.js +6 -0
- package/_shared/meta/redis/index.js.map +1 -0
- package/_shared/meta/redis/redis.config.js +10 -0
- package/_shared/meta/redis/redis.config.js.map +1 -0
- package/_shared/meta/redis/redis.repository.d.ts +3 -6
- package/_shared/meta/redis/redis.repository.js +108 -0
- package/_shared/meta/redis/redis.repository.js.map +1 -0
- package/auth/auth.service.d.ts +0 -3
- package/auth/auth.service.js +12 -0
- package/auth/auth.service.js.map +1 -0
- package/auth/index.js +5 -0
- package/auth/index.js.map +1 -0
- package/azure-auth/auth.di.js +56 -0
- package/azure-auth/auth.di.js.map +1 -0
- package/azure-auth/auth.service.d.ts +0 -3
- package/azure-auth/auth.service.js +115 -0
- package/azure-auth/auth.service.js.map +1 -0
- package/azure-auth/index.js +6 -0
- package/azure-auth/index.js.map +1 -0
- package/domain/builder/command/command.builder.d.ts +2 -1
- package/domain/builder/command/command.builder.js +30 -0
- package/domain/builder/command/command.builder.js.map +1 -0
- package/domain/builder/command/index.js +5 -0
- package/domain/builder/command/index.js.map +1 -0
- package/domain/builder/command-action/command-action.builder.d.ts +1 -1
- package/domain/builder/command-action/command-action.builder.js +139 -0
- package/domain/builder/command-action/command-action.builder.js.map +1 -0
- package/domain/builder/command-action/index.js +5 -0
- package/domain/builder/command-action/index.js.map +1 -0
- package/domain/builder/er/er.builder.js +112 -0
- package/domain/builder/er/er.builder.js.map +1 -0
- package/domain/builder/er/index.js +5 -0
- package/domain/builder/er/index.js.map +1 -0
- package/domain/builder/screen-item/index.js +5 -0
- package/domain/builder/screen-item/index.js.map +1 -0
- package/domain/builder/screen-item/screen-item.builder.d.ts +2 -2
- package/{fesm2022/xxmachina-common-domain-builder-screen-item.mjs → domain/builder/screen-item/screen-item.builder.js} +11 -10
- package/domain/builder/screen-item/screen-item.builder.js.map +1 -0
- package/domain/index.d.ts +1 -2
- package/domain/index.js +5 -0
- package/domain/index.js.map +1 -0
- package/{domain-invoice → domain/invoice}/builders/email/email.builder.d.ts +1 -1
- package/domain/invoice/builders/email/email.builder.js +29 -0
- package/domain/invoice/builders/email/email.builder.js.map +1 -0
- package/domain/invoice/builders/email/index.js +5 -0
- package/domain/invoice/builders/email/index.js.map +1 -0
- package/domain/invoice/builders/message/index.js +5 -0
- package/domain/invoice/builders/message/index.js.map +1 -0
- package/{domain-invoice → domain/invoice}/builders/message/message.builder.d.ts +1 -1
- package/domain/invoice/builders/message/message.builder.js +43 -0
- package/domain/invoice/builders/message/message.builder.js.map +1 -0
- package/domain/invoice/builders/title/index.js +5 -0
- package/domain/invoice/builders/title/index.js.map +1 -0
- package/{domain-invoice → domain/invoice}/builders/title/title.builder.d.ts +1 -1
- package/domain/invoice/builders/title/title.builder.js +11 -0
- package/domain/invoice/builders/title/title.builder.js.map +1 -0
- package/domain/invoice/models/backoffice/contract.js +50 -0
- package/domain/invoice/models/backoffice/contract.js.map +1 -0
- package/domain/invoice/models/backoffice/index.js +9 -0
- package/domain/invoice/models/backoffice/index.js.map +1 -0
- package/domain/invoice/models/backoffice/invoice-mail.js +7 -0
- package/domain/invoice/models/backoffice/invoice-mail.js.map +1 -0
- package/{domain-invoice → domain/invoice}/models/backoffice/invoice.d.ts +1 -1
- package/domain/invoice/models/backoffice/invoice.js +91 -0
- package/domain/invoice/models/backoffice/invoice.js.map +1 -0
- package/{domain-invoice → domain/invoice}/models/backoffice/order.d.ts +1 -1
- package/domain/invoice/models/backoffice/order.js +157 -0
- package/domain/invoice/models/backoffice/order.js.map +1 -0
- package/{domain-invoice → domain/invoice}/models/backoffice/partner.d.ts +1 -1
- package/domain/invoice/models/backoffice/partner.js +96 -0
- package/domain/invoice/models/backoffice/partner.js.map +1 -0
- package/domain/invoice/models/index.js +5 -0
- package/domain/invoice/models/index.js.map +1 -0
- package/domain/models/agent/assistant.js +31 -0
- package/domain/models/agent/assistant.js.map +1 -0
- package/domain/models/agent/index.js +5 -0
- package/domain/models/agent/index.js.map +1 -0
- package/domain/models/bookmarklet/bookmarklet.js +34 -0
- package/domain/models/bookmarklet/bookmarklet.js.map +1 -0
- package/domain/models/bookmarklet/index.js +5 -0
- package/domain/models/bookmarklet/index.js.map +1 -0
- package/domain/models/calendar-utils.d.ts +5 -0
- package/domain/models/calendar-utils.js +43 -0
- package/domain/models/calendar-utils.js.map +1 -0
- package/domain/models/command/command.helper.js +14 -0
- package/domain/models/command/command.helper.js.map +1 -0
- package/domain/models/command/command.js +40 -0
- package/domain/models/command/command.js.map +1 -0
- package/domain/models/command/index.js +6 -0
- package/domain/models/command/index.js.map +1 -0
- package/domain/models/database/database.js +7 -0
- package/domain/models/database/database.js.map +1 -0
- package/domain/models/database/index.js +5 -0
- package/domain/models/database/index.js.map +1 -0
- package/domain/models/endpoint/endpoint.helper.js +21 -0
- package/domain/models/endpoint/endpoint.helper.js.map +1 -0
- package/domain/models/endpoint/index.js +5 -0
- package/domain/models/endpoint/index.js.map +1 -0
- package/domain/models/index.d.ts +2 -8
- package/domain/models/index.js +12 -0
- package/domain/models/index.js.map +1 -0
- package/domain/models/links/google/google.js +47 -0
- package/domain/models/links/google/google.js.map +1 -0
- package/domain/models/links/google/index.js +5 -0
- package/domain/models/links/google/index.js.map +1 -0
- package/domain/models/openapi/index.js +6 -0
- package/domain/models/openapi/index.js.map +1 -0
- package/domain/models/openapi/openapi.js +87 -0
- package/domain/models/openapi/openapi.js.map +1 -0
- package/domain/models/openapi/openapi.schema.js +3 -0
- package/domain/models/openapi/openapi.schema.js.map +1 -0
- package/domain/models/operators/assistancts/base.js +13 -0
- package/domain/models/operators/assistancts/base.js.map +1 -0
- package/domain/models/operators/assistancts/index.js +5 -0
- package/domain/models/operators/assistancts/index.js.map +1 -0
- package/domain/models/operators/base.js +10 -0
- package/domain/models/operators/base.js.map +1 -0
- package/domain/models/operators/index.js +8 -0
- package/domain/models/operators/index.js.map +1 -0
- package/domain/models/operators/systems/base.js +3 -0
- package/domain/models/operators/systems/base.js.map +1 -0
- package/domain/models/operators/systems/graphql.js +3 -0
- package/domain/models/operators/systems/graphql.js.map +1 -0
- package/domain/models/operators/systems/index.js +7 -0
- package/domain/models/operators/systems/index.js.map +1 -0
- package/domain/models/operators/systems/rest.js +3 -0
- package/domain/models/operators/systems/rest.js.map +1 -0
- package/domain/models/operators/workflows/index.js +5 -0
- package/domain/models/operators/workflows/index.js.map +1 -0
- package/domain/models/operators/workflows/workflow.js +3 -0
- package/domain/models/operators/workflows/workflow.js.map +1 -0
- package/domain/models/project.js +9 -0
- package/domain/models/project.js.map +1 -0
- package/domain/models/query/index.js +6 -0
- package/domain/models/query/index.js.map +1 -0
- package/domain/models/query/query.d.ts +1 -1
- package/domain/models/query/query.helper.d.ts +0 -1
- package/domain/models/query/query.helper.js +172 -0
- package/domain/models/query/query.helper.js.map +1 -0
- package/domain/models/query/query.js +122 -0
- package/domain/models/query/query.js.map +1 -0
- package/domain/models/resource/index.js +6 -0
- package/domain/models/resource/index.js.map +1 -0
- package/domain/models/resource/resource.helper.js +16 -0
- package/domain/models/resource/resource.helper.js.map +1 -0
- package/domain/models/resource/resource.js +73 -0
- package/domain/models/resource/resource.js.map +1 -0
- package/domain/models/scheduler/index.js +5 -0
- package/domain/models/scheduler/index.js.map +1 -0
- package/domain/models/scheduler/schedule.js +89 -0
- package/domain/models/scheduler/schedule.js.map +1 -0
- package/domain/models/screen-item/index.js +5 -0
- package/domain/models/screen-item/index.js.map +1 -0
- package/domain/models/screen-item/screen-item.js +3 -0
- package/domain/models/screen-item/screen-item.js.map +1 -0
- package/domain/models/spec.js +3 -0
- package/domain/models/spec.js.map +1 -0
- package/domain/resolvers/index.js +5 -0
- package/domain/resolvers/index.js.map +1 -0
- package/{domain-invoice → domain}/resolvers/invoice.resolver.d.ts +1 -1
- package/domain/resolvers/invoice.resolver.js +31 -0
- package/domain/resolvers/invoice.resolver.js.map +1 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.d.ts +0 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js +1 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js.map +1 -0
- package/{infra → infrastructure}/converters/google/google.converter.d.ts +1 -4
- package/infrastructure/converters/google/google.converter.js +27 -0
- package/infrastructure/converters/google/google.converter.js.map +1 -0
- package/infrastructure/converters/google/index.js +5 -0
- package/infrastructure/converters/google/index.js.map +1 -0
- package/infrastructure/external/data-connect/data-connect.service.impl.d.ts +7 -0
- package/infrastructure/external/data-connect/data-connect.service.impl.js +20 -0
- package/infrastructure/external/data-connect/data-connect.service.impl.js.map +1 -0
- package/infrastructure/external/data-connect/data-connect.service.js +11 -0
- package/infrastructure/external/data-connect/data-connect.service.js.map +1 -0
- package/infrastructure/external/data-connect/index.js +5 -0
- package/infrastructure/external/data-connect/index.js.map +1 -0
- package/{infra → infrastructure}/external/external.config.d.ts +2 -2
- package/infrastructure/external/external.config.js +13 -0
- package/infrastructure/external/external.config.js.map +1 -0
- package/{infra → infrastructure}/external/external.service.d.ts +3 -4
- package/infrastructure/external/external.service.js +23 -0
- package/infrastructure/external/external.service.js.map +1 -0
- package/infrastructure/external/index.js +6 -0
- package/infrastructure/external/index.js.map +1 -0
- package/infrastructure/external/quick-js/index.js +5 -0
- package/infrastructure/external/quick-js/index.js.map +1 -0
- package/{infra → infrastructure}/external/quick-js/quick-js.service.d.ts +0 -3
- package/infrastructure/external/quick-js/quick-js.service.js +44 -0
- package/infrastructure/external/quick-js/quick-js.service.js.map +1 -0
- package/infrastructure/external/resend/index.js +5 -0
- package/infrastructure/external/resend/index.js.map +1 -0
- package/infrastructure/external/resend/resend.service.d.ts +9 -0
- package/{infra → infrastructure}/external/resend/resend.service.impl.d.ts +8 -4
- package/infrastructure/external/resend/resend.service.impl.js +27 -0
- package/infrastructure/external/resend/resend.service.impl.js.map +1 -0
- package/infrastructure/external/resend/resend.service.js +6 -0
- package/infrastructure/external/resend/resend.service.js.map +1 -0
- package/infrastructure/index.js +6 -0
- package/infrastructure/index.js.map +1 -0
- package/{infra → infrastructure}/infrastructure.config.d.ts +5 -5
- package/infrastructure/infrastructure.config.js +12 -0
- package/infrastructure/infrastructure.config.js.map +1 -0
- package/{infra → infrastructure}/infrastructure.service.d.ts +0 -3
- package/infrastructure/infrastructure.service.js +20 -0
- package/infrastructure/infrastructure.service.js.map +1 -0
- package/infrastructure/query/firestore/query/index.js +5 -0
- package/infrastructure/query/firestore/query/index.js.map +1 -0
- package/{infra → infrastructure}/query/firestore/query/query.query.d.ts +0 -3
- package/infrastructure/query/firestore/query/query.query.js +20 -0
- package/infrastructure/query/firestore/query/query.query.js.map +1 -0
- package/infrastructure/query/firestore/resource/index.js +5 -0
- package/infrastructure/query/firestore/resource/index.js.map +1 -0
- package/{infra → infrastructure}/query/firestore/resource/resource.query.d.ts +0 -3
- package/infrastructure/query/firestore/resource/resource.query.js +20 -0
- package/infrastructure/query/firestore/resource/resource.query.js.map +1 -0
- package/infrastructure/query/hasura/resource/index.js +5 -0
- package/infrastructure/query/hasura/resource/index.js.map +1 -0
- package/infrastructure/query/hasura/resource/resource.query.d.ts +3 -0
- package/infrastructure/query/hasura/resource/resource.query.js +14 -0
- package/infrastructure/query/hasura/resource/resource.query.js.map +1 -0
- package/infrastructure/repository/dataconnect/invoice/index.js +5 -0
- package/infrastructure/repository/dataconnect/invoice/index.js.map +1 -0
- package/{infra → infrastructure}/repository/dataconnect/invoice/invoice.repository.impl.d.ts +1 -4
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js +54 -0
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js.map +1 -0
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js +11 -0
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js.map +1 -0
- package/infrastructure/repository/dataconnect/order/index.js +5 -0
- package/infrastructure/repository/dataconnect/order/index.js.map +1 -0
- package/{infra → infrastructure}/repository/dataconnect/order/order.repository.impl.d.ts +1 -4
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js +74 -0
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js.map +1 -0
- package/infrastructure/repository/dataconnect/order/order.repository.js +11 -0
- package/infrastructure/repository/dataconnect/order/order.repository.js.map +1 -0
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.d.ts +6 -0
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js +20 -0
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js.map +1 -0
- package/infrastructure/repository/firestore/bookmarklet/index.d.ts +1 -0
- package/infrastructure/repository/firestore/bookmarklet/index.js +5 -0
- package/infrastructure/repository/firestore/bookmarklet/index.js.map +1 -0
- package/infrastructure/repository/firestore/firestore.repository.d.ts +7 -0
- package/infrastructure/repository/firestore/firestore.repository.js +20 -0
- package/infrastructure/repository/firestore/firestore.repository.js.map +1 -0
- package/infrastructure/repository/firestore/index.d.ts +1 -0
- package/infrastructure/repository/firestore/index.js +5 -0
- package/infrastructure/repository/firestore/index.js.map +1 -0
- package/infrastructure/repository/firestore/link/google/google.repository.d.ts +7 -0
- package/infrastructure/repository/firestore/link/google/google.repository.js +19 -0
- package/infrastructure/repository/firestore/link/google/google.repository.js.map +1 -0
- package/infrastructure/repository/firestore/link/google/index.js +5 -0
- package/infrastructure/repository/firestore/link/google/index.js.map +1 -0
- package/infrastructure/repository/firestore/link/index.js +5 -0
- package/infrastructure/repository/firestore/link/index.js.map +1 -0
- package/infrastructure/repository/firestore/link/link.repository.d.ts +5 -0
- package/infrastructure/repository/firestore/link/link.repository.js +17 -0
- package/infrastructure/repository/firestore/link/link.repository.js.map +1 -0
- package/infrastructure/repository/firestore/query/index.js +5 -0
- package/infrastructure/repository/firestore/query/index.js.map +1 -0
- package/{infra → infrastructure}/repository/firestore/query/query.repository.d.ts +1 -4
- package/infrastructure/repository/firestore/query/query.repository.js +20 -0
- package/infrastructure/repository/firestore/query/query.repository.js.map +1 -0
- package/infrastructure/repository/firestore/resource/index.js +5 -0
- package/infrastructure/repository/firestore/resource/index.js.map +1 -0
- package/{infra → infrastructure}/repository/firestore/resource/resource.repository.d.ts +1 -4
- package/infrastructure/repository/firestore/resource/resource.repository.js +20 -0
- package/infrastructure/repository/firestore/resource/resource.repository.js.map +1 -0
- package/infrastructure/repository/hasura/query/index.js +5 -0
- package/infrastructure/repository/hasura/query/index.js.map +1 -0
- package/{infra → infrastructure}/repository/hasura/query/query.repository.d.ts +0 -3
- package/infrastructure/repository/hasura/query/query.repository.js +23 -0
- package/infrastructure/repository/hasura/query/query.repository.js.map +1 -0
- package/infrastructure/repository/hasura/resource/index.js +5 -0
- package/infrastructure/repository/hasura/resource/index.js.map +1 -0
- package/{infra → infrastructure}/repository/hasura/resource/resource.repository.d.ts +0 -3
- package/infrastructure/repository/hasura/resource/resource.repository.js +23 -0
- package/infrastructure/repository/hasura/resource/resource.repository.js.map +1 -0
- package/infrastructure/repository/index.js +6 -0
- package/infrastructure/repository/index.js.map +1 -0
- package/infrastructure/repository/notion/contract/contract.config.js +10 -0
- package/infrastructure/repository/notion/contract/contract.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/contract/contract.repository.d.ts +1 -4
- package/infrastructure/repository/notion/contract/contract.repository.js +22 -0
- package/infrastructure/repository/notion/contract/contract.repository.js.map +1 -0
- package/infrastructure/repository/notion/contract/index.js +6 -0
- package/infrastructure/repository/notion/contract/index.js.map +1 -0
- package/infrastructure/repository/notion/index.d.ts +2 -0
- package/infrastructure/repository/notion/index.js +6 -0
- package/infrastructure/repository/notion/index.js.map +1 -0
- package/infrastructure/repository/notion/invoice/index.js +6 -0
- package/infrastructure/repository/notion/invoice/index.js.map +1 -0
- package/infrastructure/repository/notion/invoice/invoice.config.js +10 -0
- package/infrastructure/repository/notion/invoice/invoice.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/invoice/invoice.repository.d.ts +1 -4
- package/infrastructure/repository/notion/invoice/invoice.repository.js +22 -0
- package/infrastructure/repository/notion/invoice/invoice.repository.js.map +1 -0
- package/infrastructure/repository/notion/notion.config.js +18 -0
- package/infrastructure/repository/notion/notion.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/notion.repository.d.ts +0 -3
- package/infrastructure/repository/notion/notion.repository.js +26 -0
- package/infrastructure/repository/notion/notion.repository.js.map +1 -0
- package/infrastructure/repository/notion/order/index.js +5 -0
- package/infrastructure/repository/notion/order/index.js.map +1 -0
- package/infrastructure/repository/notion/order/order.config.js +10 -0
- package/infrastructure/repository/notion/order/order.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/order/order.repository.d.ts +1 -4
- package/infrastructure/repository/notion/order/order.repository.js +22 -0
- package/infrastructure/repository/notion/order/order.repository.js.map +1 -0
- package/infrastructure/repository/notion/partner/index.js +6 -0
- package/infrastructure/repository/notion/partner/index.js.map +1 -0
- package/infrastructure/repository/notion/partner/partner.config.js +10 -0
- package/infrastructure/repository/notion/partner/partner.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/partner/partner.repository.d.ts +1 -4
- package/infrastructure/repository/notion/partner/partner.repository.js +22 -0
- package/infrastructure/repository/notion/partner/partner.repository.js.map +1 -0
- package/infrastructure/repository/redis/index.js +6 -0
- package/infrastructure/repository/redis/index.js.map +1 -0
- package/infrastructure/repository/redis/operator/index.js +5 -0
- package/infrastructure/repository/redis/operator/index.js.map +1 -0
- package/{infra → infrastructure}/repository/redis/operator/operator.repository.d.ts +0 -3
- package/infrastructure/repository/redis/operator/operator.repository.js +17 -0
- package/infrastructure/repository/redis/operator/operator.repository.js.map +1 -0
- package/infrastructure/repository/redis/project/index.js +5 -0
- package/infrastructure/repository/redis/project/index.js.map +1 -0
- package/{infra → infrastructure}/repository/redis/project/project.repository.d.ts +0 -3
- package/infrastructure/repository/redis/project/project.repository.js +33 -0
- package/infrastructure/repository/redis/project/project.repository.js.map +1 -0
- package/infrastructure/repository/redis/redis.config.js +10 -0
- package/infrastructure/repository/redis/redis.config.js.map +1 -0
- package/{infra → infrastructure}/repository/redis/redis.service.d.ts +0 -3
- package/infrastructure/repository/redis/redis.service.js +22 -0
- package/infrastructure/repository/redis/redis.service.js.map +1 -0
- package/infrastructure/repository/redis/spec/index.js +5 -0
- package/infrastructure/repository/redis/spec/index.js.map +1 -0
- package/{infra → infrastructure}/repository/redis/spec/spec.repository.d.ts +3 -5
- package/infrastructure/repository/redis/spec/spec.repository.js +94 -0
- package/infrastructure/repository/redis/spec/spec.repository.js.map +1 -0
- package/infrastructure/repository/redis/system/index.js +5 -0
- package/infrastructure/repository/redis/system/index.js.map +1 -0
- package/infrastructure/repository/redis/system/system.repository.d.ts +3 -0
- package/infrastructure/repository/redis/system/system.repository.js +15 -0
- package/infrastructure/repository/redis/system/system.repository.js.map +1 -0
- package/{infra → infrastructure}/repository/repository.config.d.ts +4 -4
- package/infrastructure/repository/repository.config.js +12 -0
- package/infrastructure/repository/repository.config.js.map +1 -0
- package/{infra → infrastructure}/repository/repository.service.d.ts +0 -3
- package/infrastructure/repository/repository.service.js +20 -0
- package/infrastructure/repository/repository.service.js.map +1 -0
- package/package.json +14 -202
- package/stores/index.d.ts +28 -4
- package/stores/index.js +66 -0
- package/stores/index.js.map +1 -0
- package/usecase/assistant/assistant.service.d.ts +1 -4
- package/usecase/assistant/assistant.service.js +72 -0
- package/usecase/assistant/assistant.service.js.map +1 -0
- package/usecase/assistant/index.js +5 -0
- package/usecase/assistant/index.js.map +1 -0
- package/usecase/database/database.service.d.ts +0 -3
- package/usecase/database/database.service.js +103 -0
- package/usecase/database/database.service.js.map +1 -0
- package/usecase/database/index.js +5 -0
- package/usecase/database/index.js.map +1 -0
- package/usecase/graphql/graphql.service.d.ts +0 -3
- package/usecase/graphql/graphql.service.js +49 -0
- package/usecase/graphql/graphql.service.js.map +1 -0
- package/usecase/graphql/index.js +5 -0
- package/usecase/graphql/index.js.map +1 -0
- package/usecase/index.js +5 -0
- package/usecase/index.js.map +1 -0
- package/usecase/invoice/index.js +5 -0
- package/usecase/invoice/index.js.map +1 -0
- package/usecase/invoice/invoice.service.d.ts +13 -9
- package/usecase/invoice/invoice.service.js +69 -0
- package/usecase/invoice/invoice.service.js.map +1 -0
- package/usecase/link/index.js +5 -0
- package/usecase/link/index.js.map +1 -0
- package/usecase/link/link.service.d.ts +2 -5
- package/usecase/link/link.service.js +20 -0
- package/usecase/link/link.service.js.map +1 -0
- package/usecase/order/index.js +5 -0
- package/usecase/order/index.js.map +1 -0
- package/usecase/order/order.service.d.ts +2 -5
- package/usecase/order/order.service.js +27 -0
- package/usecase/order/order.service.js.map +1 -0
- package/usecase/project/index.js +5 -0
- package/usecase/project/index.js.map +1 -0
- package/usecase/project/project.service.d.ts +1 -4
- package/usecase/project/project.service.js +37 -0
- package/usecase/project/project.service.js.map +1 -0
- package/usecase/spec/index.js +5 -0
- package/usecase/spec/index.js.map +1 -0
- package/usecase/spec/spec.service.d.ts +1 -4
- package/usecase/spec/spec.service.js +49 -0
- package/usecase/spec/spec.service.js.map +1 -0
- package/usecase/usecase.service.d.ts +0 -3
- package/usecase/usecase.service.js +24 -0
- package/usecase/usecase.service.js.map +1 -0
- package/{fesm2022/xxmachina-common-utils-crypto.mjs → utils/crypto.js} +12 -10
- package/utils/crypto.js.map +1 -0
- package/{fesm2022/xxmachina-common-utils.mjs → utils/extract-display-fields.js} +4 -7
- package/utils/extract-display-fields.js.map +1 -0
- package/utils/index.js +5 -0
- package/utils/index.js.map +1 -0
- package/_shared/meta/index.d.ts +0 -1
- package/domain/builder/index.d.ts +0 -4
- package/domain/models/links/index.d.ts +0 -1
- package/domain-invoice/builders/index.d.ts +0 -3
- package/domain-invoice/index.d.ts +0 -3
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs +0 -20
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs +0 -41
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs +0 -34
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs +0 -49
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-auth.mjs +0 -25
- package/fesm2022/xxmachina-common-_shared-auth.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs +0 -99
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-meta.mjs +0 -26
- package/fesm2022/xxmachina-common-_shared-meta.mjs.map +0 -1
- package/fesm2022/xxmachina-common-auth.mjs +0 -17
- package/fesm2022/xxmachina-common-auth.mjs.map +0 -1
- package/fesm2022/xxmachina-common-azure-auth.mjs +0 -160
- package/fesm2022/xxmachina-common-azure-auth.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-builder.mjs +0 -470
- package/fesm2022/xxmachina-common-domain-builder.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-invoice-builders.mjs +0 -70
- package/fesm2022/xxmachina-common-domain-invoice-builders.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-invoice-models.mjs +0 -427
- package/fesm2022/xxmachina-common-domain-invoice-models.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-invoice-resolvers.mjs +0 -39
- package/fesm2022/xxmachina-common-domain-invoice-resolvers.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-invoice.mjs +0 -8
- package/fesm2022/xxmachina-common-domain-invoice.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-models.mjs +0 -805
- package/fesm2022/xxmachina-common-domain-models.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain.mjs +0 -7
- package/fesm2022/xxmachina-common-domain.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-converters-google.mjs +0 -36
- package/fesm2022/xxmachina-common-infra-converters-google.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs +0 -13
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs +0 -44
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-external-resend.mjs +0 -10
- package/fesm2022/xxmachina-common-infra-external-resend.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-external.mjs +0 -35
- package/fesm2022/xxmachina-common-infra-external.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs +0 -34
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs +0 -20
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs +0 -18
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs +0 -74
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs +0 -41
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs +0 -112
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra.mjs +0 -376
- package/fesm2022/xxmachina-common-infra.mjs.map +0 -1
- package/fesm2022/xxmachina-common-stores-firestore.mjs +0 -33
- package/fesm2022/xxmachina-common-stores-firestore.mjs.map +0 -1
- package/fesm2022/xxmachina-common-stores-hasura.mjs +0 -32
- package/fesm2022/xxmachina-common-stores-hasura.mjs.map +0 -1
- package/fesm2022/xxmachina-common-stores.mjs +0 -16
- package/fesm2022/xxmachina-common-stores.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-assistant.mjs +0 -67
- package/fesm2022/xxmachina-common-usecase-assistant.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-database.mjs +0 -95
- package/fesm2022/xxmachina-common-usecase-database.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-graphql.mjs +0 -51
- package/fesm2022/xxmachina-common-usecase-graphql.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-invoice.mjs +0 -67
- package/fesm2022/xxmachina-common-usecase-invoice.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-link.mjs +0 -26
- package/fesm2022/xxmachina-common-usecase-link.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-order.mjs +0 -29
- package/fesm2022/xxmachina-common-usecase-order.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-project.mjs +0 -35
- package/fesm2022/xxmachina-common-usecase-project.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-spec.mjs +0 -45
- package/fesm2022/xxmachina-common-usecase-spec.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase.mjs +0 -198
- package/fesm2022/xxmachina-common-usecase.mjs.map +0 -1
- package/fesm2022/xxmachina-common-utils-crypto.mjs.map +0 -1
- package/fesm2022/xxmachina-common-utils.mjs.map +0 -1
- package/fesm2022/xxmachina-common.mjs +0 -6
- package/fesm2022/xxmachina-common.mjs.map +0 -1
- package/index.d.ts +0 -1
- package/infra/external/resend/resend.service.d.ts +0 -2
- package/infra/query/firestore/index.d.ts +0 -2
- package/infra/query/hasura/index.d.ts +0 -1
- package/infra/query/hasura/resource/resource.query.d.ts +0 -6
- package/infra/repository/dataconnect/index.d.ts +0 -2
- package/infra/repository/firestore/firestore.repository.d.ts +0 -8
- package/infra/repository/firestore/index.d.ts +0 -3
- package/infra/repository/firestore/link/google/google.repository.d.ts +0 -10
- package/infra/repository/firestore/link/link.repository.d.ts +0 -8
- package/infra/repository/hasura/index.d.ts +0 -2
- package/infra/repository/notion/index.d.ts +0 -6
- package/infra/repository/redis/system/system.repository.d.ts +0 -6
- package/stores/firestore/firestore.store.d.ts +0 -12
- package/stores/firestore/index.d.ts +0 -1
- package/stores/hasura/hasura.store.d.ts +0 -12
- package/stores/hasura/index.d.ts +0 -1
- package/utils/crypto/index.d.ts +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-invoice → domain}/resolvers/index.d.ts +0 -0
- /package/{infra → infrastructure}/converters/google/index.d.ts +0 -0
- /package/{infra → infrastructure}/external/data-connect/data-connect.service.d.ts +0 -0
- /package/{infra → infrastructure}/external/data-connect/index.d.ts +0 -0
- /package/{infra → infrastructure}/external/index.d.ts +0 -0
- /package/{infra → infrastructure}/external/quick-js/index.d.ts +0 -0
- /package/{infra → infrastructure}/external/resend/index.d.ts +0 -0
- /package/{infra → infrastructure}/index.d.ts +0 -0
- /package/{infra → infrastructure}/query/firestore/query/index.d.ts +0 -0
- /package/{infra → infrastructure}/query/firestore/resource/index.d.ts +0 -0
- /package/{infra → infrastructure}/query/hasura/resource/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/dataconnect/invoice/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/dataconnect/invoice/invoice.repository.d.ts +0 -0
- /package/{infra → infrastructure}/repository/dataconnect/order/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/dataconnect/order/order.repository.d.ts +0 -0
- /package/{infra → infrastructure}/repository/firestore/link/google/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/firestore/link/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/firestore/query/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/firestore/resource/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/hasura/query/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/hasura/resource/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/contract/contract.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/contract/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/invoice/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/invoice/invoice.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/notion.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/order/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/order/order.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/partner/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/partner/partner.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/operator/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/project/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/redis.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/spec/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/system/index.d.ts +0 -0
- /package/utils/{crypto/crypto.d.ts → crypto.d.ts} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @x-x-machina-common
|
|
2
|
+
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test @x-x-machina-common` to execute the unit tests via [Jest](https://jestjs.io).
|
|
8
|
+
|
|
9
|
+
## Running lint
|
|
10
|
+
|
|
11
|
+
Run `nx lint @x-x-machina-common` to execute the lint via [ESLint](https://eslint.org/).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var AuthModule_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AuthModule = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const passport_1 = require("@nestjs/passport");
|
|
8
|
+
let AuthModule = AuthModule_1 = class AuthModule {
|
|
9
|
+
static forRoot() {
|
|
10
|
+
return { module: AuthModule_1, providers: [] };
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
exports.AuthModule = AuthModule;
|
|
14
|
+
exports.AuthModule = AuthModule = AuthModule_1 = tslib_1.__decorate([
|
|
15
|
+
(0, common_1.Module)({
|
|
16
|
+
imports: [passport_1.PassportModule],
|
|
17
|
+
providers: [],
|
|
18
|
+
exports: [],
|
|
19
|
+
controllers: [],
|
|
20
|
+
})
|
|
21
|
+
], AuthModule);
|
|
22
|
+
//# sourceMappingURL=auth.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/auth.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAU3C,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,OAAO;QACZ,OAAO,EAAE,MAAM,EAAE,YAAU,EAAE,SAAS,EAAE,EAAE,EAAE,CAAA;IAC9C,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IARtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC;QACzB,SAAS,EAAE,EACV;QACD,OAAO,EAAE,EACR;QACD,WAAW,EAAE,EAAE;KAChB,CAAC;GACW,UAAU,CAItB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnonymousStrategy = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const passport_1 = require("@nestjs/passport");
|
|
7
|
+
const passport_custom_1 = require("passport-custom");
|
|
8
|
+
let AnonymousStrategy = class AnonymousStrategy extends (0, passport_1.PassportStrategy)(passport_custom_1.Strategy, 'anonymous') {
|
|
9
|
+
validate(request) {
|
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
+
return {};
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.AnonymousStrategy = AnonymousStrategy;
|
|
16
|
+
exports.AnonymousStrategy = AnonymousStrategy = tslib_1.__decorate([
|
|
17
|
+
(0, common_1.Injectable)()
|
|
18
|
+
], AnonymousStrategy);
|
|
19
|
+
//# sourceMappingURL=anonymous.strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anonymous.strategy.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/anonymous/anonymous.strategy.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,+CAAoD;AACpD,qDAA2C;AAGpC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,IAAA,2BAAgB,EAAC,0BAAQ,EAAE,WAAW,CAAC;IACtE,QAAQ,CAAC,OAAgB;;YAC7B,OAAO,EAAE,CAAC;QACZ,CAAC;KAAA;CACF,CAAA;AAJY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAI7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/anonymous/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FirebaseAuthGuard = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const passport_1 = require("@nestjs/passport");
|
|
7
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
8
|
+
let FirebaseAuthGuard = class FirebaseAuthGuard extends (0, passport_1.AuthGuard)('firebase') {
|
|
9
|
+
getRequest(context) {
|
|
10
|
+
const ctx = graphql_1.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
|
+
exports.FirebaseAuthGuard = FirebaseAuthGuard;
|
|
20
|
+
exports.FirebaseAuthGuard = FirebaseAuthGuard = tslib_1.__decorate([
|
|
21
|
+
(0, common_1.Injectable)()
|
|
22
|
+
], FirebaseAuthGuard);
|
|
23
|
+
//# sourceMappingURL=firebase.guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firebase.guard.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/firebase.guard.ts"],"names":[],"mappings":";;;;AAAA,2CAA8D;AAC9D,+CAA6C;AAC7C,6CAAsD;AAG/C,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,IAAA,oBAAS,EAAC,UAAU,CAAC;IAC1D,UAAU,CAAC,OAAyB;QAClC,MAAM,GAAG,GAAG,6BAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC;QAEpC,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;YAC5B,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;IAC7C,CAAC;CACF,CAAA;AAXY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAW7B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FirebaseStrategy = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const passport_1 = require("@nestjs/passport");
|
|
7
|
+
const nestjs_firebase_auth_1 = require("@tfarras/nestjs-firebase-auth");
|
|
8
|
+
const passport_jwt_1 = require("passport-jwt");
|
|
9
|
+
let FirebaseStrategy = class FirebaseStrategy extends (0, passport_1.PassportStrategy)(nestjs_firebase_auth_1.FirebaseAuthStrategy, 'firebase') {
|
|
10
|
+
constructor() {
|
|
11
|
+
super({ extractor: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken() });
|
|
12
|
+
}
|
|
13
|
+
authenticate(req) {
|
|
14
|
+
return super.authenticate(req);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.FirebaseStrategy = FirebaseStrategy;
|
|
18
|
+
exports.FirebaseStrategy = FirebaseStrategy = tslib_1.__decorate([
|
|
19
|
+
(0, common_1.Injectable)(),
|
|
20
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
21
|
+
], FirebaseStrategy);
|
|
22
|
+
//# sourceMappingURL=firebase.strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firebase.strategy.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/firebase.strategy.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,+CAAoD;AACpD,wEAAqE;AACrE,+CAA0C;AAMnC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,IAAA,2BAAgB,EAAC,2CAAoB,EAAE,UAAU,CAAC;IACtF;QACE,KAAK,CAAC,EAAC,SAAS,EAAE,yBAAU,CAAC,2BAA2B,EAAE,EAAC,CAAC,CAAC;IAC/D,CAAC;IAED,YAAY,CAAC,GAAuE;QAClF,OAAO,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;CACF,CAAA;AARY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;;GACA,gBAAgB,CAQ5B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./firebase.guard"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./firebase.strategy"), exports);
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,8DAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/internal/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InternalStrategy = exports.INTERNAL_STRATEGY_TOKEN = void 0;
|
|
4
|
+
exports.provideInternalStrategyToken = provideInternalStrategyToken;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const passport_1 = require("@nestjs/passport");
|
|
8
|
+
const passport_http_bearer_1 = require("passport-http-bearer");
|
|
9
|
+
exports.INTERNAL_STRATEGY_TOKEN = 'INTERNAL_STRATEGY_TOKEN';
|
|
10
|
+
function provideInternalStrategyToken(token) {
|
|
11
|
+
return {
|
|
12
|
+
provide: exports.INTERNAL_STRATEGY_TOKEN,
|
|
13
|
+
useValue: token,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
let InternalStrategy = class InternalStrategy extends (0, passport_1.PassportStrategy)(passport_http_bearer_1.Strategy, 'internal') {
|
|
17
|
+
constructor(token) {
|
|
18
|
+
super();
|
|
19
|
+
this.token = token;
|
|
20
|
+
}
|
|
21
|
+
validate(token) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return token === this.token;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.InternalStrategy = InternalStrategy;
|
|
28
|
+
exports.InternalStrategy = InternalStrategy = tslib_1.__decorate([
|
|
29
|
+
(0, common_1.Injectable)(),
|
|
30
|
+
tslib_1.__param(0, (0, common_1.Inject)(exports.INTERNAL_STRATEGY_TOKEN)),
|
|
31
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
32
|
+
], InternalStrategy);
|
|
33
|
+
//# sourceMappingURL=internal.strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.strategy.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/internal/internal.strategy.ts"],"names":[],"mappings":";;;AAMA,oEAKC;;AAXD,2CAAoE;AACpE,+CAAoD;AACpD,+DAAgD;AAEnC,QAAA,uBAAuB,GAAmB,yBAAyB,CAAC;AAEjF,SAAgB,4BAA4B,CAAC,KAAa;IACxD,OAAO;QACL,OAAO,EAAE,+BAAuB;QAChC,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,IAAA,2BAAgB,EAAC,+BAAQ,EAAE,UAAU,CAAC;IAC1E,YAC2C,KAAa;QAEtD,KAAK,EAAE,CAAC;QAFiC,UAAK,GAAL,KAAK,CAAQ;IAGxD,CAAC;IAEK,QAAQ,CAAC,KAAa;;YAC1B,OAAO,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;QAC9B,CAAC;KAAA;CACF,CAAA;AAVY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAGR,mBAAA,IAAA,eAAM,EAAC,+BAAuB,CAAC,CAAA;;GAFvB,gBAAgB,CAU5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,0DAAgC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MsalAuthGuard = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const passport_1 = require("@nestjs/passport");
|
|
7
|
+
let MsalAuthGuard = class MsalAuthGuard extends (0, passport_1.AuthGuard)('msal') {
|
|
8
|
+
};
|
|
9
|
+
exports.MsalAuthGuard = MsalAuthGuard;
|
|
10
|
+
exports.MsalAuthGuard = MsalAuthGuard = tslib_1.__decorate([
|
|
11
|
+
(0, common_1.Injectable)()
|
|
12
|
+
], MsalAuthGuard);
|
|
13
|
+
//# sourceMappingURL=msal.guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msal.guard.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/msal.guard.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,+CAA6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,IAAA,oBAAS,EAAC,MAAM,CAAC;CAAI,CAAA;AAA3C,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAA8B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MsalStrategy = exports.MSAL_CONFIG = void 0;
|
|
4
|
+
exports.provideMsalAuth = provideMsalAuth;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const passport_1 = require("@nestjs/passport");
|
|
8
|
+
const passport_custom_1 = require("passport-custom");
|
|
9
|
+
const validate_azure_ad_token_1 = tslib_1.__importDefault(require("validate-azure-ad-token"));
|
|
10
|
+
exports.MSAL_CONFIG = 'MSAL_CONFIG';
|
|
11
|
+
function provideMsalAuth(useFactory) {
|
|
12
|
+
return [
|
|
13
|
+
{ provide: exports.MSAL_CONFIG, useFactory },
|
|
14
|
+
MsalStrategy,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
let MsalStrategy = class MsalStrategy extends (0, passport_1.PassportStrategy)(passport_custom_1.Strategy, 'msal') {
|
|
18
|
+
constructor(config) {
|
|
19
|
+
super();
|
|
20
|
+
this.config = config;
|
|
21
|
+
}
|
|
22
|
+
validate(req) {
|
|
23
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
var _a;
|
|
25
|
+
const token = (_a = req.headers.authorization) === null || _a === void 0 ? void 0 : _a.split(' ')[1];
|
|
26
|
+
try {
|
|
27
|
+
const decoded = yield (0, validate_azure_ad_token_1.default)(token, this.config);
|
|
28
|
+
return decoded.payload;
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
console.error('err:', err);
|
|
32
|
+
throw new common_1.UnauthorizedException();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.MsalStrategy = MsalStrategy;
|
|
38
|
+
exports.MsalStrategy = MsalStrategy = tslib_1.__decorate([
|
|
39
|
+
(0, common_1.Injectable)(),
|
|
40
|
+
tslib_1.__param(0, (0, common_1.Inject)(exports.MSAL_CONFIG)),
|
|
41
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
42
|
+
], MsalStrategy);
|
|
43
|
+
//# sourceMappingURL=msal.strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msal.strategy.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/msal.strategy.ts"],"names":[],"mappings":";;;AAaA,0CAKC;;AAlBD,2CAAqF;AACrF,+CAAoD;AACpD,qDAA2C;AAC3C,8FAA+C;AAElC,QAAA,WAAW,GAAG,aAAa,CAAC;AAQzC,SAAgB,eAAe,CAAC,UAA4B;IAC1D,OAAO;QACL,EAAE,OAAO,EAAE,mBAAW,EAAE,UAAU,EAAE;QACpC,YAAY;KACb,CAAC;AACJ,CAAC;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,IAAA,2BAAgB,EAAC,0BAAQ,EAAE,MAAM,CAAC;IAClE,YACwC,MAAkB;QAExD,KAAK,EAAE,CAAC;QAF8B,WAAM,GAAN,MAAM,CAAY;IAG1D,CAAC;IAEK,QAAQ,CAAC,GAAQ;;;YACrB,MAAM,KAAK,GAAG,MAAA,GAAG,CAAC,OAAO,CAAC,aAAa,0CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACvD,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,MAAM,IAAA,iCAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBACnD,OAAO,OAAO,CAAC,OAAO,CAAC;YACzB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAC3B,MAAM,IAAI,8BAAqB,EAAE,CAAC;YACpC,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AAjBY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAGR,mBAAA,IAAA,eAAM,EAAC,mBAAW,CAAC,CAAA;;GAFX,YAAY,CAiBxB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ID = exports.Field = exports.ObjectType = void 0;
|
|
5
|
+
exports.provideNestjsGraphql = provideNestjsGraphql;
|
|
6
|
+
let ObjectType, Field, ID;
|
|
7
|
+
const _decorators = {
|
|
8
|
+
ObjectType: function () {
|
|
9
|
+
return function (target) {
|
|
10
|
+
// return target;
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
Field: function () {
|
|
14
|
+
return function (target, propertyKey) {
|
|
15
|
+
// return target;
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
ID: null,
|
|
19
|
+
};
|
|
20
|
+
(_a = _decorators, exports.ObjectType = ObjectType = _a.ObjectType, exports.Field = Field = _a.Field, exports.ID = ID = _a.ID);
|
|
21
|
+
// GraphQLのデコレーターをファクトリーメソッドで提供
|
|
22
|
+
function provideNestjsGraphql(_decorators) {
|
|
23
|
+
(exports.ObjectType = ObjectType = _decorators.ObjectType, exports.Field = Field = _decorators.Field, exports.ID = ID = _decorators.ID);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../../../packages/@xxmachina/common/src/lib/_shared/meta/decorators.ts"],"names":[],"mappings":";;;;AAoBA,oDAEC;AApBD,IAAI,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC;AAE1B,MAAM,WAAW,GAA+B;IAC9C,UAAU,EAAE;QACV,OAAO,UAAU,MAAW;YAC1B,iBAAiB;QACnB,CAAC,CAAA;IACH,CAAC;IACD,KAAK,EAAE;QACL,OAAO,UAAU,MAAW,EAAE,WAA4B;YACxD,iBAAiB;QACnB,CAAC,CAAA;IACH,CAAC;IACD,EAAE,EAAE,IAAI;CACT,CAAC;AACF,CAAC,KAA4B,WAAkB,EAA5C,qBAAA,UAAU,gBAAA,EAAE,gBAAA,KAAK,WAAA,EAAE,aAAA,EAAE,QAAA,CAAwB,CAAC;AAEjD,+BAA+B;AAC/B,SAAgB,oBAAoB,CAAC,WAA8B;IACjE,CAAG,qBAAA,UAAU,GAAgB,WAAW,WAA3B,EAAE,gBAAA,KAAK,GAAS,WAAW,MAApB,EAAE,aAAA,EAAE,GAAK,WAAW,GAAhB,CAAiB,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./redis.config"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./redis.repository"), exports);
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,6DAAmC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REDIS_CONFIG = void 0;
|
|
4
|
+
exports.provideRedisConfig = provideRedisConfig;
|
|
5
|
+
const core_1 = require("@angular/core");
|
|
6
|
+
exports.REDIS_CONFIG = new core_1.InjectionToken('[@nx-ddd/redis] Redis Config');
|
|
7
|
+
function provideRedisConfig(config) {
|
|
8
|
+
return { provide: exports.REDIS_CONFIG, useValue: config };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=redis.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redis.config.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.config.ts"],"names":[],"mappings":";;;AAQA,gDAEC;AAVD,wCAA+C;AAMlC,QAAA,YAAY,GAAG,IAAI,qBAAc,CAAc,8BAA8B,CAAC,CAAC;AAE5F,SAAgB,kBAAkB,CAAC,MAAmB;IACpD,OAAO,EAAE,OAAO,EAAE,oBAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACrD,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RedisClientType } from 'redis';
|
|
2
|
-
import { RedisConfig } from
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
2
|
+
import { RedisConfig } from "./redis.config";
|
|
4
3
|
export declare class Converter<E, R> {
|
|
5
4
|
fromRedis(record: R): E;
|
|
6
5
|
toRedis(entity: E): R;
|
|
@@ -8,11 +7,11 @@ export declare class Converter<E, R> {
|
|
|
8
7
|
export declare abstract class RedisRepository<E extends {
|
|
9
8
|
id: string;
|
|
10
9
|
} = 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;
|
|
14
13
|
protected client: RedisClientType;
|
|
15
|
-
constructor();
|
|
14
|
+
constructor(config: RedisConfig);
|
|
16
15
|
init(): Promise<void>;
|
|
17
16
|
list(): Promise<Awaited<E>[]>;
|
|
18
17
|
get(id: string): Promise<E>;
|
|
@@ -21,6 +20,4 @@ export declare abstract class RedisRepository<E extends {
|
|
|
21
20
|
delete(id: string): Promise<void>;
|
|
22
21
|
deleteAll(): Promise<void>;
|
|
23
22
|
getKey(id: string): string;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RedisRepository<any, any>, never>;
|
|
25
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<RedisRepository<any, any>>;
|
|
26
23
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redis.repository.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.repository.ts"],"names":[],"mappings":";;;;AAAA,wCAAmD;AAEnD,iDAA2D;AAC3D,yCAAiC;AAEjC,MAAa,SAAS;IACpB,SAAS,CAAC,MAAS;QACjB,OAAO,kBAAI,MAAM,CAAe,CAAC;IACnC,CAAC;IAED,OAAO,CAAC,MAAS;QACf,OAAO,kBAAI,MAAM,CAAe,CAAC;IACnC,CAAC;CACF;AARD,8BAQC;AAED,SAAS,gBAAgB,CAAC,MAAsB;IAC9C,QAAQ;IACR,iCAAiC;IACjC,oBAAoB;IACpB,0BAA0B;IAC1B,IAAI;AACN,CAAC;AAGM,IAAe,eAAe,GAA9B,MAAe,eAAe;IAQnC,YACwB,MAA2B;QAAnB,WAAM,GAAN,MAAM,CAAa;QAPzC,cAAS,GAAoB,IAAI,SAAS,EAAE,CAAC;QAE7C,WAAM,GAAoB,gBAAgB,CAAC;YACnD,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;SACrB,CAAQ,CAAC;IAIN,CAAC;IAEC,IAAI;;;YACR,IAAI,CAAC;gBACH,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,CAAA;oBAAE,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACxD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;KAAA;IAEK,IAAI;;YACR,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,IAAI,CAAC;iBACxD,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1E,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACnE,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;IAEK,GAAG,CAAC,EAAU;;YAClB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,gCAAI,MAAM,KAAE,EAAE,GAAQ,CAAC,CAAC;QAC1D,CAAC;KAAA;IAEK,MAAM,CAAC,MAAS;;YACpB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,UAAU,GAAG,iBAAiB,CAAC,CAAC;YACnF,MAAM,MAAM,GAAG,IAAA,gBAAI,EAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,CAAO,CAAC;YAChE,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;YACrC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YACpC,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;IAEK,MAAM,CAAC,MAAW;;YACtB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,CAAC,CAAA,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBAAE,MAAM,IAAI,KAAK,CAAC,UAAU,GAAG,iBAAiB,CAAC,CAAC;YACpF,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,CAAO,CAAC,CAAC;QAChF,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU;;YACrB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC5B,IAAI,CAAC,CAAA,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBAAE,MAAM,IAAI,KAAK,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;YACnF,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;KAAA;IAEK,SAAS;;YACb,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC;YAC5D,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC3D,CAAC;KAAA;IAED,MAAM,CAAC,EAAU;QACf,OAAO,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AApEqB,0CAAe;0BAAf,eAAe;IADpC,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAU9B,mBAAA,IAAA,aAAM,EAAC,2BAAY,CAAC,CAAA;;GATH,eAAe,CAoEpC"}
|
package/auth/auth.service.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Signal } from "@angular/core";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
3
|
export declare abstract class AuthService {
|
|
5
4
|
abstract readonly auth$: Observable<any>;
|
|
6
5
|
abstract readonly auth: Signal<any>;
|
|
@@ -8,6 +7,4 @@ export declare abstract class AuthService {
|
|
|
8
7
|
abstract readonly accessToken: Signal<string>;
|
|
9
8
|
abstract signIn(): Promise<any>;
|
|
10
9
|
abstract signOut(): Promise<void>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
13
10
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/auth/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;IACxD,OAAO,IAAA,+BAAwB,EAAC;QAC9B;YACE,OAAO,EAAE,8BAAuB;YAChC,QAAQ;YACR,KAAK,EAAE,IAAI;SACZ;KACF,CAAC,CAAC;AACL,CAAC;AAGD,SAAgB,gBAAgB,CAAC,MAAuB;IACtD,OAAO,IAAA,+BAAwB,EAAC;QAC9B,IAAA,0BAAmB,EAAC,yBAAU,CAAC,OAAO,CAAC,IAAI,sCAAuB,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC,EAAE;YACzF,eAAe,EAAE,8BAAe,CAAC,QAAQ;YACzC,WAAW,EAAE;gBACX,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB;SACF,EAAE;YACD,eAAe,EAAE,8BAAe,CAAC,QAAQ;YACzC,oBAAoB,EAAE,IAAI,GAAG,CAAC;gBAC5B,CAAC,qCAAqC,EAAE,MAAM,CAAC,MAAM,CAAC;aACvD,CAAC;SACH,CAAC,CAAC;QACH,EAAE,OAAO,EAAE,gCAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE;QAChD,EAAE,OAAO,EAAE,kBAAW,EAAE,QAAQ,EAAE,+BAAgB,EAAE;QACpD,qBAAqB,CAAC,GAAG,EAAE,GAAG,IAAA,aAAM,EAAC,kBAAW,CAAC,CAAA,CAAC,CAAC,CAAC;QACpD,IAAA,oBAAa,EAAC,mBAAa,CAAC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;YAChE,MAAM,IAAI,GAAG,IAAA,aAAM,EAAC,kBAAW,CAAC,CAAC;YACjC,OAAO,GAAG,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;oBACjB,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC,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"}
|
|
@@ -3,7 +3,6 @@ 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";
|
|
7
6
|
declare abstract class AuthService {
|
|
8
7
|
abstract readonly auth$: Observable<any>;
|
|
9
8
|
abstract readonly accessToken$: Observable<string>;
|
|
@@ -29,7 +28,5 @@ export declare class AzureAuthService extends AuthService {
|
|
|
29
28
|
signOut(): Promise<void>;
|
|
30
29
|
protected updateAccessToken(scopes?: string[]): Promise<void>;
|
|
31
30
|
acquireAccessToken(scopes?: string[]): Promise<string>;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AzureAuthService, never>;
|
|
33
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AzureAuthService>;
|
|
34
31
|
}
|
|
35
32
|
export {};
|