@xxmachina/common 19.0.0-preview.2 → 19.0.0-preview.21
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,198 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, inject } from '@angular/core';
|
|
3
|
+
import * as i1 from '@xxmachina/common/infra';
|
|
4
|
+
import { hash } from '@xxmachina/common/utils/crypto';
|
|
5
|
+
import { __decorate, __metadata } from 'tslib';
|
|
6
|
+
import { HttpClient } from '@angular/common/http';
|
|
7
|
+
import { injectAnyFunc } from '@nx-ddd/any-func';
|
|
8
|
+
import { injectDataConnectService } from '@xxmachina/common/infra/external/data-connect';
|
|
9
|
+
import { IsString } from 'class-validator';
|
|
10
|
+
|
|
11
|
+
class AssistantService {
|
|
12
|
+
infra;
|
|
13
|
+
constructor(infra) {
|
|
14
|
+
this.infra = infra;
|
|
15
|
+
}
|
|
16
|
+
async list() {
|
|
17
|
+
return await this.infra.repo.redis.operator.list();
|
|
18
|
+
}
|
|
19
|
+
async create(assistant) {
|
|
20
|
+
return this.infra.repo.redis.operator.create(assistant);
|
|
21
|
+
}
|
|
22
|
+
async update(assistant) {
|
|
23
|
+
return this.infra.repo.redis.operator.update(assistant);
|
|
24
|
+
}
|
|
25
|
+
async delete(assistantid) {
|
|
26
|
+
return this.infra.repo.redis.operator.delete(assistantid);
|
|
27
|
+
}
|
|
28
|
+
async operate(assistantId, input) {
|
|
29
|
+
const project = await this.infra.repo.redis.project.get('default');
|
|
30
|
+
const assistant = await this.infra.repo.redis.operator.get(assistantId);
|
|
31
|
+
const adapter = this.infra.external.getAiAdapter(project.settings.ai);
|
|
32
|
+
const embeddings = await adapter.embedding(input);
|
|
33
|
+
const specs = await this.infra.repo.redis.spec.search(assistant.id, embeddings);
|
|
34
|
+
const messages = [
|
|
35
|
+
{ role: 'system', content: assistant.description },
|
|
36
|
+
...specs.map(spec => [
|
|
37
|
+
{ role: 'system', content: spec.input },
|
|
38
|
+
{ role: 'assistant', content: spec.output },
|
|
39
|
+
]).flat(),
|
|
40
|
+
{ role: 'user', content: input },
|
|
41
|
+
];
|
|
42
|
+
console.debug('messages', messages);
|
|
43
|
+
const output_ = await adapter.chatComplete(messages);
|
|
44
|
+
const output = this.scrape(assistant.outputInterfaceId, output_);
|
|
45
|
+
await this.infra.repo.redis.spec.create({
|
|
46
|
+
input, output, embeddings, id: hash(input), operatorId: assistant.id,
|
|
47
|
+
}).catch(() => { });
|
|
48
|
+
return output;
|
|
49
|
+
}
|
|
50
|
+
scrape(interface_, output) {
|
|
51
|
+
if (interface_ === 'interface:codeblock') {
|
|
52
|
+
const [_, ...lines] = (output.split('```')?.[1] ?? '').split('\n');
|
|
53
|
+
return `\`\`\`\n${lines.join('\n')}\n\`\`\``;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return output;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AssistantService, deps: [{ token: i1.InfrastructureService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
60
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AssistantService, providedIn: 'root' });
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AssistantService, decorators: [{
|
|
63
|
+
type: Injectable,
|
|
64
|
+
args: [{ providedIn: 'root' }]
|
|
65
|
+
}], ctorParameters: () => [{ type: i1.InfrastructureService }] });
|
|
66
|
+
|
|
67
|
+
class SpecService {
|
|
68
|
+
infra;
|
|
69
|
+
constructor(infra) {
|
|
70
|
+
this.infra = infra;
|
|
71
|
+
}
|
|
72
|
+
async list() {
|
|
73
|
+
return this.infra.repo.redis.spec.list();
|
|
74
|
+
}
|
|
75
|
+
async get(id) {
|
|
76
|
+
return this.infra.repo.redis.spec.get(id);
|
|
77
|
+
}
|
|
78
|
+
async create(spec) {
|
|
79
|
+
const project = await this.infra.repo.redis.project.get('default');
|
|
80
|
+
const embeddings = await this.infra.external.getAiAdapter(project.settings.ai).embedding(spec.input);
|
|
81
|
+
return this.infra.repo.redis.spec.create({ ...spec, embeddings, id: hash(spec.input) });
|
|
82
|
+
}
|
|
83
|
+
async update(spec) {
|
|
84
|
+
const project = await this.infra.repo.redis.project.get('default');
|
|
85
|
+
const embeddings = await this.infra.external.getAiAdapter(project.settings.ai).embedding(spec.input);
|
|
86
|
+
if (spec.id !== hash(spec.input))
|
|
87
|
+
throw new Error('id is not match with input hash');
|
|
88
|
+
return this.infra.repo.redis.spec.update({ ...spec, embeddings });
|
|
89
|
+
}
|
|
90
|
+
async delete(id) {
|
|
91
|
+
return this.infra.repo.redis.spec.delete(id);
|
|
92
|
+
}
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SpecService, deps: [{ token: i1.InfrastructureService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SpecService, providedIn: 'root' });
|
|
95
|
+
}
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SpecService, decorators: [{
|
|
97
|
+
type: Injectable,
|
|
98
|
+
args: [{ providedIn: 'root' }]
|
|
99
|
+
}], ctorParameters: () => [{ type: i1.InfrastructureService }] });
|
|
100
|
+
|
|
101
|
+
class ProjectService {
|
|
102
|
+
infra;
|
|
103
|
+
constructor(infra) {
|
|
104
|
+
this.infra = infra;
|
|
105
|
+
}
|
|
106
|
+
async list() {
|
|
107
|
+
return await this.infra.repo.redis.project.list();
|
|
108
|
+
}
|
|
109
|
+
async get(projectId) {
|
|
110
|
+
return this.infra.repo.redis.project.get(projectId);
|
|
111
|
+
}
|
|
112
|
+
async create(project) {
|
|
113
|
+
return this.infra.repo.redis.project.create(project);
|
|
114
|
+
}
|
|
115
|
+
async update(project) {
|
|
116
|
+
return this.infra.repo.redis.project.update(project);
|
|
117
|
+
}
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ProjectService, deps: [{ token: i1.InfrastructureService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
119
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ProjectService, providedIn: 'root' });
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ProjectService, decorators: [{
|
|
122
|
+
type: Injectable,
|
|
123
|
+
args: [{ providedIn: 'root' }]
|
|
124
|
+
}], ctorParameters: () => [{ type: i1.InfrastructureService }] });
|
|
125
|
+
|
|
126
|
+
class LinkService {
|
|
127
|
+
infra;
|
|
128
|
+
constructor(infra) {
|
|
129
|
+
this.infra = infra;
|
|
130
|
+
}
|
|
131
|
+
saveGoogleLink(google) {
|
|
132
|
+
return this.infra.repo.firestore.link.google.save(google);
|
|
133
|
+
}
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: LinkService, deps: [{ token: i1.InfrastructureService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
135
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: LinkService, providedIn: 'root' });
|
|
136
|
+
}
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: LinkService, decorators: [{
|
|
138
|
+
type: Injectable,
|
|
139
|
+
args: [{ providedIn: 'root' }]
|
|
140
|
+
}], ctorParameters: () => [{ type: i1.InfrastructureService }] });
|
|
141
|
+
|
|
142
|
+
class Result {
|
|
143
|
+
query;
|
|
144
|
+
}
|
|
145
|
+
__decorate([
|
|
146
|
+
IsString(),
|
|
147
|
+
__metadata("design:type", String)
|
|
148
|
+
], Result.prototype, "query", void 0);
|
|
149
|
+
class GraphqlService {
|
|
150
|
+
http = inject(HttpClient);
|
|
151
|
+
anyFunc = injectAnyFunc();
|
|
152
|
+
dc = injectDataConnectService();
|
|
153
|
+
constructor() { }
|
|
154
|
+
async graphql(query) {
|
|
155
|
+
// return lastValueFrom(this.http.post('http://localhost:3330/api/dataConnect', {query}));
|
|
156
|
+
return this.dc.executeGraphqlRead(query);
|
|
157
|
+
}
|
|
158
|
+
async makeQuery(instructions) {
|
|
159
|
+
const schemaQuery = `{ __schema { types { name fields { name type { name } } } } }`;
|
|
160
|
+
const schemaResult = await this.graphql(schemaQuery);
|
|
161
|
+
return this.anyFunc.call(instructions, Result, {
|
|
162
|
+
instructions: `
|
|
163
|
+
アシスタントはユーザーの要求を満たすGraphQLクエリを下記のサーバーのスキーマを元に生成します。
|
|
164
|
+
|
|
165
|
+
${JSON.stringify(schemaResult, null, 2)}
|
|
166
|
+
`,
|
|
167
|
+
model: 'gpt-4o-mini',
|
|
168
|
+
validator: async (output) => this.graphql(output.query).then(() => []).catch(error => [error.message]),
|
|
169
|
+
}).then(result => result.query);
|
|
170
|
+
}
|
|
171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: GraphqlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
172
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: GraphqlService, providedIn: 'root' });
|
|
173
|
+
}
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: GraphqlService, decorators: [{
|
|
175
|
+
type: Injectable,
|
|
176
|
+
args: [{ providedIn: 'root' }]
|
|
177
|
+
}], ctorParameters: () => [] });
|
|
178
|
+
|
|
179
|
+
class UsecaseService {
|
|
180
|
+
assistant = inject(AssistantService);
|
|
181
|
+
link = inject(LinkService);
|
|
182
|
+
project = inject(ProjectService);
|
|
183
|
+
spec = inject(SpecService);
|
|
184
|
+
graphql = inject(GraphqlService);
|
|
185
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UsecaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
186
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UsecaseService, providedIn: 'root' });
|
|
187
|
+
}
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UsecaseService, decorators: [{
|
|
189
|
+
type: Injectable,
|
|
190
|
+
args: [{ providedIn: 'root' }]
|
|
191
|
+
}] });
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Generated bundle index. Do not edit.
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
export { UsecaseService };
|
|
198
|
+
//# sourceMappingURL=xxmachina-common-usecase.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-usecase.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/usecase/assistant/assistant.service.ts","../../../../../packages/@xxmachina/common/src/lib/usecase/spec/spec.service.ts","../../../../../packages/@xxmachina/common/src/lib/usecase/project/project.service.ts","../../../../../packages/@xxmachina/common/src/lib/usecase/link/link.service.ts","../../../../../packages/@xxmachina/common/src/lib/usecase/graphql/graphql.service.ts","../../../../../packages/@xxmachina/common/src/lib/usecase/usecase.service.ts","../../../../../packages/@xxmachina/common/src/lib/usecase/xxmachina-common-usecase.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\nimport { InfrastructureService } from \"@xxmachina/common/infra\";\nimport { AssistantOperator } from \"@xxmachina/common/domain/models\";\nimport { hash } from \"@xxmachina/common/utils/crypto\";\n\n\n@Injectable({providedIn: 'root'})\nexport class AssistantService {\n constructor(\n private infra: InfrastructureService,\n ) { }\n\n async list(): Promise<AssistantOperator[]> {\n return await this.infra.repo.redis.operator.list() as AssistantOperator[];\n }\n\n async create(assistant: AssistantOperator): Promise<AssistantOperator> {\n return this.infra.repo.redis.operator.create(assistant) as any;\n }\n\n async update(assistant: AssistantOperator): Promise<void> {\n return this.infra.repo.redis.operator.update(assistant);\n }\n\n async delete(assistantid: string): Promise<void> {\n return this.infra.repo.redis.operator.delete(assistantid);\n }\n\n async operate(assistantId: string, input: string): Promise<string> {\n const project = await this.infra.repo.redis.project.get('default');\n const assistant = await this.infra.repo.redis.operator.get(assistantId);\n const adapter = this.infra.external.getAiAdapter(project.settings.ai)\n const embeddings = await adapter.embedding(input);\n const specs = await this.infra.repo.redis.spec.search(assistant.id, embeddings);\n\n const messages = [\n {role: 'system', content: assistant.description},\n ...specs.map(spec => [\n {role: 'system', content: spec.input},\n {role: 'assistant', content: spec.output},\n ]).flat(),\n {role: 'user', content: input},\n ];\n\n console.debug('messages', messages);\n const output_ = await adapter.chatComplete(messages);\n const output = this.scrape(assistant.outputInterfaceId, output_);\n await this.infra.repo.redis.spec.create({\n input, output, embeddings, id: hash(input), operatorId: assistant.id,\n }).catch(() => {});\n\n return output;\n }\n\n private scrape(interface_: string, output: string): string {\n if (interface_ === 'interface:codeblock') {\n const [_, ...lines] = (output.split('```')?.[1] ?? '').split('\\n');\n return `\\`\\`\\`\\n${lines.join('\\n')}\\n\\`\\`\\``;\n } else {\n return output;\n }\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { InfrastructureService } from \"@xxmachina/common/infra\";\nimport { Spec } from \"@xxmachina/common/domain/models\";\nimport { hash } from \"@xxmachina/common/utils/crypto\";\n\n@Injectable({providedIn: 'root'})\nexport class SpecService {\n constructor(\n private infra: InfrastructureService,\n ) { }\n\n async list(): Promise<Spec[]> {\n return this.infra.repo.redis.spec.list();\n }\n\n async get(id: string): Promise<Spec> {\n return this.infra.repo.redis.spec.get(id);\n }\n\n async create(spec: Spec): Promise<Spec> {\n const project = await this.infra.repo.redis.project.get('default');\n const embeddings = await this.infra.external.getAiAdapter(project.settings.ai).embedding(spec.input);\n return this.infra.repo.redis.spec.create({...spec, embeddings, id: hash(spec.input)});\n }\n\n async update(spec: Partial<Spec>): Promise<void> {\n const project = await this.infra.repo.redis.project.get('default');\n const embeddings = await this.infra.external.getAiAdapter(project.settings.ai).embedding(spec.input);\n if (spec.id !== hash(spec.input)) throw new Error('id is not match with input hash');\n return this.infra.repo.redis.spec.update({...spec, embeddings});\n }\n\n async delete(id: string): Promise<void> {\n return this.infra.repo.redis.spec.delete(id);\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Project } from \"@xxmachina/common/domain/models\";\nimport { InfrastructureService } from \"@xxmachina/common/infra\";\n\n\n@Injectable({providedIn: 'root'})\nexport class ProjectService {\n constructor(\n private infra: InfrastructureService,\n ) { }\n\n async list(): Promise<Project[]> {\n return await this.infra.repo.redis.project.list() as Project[];\n }\n\n async get(projectId: string): Promise<Project> {\n return this.infra.repo.redis.project.get(projectId);\n }\n\n async create(project: Project): Promise<Project> {\n return this.infra.repo.redis.project.create(project);\n }\n\n async update(project: Project): Promise<void> {\n return this.infra.repo.redis.project.update(project);\n }\n}\n","import { Google } from \"@xxmachina/common/domain/models\";\nimport { InfrastructureService } from \"@xxmachina/common/infra\";\nimport { Injectable } from \"@angular/core\";\n\n@Injectable({providedIn: 'root'})\nexport class LinkService {\n constructor(\n public infra: InfrastructureService,\n ) { }\n\n saveGoogleLink(google: Google) {\n return this.infra.repo.firestore.link.google.save(google);\n }\n}","import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { injectAnyFunc } from '@nx-ddd/any-func';\nimport { injectDataConnectService } from '@xxmachina/common/infra/external/data-connect';\nimport { IsString } from 'class-validator';\n\nclass Result {\n @IsString()\n query: string;\n}\n\n@Injectable({providedIn: 'root'})\nexport class GraphqlService {\n protected http = inject(HttpClient);\n protected anyFunc = injectAnyFunc();\n protected dc = injectDataConnectService();\n\n constructor() {}\n\n async graphql(query: string) {\n // return lastValueFrom(this.http.post('http://localhost:3330/api/dataConnect', {query}));\n return this.dc.executeGraphqlRead(query);\n }\n\n async makeQuery(instructions: string) {\n const schemaQuery = `{ __schema { types { name fields { name type { name } } } } }`;\n const schemaResult = await this.graphql(schemaQuery);\n return this.anyFunc.call(instructions, Result, {\n instructions: `\n アシスタントはユーザーの要求を満たすGraphQLクエリを下記のサーバーのスキーマを元に生成します。\n\n ${JSON.stringify(schemaResult, null, 2)}\n `,\n model: 'gpt-4o-mini',\n validator: async (output) => this.graphql(output.query).then(() => []).catch(error => [error.message]),\n }).then(result => result.query);\n }\n\n}","import { inject, Injectable } from \"@angular/core\";\nimport { AssistantService } from \"./assistant\";\nimport { SpecService } from \"./spec\";\nimport { ProjectService } from \"./project\";\nimport { LinkService } from \"./link\";\nimport { GraphqlService } from \"./graphql\";\n\n@Injectable({providedIn: 'root'})\nexport class UsecaseService {\n readonly assistant = inject(AssistantService)\n readonly link = inject(LinkService)\n readonly project = inject(ProjectService)\n readonly spec = inject(SpecService)\n readonly graph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,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADF,MAAM,EAAA,CAAA;;2FAClB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;ACPhC;;AAEG;;;;"}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.float32Buffer = float32Buffer;
|
|
4
|
-
exports._bufferFloat32 = _bufferFloat32;
|
|
5
|
-
exports.bufferFloat32 = bufferFloat32;
|
|
6
|
-
exports.float64Buffer = float64Buffer;
|
|
7
|
-
exports._bufferFloat64 = _bufferFloat64;
|
|
8
|
-
exports.bufferFloat64 = bufferFloat64;
|
|
9
|
-
exports.hash = hash;
|
|
10
|
-
const crypto_1 = require("crypto");
|
|
1
|
+
import { createHash } from 'crypto';
|
|
2
|
+
|
|
11
3
|
function float32Buffer(arr) {
|
|
12
4
|
return Buffer.from(new Float32Array(arr).buffer);
|
|
13
5
|
}
|
|
@@ -27,6 +19,12 @@ function bufferFloat64(buffer) {
|
|
|
27
19
|
return Array.from(_bufferFloat64(buffer));
|
|
28
20
|
}
|
|
29
21
|
function hash(input) {
|
|
30
|
-
return
|
|
22
|
+
return createHash('sha256').update(input).digest('hex');
|
|
31
23
|
}
|
|
32
|
-
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generated bundle index. Do not edit.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export { _bufferFloat32, _bufferFloat64, bufferFloat32, bufferFloat64, float32Buffer, float64Buffer, hash };
|
|
30
|
+
//# sourceMappingURL=xxmachina-common-utils-crypto.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-utils-crypto.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/utils/crypto/crypto.ts","../../../../../packages/@xxmachina/common/src/lib/utils/crypto/xxmachina-common-utils-crypto.ts"],"sourcesContent":["import { createHash } from 'crypto';\n\nexport function float32Buffer(arr: number[]) {\n return Buffer.from(new Float32Array(arr).buffer);\n}\n\nexport function _bufferFloat32(buffer: Buffer): Float32Array {\n return new Float32Array(buffer.buffer, buffer.byteOffset, buffer.byteLength / Float32Array.BYTES_PER_ELEMENT);\n}\n\nexport function bufferFloat32(buffer: Buffer): number[] {\n return Array.from(_bufferFloat32(buffer));\n}\n\n\nexport function float64Buffer(arr: number[]) {\n return Buffer.from(new Float64Array(arr).buffer);\n}\n\nexport function _bufferFloat64(buffer: Buffer): Float64Array {\n return new Float64Array(buffer.buffer, buffer.byteOffset, buffer.byteLength / Float64Array.BYTES_PER_ELEMENT);\n}\n\n\nexport function bufferFloat64(buffer: Buffer): number[] {\n return Array.from(_bufferFloat64(buffer));\n}\n\nexport function hash(input: string): string {\n return createHash('sha256').update(input).digest('hex');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEM,SAAU,aAAa,CAAC,GAAa,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;AAClD;AAEM,SAAU,cAAc,CAAC,MAAc,EAAA;AAC3C,IAAA,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAG,YAAY,CAAC,iBAAiB,CAAC;AAC/G;AAEM,SAAU,aAAa,CAAC,MAAc,EAAA;IAC1C,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;AAC3C;AAGM,SAAU,aAAa,CAAC,GAAa,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;AAClD;AAEM,SAAU,cAAc,CAAC,MAAc,EAAA;AAC3C,IAAA,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAG,YAAY,CAAC,iBAAiB,CAAC;AAC/G;AAGM,SAAU,aAAa,CAAC,MAAc,EAAA;IAC1C,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;AAC3C;AAEM,SAAU,IAAI,CAAC,KAAa,EAAA;AAChC,IAAA,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AACzD;;AC9BA;;AAEG;;;;"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractDisplayFields = extractDisplayFields;
|
|
4
1
|
// JSONスキーマを受け取り、表示項目のリストを生成する関数
|
|
5
2
|
function extractDisplayFields(schema, prefix = '', childrenKey = 'children') {
|
|
6
3
|
const fields = [];
|
|
@@ -47,4 +44,10 @@ function extractDisplayFields(schema, prefix = '', childrenKey = 'children') {
|
|
|
47
44
|
}
|
|
48
45
|
return [...new Set(fields).keys()];
|
|
49
46
|
}
|
|
50
|
-
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Generated bundle index. Do not edit.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
export { extractDisplayFields };
|
|
53
|
+
//# sourceMappingURL=xxmachina-common-utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common-utils.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/utils/extract-display-fields.ts","../../../../../packages/@xxmachina/common/src/lib/utils/xxmachina-common-utils.ts"],"sourcesContent":["import { JsonSchema } from 'json-schema-library';\n\n// JSONスキーマを受け取り、表示項目のリストを生成する関数\nexport function extractDisplayFields(schema: JsonSchema, prefix = '', childrenKey = 'children'): string[] {\n const fields: string[] = [];\n\n if (schema.type === 'object' && schema.properties) {\n for (const key in schema.properties) {\n const propertySchema = schema.properties[key];\n const path = prefix ? `${prefix}.${key}` : key;\n\n // anyOfを処理\n if (propertySchema.anyOf) {\n propertySchema.anyOf.forEach((subSchema) => {\n if (subSchema.type === 'object' || subSchema.type === 'array') {\n const nestedFields = extractDisplayFields(subSchema, path, childrenKey);\n fields.push(...nestedFields);\n }\n });\n } else if (propertySchema.type === 'array' && propertySchema.items) {\n // 配列を処理\n if (key === childrenKey) {\n // childrenKeyに一致する場合、再帰的に処理\n const arrayFields = extractDisplayFields(propertySchema.items, '', childrenKey);\n fields.push(...arrayFields);\n }\n } else if (propertySchema.type !== 'object') {\n // 基本的なプロパティはそのまま追加\n fields.push(path);\n } else {\n // ネストされたオブジェクトに対して再帰的に呼び出す\n const nestedFields = extractDisplayFields(propertySchema, path, childrenKey);\n fields.push(...nestedFields);\n }\n\n // 特定のプロパティ(costAttribute)を処理\n if (key === 'costAttribute' && propertySchema.type === 'object') {\n fields.push(path);\n }\n }\n } else if (schema.type === 'array' && schema.items) {\n // ルートが配列の場合を処理\n const arrayFields = extractDisplayFields(schema.items, '', childrenKey);\n fields.push(...arrayFields);\n }\n\n return [...new Set(fields).keys()]\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAEA;AACM,SAAU,oBAAoB,CAAC,MAAkB,EAAE,MAAM,GAAG,EAAE,EAAE,WAAW,GAAG,UAAU,EAAA;IAC5F,MAAM,MAAM,GAAa,EAAE;IAE3B,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,EAAE;AACjD,QAAA,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE;YACnC,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC;AAC7C,YAAA,MAAM,IAAI,GAA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AAE,EAAE,WAAW,CAAC;AACvE,QAAA,MAAM,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC;;IAG7B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AACpC;;AC/CA;;AAEG;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xxmachina-common.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/xxmachina-common.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;AAEG"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@xxmachina/common/utils';
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { Google } from "@xxmachina/common/domain/models
|
|
1
|
+
import { Google } from "@xxmachina/common/domain/models";
|
|
2
2
|
import { FirestoreAdapter } from "@nx-ddd/firestore/adapters/base";
|
|
3
3
|
import { IFirestoreConverter } from "@nx-ddd/firestore/converter";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class GoogleConverter implements IFirestoreConverter<Google> {
|
|
5
6
|
private adapter;
|
|
6
7
|
constructor(adapter: FirestoreAdapter);
|
|
7
8
|
fromFirestore(doc: any): Google;
|
|
8
9
|
toFirestore(data: Google): Google;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleConverter, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GoogleConverter>;
|
|
9
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GoogleConfig } from "@nx-ddd/google";
|
|
2
|
-
import { OpenAiConfig } from "@nx-ddd/common/infrastructure/externals/openai";
|
|
2
|
+
import { OpenAiConfig } from "@nx-ddd/common/infrastructure/externals/openai/impl";
|
|
3
3
|
export interface ExternalConfig {
|
|
4
4
|
openAi: OpenAiConfig;
|
|
5
5
|
google: GoogleConfig;
|
|
6
6
|
}
|
|
7
|
-
export declare function provideExternalConfig(config: ExternalConfig): (import("@angular/core").
|
|
7
|
+
export declare function provideExternalConfig(config: ExternalConfig): (import("@angular/core").Provider[] | import("@angular/core").EnvironmentProviders)[];
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { AiConfig } from "@xxmachina/common/domain/models";
|
|
2
2
|
import { GoogleService } from "@nx-ddd/google";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ExternalService {
|
|
4
|
-
readonly openai: import("@nx-ddd/common/infrastructure/externals/openai/
|
|
5
|
+
readonly openai: import("@nx-ddd/common/infrastructure/externals/openai/impl").OpenAiServiceImpl;
|
|
5
6
|
readonly google: GoogleService;
|
|
6
7
|
readonly dataConnect: import("firebase-admin/data-connect").DataConnect;
|
|
7
8
|
getAiAdapter(aiConfig: AiConfig): any;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExternalService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ExternalService>;
|
|
8
11
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { QuickJSContext } from 'quickjs-emscripten';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class QuickJsServcie {
|
|
3
4
|
private readonly quickJs;
|
|
4
5
|
init(): Promise<void>;
|
|
5
6
|
eval(script: string): Promise<any>;
|
|
6
7
|
protected buildInput(vm: QuickJSContext): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QuickJsServcie, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QuickJsServcie>;
|
|
7
10
|
}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { EnvironmentProviders } from "@angular/core";
|
|
2
2
|
import { Resend } from "resend";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export interface ResendConfig {
|
|
4
5
|
apiKey: string;
|
|
5
6
|
}
|
|
6
|
-
export declare const RESEND_CONFIG:
|
|
7
|
-
token: import("@angular/core").InjectionToken<ResendConfig>;
|
|
8
|
-
inject: () => ResendConfig;
|
|
9
|
-
provide: (useFactory: () => ResendConfig) => {
|
|
10
|
-
provide: import("@angular/core").InjectionToken<ResendConfig>;
|
|
11
|
-
useFactory: () => ResendConfig;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
7
|
+
export declare const RESEND_CONFIG: import("@nx-ddd/core").DiToken<ResendConfig>;
|
|
14
8
|
export declare class ResendService extends Resend {
|
|
15
9
|
constructor(config?: ResendConfig);
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResendService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ResendService>;
|
|
16
12
|
}
|
|
17
13
|
export declare function provideResend(useFacotry: () => ResendConfig): EnvironmentProviders;
|
|
@@ -4,13 +4,13 @@ export interface InfrastructureConfig {
|
|
|
4
4
|
external: ExternalConfig;
|
|
5
5
|
repository: RepositoryConfig;
|
|
6
6
|
}
|
|
7
|
-
export declare function provideInfrastructureConfig(config: InfrastructureConfig): ((import("@angular/core").
|
|
8
|
-
provide: import("@angular/core").InjectionToken<import("./repository/notion
|
|
9
|
-
useValue: import("./repository/notion
|
|
7
|
+
export declare function provideInfrastructureConfig(config: InfrastructureConfig): ((import("@angular/core").Provider[] | import("@angular/core").EnvironmentProviders)[] | (({
|
|
8
|
+
provide: import("@angular/core").InjectionToken<import("./repository/notion").ContractConfig>;
|
|
9
|
+
useValue: import("./repository/notion").ContractConfig;
|
|
10
10
|
} | {
|
|
11
11
|
provide: import("@angular/core").InjectionToken<string>;
|
|
12
12
|
useValue: string;
|
|
13
13
|
})[] | {
|
|
14
|
-
provide: import("@angular/core").InjectionToken<import("
|
|
15
|
-
useValue: import("
|
|
14
|
+
provide: import("@angular/core").InjectionToken<import("@xxmachina/common/_shared/meta/redis").RedisConfig>;
|
|
15
|
+
useValue: import("@xxmachina/common/_shared/meta/redis").RedisConfig;
|
|
16
16
|
}[])[])[];
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { RepositoriesService } from "./repository";
|
|
2
2
|
import { ExternalService } from "./external";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class InfrastructureService {
|
|
4
5
|
external: ExternalService;
|
|
5
6
|
repo: RepositoriesService;
|
|
6
7
|
constructor(external: ExternalService, repo: RepositoriesService);
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InfrastructureService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InfrastructureService>;
|
|
7
10
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Query } from "@xxmachina/common/domain/models";
|
|
2
2
|
import { FirestoreQuery } from "@nx-ddd/firestore/query/v2";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class QueryFirestoreQuery extends FirestoreQuery<Query> {
|
|
4
5
|
readonly collectionPath = "projects/:projectId/queries/:id";
|
|
5
6
|
protected converter: import("@nx-ddd/firestore").IFirestoreConverter<Query>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryFirestoreQuery, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QueryFirestoreQuery>;
|
|
6
9
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Resource } from "@xxmachina/common/domain/models";
|
|
2
2
|
import { FirestoreQuery } from "@nx-ddd/firestore/query/v2";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ResourceFirestoreQuery extends FirestoreQuery<Resource> {
|
|
4
5
|
readonly collectionPath = "projects/:projectId/resources/:id";
|
|
5
6
|
protected converter: import("@nx-ddd/firestore").IFirestoreConverter<Resource>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceFirestoreQuery, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ResourceFirestoreQuery>;
|
|
6
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './resource';
|
package/{infrastructure → infra}/repository/dataconnect/invoice/invoice.repository.impl.d.ts
RENAMED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { Invoice } from '@xxmachina/common/domain
|
|
1
|
+
import { Invoice } from '@xxmachina/common/domain-invoice/models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class InvoiceRepository {
|
|
3
4
|
protected db: import("firebase-admin/data-connect").DataConnect;
|
|
4
5
|
createMany(invoices: Invoice[]): Promise<void>;
|
|
5
6
|
deleteAll(): Promise<void>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InvoiceRepository, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InvoiceRepository>;
|
|
6
9
|
}
|
|
7
10
|
export declare function provideInvoiceRepository(): {
|
|
8
11
|
provide: import("@angular/core").InjectionToken<InvoiceRepository>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Order } from '@xxmachina/common/domain
|
|
1
|
+
import { Order } from '@xxmachina/common/domain-invoice/models';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class DataConnectConverter {
|
|
4
5
|
static fromDayJs(date: dayjs.Dayjs | null): string;
|
|
5
6
|
}
|
|
@@ -7,6 +8,8 @@ export declare class OrderRepository {
|
|
|
7
8
|
protected db: import("firebase-admin/data-connect").DataConnect;
|
|
8
9
|
createMany(orders: Order[]): Promise<void>;
|
|
9
10
|
deleteAll(): Promise<void>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrderRepository, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OrderRepository>;
|
|
10
13
|
}
|
|
11
14
|
export declare function provideOrderRepository(): {
|
|
12
15
|
provide: import("@angular/core").InjectionToken<OrderRepository>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LinkRepository } from "./link";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FirestoreRepository {
|
|
4
|
+
link: LinkRepository;
|
|
5
|
+
constructor(link: LinkRepository);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FirestoreRepository, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FirestoreRepository>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Google } from "@xxmachina/common/domain/models";
|
|
2
|
+
import { GoogleConverter } from "@xxmachina/common/infra/converters/google";
|
|
3
|
+
import { FirestoreRepository } from "@nx-ddd/firestore/repository";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class GoogleRepository extends FirestoreRepository<Google> {
|
|
6
|
+
readonly collectionPath = "users/:userId/links/:id";
|
|
7
|
+
protected converter: GoogleConverter;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleRepository, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GoogleRepository>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GoogleRepository } from "./google";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class LinkRepository {
|
|
4
|
+
google: GoogleRepository;
|
|
5
|
+
constructor(google: GoogleRepository);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LinkRepository, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LinkRepository>;
|
|
8
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Query } from "@xxmachina/common/domain/models
|
|
1
|
+
import { Query } from "@xxmachina/common/domain/models";
|
|
2
2
|
import { FirestoreRepository } from "@nx-ddd/firestore/repository";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class QueryFirestoreRepository extends FirestoreRepository<Query> {
|
|
4
5
|
readonly collectionPath = "projects/:projectId/queries/:id";
|
|
5
6
|
protected converter: import("@nx-ddd/firestore").IFirestoreConverter<Query>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryFirestoreRepository, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QueryFirestoreRepository>;
|
|
6
9
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FirestoreRepository } from "@nx-ddd/firestore/repository";
|
|
2
|
-
import { Resource } from "@xxmachina/common/domain/models
|
|
2
|
+
import { Resource } from "@xxmachina/common/domain/models";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ResourceFirestoreRepository extends FirestoreRepository<Resource> {
|
|
4
5
|
readonly collectionPath = "projects/:projectId/resources/:id";
|
|
5
6
|
protected converter: import("@nx-ddd/firestore").IFirestoreConverter<Resource>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceFirestoreRepository, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ResourceFirestoreRepository>;
|
|
6
9
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Query } from '@xxmachina/common/domain/models';
|
|
2
2
|
import { HasuraRepository } from '@nx-ddd/hasura';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class QueryHasuraRepository extends HasuraRepository<Query> {
|
|
4
5
|
readonly tableName = "meta_queries";
|
|
5
6
|
protected converter: import("@nx-ddd/hasura").HasuraConverter<Query>;
|
|
6
7
|
readonly updateColumns: string[];
|
|
7
8
|
get pkey(): string;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryHasuraRepository, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QueryHasuraRepository>;
|
|
8
11
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Resource } from '@xxmachina/common/domain/models';
|
|
2
2
|
import { HasuraRepository } from '@nx-ddd/hasura';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ResourceHasuraRepository extends HasuraRepository<Resource> {
|
|
4
5
|
readonly tableName = "meta_resources";
|
|
5
6
|
protected converter: import("@nx-ddd/hasura").HasuraConverter<Resource>;
|
|
6
7
|
readonly updateColumns: string[];
|
|
7
8
|
get pkey(): string;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceHasuraRepository, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ResourceHasuraRepository>;
|
|
8
11
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { NotionRepository } from "@nx-ddd/notion";
|
|
2
|
-
import { Contract } from "@xxmachina/common/domain
|
|
2
|
+
import { Contract } from "@xxmachina/common/domain-invoice";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ContractRepository extends NotionRepository<Contract> {
|
|
4
5
|
protected converter: import("@nx-ddd/notion").NotionConverter<any>;
|
|
5
6
|
protected config: import("./contract.config").ContractConfig;
|
|
6
7
|
protected accessToken: string;
|
|
7
8
|
protected databaseId: string;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContractRepository, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ContractRepository>;
|
|
8
11
|
}
|