@xxmachina/common 19.0.0-preview.9 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_shared/auth/index.d.ts +8 -1
- package/_shared/auth/passports/anonymous/index.d.ts +8 -1
- package/_shared/auth/passports/firebase/index.d.ts +19 -2
- package/_shared/auth/passports/internal/index.d.ts +17 -1
- package/_shared/auth/passports/msal/index.d.ts +26 -2
- package/_shared/meta/index.d.ts +8 -0
- package/_shared/meta/redis/index.d.ts +39 -2
- package/auth/index.d.ts +16 -1
- package/azure-auth/index.d.ts +41 -2
- package/domain/builder/index.d.ts +81 -0
- package/domain/builder/screen-item/index.d.ts +7 -1
- package/domain/index.d.ts +2 -1
- package/domain/models/index.d.ts +377 -13
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs +20 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs +41 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs +34 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs +49 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth.mjs +25 -0
- package/fesm2022/xxmachina-common-_shared-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs +99 -0
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-meta.mjs +26 -0
- package/fesm2022/xxmachina-common-_shared-meta.mjs.map +1 -0
- package/fesm2022/xxmachina-common-auth.mjs +17 -0
- package/fesm2022/xxmachina-common-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-azure-auth.mjs +160 -0
- package/fesm2022/xxmachina-common-azure-auth.mjs.map +1 -0
- package/{domain/builder/screen-item/screen-item.builder.js → fesm2022/xxmachina-common-domain-builder-screen-item.mjs} +10 -11
- package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs +494 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-models.mjs +842 -0
- package/fesm2022/xxmachina-common-domain-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain.mjs +7 -0
- package/fesm2022/xxmachina-common-domain.mjs.map +1 -0
- package/fesm2022/xxmachina-common-firebase-auth.mjs +36 -0
- package/fesm2022/xxmachina-common-firebase-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-converters-google.mjs +39 -0
- package/fesm2022/xxmachina-common-infra-converters-google.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs +13 -0
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs +61 -0
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-resend.mjs +10 -0
- package/fesm2022/xxmachina-common-infra-external-resend.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external.mjs +36 -0
- package/fesm2022/xxmachina-common-infra-external.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs +34 -0
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs +20 -0
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs +18 -0
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs +74 -0
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs +41 -0
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs +113 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra.mjs +378 -0
- package/fesm2022/xxmachina-common-infra.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-builders.mjs +79 -0
- package/fesm2022/xxmachina-common-invoice-domain-builders.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-models.mjs +428 -0
- package/fesm2022/xxmachina-common-invoice-domain-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-resolvers.mjs +41 -0
- package/fesm2022/xxmachina-common-invoice-domain-resolvers.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain.mjs +8 -0
- package/fesm2022/xxmachina-common-invoice-domain.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-contract.mjs +27 -0
- package/fesm2022/xxmachina-common-invoice-usecase-contract.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs +191 -0
- package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-order.mjs +36 -0
- package/fesm2022/xxmachina-common-invoice-usecase-order.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs +36 -0
- package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-graphql.mjs +60 -0
- package/fesm2022/xxmachina-common-services-graphql.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-query-config.mjs +44 -0
- package/fesm2022/xxmachina-common-services-query-config.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-query.mjs +65 -0
- package/fesm2022/xxmachina-common-services-query.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-speech.mjs +178 -0
- package/fesm2022/xxmachina-common-services-speech.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-transformer.mjs +27 -0
- package/fesm2022/xxmachina-common-services-transformer.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-firestore.mjs +33 -0
- package/fesm2022/xxmachina-common-stores-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-hasura.mjs +32 -0
- package/fesm2022/xxmachina-common-stores-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-inmemory.mjs +102 -0
- package/fesm2022/xxmachina-common-stores-inmemory.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores.mjs +16 -0
- package/fesm2022/xxmachina-common-stores.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-assistant.mjs +67 -0
- package/fesm2022/xxmachina-common-usecase-assistant.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-database.mjs +95 -0
- package/fesm2022/xxmachina-common-usecase-database.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-graphql.mjs +51 -0
- package/fesm2022/xxmachina-common-usecase-graphql.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-link.mjs +26 -0
- package/fesm2022/xxmachina-common-usecase-link.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-project.mjs +35 -0
- package/fesm2022/xxmachina-common-usecase-project.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-spec.mjs +45 -0
- package/fesm2022/xxmachina-common-usecase-spec.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase.mjs +198 -0
- package/fesm2022/xxmachina-common-usecase.mjs.map +1 -0
- package/{utils/crypto.js → fesm2022/xxmachina-common-utils-crypto.mjs} +10 -12
- package/fesm2022/xxmachina-common-utils-crypto.mjs.map +1 -0
- package/{utils/extract-display-fields.js → fesm2022/xxmachina-common-utils.mjs} +7 -4
- package/fesm2022/xxmachina-common-utils.mjs.map +1 -0
- package/fesm2022/xxmachina-common.mjs +6 -0
- package/fesm2022/xxmachina-common.mjs.map +1 -0
- package/firebase-auth/index.d.ts +6 -0
- package/index.d.ts +1 -0
- package/infra/converters/google/index.d.ts +17 -0
- package/infra/external/data-connect/index.d.ts +7 -0
- package/infra/external/index.d.ts +24 -0
- package/infra/external/quick-js/index.d.ts +24 -0
- package/infra/external/resend/index.d.ts +16 -0
- package/infra/index.d.ts +218 -0
- package/infra/query/firestore/index.d.ts +20 -0
- package/infra/query/hasura/index.d.ts +9 -0
- package/infra/repository/dataconnect/index.d.ts +28 -0
- package/infra/repository/firestore/index.d.ts +42 -0
- package/infra/repository/hasura/index.d.ts +24 -0
- package/infra/repository/notion/index.d.ts +101 -0
- package/invoice/domain/builders/index.d.ts +31 -0
- package/invoice/domain/index.d.ts +3 -0
- package/invoice/domain/models/index.d.ts +78 -0
- package/{domain/resolvers/invoice.resolver.d.ts → invoice/domain/resolvers/index.d.ts} +6 -2
- package/invoice/usecase/contract/index.d.ts +14 -0
- package/invoice/usecase/invoice/index.d.ts +34 -0
- package/invoice/usecase/order/index.d.ts +16 -0
- package/invoice/usecase/partner/index.d.ts +16 -0
- package/package.json +238 -14
- package/services/graphql/index.d.ts +32 -0
- package/services/query/config/index.d.ts +18 -0
- package/services/query/index.d.ts +29 -0
- package/services/speech/index.d.ts +37 -0
- package/services/transformer/index.d.ts +14 -0
- package/stores/firestore/index.d.ts +17 -0
- package/stores/hasura/index.d.ts +17 -0
- package/stores/index.d.ts +22 -40
- package/stores/inmemory/index.d.ts +33 -0
- package/usecase/assistant/index.d.ts +18 -1
- package/usecase/database/index.d.ts +39 -1
- package/usecase/graphql/index.d.ts +17 -1
- package/usecase/index.d.ts +73 -1
- package/usecase/link/index.d.ts +13 -1
- package/usecase/project/index.d.ts +16 -1
- package/usecase/spec/index.d.ts +17 -1
- package/utils/crypto/index.d.ts +9 -0
- package/utils/index.d.ts +5 -1
- package/README.md +0 -11
- package/_shared/auth/auth.module.d.ts +0 -6
- package/_shared/auth/auth.module.js +0 -22
- package/_shared/auth/auth.module.js.map +0 -1
- package/_shared/auth/index.js +0 -5
- package/_shared/auth/index.js.map +0 -1
- package/_shared/auth/passports/anonymous/anonymous.strategy.d.ts +0 -6
- package/_shared/auth/passports/anonymous/anonymous.strategy.js +0 -19
- package/_shared/auth/passports/anonymous/anonymous.strategy.js.map +0 -1
- package/_shared/auth/passports/anonymous/index.js +0 -5
- package/_shared/auth/passports/anonymous/index.js.map +0 -1
- package/_shared/auth/passports/firebase/firebase.guard.d.ts +0 -6
- package/_shared/auth/passports/firebase/firebase.guard.js +0 -23
- package/_shared/auth/passports/firebase/firebase.guard.js.map +0 -1
- package/_shared/auth/passports/firebase/firebase.strategy.d.ts +0 -10
- package/_shared/auth/passports/firebase/firebase.strategy.js +0 -22
- package/_shared/auth/passports/firebase/firebase.strategy.js.map +0 -1
- package/_shared/auth/passports/firebase/index.js +0 -6
- package/_shared/auth/passports/firebase/index.js.map +0 -1
- package/_shared/auth/passports/internal/index.js +0 -5
- package/_shared/auth/passports/internal/index.js.map +0 -1
- package/_shared/auth/passports/internal/internal.strategy.d.ts +0 -14
- package/_shared/auth/passports/internal/internal.strategy.js +0 -33
- package/_shared/auth/passports/internal/internal.strategy.js.map +0 -1
- package/_shared/auth/passports/msal/index.js +0 -6
- package/_shared/auth/passports/msal/index.js.map +0 -1
- package/_shared/auth/passports/msal/msal.guard.d.ts +0 -4
- package/_shared/auth/passports/msal/msal.guard.js +0 -13
- package/_shared/auth/passports/msal/msal.guard.js.map +0 -1
- package/_shared/auth/passports/msal/msal.strategy.d.ts +0 -17
- package/_shared/auth/passports/msal/msal.strategy.js +0 -43
- package/_shared/auth/passports/msal/msal.strategy.js.map +0 -1
- package/_shared/meta/decorators.d.ts +0 -4
- package/_shared/meta/decorators.js +0 -25
- package/_shared/meta/decorators.js.map +0 -1
- package/_shared/meta/redis/index.js +0 -6
- package/_shared/meta/redis/index.js.map +0 -1
- package/_shared/meta/redis/redis.config.d.ts +0 -9
- package/_shared/meta/redis/redis.config.js +0 -10
- package/_shared/meta/redis/redis.config.js.map +0 -1
- package/_shared/meta/redis/redis.repository.d.ts +0 -23
- package/_shared/meta/redis/redis.repository.js +0 -108
- package/_shared/meta/redis/redis.repository.js.map +0 -1
- package/auth/auth.service.d.ts +0 -10
- package/auth/auth.service.js +0 -12
- package/auth/auth.service.js.map +0 -1
- package/auth/index.js +0 -5
- package/auth/index.js.map +0 -1
- package/azure-auth/auth.di.d.ts +0 -4
- package/azure-auth/auth.di.js +0 -56
- package/azure-auth/auth.di.js.map +0 -1
- package/azure-auth/auth.service.d.ts +0 -32
- package/azure-auth/auth.service.js +0 -115
- package/azure-auth/auth.service.js.map +0 -1
- package/azure-auth/index.js +0 -6
- package/azure-auth/index.js.map +0 -1
- package/domain/builder/command/command.builder.d.ts +0 -5
- package/domain/builder/command/command.builder.js +0 -30
- package/domain/builder/command/command.builder.js.map +0 -1
- package/domain/builder/command/index.d.ts +0 -1
- package/domain/builder/command/index.js +0 -5
- package/domain/builder/command/index.js.map +0 -1
- package/domain/builder/command-action/command-action.builder.d.ts +0 -40
- package/domain/builder/command-action/command-action.builder.js +0 -139
- package/domain/builder/command-action/command-action.builder.js.map +0 -1
- package/domain/builder/command-action/index.d.ts +0 -1
- package/domain/builder/command-action/index.js +0 -5
- package/domain/builder/command-action/index.js.map +0 -1
- package/domain/builder/er/er.builder.d.ts +0 -19
- package/domain/builder/er/er.builder.js +0 -112
- package/domain/builder/er/er.builder.js.map +0 -1
- package/domain/builder/er/index.d.ts +0 -1
- package/domain/builder/er/index.js +0 -5
- package/domain/builder/er/index.js.map +0 -1
- package/domain/builder/screen-item/index.js +0 -5
- package/domain/builder/screen-item/index.js.map +0 -1
- package/domain/builder/screen-item/screen-item.builder.d.ts +0 -5
- package/domain/builder/screen-item/screen-item.builder.js.map +0 -1
- package/domain/index.js +0 -5
- package/domain/index.js.map +0 -1
- package/domain/invoice/builders/email/email.builder.d.ts +0 -18
- package/domain/invoice/builders/email/email.builder.js +0 -29
- package/domain/invoice/builders/email/email.builder.js.map +0 -1
- package/domain/invoice/builders/email/index.d.ts +0 -1
- package/domain/invoice/builders/email/index.js +0 -5
- package/domain/invoice/builders/email/index.js.map +0 -1
- package/domain/invoice/builders/message/index.d.ts +0 -1
- package/domain/invoice/builders/message/index.js +0 -5
- package/domain/invoice/builders/message/index.js.map +0 -1
- package/domain/invoice/builders/message/message.builder.d.ts +0 -6
- package/domain/invoice/builders/message/message.builder.js +0 -43
- package/domain/invoice/builders/message/message.builder.js.map +0 -1
- package/domain/invoice/builders/title/index.d.ts +0 -1
- package/domain/invoice/builders/title/index.js +0 -5
- package/domain/invoice/builders/title/index.js.map +0 -1
- package/domain/invoice/builders/title/title.builder.d.ts +0 -4
- package/domain/invoice/builders/title/title.builder.js +0 -11
- package/domain/invoice/builders/title/title.builder.js.map +0 -1
- package/domain/invoice/models/backoffice/contract.d.ts +0 -10
- package/domain/invoice/models/backoffice/contract.js +0 -50
- package/domain/invoice/models/backoffice/contract.js.map +0 -1
- package/domain/invoice/models/backoffice/index.d.ts +0 -5
- package/domain/invoice/models/backoffice/index.js +0 -9
- package/domain/invoice/models/backoffice/index.js.map +0 -1
- package/domain/invoice/models/backoffice/invoice-mail.d.ts +0 -8
- package/domain/invoice/models/backoffice/invoice-mail.js +0 -7
- package/domain/invoice/models/backoffice/invoice-mail.js.map +0 -1
- package/domain/invoice/models/backoffice/invoice.d.ts +0 -19
- package/domain/invoice/models/backoffice/invoice.js +0 -91
- package/domain/invoice/models/backoffice/invoice.js.map +0 -1
- package/domain/invoice/models/backoffice/order.d.ts +0 -26
- package/domain/invoice/models/backoffice/order.js +0 -157
- package/domain/invoice/models/backoffice/order.js.map +0 -1
- package/domain/invoice/models/backoffice/partner.d.ts +0 -17
- package/domain/invoice/models/backoffice/partner.js +0 -96
- package/domain/invoice/models/backoffice/partner.js.map +0 -1
- package/domain/invoice/models/index.d.ts +0 -1
- package/domain/invoice/models/index.js +0 -5
- package/domain/invoice/models/index.js.map +0 -1
- package/domain/models/agent/assistant.d.ts +0 -9
- package/domain/models/agent/assistant.js +0 -31
- package/domain/models/agent/assistant.js.map +0 -1
- package/domain/models/agent/index.d.ts +0 -1
- package/domain/models/agent/index.js +0 -5
- package/domain/models/agent/index.js.map +0 -1
- package/domain/models/bookmarklet/bookmarklet.d.ts +0 -9
- package/domain/models/bookmarklet/bookmarklet.js +0 -34
- package/domain/models/bookmarklet/bookmarklet.js.map +0 -1
- package/domain/models/bookmarklet/index.d.ts +0 -1
- package/domain/models/bookmarklet/index.js +0 -5
- package/domain/models/bookmarklet/index.js.map +0 -1
- package/domain/models/calendar-utils.d.ts +0 -5
- package/domain/models/calendar-utils.js +0 -43
- package/domain/models/calendar-utils.js.map +0 -1
- package/domain/models/command/command.d.ts +0 -18
- package/domain/models/command/command.helper.d.ts +0 -4
- package/domain/models/command/command.helper.js +0 -14
- package/domain/models/command/command.helper.js.map +0 -1
- package/domain/models/command/command.js +0 -40
- package/domain/models/command/command.js.map +0 -1
- package/domain/models/command/index.d.ts +0 -2
- package/domain/models/command/index.js +0 -6
- package/domain/models/command/index.js.map +0 -1
- package/domain/models/database/database.d.ts +0 -4
- package/domain/models/database/database.js +0 -7
- package/domain/models/database/database.js.map +0 -1
- package/domain/models/database/index.d.ts +0 -1
- package/domain/models/database/index.js +0 -5
- package/domain/models/database/index.js.map +0 -1
- package/domain/models/endpoint/endpoint.helper.d.ts +0 -4
- package/domain/models/endpoint/endpoint.helper.js +0 -21
- package/domain/models/endpoint/endpoint.helper.js.map +0 -1
- package/domain/models/endpoint/index.d.ts +0 -1
- package/domain/models/endpoint/index.js +0 -5
- package/domain/models/endpoint/index.js.map +0 -1
- package/domain/models/index.js +0 -12
- package/domain/models/index.js.map +0 -1
- package/domain/models/links/google/google.d.ts +0 -12
- package/domain/models/links/google/google.js +0 -47
- package/domain/models/links/google/google.js.map +0 -1
- package/domain/models/links/google/index.d.ts +0 -1
- package/domain/models/links/google/index.js +0 -5
- package/domain/models/links/google/index.js.map +0 -1
- package/domain/models/openapi/index.d.ts +0 -2
- package/domain/models/openapi/index.js +0 -6
- package/domain/models/openapi/index.js.map +0 -1
- package/domain/models/openapi/openapi.d.ts +0 -32
- package/domain/models/openapi/openapi.js +0 -87
- package/domain/models/openapi/openapi.js.map +0 -1
- package/domain/models/openapi/openapi.schema.d.ts +0 -76
- package/domain/models/openapi/openapi.schema.js +0 -3
- package/domain/models/openapi/openapi.schema.js.map +0 -1
- package/domain/models/operators/assistancts/base.d.ts +0 -5
- package/domain/models/operators/assistancts/base.js +0 -13
- package/domain/models/operators/assistancts/base.js.map +0 -1
- package/domain/models/operators/assistancts/index.d.ts +0 -1
- package/domain/models/operators/assistancts/index.js +0 -5
- package/domain/models/operators/assistancts/index.js.map +0 -1
- package/domain/models/operators/base.d.ts +0 -13
- package/domain/models/operators/base.js +0 -10
- package/domain/models/operators/base.js.map +0 -1
- package/domain/models/operators/index.d.ts +0 -4
- package/domain/models/operators/index.js +0 -8
- package/domain/models/operators/index.js.map +0 -1
- package/domain/models/operators/systems/base.d.ts +0 -5
- package/domain/models/operators/systems/base.js +0 -3
- package/domain/models/operators/systems/base.js.map +0 -1
- package/domain/models/operators/systems/graphql.d.ts +0 -5
- package/domain/models/operators/systems/graphql.js +0 -3
- package/domain/models/operators/systems/graphql.js.map +0 -1
- package/domain/models/operators/systems/index.d.ts +0 -3
- package/domain/models/operators/systems/index.js +0 -7
- package/domain/models/operators/systems/index.js.map +0 -1
- package/domain/models/operators/systems/rest.d.ts +0 -6
- package/domain/models/operators/systems/rest.js +0 -3
- package/domain/models/operators/systems/rest.js.map +0 -1
- package/domain/models/operators/workflows/index.d.ts +0 -1
- package/domain/models/operators/workflows/index.js +0 -5
- package/domain/models/operators/workflows/index.js.map +0 -1
- package/domain/models/operators/workflows/workflow.d.ts +0 -9
- package/domain/models/operators/workflows/workflow.js +0 -3
- package/domain/models/operators/workflows/workflow.js.map +0 -1
- package/domain/models/project.d.ts +0 -22
- package/domain/models/project.js +0 -9
- package/domain/models/project.js.map +0 -1
- package/domain/models/query/index.d.ts +0 -2
- package/domain/models/query/index.js +0 -6
- package/domain/models/query/index.js.map +0 -1
- package/domain/models/query/query.d.ts +0 -27
- package/domain/models/query/query.helper.d.ts +0 -23
- package/domain/models/query/query.helper.js +0 -172
- package/domain/models/query/query.helper.js.map +0 -1
- package/domain/models/query/query.js +0 -122
- package/domain/models/query/query.js.map +0 -1
- package/domain/models/resource/index.d.ts +0 -2
- package/domain/models/resource/index.js +0 -6
- package/domain/models/resource/index.js.map +0 -1
- package/domain/models/resource/resource.d.ts +0 -15
- package/domain/models/resource/resource.helper.d.ts +0 -4
- package/domain/models/resource/resource.helper.js +0 -16
- package/domain/models/resource/resource.helper.js.map +0 -1
- package/domain/models/resource/resource.js +0 -73
- package/domain/models/resource/resource.js.map +0 -1
- package/domain/models/scheduler/index.d.ts +0 -1
- package/domain/models/scheduler/index.js +0 -5
- package/domain/models/scheduler/index.js.map +0 -1
- package/domain/models/scheduler/schedule.d.ts +0 -23
- package/domain/models/scheduler/schedule.js +0 -89
- package/domain/models/scheduler/schedule.js.map +0 -1
- package/domain/models/screen-item/index.d.ts +0 -1
- package/domain/models/screen-item/index.js +0 -5
- package/domain/models/screen-item/index.js.map +0 -1
- package/domain/models/screen-item/screen-item.d.ts +0 -9
- package/domain/models/screen-item/screen-item.js +0 -3
- package/domain/models/screen-item/screen-item.js.map +0 -1
- package/domain/models/spec.d.ts +0 -7
- package/domain/models/spec.js +0 -3
- package/domain/models/spec.js.map +0 -1
- package/domain/resolvers/index.d.ts +0 -1
- package/domain/resolvers/index.js +0 -5
- package/domain/resolvers/index.js.map +0 -1
- package/domain/resolvers/invoice.resolver.js +0 -31
- package/domain/resolvers/invoice.resolver.js.map +0 -1
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.d.ts +0 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js +0 -1
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js.map +0 -1
- package/infrastructure/converters/google/google.converter.d.ts +0 -9
- package/infrastructure/converters/google/google.converter.js +0 -27
- package/infrastructure/converters/google/google.converter.js.map +0 -1
- package/infrastructure/converters/google/index.d.ts +0 -1
- package/infrastructure/converters/google/index.js +0 -5
- package/infrastructure/converters/google/index.js.map +0 -1
- package/infrastructure/external/data-connect/data-connect.service.d.ts +0 -4
- package/infrastructure/external/data-connect/data-connect.service.impl.d.ts +0 -7
- package/infrastructure/external/data-connect/data-connect.service.impl.js +0 -20
- package/infrastructure/external/data-connect/data-connect.service.impl.js.map +0 -1
- package/infrastructure/external/data-connect/data-connect.service.js +0 -11
- package/infrastructure/external/data-connect/data-connect.service.js.map +0 -1
- package/infrastructure/external/data-connect/index.d.ts +0 -1
- package/infrastructure/external/data-connect/index.js +0 -5
- package/infrastructure/external/data-connect/index.js.map +0 -1
- package/infrastructure/external/external.config.d.ts +0 -7
- package/infrastructure/external/external.config.js +0 -13
- package/infrastructure/external/external.config.js.map +0 -1
- package/infrastructure/external/external.service.d.ts +0 -8
- package/infrastructure/external/external.service.js +0 -23
- package/infrastructure/external/external.service.js.map +0 -1
- package/infrastructure/external/index.d.ts +0 -2
- package/infrastructure/external/index.js +0 -6
- package/infrastructure/external/index.js.map +0 -1
- package/infrastructure/external/quick-js/index.d.ts +0 -1
- package/infrastructure/external/quick-js/index.js +0 -5
- package/infrastructure/external/quick-js/index.js.map +0 -1
- package/infrastructure/external/quick-js/quick-js.service.d.ts +0 -7
- package/infrastructure/external/quick-js/quick-js.service.js +0 -44
- package/infrastructure/external/quick-js/quick-js.service.js.map +0 -1
- package/infrastructure/external/resend/index.d.ts +0 -1
- package/infrastructure/external/resend/index.js +0 -5
- package/infrastructure/external/resend/index.js.map +0 -1
- package/infrastructure/external/resend/resend.service.d.ts +0 -9
- package/infrastructure/external/resend/resend.service.impl.d.ts +0 -17
- package/infrastructure/external/resend/resend.service.impl.js +0 -27
- package/infrastructure/external/resend/resend.service.impl.js.map +0 -1
- package/infrastructure/external/resend/resend.service.js +0 -6
- package/infrastructure/external/resend/resend.service.js.map +0 -1
- package/infrastructure/index.d.ts +0 -2
- package/infrastructure/index.js +0 -6
- package/infrastructure/index.js.map +0 -1
- package/infrastructure/infrastructure.config.d.ts +0 -16
- package/infrastructure/infrastructure.config.js +0 -12
- package/infrastructure/infrastructure.config.js.map +0 -1
- package/infrastructure/infrastructure.service.d.ts +0 -7
- package/infrastructure/infrastructure.service.js +0 -20
- package/infrastructure/infrastructure.service.js.map +0 -1
- package/infrastructure/query/firestore/query/index.d.ts +0 -1
- package/infrastructure/query/firestore/query/index.js +0 -5
- package/infrastructure/query/firestore/query/index.js.map +0 -1
- package/infrastructure/query/firestore/query/query.query.d.ts +0 -6
- package/infrastructure/query/firestore/query/query.query.js +0 -20
- package/infrastructure/query/firestore/query/query.query.js.map +0 -1
- package/infrastructure/query/firestore/resource/index.d.ts +0 -1
- package/infrastructure/query/firestore/resource/index.js +0 -5
- package/infrastructure/query/firestore/resource/index.js.map +0 -1
- package/infrastructure/query/firestore/resource/resource.query.d.ts +0 -6
- package/infrastructure/query/firestore/resource/resource.query.js +0 -20
- package/infrastructure/query/firestore/resource/resource.query.js.map +0 -1
- package/infrastructure/query/hasura/resource/index.d.ts +0 -1
- package/infrastructure/query/hasura/resource/index.js +0 -5
- package/infrastructure/query/hasura/resource/index.js.map +0 -1
- package/infrastructure/query/hasura/resource/resource.query.d.ts +0 -3
- package/infrastructure/query/hasura/resource/resource.query.js +0 -14
- package/infrastructure/query/hasura/resource/resource.query.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/index.d.ts +0 -1
- package/infrastructure/repository/dataconnect/invoice/index.js +0 -5
- package/infrastructure/repository/dataconnect/invoice/index.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.d.ts +0 -4
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.d.ts +0 -10
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js +0 -54
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js.map +0 -1
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js +0 -11
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/index.d.ts +0 -1
- package/infrastructure/repository/dataconnect/order/index.js +0 -5
- package/infrastructure/repository/dataconnect/order/index.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/order.repository.d.ts +0 -4
- package/infrastructure/repository/dataconnect/order/order.repository.impl.d.ts +0 -14
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js +0 -74
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js.map +0 -1
- package/infrastructure/repository/dataconnect/order/order.repository.js +0 -11
- package/infrastructure/repository/dataconnect/order/order.repository.js.map +0 -1
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js +0 -20
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js.map +0 -1
- package/infrastructure/repository/firestore/bookmarklet/index.d.ts +0 -1
- package/infrastructure/repository/firestore/bookmarklet/index.js +0 -5
- package/infrastructure/repository/firestore/bookmarklet/index.js.map +0 -1
- package/infrastructure/repository/firestore/firestore.repository.d.ts +0 -7
- package/infrastructure/repository/firestore/firestore.repository.js +0 -20
- package/infrastructure/repository/firestore/firestore.repository.js.map +0 -1
- package/infrastructure/repository/firestore/index.d.ts +0 -1
- package/infrastructure/repository/firestore/index.js +0 -5
- package/infrastructure/repository/firestore/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/google/google.repository.d.ts +0 -7
- package/infrastructure/repository/firestore/link/google/google.repository.js +0 -19
- package/infrastructure/repository/firestore/link/google/google.repository.js.map +0 -1
- package/infrastructure/repository/firestore/link/google/index.d.ts +0 -1
- package/infrastructure/repository/firestore/link/google/index.js +0 -5
- package/infrastructure/repository/firestore/link/google/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/index.d.ts +0 -1
- package/infrastructure/repository/firestore/link/index.js +0 -5
- package/infrastructure/repository/firestore/link/index.js.map +0 -1
- package/infrastructure/repository/firestore/link/link.repository.d.ts +0 -5
- package/infrastructure/repository/firestore/link/link.repository.js +0 -17
- package/infrastructure/repository/firestore/link/link.repository.js.map +0 -1
- package/infrastructure/repository/firestore/query/index.d.ts +0 -1
- package/infrastructure/repository/firestore/query/index.js +0 -5
- package/infrastructure/repository/firestore/query/index.js.map +0 -1
- package/infrastructure/repository/firestore/query/query.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/query/query.repository.js +0 -20
- package/infrastructure/repository/firestore/query/query.repository.js.map +0 -1
- package/infrastructure/repository/firestore/resource/index.d.ts +0 -1
- package/infrastructure/repository/firestore/resource/index.js +0 -5
- package/infrastructure/repository/firestore/resource/index.js.map +0 -1
- package/infrastructure/repository/firestore/resource/resource.repository.d.ts +0 -6
- package/infrastructure/repository/firestore/resource/resource.repository.js +0 -20
- package/infrastructure/repository/firestore/resource/resource.repository.js.map +0 -1
- package/infrastructure/repository/hasura/query/index.d.ts +0 -1
- package/infrastructure/repository/hasura/query/index.js +0 -5
- package/infrastructure/repository/hasura/query/index.js.map +0 -1
- package/infrastructure/repository/hasura/query/query.repository.d.ts +0 -8
- package/infrastructure/repository/hasura/query/query.repository.js +0 -23
- package/infrastructure/repository/hasura/query/query.repository.js.map +0 -1
- package/infrastructure/repository/hasura/resource/index.d.ts +0 -1
- package/infrastructure/repository/hasura/resource/index.js +0 -5
- package/infrastructure/repository/hasura/resource/index.js.map +0 -1
- package/infrastructure/repository/hasura/resource/resource.repository.d.ts +0 -8
- package/infrastructure/repository/hasura/resource/resource.repository.js +0 -23
- package/infrastructure/repository/hasura/resource/resource.repository.js.map +0 -1
- package/infrastructure/repository/index.d.ts +0 -2
- package/infrastructure/repository/index.js +0 -6
- package/infrastructure/repository/index.js.map +0 -1
- package/infrastructure/repository/notion/contract/contract.config.d.ts +0 -9
- package/infrastructure/repository/notion/contract/contract.config.js +0 -10
- package/infrastructure/repository/notion/contract/contract.config.js.map +0 -1
- package/infrastructure/repository/notion/contract/contract.repository.d.ts +0 -8
- package/infrastructure/repository/notion/contract/contract.repository.js +0 -22
- package/infrastructure/repository/notion/contract/contract.repository.js.map +0 -1
- package/infrastructure/repository/notion/contract/index.d.ts +0 -2
- package/infrastructure/repository/notion/contract/index.js +0 -6
- package/infrastructure/repository/notion/contract/index.js.map +0 -1
- package/infrastructure/repository/notion/index.d.ts +0 -2
- package/infrastructure/repository/notion/index.js +0 -6
- package/infrastructure/repository/notion/index.js.map +0 -1
- package/infrastructure/repository/notion/invoice/index.d.ts +0 -2
- package/infrastructure/repository/notion/invoice/index.js +0 -6
- package/infrastructure/repository/notion/invoice/index.js.map +0 -1
- package/infrastructure/repository/notion/invoice/invoice.config.d.ts +0 -9
- package/infrastructure/repository/notion/invoice/invoice.config.js +0 -10
- package/infrastructure/repository/notion/invoice/invoice.config.js.map +0 -1
- package/infrastructure/repository/notion/invoice/invoice.repository.d.ts +0 -8
- package/infrastructure/repository/notion/invoice/invoice.repository.js +0 -22
- package/infrastructure/repository/notion/invoice/invoice.repository.js.map +0 -1
- package/infrastructure/repository/notion/notion.config.d.ts +0 -17
- package/infrastructure/repository/notion/notion.config.js +0 -18
- package/infrastructure/repository/notion/notion.config.js.map +0 -1
- package/infrastructure/repository/notion/notion.repository.d.ts +0 -11
- package/infrastructure/repository/notion/notion.repository.js +0 -26
- package/infrastructure/repository/notion/notion.repository.js.map +0 -1
- package/infrastructure/repository/notion/order/index.d.ts +0 -1
- package/infrastructure/repository/notion/order/index.js +0 -5
- package/infrastructure/repository/notion/order/index.js.map +0 -1
- package/infrastructure/repository/notion/order/order.config.d.ts +0 -9
- package/infrastructure/repository/notion/order/order.config.js +0 -10
- package/infrastructure/repository/notion/order/order.config.js.map +0 -1
- package/infrastructure/repository/notion/order/order.repository.d.ts +0 -8
- package/infrastructure/repository/notion/order/order.repository.js +0 -22
- package/infrastructure/repository/notion/order/order.repository.js.map +0 -1
- package/infrastructure/repository/notion/partner/index.d.ts +0 -2
- package/infrastructure/repository/notion/partner/index.js +0 -6
- package/infrastructure/repository/notion/partner/index.js.map +0 -1
- package/infrastructure/repository/notion/partner/partner.config.d.ts +0 -9
- package/infrastructure/repository/notion/partner/partner.config.js +0 -10
- package/infrastructure/repository/notion/partner/partner.config.js.map +0 -1
- package/infrastructure/repository/notion/partner/partner.repository.d.ts +0 -8
- package/infrastructure/repository/notion/partner/partner.repository.js +0 -22
- package/infrastructure/repository/notion/partner/partner.repository.js.map +0 -1
- package/infrastructure/repository/redis/index.d.ts +0 -2
- package/infrastructure/repository/redis/index.js +0 -6
- package/infrastructure/repository/redis/index.js.map +0 -1
- package/infrastructure/repository/redis/operator/index.d.ts +0 -1
- package/infrastructure/repository/redis/operator/index.js +0 -5
- package/infrastructure/repository/redis/operator/index.js.map +0 -1
- package/infrastructure/repository/redis/operator/operator.repository.d.ts +0 -5
- package/infrastructure/repository/redis/operator/operator.repository.js +0 -17
- package/infrastructure/repository/redis/operator/operator.repository.js.map +0 -1
- package/infrastructure/repository/redis/project/index.d.ts +0 -1
- package/infrastructure/repository/redis/project/index.js +0 -5
- package/infrastructure/repository/redis/project/index.js.map +0 -1
- package/infrastructure/repository/redis/project/project.repository.d.ts +0 -19
- package/infrastructure/repository/redis/project/project.repository.js +0 -33
- package/infrastructure/repository/redis/project/project.repository.js.map +0 -1
- package/infrastructure/repository/redis/redis.config.d.ts +0 -8
- package/infrastructure/repository/redis/redis.config.js +0 -10
- package/infrastructure/repository/redis/redis.config.js.map +0 -1
- package/infrastructure/repository/redis/redis.service.d.ts +0 -10
- package/infrastructure/repository/redis/redis.service.js +0 -22
- package/infrastructure/repository/redis/redis.service.js.map +0 -1
- package/infrastructure/repository/redis/spec/index.d.ts +0 -1
- package/infrastructure/repository/redis/spec/index.js +0 -5
- package/infrastructure/repository/redis/spec/index.js.map +0 -1
- package/infrastructure/repository/redis/spec/spec.repository.d.ts +0 -17
- package/infrastructure/repository/redis/spec/spec.repository.js +0 -94
- package/infrastructure/repository/redis/spec/spec.repository.js.map +0 -1
- package/infrastructure/repository/redis/system/index.d.ts +0 -1
- package/infrastructure/repository/redis/system/index.js +0 -5
- package/infrastructure/repository/redis/system/index.js.map +0 -1
- package/infrastructure/repository/redis/system/system.repository.d.ts +0 -3
- package/infrastructure/repository/redis/system/system.repository.js +0 -15
- package/infrastructure/repository/redis/system/system.repository.js.map +0 -1
- package/infrastructure/repository/repository.config.d.ts +0 -16
- package/infrastructure/repository/repository.config.js +0 -12
- package/infrastructure/repository/repository.config.js.map +0 -1
- package/infrastructure/repository/repository.service.d.ts +0 -8
- package/infrastructure/repository/repository.service.js +0 -20
- package/infrastructure/repository/repository.service.js.map +0 -1
- package/stores/index.js +0 -66
- package/stores/index.js.map +0 -1
- package/usecase/assistant/assistant.service.d.ts +0 -12
- package/usecase/assistant/assistant.service.js +0 -72
- package/usecase/assistant/assistant.service.js.map +0 -1
- package/usecase/assistant/index.js +0 -5
- package/usecase/assistant/index.js.map +0 -1
- package/usecase/database/database.service.d.ts +0 -31
- package/usecase/database/database.service.js +0 -103
- package/usecase/database/database.service.js.map +0 -1
- package/usecase/database/index.js +0 -5
- package/usecase/database/index.js.map +0 -1
- package/usecase/graphql/graphql.service.d.ts +0 -9
- package/usecase/graphql/graphql.service.js +0 -49
- package/usecase/graphql/graphql.service.js.map +0 -1
- package/usecase/graphql/index.js +0 -5
- package/usecase/graphql/index.js.map +0 -1
- package/usecase/index.js +0 -5
- package/usecase/index.js.map +0 -1
- package/usecase/invoice/index.d.ts +0 -1
- package/usecase/invoice/index.js +0 -5
- package/usecase/invoice/index.js.map +0 -1
- package/usecase/invoice/invoice.service.d.ts +0 -27
- package/usecase/invoice/invoice.service.js +0 -69
- package/usecase/invoice/invoice.service.js.map +0 -1
- package/usecase/link/index.js +0 -5
- package/usecase/link/index.js.map +0 -1
- package/usecase/link/link.service.d.ts +0 -7
- package/usecase/link/link.service.js +0 -20
- package/usecase/link/link.service.js.map +0 -1
- package/usecase/order/index.d.ts +0 -1
- package/usecase/order/index.js +0 -5
- package/usecase/order/index.js.map +0 -1
- package/usecase/order/order.service.d.ts +0 -6
- package/usecase/order/order.service.js +0 -27
- package/usecase/order/order.service.js.map +0 -1
- package/usecase/project/index.js +0 -5
- package/usecase/project/index.js.map +0 -1
- package/usecase/project/project.service.d.ts +0 -10
- package/usecase/project/project.service.js +0 -37
- package/usecase/project/project.service.js.map +0 -1
- package/usecase/spec/index.js +0 -5
- package/usecase/spec/index.js.map +0 -1
- package/usecase/spec/spec.service.d.ts +0 -11
- package/usecase/spec/spec.service.js +0 -49
- package/usecase/spec/spec.service.js.map +0 -1
- package/usecase/usecase.service.d.ts +0 -12
- package/usecase/usecase.service.js +0 -24
- package/usecase/usecase.service.js.map +0 -1
- package/utils/crypto.d.ts +0 -7
- package/utils/crypto.js.map +0 -1
- package/utils/extract-display-fields.d.ts +0 -2
- package/utils/extract-display-fields.js.map +0 -1
- package/utils/index.js +0 -5
- package/utils/index.js.map +0 -1
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import { createAction } from '@ng-atomic/core';
|
|
2
|
+
import { flatten } from 'flat';
|
|
3
|
+
import { omitBy } from 'lodash-es';
|
|
4
|
+
import { createNavigateAction } from '@ng-atomic/components/frames/app';
|
|
5
|
+
import { message } from '@nx-ddd/common';
|
|
6
|
+
import { QueryHelper } from '@xxmachina/common/domain/models';
|
|
7
|
+
|
|
8
|
+
class CommandBuilder {
|
|
9
|
+
buildFromOpenApi(openApi) {
|
|
10
|
+
return Object.keys(openApi.getPaths()).flatMap((path) => {
|
|
11
|
+
return openApi.getMethods(path).map((method, index) => ({
|
|
12
|
+
id: openApi.getOperationId(path, method) ?? `cmd-${index}`,
|
|
13
|
+
name: openApi.getSummary(path, method) ?? '',
|
|
14
|
+
description: openApi.getDescription(path, method) ?? '',
|
|
15
|
+
type: 'webApiRequest',
|
|
16
|
+
webApiRequest: {
|
|
17
|
+
path: path,
|
|
18
|
+
method: method.toLocaleUpperCase(),
|
|
19
|
+
contentType: openApi.getContentType(path, method),
|
|
20
|
+
responseContentType: openApi.getResponseContentType(path, method),
|
|
21
|
+
bodySchema: openApi.getRequestBodySchema(path, method),
|
|
22
|
+
serverUrl: openApi.getServerUrl(),
|
|
23
|
+
apiJsonUrl: openApi.apiJsonUrl,
|
|
24
|
+
security: openApi.getSecurity(path, method) ?? [],
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var ActionId;
|
|
32
|
+
(function (ActionId) {
|
|
33
|
+
ActionId["NAVIGATE_TO_COMMAND_PAGE"] = "[@xxmachina/common] Navigate To Command Page";
|
|
34
|
+
ActionId["EXECUTE_COMMAND"] = "[@xxmachina/common] Execute Command";
|
|
35
|
+
})(ActionId || (ActionId = {}));
|
|
36
|
+
class CommandActionsBuilder {
|
|
37
|
+
commands = [];
|
|
38
|
+
options = {};
|
|
39
|
+
item = null;
|
|
40
|
+
filterIds = null;
|
|
41
|
+
autoIds = [];
|
|
42
|
+
setCommands(commands) {
|
|
43
|
+
const newFactory = new CommandActionsBuilder();
|
|
44
|
+
newFactory.commands = [...commands];
|
|
45
|
+
newFactory.options = { ...this.options };
|
|
46
|
+
newFactory.item = this.item;
|
|
47
|
+
newFactory.filterIds = this.filterIds;
|
|
48
|
+
newFactory.autoIds = this.autoIds;
|
|
49
|
+
return newFactory;
|
|
50
|
+
}
|
|
51
|
+
setOptions(options) {
|
|
52
|
+
const newFactory = new CommandActionsBuilder();
|
|
53
|
+
newFactory.commands = [...this.commands];
|
|
54
|
+
newFactory.options = { ...this.options, ...options };
|
|
55
|
+
newFactory.item = this.item;
|
|
56
|
+
newFactory.filterIds = this.filterIds;
|
|
57
|
+
newFactory.autoIds = this.autoIds;
|
|
58
|
+
return newFactory;
|
|
59
|
+
}
|
|
60
|
+
setItem(item) {
|
|
61
|
+
const newFactory = new CommandActionsBuilder();
|
|
62
|
+
newFactory.commands = [...this.commands];
|
|
63
|
+
newFactory.options = { ...this.options };
|
|
64
|
+
newFactory.item = item;
|
|
65
|
+
newFactory.filterIds = this.filterIds;
|
|
66
|
+
newFactory.autoIds = this.autoIds;
|
|
67
|
+
return newFactory;
|
|
68
|
+
}
|
|
69
|
+
setFilterIds(filterIds = []) {
|
|
70
|
+
const newFactory = new CommandActionsBuilder();
|
|
71
|
+
newFactory.commands = [...this.commands];
|
|
72
|
+
newFactory.options = { ...this.options };
|
|
73
|
+
newFactory.item = this.item;
|
|
74
|
+
newFactory.filterIds = filterIds.map((id) => typeof id === 'string' ? id : id.id);
|
|
75
|
+
newFactory.autoIds = filterIds.filter((id) => typeof id !== 'string' && id.auto).map((id) => id.id);
|
|
76
|
+
return newFactory;
|
|
77
|
+
}
|
|
78
|
+
setAutoIds(autoIds) {
|
|
79
|
+
const newFactory = new CommandActionsBuilder();
|
|
80
|
+
newFactory.commands = [...this.commands];
|
|
81
|
+
newFactory.options = { ...this.options };
|
|
82
|
+
newFactory.item = this.item;
|
|
83
|
+
newFactory.filterIds = [...this.filterIds];
|
|
84
|
+
newFactory.autoIds = autoIds;
|
|
85
|
+
return newFactory;
|
|
86
|
+
}
|
|
87
|
+
applyFilter(commands) {
|
|
88
|
+
if (!this.filterIds)
|
|
89
|
+
return commands;
|
|
90
|
+
return this.filterIds.map((id) => commands.find((command) => command.id === id))
|
|
91
|
+
.filter((command) => !!command);
|
|
92
|
+
}
|
|
93
|
+
buildAction(id) {
|
|
94
|
+
const command = this.commands.find((command) => command.id === id);
|
|
95
|
+
if (!command)
|
|
96
|
+
throw new Error(`Command not found: ${id}`);
|
|
97
|
+
const actionId = this.autoIds.includes(command.id)
|
|
98
|
+
? ActionId.EXECUTE_COMMAND
|
|
99
|
+
: ActionId.NAVIGATE_TO_COMMAND_PAGE;
|
|
100
|
+
const creator = createAction(actionId, command.webApiRequest.bodySchema, {
|
|
101
|
+
name: command.name,
|
|
102
|
+
icon: this.options.icon || 'default',
|
|
103
|
+
...this.options,
|
|
104
|
+
});
|
|
105
|
+
return creator.create({
|
|
106
|
+
command,
|
|
107
|
+
body: this.item,
|
|
108
|
+
options: {
|
|
109
|
+
queryId: this.options.queryId,
|
|
110
|
+
confirm: this.options.confirm,
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
buildActions(item, navigationExtras = {}, overwrite = {}) {
|
|
115
|
+
const filteredCommands = this.applyFilter(this.commands);
|
|
116
|
+
return filteredCommands.map((command) => {
|
|
117
|
+
if (this.autoIds.includes(command.id)) {
|
|
118
|
+
return createAction(ActionId.EXECUTE_COMMAND, command.webApiRequest.bodySchema, {
|
|
119
|
+
name: command.name,
|
|
120
|
+
icon: this.options.icon || 'default',
|
|
121
|
+
}).create({
|
|
122
|
+
command,
|
|
123
|
+
body: this.item,
|
|
124
|
+
options: {
|
|
125
|
+
queryId: this.options.queryId,
|
|
126
|
+
confirm: this.options.confirm,
|
|
127
|
+
}
|
|
128
|
+
}, overwrite);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const data = omitBy(flatten({ data: this.item, queryId: this.options.queryId }), value => typeof value === 'undefined');
|
|
132
|
+
return createNavigateAction(['commands', { skip: true }, command.id, data], navigationExtras, {
|
|
133
|
+
name: command.name,
|
|
134
|
+
icon: this.options.icon,
|
|
135
|
+
...overwrite,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
buildItemActions() {
|
|
141
|
+
return (item) => this.setItem(item).buildActions();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function createCommandNavigateAction(command, navigationExtras = {}, item = {}, options = {}, overwrite = {}) {
|
|
145
|
+
if (!command)
|
|
146
|
+
return null;
|
|
147
|
+
return new CommandActionsBuilder()
|
|
148
|
+
.setItem(item)
|
|
149
|
+
.setCommands([command])
|
|
150
|
+
.setOptions(options)
|
|
151
|
+
.setFilterIds([command.id])
|
|
152
|
+
.buildActions(item, navigationExtras, overwrite)[0];
|
|
153
|
+
}
|
|
154
|
+
function createCommandExecutionAction(command, item = {}, options = {}, overwrite = {}) {
|
|
155
|
+
if (!command)
|
|
156
|
+
return null;
|
|
157
|
+
return new CommandActionsBuilder()
|
|
158
|
+
.setItem(item)
|
|
159
|
+
.setCommands([command])
|
|
160
|
+
.setOptions(options)
|
|
161
|
+
.setFilterIds([command.id])
|
|
162
|
+
.setAutoIds([command.id])
|
|
163
|
+
.buildActions(item, undefined, overwrite)[0];
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const NOTION_PROP_TYPE_MAP = {
|
|
167
|
+
people: 'string',
|
|
168
|
+
unique_id: 'string',
|
|
169
|
+
rich_text: 'string',
|
|
170
|
+
title: 'string',
|
|
171
|
+
text: 'string',
|
|
172
|
+
number: 'number',
|
|
173
|
+
select: 'enum',
|
|
174
|
+
status: 'enum',
|
|
175
|
+
multi_select: 'string',
|
|
176
|
+
date: 'date',
|
|
177
|
+
person: 'string',
|
|
178
|
+
files: 'string',
|
|
179
|
+
checkbox: 'boolean',
|
|
180
|
+
url: 'string',
|
|
181
|
+
email: 'string',
|
|
182
|
+
phone_number: 'string',
|
|
183
|
+
relation: 'string',
|
|
184
|
+
rollup: 'string',
|
|
185
|
+
created_time: 'date',
|
|
186
|
+
created_by: 'string',
|
|
187
|
+
last_edited_time: 'date',
|
|
188
|
+
last_edited_by: 'string',
|
|
189
|
+
};
|
|
190
|
+
const NOTION_KEY_MAP = {
|
|
191
|
+
'relation': 'FK',
|
|
192
|
+
'unique_id': 'UK',
|
|
193
|
+
};
|
|
194
|
+
class ErBuilder {
|
|
195
|
+
build(databases) {
|
|
196
|
+
const schemas = [];
|
|
197
|
+
const dbIdToName = databases.reduce((acc, db) => ({
|
|
198
|
+
...acc,
|
|
199
|
+
[db.id]: db?.title?.[0]?.plain_text
|
|
200
|
+
}), {});
|
|
201
|
+
for (const database of databases) {
|
|
202
|
+
const schema = this.parseDatabaseSchema(database, database?.title?.[0]?.plain_text, dbIdToName);
|
|
203
|
+
schemas.push(schema);
|
|
204
|
+
}
|
|
205
|
+
return this.buildMermaidER(schemas);
|
|
206
|
+
}
|
|
207
|
+
parseDatabaseSchema(database, name = '', map = {}) {
|
|
208
|
+
const properties = database.properties;
|
|
209
|
+
const fields = [];
|
|
210
|
+
const relations = [];
|
|
211
|
+
Object.keys(properties)
|
|
212
|
+
.filter(propName => {
|
|
213
|
+
if (['formula', 'rollup', 'button'].includes(properties[propName].type))
|
|
214
|
+
return false;
|
|
215
|
+
return true;
|
|
216
|
+
})
|
|
217
|
+
.sort()
|
|
218
|
+
.forEach(propName => {
|
|
219
|
+
const prop = properties[propName];
|
|
220
|
+
const type = prop.type;
|
|
221
|
+
const mappedType = NOTION_PROP_TYPE_MAP[type];
|
|
222
|
+
const key = NOTION_KEY_MAP[type] ?? ' ';
|
|
223
|
+
const field = `${mappedType} ${type} ${key} "${propName}"`;
|
|
224
|
+
fields.push(field);
|
|
225
|
+
// リレーションシップの解析
|
|
226
|
+
if (type === 'relation') {
|
|
227
|
+
const relation = prop['relation'];
|
|
228
|
+
if (relation && relation.database_id) {
|
|
229
|
+
const targetDbId = relation.database_id;
|
|
230
|
+
const targetDbName = map[targetDbId] || 'Unknown';
|
|
231
|
+
relations.push({
|
|
232
|
+
source: name,
|
|
233
|
+
target: targetDbName,
|
|
234
|
+
label: propName,
|
|
235
|
+
type: '||--||', // リレーションのタイプを適宜設定
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
else if (relation && Array.isArray(relation)) {
|
|
239
|
+
relation.forEach(rel => {
|
|
240
|
+
const targetDbId = rel.database_id;
|
|
241
|
+
const targetDbName = map[targetDbId] || 'Unknown';
|
|
242
|
+
relations.push({
|
|
243
|
+
source: name,
|
|
244
|
+
target: targetDbName,
|
|
245
|
+
label: propName,
|
|
246
|
+
type: '||--o{',
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
return { name, fields, relations };
|
|
253
|
+
}
|
|
254
|
+
buildMermaidER(schemas) {
|
|
255
|
+
let mermaid = 'erDiagram\n';
|
|
256
|
+
// エンティティの定義
|
|
257
|
+
schemas.forEach(schema => {
|
|
258
|
+
mermaid += ` "${schema.name}" {\n`;
|
|
259
|
+
mermaid += schema.fields.map(field => ` ${field}`).join('\n');
|
|
260
|
+
mermaid += '\n }\n';
|
|
261
|
+
});
|
|
262
|
+
// リレーションシップの定義
|
|
263
|
+
schemas.forEach(schema => {
|
|
264
|
+
schema.relations.forEach(relation => {
|
|
265
|
+
mermaid += ` "${relation.source}" ${relation.type} "${relation.target}" : "${relation.label}"\n`;
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
return mermaid;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
class QueryBuilder {
|
|
273
|
+
static buildByGraphql(graphql, meta = {}) {
|
|
274
|
+
return QueryHelper.tryParse({
|
|
275
|
+
id: 'builded_query',
|
|
276
|
+
type: 'graphql',
|
|
277
|
+
projectId: 'default',
|
|
278
|
+
title: 'Builded Query',
|
|
279
|
+
summary: 'This query was built by QueryBuilder',
|
|
280
|
+
graphql: {
|
|
281
|
+
endpoint: graphql.endpoint,
|
|
282
|
+
query: message `${graphql.query}`,
|
|
283
|
+
headersJson: JSON.stringify(graphql.headers),
|
|
284
|
+
variablesJson: JSON.stringify(graphql.variables),
|
|
285
|
+
transformerTs: graphql?.transformerTs ?? null,
|
|
286
|
+
},
|
|
287
|
+
createdAt: null,
|
|
288
|
+
updatedAt: null,
|
|
289
|
+
...meta,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function buildPageItem(property, propName, dbName) {
|
|
295
|
+
switch (property.type) {
|
|
296
|
+
case 'select': return {
|
|
297
|
+
id: property.id,
|
|
298
|
+
name: propName,
|
|
299
|
+
type: '入力(単一選択)',
|
|
300
|
+
notionPropType: 'セレクト',
|
|
301
|
+
formula: '',
|
|
302
|
+
valueType: 'string',
|
|
303
|
+
dbName,
|
|
304
|
+
};
|
|
305
|
+
case 'multi_select': return {
|
|
306
|
+
id: property.id,
|
|
307
|
+
name: propName,
|
|
308
|
+
type: '入力(複数選択)',
|
|
309
|
+
notionPropType: 'マルチセレクト',
|
|
310
|
+
formula: '',
|
|
311
|
+
valueType: 'string',
|
|
312
|
+
dbName,
|
|
313
|
+
};
|
|
314
|
+
case 'relation': return {
|
|
315
|
+
id: property.id,
|
|
316
|
+
name: propName,
|
|
317
|
+
type: '入力(単一選択)',
|
|
318
|
+
notionPropType: 'リレーション',
|
|
319
|
+
formula: '',
|
|
320
|
+
valueType: 'string',
|
|
321
|
+
dbName,
|
|
322
|
+
};
|
|
323
|
+
case 'rollup': return {
|
|
324
|
+
id: property.id,
|
|
325
|
+
name: propName,
|
|
326
|
+
type: '表示',
|
|
327
|
+
notionPropType: 'ロールアップ',
|
|
328
|
+
formula: '',
|
|
329
|
+
valueType: 'string',
|
|
330
|
+
dbName,
|
|
331
|
+
};
|
|
332
|
+
case 'unique_id': return {
|
|
333
|
+
id: property.id,
|
|
334
|
+
name: propName,
|
|
335
|
+
type: '表示',
|
|
336
|
+
notionPropType: 'ユニークID',
|
|
337
|
+
formula: '',
|
|
338
|
+
valueType: 'string',
|
|
339
|
+
dbName,
|
|
340
|
+
};
|
|
341
|
+
case 'created_time': return {
|
|
342
|
+
id: property.id,
|
|
343
|
+
name: propName,
|
|
344
|
+
type: '表示',
|
|
345
|
+
notionPropType: '作成日時',
|
|
346
|
+
formula: '',
|
|
347
|
+
valueType: 'date',
|
|
348
|
+
dbName,
|
|
349
|
+
};
|
|
350
|
+
case 'created_by': return {
|
|
351
|
+
id: property.id,
|
|
352
|
+
name: propName,
|
|
353
|
+
type: '表示',
|
|
354
|
+
notionPropType: '作成者',
|
|
355
|
+
formula: '',
|
|
356
|
+
valueType: 'string',
|
|
357
|
+
dbName,
|
|
358
|
+
};
|
|
359
|
+
case 'rich_text': return {
|
|
360
|
+
id: property.id,
|
|
361
|
+
name: propName,
|
|
362
|
+
type: '入力(テキスト)',
|
|
363
|
+
notionPropType: 'テキスト',
|
|
364
|
+
formula: '',
|
|
365
|
+
valueType: 'string',
|
|
366
|
+
dbName,
|
|
367
|
+
};
|
|
368
|
+
case 'number': return {
|
|
369
|
+
id: property.id,
|
|
370
|
+
name: propName,
|
|
371
|
+
type: '入力(数値)',
|
|
372
|
+
notionPropType: '数値',
|
|
373
|
+
formula: '',
|
|
374
|
+
valueType: 'number',
|
|
375
|
+
dbName,
|
|
376
|
+
};
|
|
377
|
+
case 'date': return {
|
|
378
|
+
id: property.id,
|
|
379
|
+
name: propName,
|
|
380
|
+
type: '入力(日時)',
|
|
381
|
+
notionPropType: '日時',
|
|
382
|
+
formula: '',
|
|
383
|
+
valueType: 'date',
|
|
384
|
+
dbName,
|
|
385
|
+
};
|
|
386
|
+
case 'checkbox': return {
|
|
387
|
+
id: property.id,
|
|
388
|
+
name: propName,
|
|
389
|
+
type: '入力(複数選択)',
|
|
390
|
+
notionPropType: 'チェックボックス',
|
|
391
|
+
formula: '',
|
|
392
|
+
valueType: 'boolean',
|
|
393
|
+
dbName,
|
|
394
|
+
};
|
|
395
|
+
case 'title': return {
|
|
396
|
+
id: property.id,
|
|
397
|
+
name: propName,
|
|
398
|
+
type: '入力(テキスト)',
|
|
399
|
+
notionPropType: 'タイトル',
|
|
400
|
+
formula: '',
|
|
401
|
+
valueType: 'string',
|
|
402
|
+
dbName,
|
|
403
|
+
};
|
|
404
|
+
case 'people': return {
|
|
405
|
+
id: property.id,
|
|
406
|
+
name: propName,
|
|
407
|
+
type: '入力(単一選択)',
|
|
408
|
+
notionPropType: 'ユーザー',
|
|
409
|
+
formula: '',
|
|
410
|
+
valueType: 'string',
|
|
411
|
+
dbName,
|
|
412
|
+
};
|
|
413
|
+
case 'last_edited_time': return {
|
|
414
|
+
id: property.id,
|
|
415
|
+
name: propName,
|
|
416
|
+
type: '表示',
|
|
417
|
+
notionPropType: '最終更新日時',
|
|
418
|
+
formula: '',
|
|
419
|
+
valueType: 'date',
|
|
420
|
+
dbName,
|
|
421
|
+
};
|
|
422
|
+
case 'last_edited_by': return {
|
|
423
|
+
id: property.id,
|
|
424
|
+
name: propName,
|
|
425
|
+
type: '表示',
|
|
426
|
+
notionPropType: '最終更新者',
|
|
427
|
+
formula: '',
|
|
428
|
+
valueType: 'string',
|
|
429
|
+
dbName,
|
|
430
|
+
};
|
|
431
|
+
case 'status': return {
|
|
432
|
+
id: property.id,
|
|
433
|
+
name: propName,
|
|
434
|
+
type: '入力(単一選択)',
|
|
435
|
+
notionPropType: 'ステータス',
|
|
436
|
+
formula: '',
|
|
437
|
+
valueType: 'string',
|
|
438
|
+
dbName,
|
|
439
|
+
};
|
|
440
|
+
case 'formula': return {
|
|
441
|
+
id: property.id,
|
|
442
|
+
name: propName,
|
|
443
|
+
type: '表示',
|
|
444
|
+
notionPropType: '数式',
|
|
445
|
+
formula: '',
|
|
446
|
+
valueType: 'any',
|
|
447
|
+
dbName,
|
|
448
|
+
};
|
|
449
|
+
/* @ts-ignore */
|
|
450
|
+
case 'button': return {
|
|
451
|
+
id: property?.['id'] ?? '',
|
|
452
|
+
name: propName,
|
|
453
|
+
type: 'ボタン',
|
|
454
|
+
notionPropType: 'ボタン',
|
|
455
|
+
formula: '',
|
|
456
|
+
valueType: 'string',
|
|
457
|
+
dbName,
|
|
458
|
+
};
|
|
459
|
+
default: return {
|
|
460
|
+
id: property.id,
|
|
461
|
+
name: propName,
|
|
462
|
+
type: '不明',
|
|
463
|
+
notionPropType: property.type,
|
|
464
|
+
formula: '',
|
|
465
|
+
valueType: 'string',
|
|
466
|
+
dbName,
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
class ScreenItemBuilder {
|
|
471
|
+
build(database) {
|
|
472
|
+
const items = [];
|
|
473
|
+
Object.entries(database?.properties ?? {}).sort((a, b) => {
|
|
474
|
+
return a[0].localeCompare(b[0]);
|
|
475
|
+
}).filter(([propName, prop]) => {
|
|
476
|
+
// if (propName.startsWith('_')) return false;
|
|
477
|
+
// if (/^\d/.test(propName)) return false;
|
|
478
|
+
// if (propName.includes('旧エクセル')) return false;
|
|
479
|
+
// if (['formula', 'rollup', 'button'].includes(prop.type)) return false;
|
|
480
|
+
return true;
|
|
481
|
+
}).forEach(([propName, prop]) => {
|
|
482
|
+
const item = buildPageItem(prop, propName, database?.title?.[0]?.plain_text ?? '');
|
|
483
|
+
items.push(item);
|
|
484
|
+
});
|
|
485
|
+
return items;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Generated bundle index. Do not edit.
|
|
491
|
+
*/
|
|
492
|
+
|
|
493
|
+
export { ActionId, CommandActionsBuilder, CommandBuilder, ErBuilder, QueryBuilder, ScreenItemBuilder, createCommandExecutionAction, createCommandNavigateAction };
|
|
494
|
+
//# sourceMappingURL=xxmachina-common-domain-builder.mjs.map
|