@xxmachina/common 19.0.0-preview.8 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_shared/auth/index.d.ts +8 -1
- package/_shared/auth/passports/anonymous/index.d.ts +8 -1
- package/_shared/auth/passports/firebase/index.d.ts +19 -2
- package/_shared/auth/passports/internal/index.d.ts +17 -1
- package/_shared/auth/passports/msal/index.d.ts +26 -2
- package/_shared/meta/index.d.ts +8 -0
- package/_shared/meta/redis/index.d.ts +39 -2
- package/auth/index.d.ts +16 -1
- package/azure-auth/index.d.ts +41 -2
- package/domain/builder/index.d.ts +81 -0
- package/domain/builder/screen-item/index.d.ts +7 -1
- package/domain/index.d.ts +2 -1
- package/domain/models/index.d.ts +377 -13
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs +20 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs +41 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs +34 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs +49 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth.mjs +25 -0
- package/fesm2022/xxmachina-common-_shared-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs +99 -0
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-meta.mjs +26 -0
- package/fesm2022/xxmachina-common-_shared-meta.mjs.map +1 -0
- package/fesm2022/xxmachina-common-auth.mjs +17 -0
- package/fesm2022/xxmachina-common-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-azure-auth.mjs +160 -0
- package/fesm2022/xxmachina-common-azure-auth.mjs.map +1 -0
- package/{domain/builder/screen-item/screen-item.builder.js → fesm2022/xxmachina-common-domain-builder-screen-item.mjs} +10 -11
- package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs +494 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-models.mjs +842 -0
- package/fesm2022/xxmachina-common-domain-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain.mjs +7 -0
- package/fesm2022/xxmachina-common-domain.mjs.map +1 -0
- package/fesm2022/xxmachina-common-firebase-auth.mjs +36 -0
- package/fesm2022/xxmachina-common-firebase-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-converters-google.mjs +39 -0
- package/fesm2022/xxmachina-common-infra-converters-google.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs +13 -0
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs +61 -0
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-resend.mjs +10 -0
- package/fesm2022/xxmachina-common-infra-external-resend.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external.mjs +36 -0
- package/fesm2022/xxmachina-common-infra-external.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs +34 -0
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs +20 -0
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs +18 -0
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs +74 -0
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs +41 -0
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs +113 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra.mjs +378 -0
- package/fesm2022/xxmachina-common-infra.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-builders.mjs +79 -0
- package/fesm2022/xxmachina-common-invoice-domain-builders.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-models.mjs +428 -0
- package/fesm2022/xxmachina-common-invoice-domain-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-resolvers.mjs +41 -0
- package/fesm2022/xxmachina-common-invoice-domain-resolvers.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain.mjs +8 -0
- package/fesm2022/xxmachina-common-invoice-domain.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-contract.mjs +27 -0
- package/fesm2022/xxmachina-common-invoice-usecase-contract.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs +191 -0
- package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-order.mjs +36 -0
- package/fesm2022/xxmachina-common-invoice-usecase-order.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs +36 -0
- package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-graphql.mjs +60 -0
- package/fesm2022/xxmachina-common-services-graphql.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-query-config.mjs +44 -0
- package/fesm2022/xxmachina-common-services-query-config.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-query.mjs +65 -0
- package/fesm2022/xxmachina-common-services-query.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-speech.mjs +178 -0
- package/fesm2022/xxmachina-common-services-speech.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-transformer.mjs +27 -0
- package/fesm2022/xxmachina-common-services-transformer.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-firestore.mjs +33 -0
- package/fesm2022/xxmachina-common-stores-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-hasura.mjs +32 -0
- package/fesm2022/xxmachina-common-stores-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-inmemory.mjs +102 -0
- package/fesm2022/xxmachina-common-stores-inmemory.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores.mjs +16 -0
- package/fesm2022/xxmachina-common-stores.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-assistant.mjs +67 -0
- package/fesm2022/xxmachina-common-usecase-assistant.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-database.mjs +95 -0
- package/fesm2022/xxmachina-common-usecase-database.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-graphql.mjs +51 -0
- package/fesm2022/xxmachina-common-usecase-graphql.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-link.mjs +26 -0
- package/fesm2022/xxmachina-common-usecase-link.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-project.mjs +35 -0
- package/fesm2022/xxmachina-common-usecase-project.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-spec.mjs +45 -0
- package/fesm2022/xxmachina-common-usecase-spec.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase.mjs +198 -0
- package/fesm2022/xxmachina-common-usecase.mjs.map +1 -0
- package/{utils/crypto.js → fesm2022/xxmachina-common-utils-crypto.mjs} +10 -12
- package/fesm2022/xxmachina-common-utils-crypto.mjs.map +1 -0
- package/{utils/extract-display-fields.js → fesm2022/xxmachina-common-utils.mjs} +7 -4
- package/fesm2022/xxmachina-common-utils.mjs.map +1 -0
- package/fesm2022/xxmachina-common.mjs +6 -0
- package/fesm2022/xxmachina-common.mjs.map +1 -0
- package/firebase-auth/index.d.ts +6 -0
- package/index.d.ts +1 -0
- package/infra/converters/google/index.d.ts +17 -0
- package/infra/external/data-connect/index.d.ts +7 -0
- package/infra/external/index.d.ts +24 -0
- package/infra/external/quick-js/index.d.ts +24 -0
- package/infra/external/resend/index.d.ts +16 -0
- package/infra/index.d.ts +218 -0
- package/infra/query/firestore/index.d.ts +20 -0
- package/infra/query/hasura/index.d.ts +9 -0
- package/infra/repository/dataconnect/index.d.ts +28 -0
- package/infra/repository/firestore/index.d.ts +42 -0
- package/infra/repository/hasura/index.d.ts +24 -0
- package/infra/repository/notion/index.d.ts +101 -0
- package/invoice/domain/builders/index.d.ts +31 -0
- package/invoice/domain/index.d.ts +3 -0
- package/invoice/domain/models/index.d.ts +78 -0
- package/{domain/resolvers/invoice.resolver.d.ts → invoice/domain/resolvers/index.d.ts} +6 -2
- package/invoice/usecase/contract/index.d.ts +14 -0
- package/invoice/usecase/invoice/index.d.ts +34 -0
- package/invoice/usecase/order/index.d.ts +16 -0
- package/invoice/usecase/partner/index.d.ts +16 -0
- package/package.json +238 -14
- package/services/graphql/index.d.ts +32 -0
- package/services/query/config/index.d.ts +18 -0
- package/services/query/index.d.ts +29 -0
- package/services/speech/index.d.ts +37 -0
- package/services/transformer/index.d.ts +14 -0
- package/stores/firestore/index.d.ts +17 -0
- package/stores/hasura/index.d.ts +17 -0
- package/stores/index.d.ts +22 -40
- package/stores/inmemory/index.d.ts +33 -0
- package/usecase/assistant/index.d.ts +18 -1
- package/usecase/database/index.d.ts +39 -1
- package/usecase/graphql/index.d.ts +17 -1
- package/usecase/index.d.ts +73 -1
- package/usecase/link/index.d.ts +13 -1
- package/usecase/project/index.d.ts +16 -1
- package/usecase/spec/index.d.ts +17 -1
- package/utils/crypto/index.d.ts +9 -0
- package/utils/index.d.ts +5 -1
- package/README.md +0 -11
- package/_shared/auth/auth.module.d.ts +0 -6
- package/_shared/auth/auth.module.js +0 -22
- package/_shared/auth/auth.module.js.map +0 -1
- package/_shared/auth/index.js +0 -5
- package/_shared/auth/index.js.map +0 -1
- package/_shared/auth/passports/anonymous/anonymous.strategy.d.ts +0 -6
- package/_shared/auth/passports/anonymous/anonymous.strategy.js +0 -19
- package/_shared/auth/passports/anonymous/anonymous.strategy.js.map +0 -1
- package/_shared/auth/passports/anonymous/index.js +0 -5
- package/_shared/auth/passports/anonymous/index.js.map +0 -1
- package/_shared/auth/passports/firebase/firebase.guard.d.ts +0 -6
- package/_shared/auth/passports/firebase/firebase.guard.js +0 -23
- package/_shared/auth/passports/firebase/firebase.guard.js.map +0 -1
- package/_shared/auth/passports/firebase/firebase.strategy.d.ts +0 -10
- package/_shared/auth/passports/firebase/firebase.strategy.js +0 -22
- package/_shared/auth/passports/firebase/firebase.strategy.js.map +0 -1
- package/_shared/auth/passports/firebase/index.js +0 -6
- package/_shared/auth/passports/firebase/index.js.map +0 -1
- package/_shared/auth/passports/internal/index.js +0 -5
- package/_shared/auth/passports/internal/index.js.map +0 -1
- package/_shared/auth/passports/internal/internal.strategy.d.ts +0 -14
- package/_shared/auth/passports/internal/internal.strategy.js +0 -33
- package/_shared/auth/passports/internal/internal.strategy.js.map +0 -1
- package/_shared/auth/passports/msal/index.js +0 -6
- package/_shared/auth/passports/msal/index.js.map +0 -1
- package/_shared/auth/passports/msal/msal.guard.d.ts +0 -4
- package/_shared/auth/passports/msal/msal.guard.js +0 -13
- package/_shared/auth/passports/msal/msal.guard.js.map +0 -1
- package/_shared/auth/passports/msal/msal.strategy.d.ts +0 -17
- package/_shared/auth/passports/msal/msal.strategy.js +0 -43
- package/_shared/auth/passports/msal/msal.strategy.js.map +0 -1
- package/_shared/meta/decorators.d.ts +0 -4
- package/_shared/meta/decorators.js +0 -25
- package/_shared/meta/decorators.js.map +0 -1
- package/_shared/meta/redis/index.js +0 -6
- package/_shared/meta/redis/index.js.map +0 -1
- package/_shared/meta/redis/redis.config.d.ts +0 -9
- package/_shared/meta/redis/redis.config.js +0 -10
- package/_shared/meta/redis/redis.config.js.map +0 -1
- package/_shared/meta/redis/redis.repository.d.ts +0 -23
- package/_shared/meta/redis/redis.repository.js +0 -108
- package/_shared/meta/redis/redis.repository.js.map +0 -1
- package/auth/auth.service.d.ts +0 -10
- package/auth/auth.service.js +0 -12
- package/auth/auth.service.js.map +0 -1
- package/auth/index.js +0 -5
- package/auth/index.js.map +0 -1
- package/azure-auth/auth.di.d.ts +0 -4
- package/azure-auth/auth.di.js +0 -56
- package/azure-auth/auth.di.js.map +0 -1
- package/azure-auth/auth.service.d.ts +0 -32
- package/azure-auth/auth.service.js +0 -115
- package/azure-auth/auth.service.js.map +0 -1
- package/azure-auth/index.js +0 -6
- package/azure-auth/index.js.map +0 -1
- package/domain/builder/command/command.builder.d.ts +0 -5
- package/domain/builder/command/command.builder.js +0 -30
- package/domain/builder/command/command.builder.js.map +0 -1
- package/domain/builder/command/index.d.ts +0 -1
- package/domain/builder/command/index.js +0 -5
- package/domain/builder/command/index.js.map +0 -1
- package/domain/builder/command-action/command-action.builder.d.ts +0 -40
- package/domain/builder/command-action/command-action.builder.js +0 -139
- package/domain/builder/command-action/command-action.builder.js.map +0 -1
- package/domain/builder/command-action/index.d.ts +0 -1
- package/domain/builder/command-action/index.js +0 -5
- package/domain/builder/command-action/index.js.map +0 -1
- package/domain/builder/er/er.builder.d.ts +0 -19
- package/domain/builder/er/er.builder.js +0 -112
- package/domain/builder/er/er.builder.js.map +0 -1
- package/domain/builder/er/index.d.ts +0 -1
- package/domain/builder/er/index.js +0 -5
- package/domain/builder/er/index.js.map +0 -1
- package/domain/builder/screen-item/index.js +0 -5
- package/domain/builder/screen-item/index.js.map +0 -1
- package/domain/builder/screen-item/screen-item.builder.d.ts +0 -5
- package/domain/builder/screen-item/screen-item.builder.js.map +0 -1
- package/domain/index.js +0 -5
- package/domain/index.js.map +0 -1
- package/domain/invoice/builders/email/email.builder.d.ts +0 -18
- package/domain/invoice/builders/email/email.builder.js +0 -29
- package/domain/invoice/builders/email/email.builder.js.map +0 -1
- package/domain/invoice/builders/email/index.d.ts +0 -1
- package/domain/invoice/builders/email/index.js +0 -5
- package/domain/invoice/builders/email/index.js.map +0 -1
- package/domain/invoice/builders/message/index.d.ts +0 -1
- package/domain/invoice/builders/message/index.js +0 -5
- package/domain/invoice/builders/message/index.js.map +0 -1
- package/domain/invoice/builders/message/message.builder.d.ts +0 -6
- package/domain/invoice/builders/message/message.builder.js +0 -43
- package/domain/invoice/builders/message/message.builder.js.map +0 -1
- package/domain/invoice/builders/title/index.d.ts +0 -1
- package/domain/invoice/builders/title/index.js +0 -5
- package/domain/invoice/builders/title/index.js.map +0 -1
- package/domain/invoice/builders/title/title.builder.d.ts +0 -4
- package/domain/invoice/builders/title/title.builder.js +0 -11
- package/domain/invoice/builders/title/title.builder.js.map +0 -1
- package/domain/invoice/models/backoffice/contract.d.ts +0 -10
- package/domain/invoice/models/backoffice/contract.js +0 -50
- package/domain/invoice/models/backoffice/contract.js.map +0 -1
- package/domain/invoice/models/backoffice/index.d.ts +0 -5
- package/domain/invoice/models/backoffice/index.js +0 -9
- package/domain/invoice/models/backoffice/index.js.map +0 -1
- package/domain/invoice/models/backoffice/invoice-mail.d.ts +0 -8
- package/domain/invoice/models/backoffice/invoice-mail.js +0 -7
- package/domain/invoice/models/backoffice/invoice-mail.js.map +0 -1
- package/domain/invoice/models/backoffice/invoice.d.ts +0 -19
- package/domain/invoice/models/backoffice/invoice.js +0 -91
- package/domain/invoice/models/backoffice/invoice.js.map +0 -1
- package/domain/invoice/models/backoffice/order.d.ts +0 -26
- package/domain/invoice/models/backoffice/order.js +0 -157
- package/domain/invoice/models/backoffice/order.js.map +0 -1
- package/domain/invoice/models/backoffice/partner.d.ts +0 -17
- package/domain/invoice/models/backoffice/partner.js +0 -96
- package/domain/invoice/models/backoffice/partner.js.map +0 -1
- package/domain/invoice/models/index.d.ts +0 -1
- package/domain/invoice/models/index.js +0 -5
- package/domain/invoice/models/index.js.map +0 -1
- package/domain/models/agent/assistant.d.ts +0 -9
- package/domain/models/agent/assistant.js +0 -31
- package/domain/models/agent/assistant.js.map +0 -1
- package/domain/models/agent/index.d.ts +0 -1
- package/domain/models/agent/index.js +0 -5
- package/domain/models/agent/index.js.map +0 -1
- package/domain/models/bookmarklet/bookmarklet.d.ts +0 -9
- package/domain/models/bookmarklet/bookmarklet.js +0 -34
- package/domain/models/bookmarklet/bookmarklet.js.map +0 -1
- package/domain/models/bookmarklet/index.d.ts +0 -1
- package/domain/models/bookmarklet/index.js +0 -5
- package/domain/models/bookmarklet/index.js.map +0 -1
- package/domain/models/calendar-utils.d.ts +0 -5
- package/domain/models/calendar-utils.js +0 -43
- package/domain/models/calendar-utils.js.map +0 -1
- package/domain/models/command/command.d.ts +0 -18
- package/domain/models/command/command.helper.d.ts +0 -4
- package/domain/models/command/command.helper.js +0 -14
- package/domain/models/command/command.helper.js.map +0 -1
- package/domain/models/command/command.js +0 -40
- package/domain/models/command/command.js.map +0 -1
- package/domain/models/command/index.d.ts +0 -2
- package/domain/models/command/index.js +0 -6
- package/domain/models/command/index.js.map +0 -1
- package/domain/models/database/database.d.ts +0 -4
- package/domain/models/database/database.js +0 -7
- package/domain/models/database/database.js.map +0 -1
- package/domain/models/database/index.d.ts +0 -1
- package/domain/models/database/index.js +0 -5
- package/domain/models/database/index.js.map +0 -1
- package/domain/models/endpoint/endpoint.helper.d.ts +0 -4
- package/domain/models/endpoint/endpoint.helper.js +0 -21
- package/domain/models/endpoint/endpoint.helper.js.map +0 -1
- package/domain/models/endpoint/index.d.ts +0 -1
- package/domain/models/endpoint/index.js +0 -5
- package/domain/models/endpoint/index.js.map +0 -1
- package/domain/models/index.js +0 -12
- package/domain/models/index.js.map +0 -1
- package/domain/models/links/google/google.d.ts +0 -12
- package/domain/models/links/google/google.js +0 -47
- package/domain/models/links/google/google.js.map +0 -1
- package/domain/models/links/google/index.d.ts +0 -1
- package/domain/models/links/google/index.js +0 -5
- package/domain/models/links/google/index.js.map +0 -1
- package/domain/models/openapi/index.d.ts +0 -2
- package/domain/models/openapi/index.js +0 -6
- package/domain/models/openapi/index.js.map +0 -1
- package/domain/models/openapi/openapi.d.ts +0 -32
- package/domain/models/openapi/openapi.js +0 -87
- package/domain/models/openapi/openapi.js.map +0 -1
- package/domain/models/openapi/openapi.schema.d.ts +0 -76
- package/domain/models/openapi/openapi.schema.js +0 -3
- package/domain/models/openapi/openapi.schema.js.map +0 -1
- package/domain/models/operators/assistancts/base.d.ts +0 -5
- package/domain/models/operators/assistancts/base.js +0 -13
- package/domain/models/operators/assistancts/base.js.map +0 -1
- package/domain/models/operators/assistancts/index.d.ts +0 -1
- package/domain/models/operators/assistancts/index.js +0 -5
- package/domain/models/operators/assistancts/index.js.map +0 -1
- package/domain/models/operators/base.d.ts +0 -13
- package/domain/models/operators/base.js +0 -10
- package/domain/models/operators/base.js.map +0 -1
- package/domain/models/operators/index.d.ts +0 -4
- package/domain/models/operators/index.js +0 -8
- package/domain/models/operators/index.js.map +0 -1
- package/domain/models/operators/systems/base.d.ts +0 -5
- package/domain/models/operators/systems/base.js +0 -3
- package/domain/models/operators/systems/base.js.map +0 -1
- package/domain/models/operators/systems/graphql.d.ts +0 -5
- package/domain/models/operators/systems/graphql.js +0 -3
- package/domain/models/operators/systems/graphql.js.map +0 -1
- package/domain/models/operators/systems/index.d.ts +0 -3
- package/domain/models/operators/systems/index.js +0 -7
- package/domain/models/operators/systems/index.js.map +0 -1
- package/domain/models/operators/systems/rest.d.ts +0 -6
- package/domain/models/operators/systems/rest.js +0 -3
- package/domain/models/operators/systems/rest.js.map +0 -1
- package/domain/models/operators/workflows/index.d.ts +0 -1
- package/domain/models/operators/workflows/index.js +0 -5
- package/domain/models/operators/workflows/index.js.map +0 -1
- package/domain/models/operators/workflows/workflow.d.ts +0 -9
- package/domain/models/operators/workflows/workflow.js +0 -3
- package/domain/models/operators/workflows/workflow.js.map +0 -1
- package/domain/models/project.d.ts +0 -22
- package/domain/models/project.js +0 -9
- package/domain/models/project.js.map +0 -1
- package/domain/models/query/index.d.ts +0 -2
- package/domain/models/query/index.js +0 -6
- package/domain/models/query/index.js.map +0 -1
- package/domain/models/query/query.d.ts +0 -27
- package/domain/models/query/query.helper.d.ts +0 -23
- package/domain/models/query/query.helper.js +0 -172
- package/domain/models/query/query.helper.js.map +0 -1
- package/domain/models/query/query.js +0 -122
- package/domain/models/query/query.js.map +0 -1
- package/domain/models/resource/index.d.ts +0 -2
- package/domain/models/resource/index.js +0 -6
- package/domain/models/resource/index.js.map +0 -1
- package/domain/models/resource/resource.d.ts +0 -15
- package/domain/models/resource/resource.helper.d.ts +0 -4
- package/domain/models/resource/resource.helper.js +0 -16
- package/domain/models/resource/resource.helper.js.map +0 -1
- package/domain/models/resource/resource.js +0 -73
- package/domain/models/resource/resource.js.map +0 -1
- package/domain/models/scheduler/index.d.ts +0 -1
- package/domain/models/scheduler/index.js +0 -5
- package/domain/models/scheduler/index.js.map +0 -1
- package/domain/models/scheduler/schedule.d.ts +0 -23
- package/domain/models/scheduler/schedule.js +0 -89
- package/domain/models/scheduler/schedule.js.map +0 -1
- package/domain/models/screen-item/index.d.ts +0 -1
- package/domain/models/screen-item/index.js +0 -5
- package/domain/models/screen-item/index.js.map +0 -1
- package/domain/models/screen-item/screen-item.d.ts +0 -9
- package/domain/models/screen-item/screen-item.js +0 -3
- package/domain/models/screen-item/screen-item.js.map +0 -1
- package/domain/models/spec.d.ts +0 -7
- package/domain/models/spec.js +0 -3
- package/domain/models/spec.js.map +0 -1
- package/domain/resolvers/index.d.ts +0 -1
- package/domain/resolvers/index.js +0 -5
- package/domain/resolvers/index.js.map +0 -1
- package/domain/resolvers/invoice.resolver.js +0 -31
- package/domain/resolvers/invoice.resolver.js.map +0 -1
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.d.ts +0 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js +0 -1
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js.map +0 -1
- package/infrastructure/converters/google/google.converter.d.ts +0 -9
- package/infrastructure/converters/google/google.converter.js +0 -27
- package/infrastructure/converters/google/google.converter.js.map +0 -1
- package/infrastructure/converters/google/index.d.ts +0 -1
- package/infrastructure/converters/google/index.js +0 -5
- package/infrastructure/converters/google/index.js.map +0 -1
- package/infrastructure/external/data-connect/data-connect.service.d.ts +0 -4
- package/infrastructure/external/data-connect/data-connect.service.impl.d.ts +0 -7
- package/infrastructure/external/data-connect/data-connect.service.impl.js +0 -20
- package/infrastructure/external/data-connect/data-connect.service.impl.js.map +0 -1
- package/infrastructure/external/data-connect/data-connect.service.js +0 -11
- package/infrastructure/external/data-connect/data-connect.service.js.map +0 -1
- package/infrastructure/external/data-connect/index.d.ts +0 -1
- package/infrastructure/external/data-connect/index.js +0 -5
- package/infrastructure/external/data-connect/index.js.map +0 -1
- package/infrastructure/external/external.config.d.ts +0 -7
- package/infrastructure/external/external.config.js +0 -13
- package/infrastructure/external/external.config.js.map +0 -1
- package/infrastructure/external/external.service.d.ts +0 -8
- package/infrastructure/external/external.service.js +0 -23
- package/infrastructure/external/external.service.js.map +0 -1
- package/infrastructure/external/index.d.ts +0 -2
- package/infrastructure/external/index.js +0 -6
- package/infrastructure/external/index.js.map +0 -1
- package/infrastructure/external/quick-js/index.d.ts +0 -1
- package/infrastructure/external/quick-js/index.js +0 -5
- package/infrastructure/external/quick-js/index.js.map +0 -1
- package/infrastructure/external/quick-js/quick-js.service.d.ts +0 -7
- package/infrastructure/external/quick-js/quick-js.service.js +0 -44
- package/infrastructure/external/quick-js/quick-js.service.js.map +0 -1
- package/infrastructure/external/resend/index.d.ts +0 -1
- package/infrastructure/external/resend/index.js +0 -5
- package/infrastructure/external/resend/index.js.map +0 -1
- package/infrastructure/external/resend/resend.service.d.ts +0 -9
- package/infrastructure/external/resend/resend.service.impl.d.ts +0 -17
- package/infrastructure/external/resend/resend.service.impl.js +0 -27
- package/infrastructure/external/resend/resend.service.impl.js.map +0 -1
- package/infrastructure/external/resend/resend.service.js +0 -6
- package/infrastructure/external/resend/resend.service.js.map +0 -1
- package/infrastructure/index.d.ts +0 -2
- package/infrastructure/index.js +0 -6
- package/infrastructure/index.js.map +0 -1
- package/infrastructure/infrastructure.config.d.ts +0 -16
- package/infrastructure/infrastructure.config.js +0 -12
- package/infrastructure/infrastructure.config.js.map +0 -1
- package/infrastructure/infrastructure.service.d.ts +0 -7
- package/infrastructure/infrastructure.service.js +0 -20
- package/infrastructure/infrastructure.service.js.map +0 -1
- package/infrastructure/query/firestore/query/index.d.ts +0 -1
- package/infrastructure/query/firestore/query/index.js +0 -5
- package/infrastructure/query/firestore/query/index.js.map +0 -1
- package/infrastructure/query/firestore/query/query.query.d.ts +0 -6
- package/infrastructure/query/firestore/query/query.query.js +0 -20
- package/infrastructure/query/firestore/query/query.query.js.map +0 -1
- package/infrastructure/query/firestore/resource/index.d.ts +0 -1
- package/infrastructure/query/firestore/resource/index.js +0 -5
- package/infrastructure/query/firestore/resource/index.js.map +0 -1
- package/infrastructure/query/firestore/resource/resource.query.d.ts +0 -6
- package/infrastructure/query/firestore/resource/resource.query.js +0 -20
- package/infrastructure/query/firestore/resource/resource.query.js.map +0 -1
- package/infrastructure/query/hasura/resource/index.d.ts +0 -1
- package/infrastructure/query/hasura/resource/index.js +0 -5
- package/infrastructure/query/hasura/resource/index.js.map +0 -1
- package/infrastructure/query/hasura/resource/resource.query.d.ts +0 -3
- package/infrastructure/query/hasura/resource/resource.query.js +0 -14
- package/infrastructure/query/hasura/resource/resource.query.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/index.d.ts +0 -1
- package/infrastructure/repository/dataconnect/invoice/index.js +0 -5
- package/infrastructure/repository/dataconnect/invoice/index.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.d.ts +0 -4
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.d.ts +0 -10
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js +0 -54
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js +0 -11
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/index.d.ts +0 -1
- package/infrastructure/repository/dataconnect/order/index.js +0 -5
- package/infrastructure/repository/dataconnect/order/index.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/order.repository.d.ts +0 -4
- package/infrastructure/repository/dataconnect/order/order.repository.impl.d.ts +0 -14
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js +0 -74
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/order.repository.js +0 -11
- package/infrastructure/repository/dataconnect/order/order.repository.js.map +0 -1
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js +0 -20
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js.map +0 -1
- package/infrastructure/repository/firestore/bookmarklet/index.d.ts +0 -1
- package/infrastructure/repository/firestore/bookmarklet/index.js +0 -5
- package/infrastructure/repository/firestore/bookmarklet/index.js.map +0 -1
- package/infrastructure/repository/firestore/firestore.repository.d.ts +0 -7
- package/infrastructure/repository/firestore/firestore.repository.js +0 -20
- package/infrastructure/repository/firestore/firestore.repository.js.map +0 -1
- package/infrastructure/repository/firestore/index.d.ts +0 -1
- package/infrastructure/repository/firestore/index.js +0 -5
- package/infrastructure/repository/firestore/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/google/google.repository.d.ts +0 -7
- package/infrastructure/repository/firestore/link/google/google.repository.js +0 -19
- package/infrastructure/repository/firestore/link/google/google.repository.js.map +0 -1
- package/infrastructure/repository/firestore/link/google/index.d.ts +0 -1
- package/infrastructure/repository/firestore/link/google/index.js +0 -5
- package/infrastructure/repository/firestore/link/google/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/index.d.ts +0 -1
- package/infrastructure/repository/firestore/link/index.js +0 -5
- package/infrastructure/repository/firestore/link/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/link.repository.d.ts +0 -5
- package/infrastructure/repository/firestore/link/link.repository.js +0 -17
- package/infrastructure/repository/firestore/link/link.repository.js.map +0 -1
- package/infrastructure/repository/firestore/query/index.d.ts +0 -1
- package/infrastructure/repository/firestore/query/index.js +0 -5
- package/infrastructure/repository/firestore/query/index.js.map +0 -1
- package/infrastructure/repository/firestore/query/query.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/query/query.repository.js +0 -20
- package/infrastructure/repository/firestore/query/query.repository.js.map +0 -1
- package/infrastructure/repository/firestore/resource/index.d.ts +0 -1
- package/infrastructure/repository/firestore/resource/index.js +0 -5
- package/infrastructure/repository/firestore/resource/index.js.map +0 -1
- package/infrastructure/repository/firestore/resource/resource.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/resource/resource.repository.js +0 -20
- package/infrastructure/repository/firestore/resource/resource.repository.js.map +0 -1
- package/infrastructure/repository/hasura/query/index.d.ts +0 -1
- package/infrastructure/repository/hasura/query/index.js +0 -5
- package/infrastructure/repository/hasura/query/index.js.map +0 -1
- package/infrastructure/repository/hasura/query/query.repository.d.ts +0 -8
- package/infrastructure/repository/hasura/query/query.repository.js +0 -23
- package/infrastructure/repository/hasura/query/query.repository.js.map +0 -1
- package/infrastructure/repository/hasura/resource/index.d.ts +0 -1
- package/infrastructure/repository/hasura/resource/index.js +0 -5
- package/infrastructure/repository/hasura/resource/index.js.map +0 -1
- package/infrastructure/repository/hasura/resource/resource.repository.d.ts +0 -8
- package/infrastructure/repository/hasura/resource/resource.repository.js +0 -23
- package/infrastructure/repository/hasura/resource/resource.repository.js.map +0 -1
- package/infrastructure/repository/index.d.ts +0 -2
- package/infrastructure/repository/index.js +0 -6
- package/infrastructure/repository/index.js.map +0 -1
- package/infrastructure/repository/notion/contract/contract.config.d.ts +0 -9
- package/infrastructure/repository/notion/contract/contract.config.js +0 -10
- package/infrastructure/repository/notion/contract/contract.config.js.map +0 -1
- package/infrastructure/repository/notion/contract/contract.repository.d.ts +0 -8
- package/infrastructure/repository/notion/contract/contract.repository.js +0 -22
- package/infrastructure/repository/notion/contract/contract.repository.js.map +0 -1
- package/infrastructure/repository/notion/contract/index.d.ts +0 -2
- package/infrastructure/repository/notion/contract/index.js +0 -6
- package/infrastructure/repository/notion/contract/index.js.map +0 -1
- package/infrastructure/repository/notion/index.d.ts +0 -2
- package/infrastructure/repository/notion/index.js +0 -6
- package/infrastructure/repository/notion/index.js.map +0 -1
- package/infrastructure/repository/notion/invoice/index.d.ts +0 -2
- package/infrastructure/repository/notion/invoice/index.js +0 -6
- package/infrastructure/repository/notion/invoice/index.js.map +0 -1
- package/infrastructure/repository/notion/invoice/invoice.config.d.ts +0 -9
- package/infrastructure/repository/notion/invoice/invoice.config.js +0 -10
- package/infrastructure/repository/notion/invoice/invoice.config.js.map +0 -1
- package/infrastructure/repository/notion/invoice/invoice.repository.d.ts +0 -8
- package/infrastructure/repository/notion/invoice/invoice.repository.js +0 -22
- package/infrastructure/repository/notion/invoice/invoice.repository.js.map +0 -1
- package/infrastructure/repository/notion/notion.config.d.ts +0 -17
- package/infrastructure/repository/notion/notion.config.js +0 -18
- package/infrastructure/repository/notion/notion.config.js.map +0 -1
- package/infrastructure/repository/notion/notion.repository.d.ts +0 -11
- package/infrastructure/repository/notion/notion.repository.js +0 -26
- package/infrastructure/repository/notion/notion.repository.js.map +0 -1
- package/infrastructure/repository/notion/order/index.d.ts +0 -1
- package/infrastructure/repository/notion/order/index.js +0 -5
- package/infrastructure/repository/notion/order/index.js.map +0 -1
- package/infrastructure/repository/notion/order/order.config.d.ts +0 -9
- package/infrastructure/repository/notion/order/order.config.js +0 -10
- package/infrastructure/repository/notion/order/order.config.js.map +0 -1
- package/infrastructure/repository/notion/order/order.repository.d.ts +0 -8
- package/infrastructure/repository/notion/order/order.repository.js +0 -22
- package/infrastructure/repository/notion/order/order.repository.js.map +0 -1
- package/infrastructure/repository/notion/partner/index.d.ts +0 -2
- package/infrastructure/repository/notion/partner/index.js +0 -6
- package/infrastructure/repository/notion/partner/index.js.map +0 -1
- package/infrastructure/repository/notion/partner/partner.config.d.ts +0 -9
- package/infrastructure/repository/notion/partner/partner.config.js +0 -10
- package/infrastructure/repository/notion/partner/partner.config.js.map +0 -1
- package/infrastructure/repository/notion/partner/partner.repository.d.ts +0 -8
- package/infrastructure/repository/notion/partner/partner.repository.js +0 -22
- package/infrastructure/repository/notion/partner/partner.repository.js.map +0 -1
- package/infrastructure/repository/redis/index.d.ts +0 -2
- package/infrastructure/repository/redis/index.js +0 -6
- package/infrastructure/repository/redis/index.js.map +0 -1
- package/infrastructure/repository/redis/operator/index.d.ts +0 -1
- package/infrastructure/repository/redis/operator/index.js +0 -5
- package/infrastructure/repository/redis/operator/index.js.map +0 -1
- package/infrastructure/repository/redis/operator/operator.repository.d.ts +0 -5
- package/infrastructure/repository/redis/operator/operator.repository.js +0 -17
- package/infrastructure/repository/redis/operator/operator.repository.js.map +0 -1
- package/infrastructure/repository/redis/project/index.d.ts +0 -1
- package/infrastructure/repository/redis/project/index.js +0 -5
- package/infrastructure/repository/redis/project/index.js.map +0 -1
- package/infrastructure/repository/redis/project/project.repository.d.ts +0 -19
- package/infrastructure/repository/redis/project/project.repository.js +0 -33
- package/infrastructure/repository/redis/project/project.repository.js.map +0 -1
- package/infrastructure/repository/redis/redis.config.d.ts +0 -8
- package/infrastructure/repository/redis/redis.config.js +0 -10
- package/infrastructure/repository/redis/redis.config.js.map +0 -1
- package/infrastructure/repository/redis/redis.service.d.ts +0 -10
- package/infrastructure/repository/redis/redis.service.js +0 -22
- package/infrastructure/repository/redis/redis.service.js.map +0 -1
- package/infrastructure/repository/redis/spec/index.d.ts +0 -1
- package/infrastructure/repository/redis/spec/index.js +0 -5
- package/infrastructure/repository/redis/spec/index.js.map +0 -1
- package/infrastructure/repository/redis/spec/spec.repository.d.ts +0 -17
- package/infrastructure/repository/redis/spec/spec.repository.js +0 -94
- package/infrastructure/repository/redis/spec/spec.repository.js.map +0 -1
- package/infrastructure/repository/redis/system/index.d.ts +0 -1
- package/infrastructure/repository/redis/system/index.js +0 -5
- package/infrastructure/repository/redis/system/index.js.map +0 -1
- package/infrastructure/repository/redis/system/system.repository.d.ts +0 -3
- package/infrastructure/repository/redis/system/system.repository.js +0 -15
- package/infrastructure/repository/redis/system/system.repository.js.map +0 -1
- package/infrastructure/repository/repository.config.d.ts +0 -16
- package/infrastructure/repository/repository.config.js +0 -12
- package/infrastructure/repository/repository.config.js.map +0 -1
- package/infrastructure/repository/repository.service.d.ts +0 -8
- package/infrastructure/repository/repository.service.js +0 -20
- package/infrastructure/repository/repository.service.js.map +0 -1
- package/stores/index.js +0 -66
- package/stores/index.js.map +0 -1
- package/usecase/assistant/assistant.service.d.ts +0 -12
- package/usecase/assistant/assistant.service.js +0 -72
- package/usecase/assistant/assistant.service.js.map +0 -1
- package/usecase/assistant/index.js +0 -5
- package/usecase/assistant/index.js.map +0 -1
- package/usecase/database/database.service.d.ts +0 -31
- package/usecase/database/database.service.js +0 -103
- package/usecase/database/database.service.js.map +0 -1
- package/usecase/database/index.js +0 -5
- package/usecase/database/index.js.map +0 -1
- package/usecase/graphql/graphql.service.d.ts +0 -9
- package/usecase/graphql/graphql.service.js +0 -49
- package/usecase/graphql/graphql.service.js.map +0 -1
- package/usecase/graphql/index.js +0 -5
- package/usecase/graphql/index.js.map +0 -1
- package/usecase/index.js +0 -5
- package/usecase/index.js.map +0 -1
- package/usecase/invoice/index.d.ts +0 -1
- package/usecase/invoice/index.js +0 -5
- package/usecase/invoice/index.js.map +0 -1
- package/usecase/invoice/invoice.service.d.ts +0 -27
- package/usecase/invoice/invoice.service.js +0 -69
- package/usecase/invoice/invoice.service.js.map +0 -1
- package/usecase/link/index.js +0 -5
- package/usecase/link/index.js.map +0 -1
- package/usecase/link/link.service.d.ts +0 -7
- package/usecase/link/link.service.js +0 -20
- package/usecase/link/link.service.js.map +0 -1
- package/usecase/order/index.d.ts +0 -1
- package/usecase/order/index.js +0 -5
- package/usecase/order/index.js.map +0 -1
- package/usecase/order/order.service.d.ts +0 -6
- package/usecase/order/order.service.js +0 -27
- package/usecase/order/order.service.js.map +0 -1
- package/usecase/project/index.js +0 -5
- package/usecase/project/index.js.map +0 -1
- package/usecase/project/project.service.d.ts +0 -10
- package/usecase/project/project.service.js +0 -37
- package/usecase/project/project.service.js.map +0 -1
- package/usecase/spec/index.js +0 -5
- package/usecase/spec/index.js.map +0 -1
- package/usecase/spec/spec.service.d.ts +0 -11
- package/usecase/spec/spec.service.js +0 -49
- package/usecase/spec/spec.service.js.map +0 -1
- package/usecase/usecase.service.d.ts +0 -12
- package/usecase/usecase.service.js +0 -24
- package/usecase/usecase.service.js.map +0 -1
- package/utils/crypto.d.ts +0 -7
- package/utils/crypto.js.map +0 -1
- package/utils/extract-display-fields.d.ts +0 -2
- package/utils/extract-display-fields.js.map +0 -1
- package/utils/index.js +0 -5
- package/utils/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/domain/builder/command-action/index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
interface Schema {
|
|
2
|
-
name: string;
|
|
3
|
-
fields: string[];
|
|
4
|
-
relations: Relation[];
|
|
5
|
-
}
|
|
6
|
-
interface Relation {
|
|
7
|
-
source: string;
|
|
8
|
-
target: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
type?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare class ErBuilder {
|
|
13
|
-
build(databases: any): string;
|
|
14
|
-
parseDatabaseSchema(database: any, name?: string, map?: {
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
}): Schema;
|
|
17
|
-
buildMermaidER(schemas: Schema[]): string;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ErBuilder = void 0;
|
|
4
|
-
const NOTION_PROP_TYPE_MAP = {
|
|
5
|
-
people: 'string',
|
|
6
|
-
unique_id: 'string',
|
|
7
|
-
rich_text: 'string',
|
|
8
|
-
title: 'string',
|
|
9
|
-
text: 'string',
|
|
10
|
-
number: 'number',
|
|
11
|
-
select: 'enum',
|
|
12
|
-
status: 'enum',
|
|
13
|
-
multi_select: 'string',
|
|
14
|
-
date: 'date',
|
|
15
|
-
person: 'string',
|
|
16
|
-
files: 'string',
|
|
17
|
-
checkbox: 'boolean',
|
|
18
|
-
url: 'string',
|
|
19
|
-
email: 'string',
|
|
20
|
-
phone_number: 'string',
|
|
21
|
-
relation: 'string',
|
|
22
|
-
rollup: 'string',
|
|
23
|
-
created_time: 'date',
|
|
24
|
-
created_by: 'string',
|
|
25
|
-
last_edited_time: 'date',
|
|
26
|
-
last_edited_by: 'string',
|
|
27
|
-
};
|
|
28
|
-
const NOTION_KEY_MAP = {
|
|
29
|
-
'relation': 'FK',
|
|
30
|
-
'unique_id': 'UK',
|
|
31
|
-
};
|
|
32
|
-
class ErBuilder {
|
|
33
|
-
build(databases) {
|
|
34
|
-
var _a, _b;
|
|
35
|
-
const schemas = [];
|
|
36
|
-
const dbIdToName = databases.reduce((acc, db) => {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
return (Object.assign(Object.assign({}, acc), { [db.id]: (_b = (_a = db === null || db === void 0 ? void 0 : db.title) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.plain_text }));
|
|
39
|
-
}, {});
|
|
40
|
-
for (const database of databases) {
|
|
41
|
-
const schema = this.parseDatabaseSchema(database, (_b = (_a = database === null || database === void 0 ? void 0 : database.title) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.plain_text, dbIdToName);
|
|
42
|
-
schemas.push(schema);
|
|
43
|
-
}
|
|
44
|
-
return this.buildMermaidER(schemas);
|
|
45
|
-
}
|
|
46
|
-
parseDatabaseSchema(database, name = '', map = {}) {
|
|
47
|
-
const properties = database.properties;
|
|
48
|
-
const fields = [];
|
|
49
|
-
const relations = [];
|
|
50
|
-
Object.keys(properties)
|
|
51
|
-
.filter(propName => {
|
|
52
|
-
if (['formula', 'rollup', 'button'].includes(properties[propName].type))
|
|
53
|
-
return false;
|
|
54
|
-
return true;
|
|
55
|
-
})
|
|
56
|
-
.sort()
|
|
57
|
-
.forEach(propName => {
|
|
58
|
-
var _a;
|
|
59
|
-
const prop = properties[propName];
|
|
60
|
-
const type = prop.type;
|
|
61
|
-
const mappedType = NOTION_PROP_TYPE_MAP[type];
|
|
62
|
-
const key = (_a = NOTION_KEY_MAP[type]) !== null && _a !== void 0 ? _a : ' ';
|
|
63
|
-
const field = `${mappedType} ${type} ${key} "${propName}"`;
|
|
64
|
-
fields.push(field);
|
|
65
|
-
// リレーションシップの解析
|
|
66
|
-
if (type === 'relation') {
|
|
67
|
-
const relation = prop['relation'];
|
|
68
|
-
if (relation && relation.database_id) {
|
|
69
|
-
const targetDbId = relation.database_id;
|
|
70
|
-
const targetDbName = map[targetDbId] || 'Unknown';
|
|
71
|
-
relations.push({
|
|
72
|
-
source: name,
|
|
73
|
-
target: targetDbName,
|
|
74
|
-
label: propName,
|
|
75
|
-
type: '||--||', // リレーションのタイプを適宜設定
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
else if (relation && Array.isArray(relation)) {
|
|
79
|
-
relation.forEach(rel => {
|
|
80
|
-
const targetDbId = rel.database_id;
|
|
81
|
-
const targetDbName = map[targetDbId] || 'Unknown';
|
|
82
|
-
relations.push({
|
|
83
|
-
source: name,
|
|
84
|
-
target: targetDbName,
|
|
85
|
-
label: propName,
|
|
86
|
-
type: '||--o{',
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
return { name, fields, relations };
|
|
93
|
-
}
|
|
94
|
-
buildMermaidER(schemas) {
|
|
95
|
-
let mermaid = 'erDiagram\n';
|
|
96
|
-
// エンティティの定義
|
|
97
|
-
schemas.forEach(schema => {
|
|
98
|
-
mermaid += ` "${schema.name}" {\n`;
|
|
99
|
-
mermaid += schema.fields.map(field => ` ${field}`).join('\n');
|
|
100
|
-
mermaid += '\n }\n';
|
|
101
|
-
});
|
|
102
|
-
// リレーションシップの定義
|
|
103
|
-
schemas.forEach(schema => {
|
|
104
|
-
schema.relations.forEach(relation => {
|
|
105
|
-
mermaid += ` "${relation.source}" ${relation.type} "${relation.target}" : "${relation.label}"\n`;
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
return mermaid;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
exports.ErBuilder = ErBuilder;
|
|
112
|
-
//# sourceMappingURL=er.builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"er.builder.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/domain/builder/er/er.builder.ts"],"names":[],"mappings":";;;AAaA,MAAM,oBAAoB,GAAG;IAC3B,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,SAAS;IACnB,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,QAAQ;IACf,YAAY,EAAE,QAAQ;IACtB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,MAAM;IACpB,UAAU,EAAE,QAAQ;IACpB,gBA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AI,CAAC;4BACb,MAAM,EAAE,IAAI;4BACZ,MAAM,EAAE,YAAY;4BACpB,KAAK,EAAE,QAAQ;4BACf,IAAI,EAAE,QAAQ;yBACf,CAAC,CAAC;oBACL,CAAC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QAEL,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IACrC,CAAC;IAED,cAAc,CAAC,OAAiB;QAC9B,IAAI,OAAO,GAAG,aAAa,CAAC;QAE5B,YAAY;QACZ,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACvB,OAAO,IAAI,MAAM,MAAM,CAAC,IAAI,OAAO,CAAC;YACpC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjE,OAAO,IAAI,SAAS,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,eAAe;QACf,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACvB,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAClC,OAAO,IAAI,MAAM,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,MAAM,QAAQ,QAAQ,CAAC,KAAK,KAAK,CAAC;YACpG,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAtFD,8BAsFC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './er.builder';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/domain/builder/er/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/index.ts"],"names":[],"mappings":";;;AAAA,gEAAsC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"screen-item.builder.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/screen-item.builder.ts"],"names":[],"mappings":";;;AAIA,SAAS,aAAa,CACpB,QAAmD,EACnD,QAAgB,EAChB,MAAc;;IAEd,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;QACtB,KAAK,QAAQ,CAAC,CAAC,OAAO;YACpB,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,UAAU;YAChB,cAAc,EAAE,MAAM;YACtB,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,QAAQ;YACnB,MAAM;SACP,CAAC;QACF,KAAK,cAAc,CAAC,CAAC,OAAO;YAC1B,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,UAAU;YAChB,cAAc,EAAE,SAAS;YACzB,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,QAAQ;YACnB,MAAM;SACP,CAAA;QACD,KAAK,UAAU,CAAC,CAAC,OAAO;YACtB,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,UAAU;YAChB,cAAc,EAAE,QAAQ;YACxB,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,QAAQ;YACnB,MAAM;SACP,CAAA;QACD,KAAK,QAAQ,CAAC,CAAC,OAAO;YACpB,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,IAAI;YACV,cAAc,EAAE,QAAQ;YACxB,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,QAAQ;YACnB,MAAM;SACP,CAAA;QACD,K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AAE,IAAI,CAAC,EAAE,EAAE;YAC7B,8CAA8C;YAC9C,0CAA0C;YAC1C,gDAAgD;YAChD,yEAAyE;YACzE,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE;;YAC9B,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAA,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,0CAAG,CAAC,CAAC,0CAAE,UAAU,mCAAI,EAAE,CAAC,CAAC;YACnF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAnBD,8CAmBC"}
|
package/domain/index.js
DELETED
package/domain/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/domain/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Invoice } from "@xxmachina/common/domain/invoice/models";
|
|
2
|
-
import { MessageBuilder } from "../message";
|
|
3
|
-
export declare class Email {
|
|
4
|
-
static EMPTY: {
|
|
5
|
-
to: string;
|
|
6
|
-
cc: string;
|
|
7
|
-
title: string;
|
|
8
|
-
body: string;
|
|
9
|
-
};
|
|
10
|
-
to: string;
|
|
11
|
-
cc: string;
|
|
12
|
-
title: string;
|
|
13
|
-
body: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class EmailBuilder {
|
|
16
|
-
protected readonly mesageBuilder: MessageBuilder;
|
|
17
|
-
build(invoice: Invoice): Email;
|
|
18
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmailBuilder = exports.Email = void 0;
|
|
4
|
-
const message_1 = require("../message");
|
|
5
|
-
class Email {
|
|
6
|
-
}
|
|
7
|
-
exports.Email = Email;
|
|
8
|
-
Email.EMPTY = {
|
|
9
|
-
to: '',
|
|
10
|
-
cc: '',
|
|
11
|
-
title: '',
|
|
12
|
-
body: '',
|
|
13
|
-
};
|
|
14
|
-
class EmailBuilder {
|
|
15
|
-
constructor() {
|
|
16
|
-
this.mesageBuilder = new message_1.MessageBuilder();
|
|
17
|
-
}
|
|
18
|
-
build(invoice) {
|
|
19
|
-
var _a, _b, _c, _d;
|
|
20
|
-
return {
|
|
21
|
-
to: (_a = invoice === null || invoice === void 0 ? void 0 : invoice.customer) === null || _a === void 0 ? void 0 : _a.billingEmail,
|
|
22
|
-
cc: (_b = invoice === null || invoice === void 0 ? void 0 : invoice.vendor) === null || _b === void 0 ? void 0 : _b.email,
|
|
23
|
-
title: `[${(_d = (_c = invoice === null || invoice === void 0 ? void 0 : invoice.vendor) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : '{{invoice.vendor.name}}'}] 請求書ご送付のお知らせ`,
|
|
24
|
-
body: this.mesageBuilder.build(invoice),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.EmailBuilder = EmailBuilder;
|
|
29
|
-
//# sourceMappingURL=email.builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email.builder.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/builders/email/email.builder.ts"],"names":[],"mappings":";;;AACA,wCAA4C;AAE5C,MAAa,KAAK;;AAAlB,sBAYC;AAXQ,WAAK,GAAG;IACb,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,EAAE;CACT,CAAC;AAQJ,MAAa,YAAY;IAAzB;QACqB,kBAAa,GAAG,IAAI,wBAAc,EAAE,CAAC;IAU1D,CAAC;IARC,KAAK,CAAC,OAAgB;;QACpB,OAAO;YACL,EAAE,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,YAAY;YACnC,EAAE,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,KAAK;YAC1B,KAAK,EAAE,IAAI,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,IAAI,mCAAI,yBAAyB,eAAe;YAC5E,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC;SACxC,CAAA;IACH,CAAC;CACF;AAXD,oCAWC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './email.builder';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/builders/email/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './message.builder';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/builders/message/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageBuilder = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const message_1 = require("@nx-ddd/common/utilities/message");
|
|
6
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
7
|
-
class MessageBuilder {
|
|
8
|
-
getInvoiceRange(invoice) {
|
|
9
|
-
var _a, _b;
|
|
10
|
-
const start = ((_a = invoice === null || invoice === void 0 ? void 0 : invoice.orders) !== null && _a !== void 0 ? _a : []).reduce((acc, order) => {
|
|
11
|
-
var _a;
|
|
12
|
-
const startDate = (_a = order === null || order === void 0 ? void 0 : order.startDate) !== null && _a !== void 0 ? _a : (0, dayjs_1.default)('2200-12-31');
|
|
13
|
-
return acc.isBefore(startDate) ? acc : startDate;
|
|
14
|
-
}, (0, dayjs_1.default)('2200-12-31'));
|
|
15
|
-
const end = ((_b = invoice === null || invoice === void 0 ? void 0 : invoice.orders) !== null && _b !== void 0 ? _b : []).reduce((acc, order) => {
|
|
16
|
-
var _a;
|
|
17
|
-
const endDate = (_a = order === null || order === void 0 ? void 0 : order.endDate) !== null && _a !== void 0 ? _a : (0, dayjs_1.default)('1970-01-01');
|
|
18
|
-
return acc.isAfter(endDate) ? acc : endDate;
|
|
19
|
-
}, (0, dayjs_1.default)('1970-01-01'));
|
|
20
|
-
return { start, end };
|
|
21
|
-
}
|
|
22
|
-
getInvoicePeriod(invoice) {
|
|
23
|
-
var _a, _b;
|
|
24
|
-
const { start, end } = this.getInvoiceRange(invoice);
|
|
25
|
-
return `${(_a = start === null || start === void 0 ? void 0 : start.format('YYYY年M月D日')) !== null && _a !== void 0 ? _a : ''}~${(_b = end === null || end === void 0 ? void 0 : end.format('YYYY年M月D日')) !== null && _b !== void 0 ? _b : ''}`;
|
|
26
|
-
}
|
|
27
|
-
build(invoice) {
|
|
28
|
-
var _a, _b, _c, _d, _e, _f;
|
|
29
|
-
return (0, message_1.message) `${(_a = invoice === null || invoice === void 0 ? void 0 : invoice.customer) === null || _a === void 0 ? void 0 : _a.name}
|
|
30
|
-
${(_c = (_b = invoice === null || invoice === void 0 ? void 0 : invoice.customer) === null || _b === void 0 ? void 0 : _b.billingContact) !== null && _c !== void 0 ? _c : 'ご担当者'}様
|
|
31
|
-
|
|
32
|
-
お世話になっております。
|
|
33
|
-
${'〇〇'}です。
|
|
34
|
-
|
|
35
|
-
${this.getInvoicePeriod(invoice)}の請求書をご用意ができましたのでお送りさせていただきます。
|
|
36
|
-
ご確認のほど、よろしくお願いいたします。
|
|
37
|
-
|
|
38
|
-
${((_d = invoice === null || invoice === void 0 ? void 0 : invoice.vendor) === null || _d === void 0 ? void 0 : _d.type) !== '個人事業主' ? (_e = invoice === null || invoice === void 0 ? void 0 : invoice.vendor) === null || _e === void 0 ? void 0 : _e.name : ''}
|
|
39
|
-
${(_f = invoice === null || invoice === void 0 ? void 0 : invoice.vendor) === null || _f === void 0 ? void 0 : _f.contact}`;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.MessageBuilder = MessageBuilder;
|
|
43
|
-
//# sourceMappingURL=message.builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.builder.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/builders/message/message.builder.ts"],"names":[],"mappings":";;;;AACA,8DAA2D;AAC3D,0DAA0B;AAE1B,MAAa,cAAc;IACjB,eAAe,CAAC,OAAgB;;QACtC,MAAM,KAAK,GAAG,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;;YAC1D,MAAM,SAAS,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,mCAAI,IAAA,eAAK,EAAC,YAAY,CAAC,CAAC;YAC1D,OAAO,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QACnD,CAAC,EAAE,IAAA,eAAK,EAAC,YAAY,CAAC,CAAC,CAAC;QACxB,MAAM,GAAG,GAAG,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;;YACxD,MAAM,OAAO,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KA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
|
-
export * from './title.builder';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/builders/title/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TitleBuilder = void 0;
|
|
4
|
-
class TitleBuilder {
|
|
5
|
-
build(invoice) {
|
|
6
|
-
var _a, _b, _c;
|
|
7
|
-
return `[${(_b = (_a = invoice === null || invoice === void 0 ? void 0 : invoice.customer) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '{{invoice.vendor.name}}'}様] invoice_${(_c = invoice === null || invoice === void 0 ? void 0 : invoice.dueDate) === null || _c === void 0 ? void 0 : _c.toISOString()}`;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.TitleBuilder = TitleBuilder;
|
|
11
|
-
//# sourceMappingURL=title.builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"title.builder.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/builders/title/title.builder.ts"],"names":[],"mappings":";;;AAEA,MAAa,YAAY;IACvB,KAAK,CAAC,OAAgB;;QACpB,OAAO,IAAI,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,IAAI,mCAAI,yBAAyB,cAAc,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,WAAW,EAAE,EAAE,CAAC;IACjH,CAAC;CACF;AAJD,oCAIC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Entity } from "@nx-ddd/common/domain/models";
|
|
2
|
-
import dayjs from "dayjs";
|
|
3
|
-
export declare class Contract extends Entity {
|
|
4
|
-
id: string;
|
|
5
|
-
no: number;
|
|
6
|
-
title: string;
|
|
7
|
-
issueDate: dayjs.Dayjs;
|
|
8
|
-
orderIds: string[];
|
|
9
|
-
static from(params: Contract): Contract;
|
|
10
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var Contract_1;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Contract = void 0;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const models_1 = require("@nx-ddd/common/domain/models");
|
|
7
|
-
const decorators_1 = require("@nx-ddd/notion/decorators");
|
|
8
|
-
const decorators_2 = require("@xxmachina/common/_shared/meta/decorators");
|
|
9
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
10
|
-
let Contract = Contract_1 = class Contract extends models_1.Entity {
|
|
11
|
-
static from(params) {
|
|
12
|
-
const instance = Object.assign(new Contract_1(), Object.assign({}, params));
|
|
13
|
-
return instance;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
exports.Contract = Contract;
|
|
17
|
-
tslib_1.__decorate([
|
|
18
|
-
(0, decorators_2.Field)(() => decorators_2.ID, { nullable: true }),
|
|
19
|
-
models_1.Domain.Lang('ID'),
|
|
20
|
-
tslib_1.__metadata("design:type", String)
|
|
21
|
-
], Contract.prototype, "id", void 0);
|
|
22
|
-
tslib_1.__decorate([
|
|
23
|
-
(0, decorators_2.Field)(() => Number, { nullable: true }),
|
|
24
|
-
models_1.Domain.Lang('番号'),
|
|
25
|
-
decorators_1.Notion.UniqueID('no'),
|
|
26
|
-
tslib_1.__metadata("design:type", Number)
|
|
27
|
-
], Contract.prototype, "no", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
(0, decorators_2.Field)(() => String, { nullable: false }),
|
|
30
|
-
decorators_1.Notion.Title('件名'),
|
|
31
|
-
models_1.Domain.Lang('件名'),
|
|
32
|
-
tslib_1.__metadata("design:type", String)
|
|
33
|
-
], Contract.prototype, "title", void 0);
|
|
34
|
-
tslib_1.__decorate([
|
|
35
|
-
(0, decorators_2.Field)(() => Date, { nullable: true }),
|
|
36
|
-
decorators_1.Notion.Date('発行日'),
|
|
37
|
-
models_1.Domain.Lang('発行日'),
|
|
38
|
-
tslib_1.__metadata("design:type", dayjs_1.default.Dayjs)
|
|
39
|
-
], Contract.prototype, "issueDate", void 0);
|
|
40
|
-
tslib_1.__decorate([
|
|
41
|
-
(0, decorators_2.Field)(() => [String], { nullable: true }),
|
|
42
|
-
decorators_1.Notion.Relation('注文一覧', { multi: true }),
|
|
43
|
-
models_1.Domain.Lang('注文一覧'),
|
|
44
|
-
tslib_1.__metadata("design:type", Array)
|
|
45
|
-
], Contract.prototype, "orderIds", void 0);
|
|
46
|
-
exports.Contract = Contract = Contract_1 = tslib_1.__decorate([
|
|
47
|
-
(0, decorators_2.ObjectType)(),
|
|
48
|
-
models_1.Domain.Entity({ name: '契約' })
|
|
49
|
-
], Contract);
|
|
50
|
-
//# sourceMappingURL=contract.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/models/backoffice/contract.ts"],"names":[],"mappings":";;;;;AAAA,yDAA8D;AAC9D,0DAAmD;AACnD,0EAAkF;AAClF,0DAA0B;AAKnB,IAAM,QAAQ,gBAAd,MAAM,QAAS,SAAQ,eAAM;IAyBlC,MAAM,CAAC,IAAI,CAAC,MAAgB;QAC1B,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,UAAQ,EAAE,oBAAM,MAAM,EAAE,CAAC;QAC5D,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AA7BY,4BAAQ;AAGnB;IAFC,IAAA,kBAAK,EAAC,GAAG,EAAE,CAAC,eAAE,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IACjC,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC;;oCACN;AAKZ;IAHC,IAAA,kBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IACrC,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACjB,mBAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;;oCACX;AAKX;IAHC,IAAA,kBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC;IACtC,mBAAM,CAAC,KAAK,CAAC,IAAI,CAAC;IAClB,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC;;uCACJ;AAKd;IAHC,IAAA,kBAAK,EAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IACnC,mBAAM,CAAC,IAAI,CAAC,KAAK,CAAC;IAClB,eAAM,CAAC,IAAI,CAAC,KAAK,CAAC;sCACR,eAAK,CAAC,KAAK;2CAAC;AAKvB;IAHC,IAAA,kBAAK,EAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IACvC,mBAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC;IACtC,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC;;0CACD;mBAvBR,QAAQ;IAFpB,IAAA,uBAAU,GAAE;IACZ,eAAM,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC;GACf,QAAQ,CA6BpB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./contract"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./order"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./partner"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./invoice-mail"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./invoice"), exports);
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/models/backoffice/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,kDAAwB;AACxB,oDAA0B;AAC1B,yDAA+B;AAC/B,oDAA0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoice-mail.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/models/backoffice/invoice-mail.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;CAMvB;AAND,kCAMC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Entity } from "@nx-ddd/common/domain/models";
|
|
2
|
-
import dayjs from "dayjs";
|
|
3
|
-
import { Order } from "./order";
|
|
4
|
-
import { Partner } from './partner';
|
|
5
|
-
export declare class Invoice extends Entity {
|
|
6
|
-
id: string;
|
|
7
|
-
no: number;
|
|
8
|
-
title: string;
|
|
9
|
-
subject: string;
|
|
10
|
-
customerId: string;
|
|
11
|
-
customer?: Partner;
|
|
12
|
-
vendorId: string;
|
|
13
|
-
vendor?: Partner;
|
|
14
|
-
amount: number;
|
|
15
|
-
dueDate: dayjs.Dayjs;
|
|
16
|
-
orderIds: string[];
|
|
17
|
-
orders?: Order[];
|
|
18
|
-
static from(data: Partial<Invoice>): Invoice & Partial<Invoice>;
|
|
19
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var Invoice_1;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Invoice = void 0;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const decorators_1 = require("@xxmachina/common/_shared/meta/decorators");
|
|
7
|
-
const models_1 = require("@nx-ddd/common/domain/models");
|
|
8
|
-
const notion = tslib_1.__importStar(require("@nx-ddd/notion/decorators"));
|
|
9
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
10
|
-
const order_1 = require("./order");
|
|
11
|
-
const partner_1 = require("./partner");
|
|
12
|
-
const class_transformer_1 = require("class-transformer");
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
let Invoice = Invoice_1 = class Invoice extends models_1.Entity {
|
|
15
|
-
static from(data) {
|
|
16
|
-
return Object.assign(new Invoice_1(), data);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
exports.Invoice = Invoice;
|
|
20
|
-
tslib_1.__decorate([
|
|
21
|
-
(0, decorators_1.Field)(() => decorators_1.ID, { nullable: true }),
|
|
22
|
-
models_1.Domain.Lang('番号'),
|
|
23
|
-
tslib_1.__metadata("design:type", String)
|
|
24
|
-
], Invoice.prototype, "id", void 0);
|
|
25
|
-
tslib_1.__decorate([
|
|
26
|
-
(0, decorators_1.Field)(() => Number, { nullable: true }),
|
|
27
|
-
notion.UniqueID('no'),
|
|
28
|
-
models_1.Domain.Lang('no'),
|
|
29
|
-
tslib_1.__metadata("design:type", Number)
|
|
30
|
-
], Invoice.prototype, "no", void 0);
|
|
31
|
-
tslib_1.__decorate([
|
|
32
|
-
(0, decorators_1.Field)(() => String, { nullable: true }),
|
|
33
|
-
notion.Title('タイトル'),
|
|
34
|
-
models_1.Domain.Lang('タイトル'),
|
|
35
|
-
tslib_1.__metadata("design:type", String)
|
|
36
|
-
], Invoice.prototype, "title", void 0);
|
|
37
|
-
tslib_1.__decorate([
|
|
38
|
-
(0, decorators_1.Field)(() => String, { nullable: true }),
|
|
39
|
-
notion.RichText('件名'),
|
|
40
|
-
models_1.Domain.Lang('件名'),
|
|
41
|
-
tslib_1.__metadata("design:type", String)
|
|
42
|
-
], Invoice.prototype, "subject", void 0);
|
|
43
|
-
tslib_1.__decorate([
|
|
44
|
-
(0, decorators_1.Field)(() => String, { nullable: true }),
|
|
45
|
-
notion.Relation('請求先'),
|
|
46
|
-
models_1.Domain.Lang('請求先'),
|
|
47
|
-
tslib_1.__metadata("design:type", String)
|
|
48
|
-
], Invoice.prototype, "customerId", void 0);
|
|
49
|
-
tslib_1.__decorate([
|
|
50
|
-
(0, class_transformer_1.Type)(() => partner_1.Partner),
|
|
51
|
-
tslib_1.__metadata("design:type", partner_1.Partner)
|
|
52
|
-
], Invoice.prototype, "customer", void 0);
|
|
53
|
-
tslib_1.__decorate([
|
|
54
|
-
(0, decorators_1.Field)(() => String, { nullable: true }),
|
|
55
|
-
notion.Relation('受託先'),
|
|
56
|
-
models_1.Domain.Lang('受託先'),
|
|
57
|
-
tslib_1.__metadata("design:type", String)
|
|
58
|
-
], Invoice.prototype, "vendorId", void 0);
|
|
59
|
-
tslib_1.__decorate([
|
|
60
|
-
(0, class_transformer_1.Type)(() => partner_1.Partner),
|
|
61
|
-
tslib_1.__metadata("design:type", partner_1.Partner)
|
|
62
|
-
], Invoice.prototype, "vendor", void 0);
|
|
63
|
-
tslib_1.__decorate([
|
|
64
|
-
(0, decorators_1.Field)(() => Number, { nullable: true }),
|
|
65
|
-
notion.Rollup('請求金額(税込)', { multi: false }),
|
|
66
|
-
models_1.Domain.Lang('請求金額(税込)'),
|
|
67
|
-
tslib_1.__metadata("design:type", Number)
|
|
68
|
-
], Invoice.prototype, "amount", void 0);
|
|
69
|
-
tslib_1.__decorate([
|
|
70
|
-
(0, decorators_1.Field)(() => Date, { nullable: true }),
|
|
71
|
-
notion.Date('支払期日'),
|
|
72
|
-
models_1.Domain.Lang('支払期日'),
|
|
73
|
-
(0, models_1.TransformToDayjs)(),
|
|
74
|
-
tslib_1.__metadata("design:type", dayjs_1.default.Dayjs)
|
|
75
|
-
], Invoice.prototype, "dueDate", void 0);
|
|
76
|
-
tslib_1.__decorate([
|
|
77
|
-
(0, decorators_1.Field)(() => [String], { nullable: true }),
|
|
78
|
-
notion.Relation('請求内容', { multi: true }),
|
|
79
|
-
models_1.Domain.Lang('請求内容'),
|
|
80
|
-
tslib_1.__metadata("design:type", Array)
|
|
81
|
-
], Invoice.prototype, "orderIds", void 0);
|
|
82
|
-
tslib_1.__decorate([
|
|
83
|
-
(0, class_validator_1.ValidateNested)(),
|
|
84
|
-
(0, class_transformer_1.Type)(() => order_1.Order),
|
|
85
|
-
tslib_1.__metadata("design:type", Array)
|
|
86
|
-
], Invoice.prototype, "orders", void 0);
|
|
87
|
-
exports.Invoice = Invoice = Invoice_1 = tslib_1.__decorate([
|
|
88
|
-
(0, decorators_1.ObjectType)(),
|
|
89
|
-
models_1.Domain.Entity({ name: '請求' })
|
|
90
|
-
], Invoice);
|
|
91
|
-
//# sourceMappingURL=invoice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/domain/invoice/models/backoffice/invoice.ts"],"names":[],"mappings":";;;;;AAAA,0EAAkF;AAClF,yDAAgF;AAChF,0EAAoD;AACpD,0DAA0B;AAC1B,mCAAgC;AAChC,uCAAoC;AACpC,yDAAyC;AACzC,qDAAiD;AAI1C,IAAM,OAAO,eAAb,MAAM,OAAQ,SAAQ,eAAM;IAwDjC,MAAM,CAAC,IAAI,CAAC,IAAsB;QAChC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,SAAO,EAAE,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;CACF,CAAA;AA3DY,0BAAO;AAGlB;IAFC,IAAA,kBAAK,EAAC,GAAG,EAAE,CAAC,eAAE,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IACjC,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC;;mCACP;AAKX;IAHC,IAAA,kBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC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