@xxmachina/common 19.0.0-preview.29 → 19.0.0-preview.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/_shared/auth/auth.module.js +22 -0
- package/_shared/auth/auth.module.js.map +1 -0
- package/_shared/auth/index.js +5 -0
- package/_shared/auth/index.js.map +1 -0
- package/_shared/auth/passports/anonymous/anonymous.strategy.js +19 -0
- package/_shared/auth/passports/anonymous/anonymous.strategy.js.map +1 -0
- package/_shared/auth/passports/anonymous/index.js +5 -0
- package/_shared/auth/passports/anonymous/index.js.map +1 -0
- package/_shared/auth/passports/firebase/firebase.guard.js +23 -0
- package/_shared/auth/passports/firebase/firebase.guard.js.map +1 -0
- package/_shared/auth/passports/firebase/firebase.strategy.js +22 -0
- package/_shared/auth/passports/firebase/firebase.strategy.js.map +1 -0
- package/_shared/auth/passports/firebase/index.js +6 -0
- package/_shared/auth/passports/firebase/index.js.map +1 -0
- package/_shared/auth/passports/internal/index.js +5 -0
- package/_shared/auth/passports/internal/index.js.map +1 -0
- package/_shared/auth/passports/internal/internal.strategy.js +33 -0
- package/_shared/auth/passports/internal/internal.strategy.js.map +1 -0
- package/_shared/auth/passports/msal/index.js +6 -0
- package/_shared/auth/passports/msal/index.js.map +1 -0
- package/_shared/auth/passports/msal/msal.guard.js +13 -0
- package/_shared/auth/passports/msal/msal.guard.js.map +1 -0
- package/_shared/auth/passports/msal/msal.strategy.js +43 -0
- package/_shared/auth/passports/msal/msal.strategy.js.map +1 -0
- package/_shared/meta/decorators.js +25 -0
- package/_shared/meta/decorators.js.map +1 -0
- package/_shared/meta/redis/index.js +6 -0
- package/_shared/meta/redis/index.js.map +1 -0
- package/_shared/meta/redis/redis.config.js +10 -0
- package/_shared/meta/redis/redis.config.js.map +1 -0
- package/_shared/meta/redis/redis.repository.d.ts +3 -6
- package/_shared/meta/redis/redis.repository.js +108 -0
- package/_shared/meta/redis/redis.repository.js.map +1 -0
- package/auth/auth.service.d.ts +0 -3
- package/auth/auth.service.js +12 -0
- package/auth/auth.service.js.map +1 -0
- package/auth/index.js +5 -0
- package/auth/index.js.map +1 -0
- package/azure-auth/auth.di.js +56 -0
- package/azure-auth/auth.di.js.map +1 -0
- package/azure-auth/auth.service.d.ts +0 -3
- package/azure-auth/auth.service.js +115 -0
- package/azure-auth/auth.service.js.map +1 -0
- package/azure-auth/index.js +6 -0
- package/azure-auth/index.js.map +1 -0
- package/domain/builder/command/command.builder.d.ts +2 -1
- package/domain/builder/command/command.builder.js +30 -0
- package/domain/builder/command/command.builder.js.map +1 -0
- package/domain/builder/command/index.js +5 -0
- package/domain/builder/command/index.js.map +1 -0
- package/domain/builder/command-action/command-action.builder.d.ts +1 -1
- package/domain/builder/command-action/command-action.builder.js +139 -0
- package/domain/builder/command-action/command-action.builder.js.map +1 -0
- package/domain/builder/command-action/index.js +5 -0
- package/domain/builder/command-action/index.js.map +1 -0
- package/domain/builder/er/er.builder.js +112 -0
- package/domain/builder/er/er.builder.js.map +1 -0
- package/domain/builder/er/index.js +5 -0
- package/domain/builder/er/index.js.map +1 -0
- package/domain/builder/screen-item/index.js +5 -0
- package/domain/builder/screen-item/index.js.map +1 -0
- package/domain/builder/screen-item/screen-item.builder.d.ts +2 -2
- package/{fesm2022/xxmachina-common-domain-builder-screen-item.mjs → domain/builder/screen-item/screen-item.builder.js} +11 -10
- package/domain/builder/screen-item/screen-item.builder.js.map +1 -0
- package/domain/index.d.ts +1 -2
- package/domain/index.js +5 -0
- package/domain/index.js.map +1 -0
- package/{domain-invoice → domain/invoice}/builders/email/email.builder.d.ts +1 -1
- package/domain/invoice/builders/email/email.builder.js +29 -0
- package/domain/invoice/builders/email/email.builder.js.map +1 -0
- package/domain/invoice/builders/email/index.js +5 -0
- package/domain/invoice/builders/email/index.js.map +1 -0
- package/domain/invoice/builders/message/index.js +5 -0
- package/domain/invoice/builders/message/index.js.map +1 -0
- package/{domain-invoice → domain/invoice}/builders/message/message.builder.d.ts +1 -1
- package/domain/invoice/builders/message/message.builder.js +43 -0
- package/domain/invoice/builders/message/message.builder.js.map +1 -0
- package/domain/invoice/builders/title/index.js +5 -0
- package/domain/invoice/builders/title/index.js.map +1 -0
- package/{domain-invoice → domain/invoice}/builders/title/title.builder.d.ts +1 -1
- package/domain/invoice/builders/title/title.builder.js +11 -0
- package/domain/invoice/builders/title/title.builder.js.map +1 -0
- package/domain/invoice/models/backoffice/contract.js +50 -0
- package/domain/invoice/models/backoffice/contract.js.map +1 -0
- package/domain/invoice/models/backoffice/index.js +9 -0
- package/domain/invoice/models/backoffice/index.js.map +1 -0
- package/domain/invoice/models/backoffice/invoice-mail.js +7 -0
- package/domain/invoice/models/backoffice/invoice-mail.js.map +1 -0
- package/{domain-invoice → domain/invoice}/models/backoffice/invoice.d.ts +1 -1
- package/domain/invoice/models/backoffice/invoice.js +91 -0
- package/domain/invoice/models/backoffice/invoice.js.map +1 -0
- package/{domain-invoice → domain/invoice}/models/backoffice/order.d.ts +1 -1
- package/domain/invoice/models/backoffice/order.js +157 -0
- package/domain/invoice/models/backoffice/order.js.map +1 -0
- package/{domain-invoice → domain/invoice}/models/backoffice/partner.d.ts +1 -1
- package/domain/invoice/models/backoffice/partner.js +96 -0
- package/domain/invoice/models/backoffice/partner.js.map +1 -0
- package/domain/invoice/models/index.js +5 -0
- package/domain/invoice/models/index.js.map +1 -0
- package/domain/models/agent/assistant.js +31 -0
- package/domain/models/agent/assistant.js.map +1 -0
- package/domain/models/agent/index.js +5 -0
- package/domain/models/agent/index.js.map +1 -0
- package/domain/models/bookmarklet/bookmarklet.js +34 -0
- package/domain/models/bookmarklet/bookmarklet.js.map +1 -0
- package/domain/models/bookmarklet/index.js +5 -0
- package/domain/models/bookmarklet/index.js.map +1 -0
- package/domain/models/calendar-utils.d.ts +5 -0
- package/domain/models/calendar-utils.js +43 -0
- package/domain/models/calendar-utils.js.map +1 -0
- package/domain/models/command/command.helper.js +14 -0
- package/domain/models/command/command.helper.js.map +1 -0
- package/domain/models/command/command.js +40 -0
- package/domain/models/command/command.js.map +1 -0
- package/domain/models/command/index.js +6 -0
- package/domain/models/command/index.js.map +1 -0
- package/domain/models/database/database.js +7 -0
- package/domain/models/database/database.js.map +1 -0
- package/domain/models/database/index.js +5 -0
- package/domain/models/database/index.js.map +1 -0
- package/domain/models/endpoint/endpoint.helper.js +21 -0
- package/domain/models/endpoint/endpoint.helper.js.map +1 -0
- package/domain/models/endpoint/index.js +5 -0
- package/domain/models/endpoint/index.js.map +1 -0
- package/domain/models/index.d.ts +2 -8
- package/domain/models/index.js +12 -0
- package/domain/models/index.js.map +1 -0
- package/domain/models/links/google/google.js +47 -0
- package/domain/models/links/google/google.js.map +1 -0
- package/domain/models/links/google/index.js +5 -0
- package/domain/models/links/google/index.js.map +1 -0
- package/domain/models/openapi/index.js +6 -0
- package/domain/models/openapi/index.js.map +1 -0
- package/domain/models/openapi/openapi.js +87 -0
- package/domain/models/openapi/openapi.js.map +1 -0
- package/domain/models/openapi/openapi.schema.js +3 -0
- package/domain/models/openapi/openapi.schema.js.map +1 -0
- package/domain/models/operators/assistancts/base.js +13 -0
- package/domain/models/operators/assistancts/base.js.map +1 -0
- package/domain/models/operators/assistancts/index.js +5 -0
- package/domain/models/operators/assistancts/index.js.map +1 -0
- package/domain/models/operators/base.js +10 -0
- package/domain/models/operators/base.js.map +1 -0
- package/domain/models/operators/index.js +8 -0
- package/domain/models/operators/index.js.map +1 -0
- package/domain/models/operators/systems/base.js +3 -0
- package/domain/models/operators/systems/base.js.map +1 -0
- package/domain/models/operators/systems/graphql.js +3 -0
- package/domain/models/operators/systems/graphql.js.map +1 -0
- package/domain/models/operators/systems/index.js +7 -0
- package/domain/models/operators/systems/index.js.map +1 -0
- package/domain/models/operators/systems/rest.js +3 -0
- package/domain/models/operators/systems/rest.js.map +1 -0
- package/domain/models/operators/workflows/index.js +5 -0
- package/domain/models/operators/workflows/index.js.map +1 -0
- package/domain/models/operators/workflows/workflow.js +3 -0
- package/domain/models/operators/workflows/workflow.js.map +1 -0
- package/domain/models/project.js +9 -0
- package/domain/models/project.js.map +1 -0
- package/domain/models/query/index.js +6 -0
- package/domain/models/query/index.js.map +1 -0
- package/domain/models/query/query.d.ts +1 -1
- package/domain/models/query/query.helper.d.ts +0 -1
- package/domain/models/query/query.helper.js +172 -0
- package/domain/models/query/query.helper.js.map +1 -0
- package/domain/models/query/query.js +122 -0
- package/domain/models/query/query.js.map +1 -0
- package/domain/models/resource/index.js +6 -0
- package/domain/models/resource/index.js.map +1 -0
- package/domain/models/resource/resource.helper.js +16 -0
- package/domain/models/resource/resource.helper.js.map +1 -0
- package/domain/models/resource/resource.js +73 -0
- package/domain/models/resource/resource.js.map +1 -0
- package/domain/models/scheduler/index.js +5 -0
- package/domain/models/scheduler/index.js.map +1 -0
- package/domain/models/scheduler/schedule.js +89 -0
- package/domain/models/scheduler/schedule.js.map +1 -0
- package/domain/models/screen-item/index.js +5 -0
- package/domain/models/screen-item/index.js.map +1 -0
- package/domain/models/screen-item/screen-item.js +3 -0
- package/domain/models/screen-item/screen-item.js.map +1 -0
- package/domain/models/spec.js +3 -0
- package/domain/models/spec.js.map +1 -0
- package/domain/resolvers/index.js +5 -0
- package/domain/resolvers/index.js.map +1 -0
- package/{domain-invoice → domain}/resolvers/invoice.resolver.d.ts +1 -1
- package/domain/resolvers/invoice.resolver.js +31 -0
- package/domain/resolvers/invoice.resolver.js.map +1 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.d.ts +0 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js +1 -0
- package/infrastructure/converters/bookmarklet/bookmarklet.converter.js.map +1 -0
- package/{infra → infrastructure}/converters/google/google.converter.d.ts +1 -4
- package/infrastructure/converters/google/google.converter.js +27 -0
- package/infrastructure/converters/google/google.converter.js.map +1 -0
- package/infrastructure/converters/google/index.js +5 -0
- package/infrastructure/converters/google/index.js.map +1 -0
- package/infrastructure/external/data-connect/data-connect.service.impl.d.ts +7 -0
- package/infrastructure/external/data-connect/data-connect.service.impl.js +20 -0
- package/infrastructure/external/data-connect/data-connect.service.impl.js.map +1 -0
- package/infrastructure/external/data-connect/data-connect.service.js +11 -0
- package/infrastructure/external/data-connect/data-connect.service.js.map +1 -0
- package/infrastructure/external/data-connect/index.js +5 -0
- package/infrastructure/external/data-connect/index.js.map +1 -0
- package/{infra → infrastructure}/external/external.config.d.ts +2 -2
- package/infrastructure/external/external.config.js +13 -0
- package/infrastructure/external/external.config.js.map +1 -0
- package/{infra → infrastructure}/external/external.service.d.ts +3 -4
- package/infrastructure/external/external.service.js +23 -0
- package/infrastructure/external/external.service.js.map +1 -0
- package/infrastructure/external/index.js +6 -0
- package/infrastructure/external/index.js.map +1 -0
- package/infrastructure/external/quick-js/index.js +5 -0
- package/infrastructure/external/quick-js/index.js.map +1 -0
- package/{infra → infrastructure}/external/quick-js/quick-js.service.d.ts +0 -3
- package/infrastructure/external/quick-js/quick-js.service.js +44 -0
- package/infrastructure/external/quick-js/quick-js.service.js.map +1 -0
- package/infrastructure/external/resend/index.js +5 -0
- package/infrastructure/external/resend/index.js.map +1 -0
- package/infrastructure/external/resend/resend.service.d.ts +9 -0
- package/{infra → infrastructure}/external/resend/resend.service.impl.d.ts +8 -4
- package/infrastructure/external/resend/resend.service.impl.js +27 -0
- package/infrastructure/external/resend/resend.service.impl.js.map +1 -0
- package/infrastructure/external/resend/resend.service.js +6 -0
- package/infrastructure/external/resend/resend.service.js.map +1 -0
- package/infrastructure/index.js +6 -0
- package/infrastructure/index.js.map +1 -0
- package/{infra → infrastructure}/infrastructure.config.d.ts +5 -5
- package/infrastructure/infrastructure.config.js +12 -0
- package/infrastructure/infrastructure.config.js.map +1 -0
- package/{infra → infrastructure}/infrastructure.service.d.ts +0 -3
- package/infrastructure/infrastructure.service.js +20 -0
- package/infrastructure/infrastructure.service.js.map +1 -0
- package/infrastructure/query/firestore/query/index.js +5 -0
- package/infrastructure/query/firestore/query/index.js.map +1 -0
- package/{infra → infrastructure}/query/firestore/query/query.query.d.ts +0 -3
- package/infrastructure/query/firestore/query/query.query.js +20 -0
- package/infrastructure/query/firestore/query/query.query.js.map +1 -0
- package/infrastructure/query/firestore/resource/index.js +5 -0
- package/infrastructure/query/firestore/resource/index.js.map +1 -0
- package/{infra → infrastructure}/query/firestore/resource/resource.query.d.ts +0 -3
- package/infrastructure/query/firestore/resource/resource.query.js +20 -0
- package/infrastructure/query/firestore/resource/resource.query.js.map +1 -0
- package/infrastructure/query/hasura/resource/index.js +5 -0
- package/infrastructure/query/hasura/resource/index.js.map +1 -0
- package/infrastructure/query/hasura/resource/resource.query.d.ts +3 -0
- package/infrastructure/query/hasura/resource/resource.query.js +14 -0
- package/infrastructure/query/hasura/resource/resource.query.js.map +1 -0
- package/infrastructure/repository/dataconnect/invoice/index.js +5 -0
- package/infrastructure/repository/dataconnect/invoice/index.js.map +1 -0
- package/{infra → infrastructure}/repository/dataconnect/invoice/invoice.repository.impl.d.ts +1 -4
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js +54 -0
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js.map +1 -0
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js +11 -0
- package/infrastructure/repository/dataconnect/invoice/invoice.repository.js.map +1 -0
- package/infrastructure/repository/dataconnect/order/index.js +5 -0
- package/infrastructure/repository/dataconnect/order/index.js.map +1 -0
- package/{infra → infrastructure}/repository/dataconnect/order/order.repository.impl.d.ts +1 -4
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js +74 -0
- package/infrastructure/repository/dataconnect/order/order.repository.impl.js.map +1 -0
- package/infrastructure/repository/dataconnect/order/order.repository.js +11 -0
- package/infrastructure/repository/dataconnect/order/order.repository.js.map +1 -0
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.d.ts +6 -0
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js +20 -0
- package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js.map +1 -0
- package/infrastructure/repository/firestore/bookmarklet/index.d.ts +1 -0
- package/infrastructure/repository/firestore/bookmarklet/index.js +5 -0
- package/infrastructure/repository/firestore/bookmarklet/index.js.map +1 -0
- package/infrastructure/repository/firestore/firestore.repository.d.ts +7 -0
- package/infrastructure/repository/firestore/firestore.repository.js +20 -0
- package/infrastructure/repository/firestore/firestore.repository.js.map +1 -0
- package/infrastructure/repository/firestore/index.d.ts +1 -0
- package/infrastructure/repository/firestore/index.js +5 -0
- package/infrastructure/repository/firestore/index.js.map +1 -0
- package/infrastructure/repository/firestore/link/google/google.repository.d.ts +7 -0
- package/infrastructure/repository/firestore/link/google/google.repository.js +19 -0
- package/infrastructure/repository/firestore/link/google/google.repository.js.map +1 -0
- package/infrastructure/repository/firestore/link/google/index.js +5 -0
- package/infrastructure/repository/firestore/link/google/index.js.map +1 -0
- package/infrastructure/repository/firestore/link/index.js +5 -0
- package/infrastructure/repository/firestore/link/index.js.map +1 -0
- package/infrastructure/repository/firestore/link/link.repository.d.ts +5 -0
- package/infrastructure/repository/firestore/link/link.repository.js +17 -0
- package/infrastructure/repository/firestore/link/link.repository.js.map +1 -0
- package/infrastructure/repository/firestore/query/index.js +5 -0
- package/infrastructure/repository/firestore/query/index.js.map +1 -0
- package/{infra → infrastructure}/repository/firestore/query/query.repository.d.ts +1 -4
- package/infrastructure/repository/firestore/query/query.repository.js +20 -0
- package/infrastructure/repository/firestore/query/query.repository.js.map +1 -0
- package/infrastructure/repository/firestore/resource/index.js +5 -0
- package/infrastructure/repository/firestore/resource/index.js.map +1 -0
- package/{infra → infrastructure}/repository/firestore/resource/resource.repository.d.ts +1 -4
- package/infrastructure/repository/firestore/resource/resource.repository.js +20 -0
- package/infrastructure/repository/firestore/resource/resource.repository.js.map +1 -0
- package/infrastructure/repository/hasura/query/index.js +5 -0
- package/infrastructure/repository/hasura/query/index.js.map +1 -0
- package/{infra → infrastructure}/repository/hasura/query/query.repository.d.ts +0 -3
- package/infrastructure/repository/hasura/query/query.repository.js +23 -0
- package/infrastructure/repository/hasura/query/query.repository.js.map +1 -0
- package/infrastructure/repository/hasura/resource/index.js +5 -0
- package/infrastructure/repository/hasura/resource/index.js.map +1 -0
- package/{infra → infrastructure}/repository/hasura/resource/resource.repository.d.ts +0 -3
- package/infrastructure/repository/hasura/resource/resource.repository.js +23 -0
- package/infrastructure/repository/hasura/resource/resource.repository.js.map +1 -0
- package/infrastructure/repository/index.js +6 -0
- package/infrastructure/repository/index.js.map +1 -0
- package/infrastructure/repository/notion/contract/contract.config.js +10 -0
- package/infrastructure/repository/notion/contract/contract.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/contract/contract.repository.d.ts +1 -4
- package/infrastructure/repository/notion/contract/contract.repository.js +22 -0
- package/infrastructure/repository/notion/contract/contract.repository.js.map +1 -0
- package/infrastructure/repository/notion/contract/index.js +6 -0
- package/infrastructure/repository/notion/contract/index.js.map +1 -0
- package/infrastructure/repository/notion/index.d.ts +2 -0
- package/infrastructure/repository/notion/index.js +6 -0
- package/infrastructure/repository/notion/index.js.map +1 -0
- package/infrastructure/repository/notion/invoice/index.js +6 -0
- package/infrastructure/repository/notion/invoice/index.js.map +1 -0
- package/infrastructure/repository/notion/invoice/invoice.config.js +10 -0
- package/infrastructure/repository/notion/invoice/invoice.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/invoice/invoice.repository.d.ts +1 -4
- package/infrastructure/repository/notion/invoice/invoice.repository.js +22 -0
- package/infrastructure/repository/notion/invoice/invoice.repository.js.map +1 -0
- package/infrastructure/repository/notion/notion.config.js +18 -0
- package/infrastructure/repository/notion/notion.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/notion.repository.d.ts +0 -3
- package/infrastructure/repository/notion/notion.repository.js +26 -0
- package/infrastructure/repository/notion/notion.repository.js.map +1 -0
- package/infrastructure/repository/notion/order/index.js +5 -0
- package/infrastructure/repository/notion/order/index.js.map +1 -0
- package/infrastructure/repository/notion/order/order.config.js +10 -0
- package/infrastructure/repository/notion/order/order.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/order/order.repository.d.ts +1 -4
- package/infrastructure/repository/notion/order/order.repository.js +22 -0
- package/infrastructure/repository/notion/order/order.repository.js.map +1 -0
- package/infrastructure/repository/notion/partner/index.js +6 -0
- package/infrastructure/repository/notion/partner/index.js.map +1 -0
- package/infrastructure/repository/notion/partner/partner.config.js +10 -0
- package/infrastructure/repository/notion/partner/partner.config.js.map +1 -0
- package/{infra → infrastructure}/repository/notion/partner/partner.repository.d.ts +1 -4
- package/infrastructure/repository/notion/partner/partner.repository.js +22 -0
- package/infrastructure/repository/notion/partner/partner.repository.js.map +1 -0
- package/infrastructure/repository/redis/index.js +6 -0
- package/infrastructure/repository/redis/index.js.map +1 -0
- package/infrastructure/repository/redis/operator/index.js +5 -0
- package/infrastructure/repository/redis/operator/index.js.map +1 -0
- package/{infra → infrastructure}/repository/redis/operator/operator.repository.d.ts +0 -3
- package/infrastructure/repository/redis/operator/operator.repository.js +17 -0
- package/infrastructure/repository/redis/operator/operator.repository.js.map +1 -0
- package/infrastructure/repository/redis/project/index.js +5 -0
- package/infrastructure/repository/redis/project/index.js.map +1 -0
- package/{infra → infrastructure}/repository/redis/project/project.repository.d.ts +0 -3
- package/infrastructure/repository/redis/project/project.repository.js +33 -0
- package/infrastructure/repository/redis/project/project.repository.js.map +1 -0
- package/infrastructure/repository/redis/redis.config.js +10 -0
- package/infrastructure/repository/redis/redis.config.js.map +1 -0
- package/{infra → infrastructure}/repository/redis/redis.service.d.ts +0 -3
- package/infrastructure/repository/redis/redis.service.js +22 -0
- package/infrastructure/repository/redis/redis.service.js.map +1 -0
- package/infrastructure/repository/redis/spec/index.js +5 -0
- package/infrastructure/repository/redis/spec/index.js.map +1 -0
- package/{infra → infrastructure}/repository/redis/spec/spec.repository.d.ts +3 -5
- package/infrastructure/repository/redis/spec/spec.repository.js +94 -0
- package/infrastructure/repository/redis/spec/spec.repository.js.map +1 -0
- package/infrastructure/repository/redis/system/index.js +5 -0
- package/infrastructure/repository/redis/system/index.js.map +1 -0
- package/infrastructure/repository/redis/system/system.repository.d.ts +3 -0
- package/infrastructure/repository/redis/system/system.repository.js +15 -0
- package/infrastructure/repository/redis/system/system.repository.js.map +1 -0
- package/{infra → infrastructure}/repository/repository.config.d.ts +4 -4
- package/infrastructure/repository/repository.config.js +12 -0
- package/infrastructure/repository/repository.config.js.map +1 -0
- package/{infra → infrastructure}/repository/repository.service.d.ts +0 -3
- package/infrastructure/repository/repository.service.js +20 -0
- package/infrastructure/repository/repository.service.js.map +1 -0
- package/package.json +14 -202
- package/stores/index.d.ts +28 -4
- package/stores/index.js +66 -0
- package/stores/index.js.map +1 -0
- package/usecase/assistant/assistant.service.d.ts +1 -4
- package/usecase/assistant/assistant.service.js +72 -0
- package/usecase/assistant/assistant.service.js.map +1 -0
- package/usecase/assistant/index.js +5 -0
- package/usecase/assistant/index.js.map +1 -0
- package/usecase/database/database.service.d.ts +0 -3
- package/usecase/database/database.service.js +103 -0
- package/usecase/database/database.service.js.map +1 -0
- package/usecase/database/index.js +5 -0
- package/usecase/database/index.js.map +1 -0
- package/usecase/graphql/graphql.service.d.ts +0 -3
- package/usecase/graphql/graphql.service.js +49 -0
- package/usecase/graphql/graphql.service.js.map +1 -0
- package/usecase/graphql/index.js +5 -0
- package/usecase/graphql/index.js.map +1 -0
- package/usecase/index.js +5 -0
- package/usecase/index.js.map +1 -0
- package/usecase/invoice/index.js +5 -0
- package/usecase/invoice/index.js.map +1 -0
- package/usecase/invoice/invoice.service.d.ts +13 -9
- package/usecase/invoice/invoice.service.js +69 -0
- package/usecase/invoice/invoice.service.js.map +1 -0
- package/usecase/link/index.js +5 -0
- package/usecase/link/index.js.map +1 -0
- package/usecase/link/link.service.d.ts +2 -5
- package/usecase/link/link.service.js +20 -0
- package/usecase/link/link.service.js.map +1 -0
- package/usecase/order/index.js +5 -0
- package/usecase/order/index.js.map +1 -0
- package/usecase/order/order.service.d.ts +2 -5
- package/usecase/order/order.service.js +27 -0
- package/usecase/order/order.service.js.map +1 -0
- package/usecase/project/index.js +5 -0
- package/usecase/project/index.js.map +1 -0
- package/usecase/project/project.service.d.ts +1 -4
- package/usecase/project/project.service.js +37 -0
- package/usecase/project/project.service.js.map +1 -0
- package/usecase/spec/index.js +5 -0
- package/usecase/spec/index.js.map +1 -0
- package/usecase/spec/spec.service.d.ts +1 -4
- package/usecase/spec/spec.service.js +49 -0
- package/usecase/spec/spec.service.js.map +1 -0
- package/usecase/usecase.service.d.ts +0 -3
- package/usecase/usecase.service.js +24 -0
- package/usecase/usecase.service.js.map +1 -0
- package/{fesm2022/xxmachina-common-utils-crypto.mjs → utils/crypto.js} +12 -10
- package/utils/crypto.js.map +1 -0
- package/{fesm2022/xxmachina-common-utils.mjs → utils/extract-display-fields.js} +4 -7
- package/utils/extract-display-fields.js.map +1 -0
- package/utils/index.js +5 -0
- package/utils/index.js.map +1 -0
- package/_shared/meta/index.d.ts +0 -1
- package/domain/builder/index.d.ts +0 -4
- package/domain/models/links/index.d.ts +0 -1
- package/domain-invoice/builders/index.d.ts +0 -3
- package/domain-invoice/index.d.ts +0 -3
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs +0 -20
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs +0 -41
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs +0 -34
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs +0 -49
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-auth.mjs +0 -25
- package/fesm2022/xxmachina-common-_shared-auth.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs +0 -99
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs.map +0 -1
- package/fesm2022/xxmachina-common-_shared-meta.mjs +0 -26
- package/fesm2022/xxmachina-common-_shared-meta.mjs.map +0 -1
- package/fesm2022/xxmachina-common-auth.mjs +0 -17
- package/fesm2022/xxmachina-common-auth.mjs.map +0 -1
- package/fesm2022/xxmachina-common-azure-auth.mjs +0 -160
- package/fesm2022/xxmachina-common-azure-auth.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-builder.mjs +0 -470
- package/fesm2022/xxmachina-common-domain-builder.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-invoice-builders.mjs +0 -70
- package/fesm2022/xxmachina-common-domain-invoice-builders.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-invoice-models.mjs +0 -427
- package/fesm2022/xxmachina-common-domain-invoice-models.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-invoice-resolvers.mjs +0 -39
- package/fesm2022/xxmachina-common-domain-invoice-resolvers.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-invoice.mjs +0 -8
- package/fesm2022/xxmachina-common-domain-invoice.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain-models.mjs +0 -805
- package/fesm2022/xxmachina-common-domain-models.mjs.map +0 -1
- package/fesm2022/xxmachina-common-domain.mjs +0 -7
- package/fesm2022/xxmachina-common-domain.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-converters-google.mjs +0 -36
- package/fesm2022/xxmachina-common-infra-converters-google.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs +0 -13
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs +0 -44
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-external-resend.mjs +0 -10
- package/fesm2022/xxmachina-common-infra-external-resend.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-external.mjs +0 -35
- package/fesm2022/xxmachina-common-infra-external.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs +0 -34
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs +0 -20
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs +0 -18
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs +0 -74
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs +0 -41
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs +0 -112
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs.map +0 -1
- package/fesm2022/xxmachina-common-infra.mjs +0 -376
- package/fesm2022/xxmachina-common-infra.mjs.map +0 -1
- package/fesm2022/xxmachina-common-stores-firestore.mjs +0 -33
- package/fesm2022/xxmachina-common-stores-firestore.mjs.map +0 -1
- package/fesm2022/xxmachina-common-stores-hasura.mjs +0 -32
- package/fesm2022/xxmachina-common-stores-hasura.mjs.map +0 -1
- package/fesm2022/xxmachina-common-stores.mjs +0 -16
- package/fesm2022/xxmachina-common-stores.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-assistant.mjs +0 -67
- package/fesm2022/xxmachina-common-usecase-assistant.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-database.mjs +0 -95
- package/fesm2022/xxmachina-common-usecase-database.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-graphql.mjs +0 -51
- package/fesm2022/xxmachina-common-usecase-graphql.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-invoice.mjs +0 -67
- package/fesm2022/xxmachina-common-usecase-invoice.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-link.mjs +0 -26
- package/fesm2022/xxmachina-common-usecase-link.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-order.mjs +0 -29
- package/fesm2022/xxmachina-common-usecase-order.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-project.mjs +0 -35
- package/fesm2022/xxmachina-common-usecase-project.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase-spec.mjs +0 -45
- package/fesm2022/xxmachina-common-usecase-spec.mjs.map +0 -1
- package/fesm2022/xxmachina-common-usecase.mjs +0 -198
- package/fesm2022/xxmachina-common-usecase.mjs.map +0 -1
- package/fesm2022/xxmachina-common-utils-crypto.mjs.map +0 -1
- package/fesm2022/xxmachina-common-utils.mjs.map +0 -1
- package/fesm2022/xxmachina-common.mjs +0 -6
- package/fesm2022/xxmachina-common.mjs.map +0 -1
- package/index.d.ts +0 -1
- package/infra/external/resend/resend.service.d.ts +0 -2
- package/infra/query/firestore/index.d.ts +0 -2
- package/infra/query/hasura/index.d.ts +0 -1
- package/infra/query/hasura/resource/resource.query.d.ts +0 -6
- package/infra/repository/dataconnect/index.d.ts +0 -2
- package/infra/repository/firestore/firestore.repository.d.ts +0 -8
- package/infra/repository/firestore/index.d.ts +0 -3
- package/infra/repository/firestore/link/google/google.repository.d.ts +0 -10
- package/infra/repository/firestore/link/link.repository.d.ts +0 -8
- package/infra/repository/hasura/index.d.ts +0 -2
- package/infra/repository/notion/index.d.ts +0 -6
- package/infra/repository/redis/system/system.repository.d.ts +0 -6
- package/stores/firestore/firestore.store.d.ts +0 -12
- package/stores/firestore/index.d.ts +0 -1
- package/stores/hasura/hasura.store.d.ts +0 -12
- package/stores/hasura/index.d.ts +0 -1
- package/utils/crypto/index.d.ts +0 -1
- /package/{domain-invoice → domain/invoice}/builders/email/index.d.ts +0 -0
- /package/{domain-invoice → domain/invoice}/builders/message/index.d.ts +0 -0
- /package/{domain-invoice → domain/invoice}/builders/title/index.d.ts +0 -0
- /package/{domain-invoice → domain/invoice}/models/backoffice/contract.d.ts +0 -0
- /package/{domain-invoice → domain/invoice}/models/backoffice/index.d.ts +0 -0
- /package/{domain-invoice → domain/invoice}/models/backoffice/invoice-mail.d.ts +0 -0
- /package/{domain-invoice → domain/invoice}/models/index.d.ts +0 -0
- /package/{domain-invoice → domain}/resolvers/index.d.ts +0 -0
- /package/{infra → infrastructure}/converters/google/index.d.ts +0 -0
- /package/{infra → infrastructure}/external/data-connect/data-connect.service.d.ts +0 -0
- /package/{infra → infrastructure}/external/data-connect/index.d.ts +0 -0
- /package/{infra → infrastructure}/external/index.d.ts +0 -0
- /package/{infra → infrastructure}/external/quick-js/index.d.ts +0 -0
- /package/{infra → infrastructure}/external/resend/index.d.ts +0 -0
- /package/{infra → infrastructure}/index.d.ts +0 -0
- /package/{infra → infrastructure}/query/firestore/query/index.d.ts +0 -0
- /package/{infra → infrastructure}/query/firestore/resource/index.d.ts +0 -0
- /package/{infra → infrastructure}/query/hasura/resource/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/dataconnect/invoice/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/dataconnect/invoice/invoice.repository.d.ts +0 -0
- /package/{infra → infrastructure}/repository/dataconnect/order/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/dataconnect/order/order.repository.d.ts +0 -0
- /package/{infra → infrastructure}/repository/firestore/link/google/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/firestore/link/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/firestore/query/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/firestore/resource/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/hasura/query/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/hasura/resource/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/contract/contract.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/contract/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/invoice/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/invoice/invoice.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/notion.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/order/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/order/order.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/partner/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/notion/partner/partner.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/operator/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/project/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/redis.config.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/spec/index.d.ts +0 -0
- /package/{infra → infrastructure}/repository/redis/system/index.d.ts +0 -0
- /package/utils/{crypto/crypto.d.ts → crypto.d.ts} +0 -0
|
@@ -1,805 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import { IsString, IsOptional, ValidateNested } from 'class-validator';
|
|
3
|
-
import { Nullable, Optional, IsDayjs as IsDayjs$1 } from 'class-validator-extended';
|
|
4
|
-
import { Firestore } from '@nx-ddd/firestore/decorators';
|
|
5
|
-
import dayjs from 'dayjs';
|
|
6
|
-
import { Domain, TransformToDayjs as TransformToDayjs$1 } from '@nx-ddd/common/domain';
|
|
7
|
-
import { get, merge, pick, camelCase } from 'lodash-es';
|
|
8
|
-
import { extractDisplayFields } from '@xxmachina/common/utils';
|
|
9
|
-
import { createCompoundSchema } from 'genson-js';
|
|
10
|
-
import { deepSnakeToCamelCase, Hasura, TransformToDayjs } from '@nx-ddd/hasura';
|
|
11
|
-
import { gql } from 'apollo-angular';
|
|
12
|
-
import { format } from 'prettier';
|
|
13
|
-
import graphqlParser from 'prettier/parser-graphql';
|
|
14
|
-
import { IsDayjs } from '@nx-ddd/core';
|
|
15
|
-
import { Firestore as Firestore$1 } from '@nx-ddd/firestore';
|
|
16
|
-
|
|
17
|
-
class Assistant {
|
|
18
|
-
id;
|
|
19
|
-
model;
|
|
20
|
-
name;
|
|
21
|
-
description;
|
|
22
|
-
instructions;
|
|
23
|
-
isPublic;
|
|
24
|
-
sheetUrl;
|
|
25
|
-
}
|
|
26
|
-
__decorate([
|
|
27
|
-
IsString(),
|
|
28
|
-
IsOptional(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], Assistant.prototype, "model", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
IsString(),
|
|
33
|
-
IsOptional(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], Assistant.prototype, "name", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
IsString(),
|
|
38
|
-
Nullable(),
|
|
39
|
-
IsOptional(),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], Assistant.prototype, "description", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
IsString(),
|
|
44
|
-
IsOptional(),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], Assistant.prototype, "instructions", void 0);
|
|
47
|
-
|
|
48
|
-
class Bookmarklet {
|
|
49
|
-
id;
|
|
50
|
-
title;
|
|
51
|
-
code;
|
|
52
|
-
userId;
|
|
53
|
-
createdAt;
|
|
54
|
-
updatedAt;
|
|
55
|
-
}
|
|
56
|
-
__decorate([
|
|
57
|
-
Firestore.ID(),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], Bookmarklet.prototype, "id", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
Firestore.String(),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], Bookmarklet.prototype, "title", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
Firestore.String(),
|
|
66
|
-
__metadata("design:type", String)
|
|
67
|
-
], Bookmarklet.prototype, "code", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
Firestore.String(),
|
|
70
|
-
__metadata("design:type", String)
|
|
71
|
-
], Bookmarklet.prototype, "userId", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
Firestore.Timestamp(),
|
|
74
|
-
__metadata("design:type", dayjs.Dayjs)
|
|
75
|
-
], Bookmarklet.prototype, "createdAt", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
Firestore.Timestamp(),
|
|
78
|
-
__metadata("design:type", dayjs.Dayjs)
|
|
79
|
-
], Bookmarklet.prototype, "updatedAt", void 0);
|
|
80
|
-
|
|
81
|
-
class WebApiRequest {
|
|
82
|
-
contentType;
|
|
83
|
-
responseContentType;
|
|
84
|
-
serverUrl;
|
|
85
|
-
apiJsonUrl;
|
|
86
|
-
path;
|
|
87
|
-
method;
|
|
88
|
-
security;
|
|
89
|
-
bodySchema;
|
|
90
|
-
}
|
|
91
|
-
__decorate([
|
|
92
|
-
Domain.Lang('contentType'),
|
|
93
|
-
__metadata("design:type", String)
|
|
94
|
-
], WebApiRequest.prototype, "contentType", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
Domain.Lang('サーバーURL'),
|
|
97
|
-
__metadata("design:type", String)
|
|
98
|
-
], WebApiRequest.prototype, "serverUrl", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
Domain.Lang('OpenAPI URL'),
|
|
101
|
-
__metadata("design:type", String)
|
|
102
|
-
], WebApiRequest.prototype, "apiJsonUrl", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
Domain.Lang('パス'),
|
|
105
|
-
__metadata("design:type", String)
|
|
106
|
-
], WebApiRequest.prototype, "path", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
Domain.Lang('メソッド'),
|
|
109
|
-
__metadata("design:type", String)
|
|
110
|
-
], WebApiRequest.prototype, "method", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
Domain.Lang('セキュリティ'),
|
|
113
|
-
__metadata("design:type", Array)
|
|
114
|
-
], WebApiRequest.prototype, "security", void 0);
|
|
115
|
-
class WebAPiRequestCommand {
|
|
116
|
-
id;
|
|
117
|
-
name;
|
|
118
|
-
description;
|
|
119
|
-
type;
|
|
120
|
-
webApiRequest;
|
|
121
|
-
}
|
|
122
|
-
__decorate([
|
|
123
|
-
Domain.Lang('説明'),
|
|
124
|
-
__metadata("design:type", String)
|
|
125
|
-
], WebAPiRequestCommand.prototype, "description", void 0);
|
|
126
|
-
|
|
127
|
-
class EndpointHelper {
|
|
128
|
-
static extract(endpoint) {
|
|
129
|
-
if (!endpoint)
|
|
130
|
-
return [];
|
|
131
|
-
console.debug('[CommandPage] endpoint:', endpoint);
|
|
132
|
-
return (endpoint.match(/{(\w+)}/g) || []).map(key => key.slice(1, -1));
|
|
133
|
-
}
|
|
134
|
-
static resolve(endpoint, params) {
|
|
135
|
-
return endpoint.replace(/{(\w+)}/g, (_, key) => {
|
|
136
|
-
if (params[key] === undefined) {
|
|
137
|
-
throw new Error(`Missing parameter: ${key}`);
|
|
138
|
-
}
|
|
139
|
-
return params[key];
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function join(...paths) {
|
|
145
|
-
return paths.map(path => path.replace(/(^\/|\/$)/g, '')).join('/');
|
|
146
|
-
}
|
|
147
|
-
class CommandHelper {
|
|
148
|
-
static resolveEndpoint(command, params) {
|
|
149
|
-
return EndpointHelper.resolve(join(command.webApiRequest.serverUrl, command.webApiRequest.path), params);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
class Database {
|
|
154
|
-
title;
|
|
155
|
-
properties;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
class GoogleCredential {
|
|
159
|
-
accessToken;
|
|
160
|
-
idToken;
|
|
161
|
-
refreshToken;
|
|
162
|
-
expiresIn;
|
|
163
|
-
photoUrl;
|
|
164
|
-
}
|
|
165
|
-
__decorate([
|
|
166
|
-
Firestore.String(),
|
|
167
|
-
__metadata("design:type", String)
|
|
168
|
-
], GoogleCredential.prototype, "accessToken", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
Firestore.String(),
|
|
171
|
-
__metadata("design:type", String)
|
|
172
|
-
], GoogleCredential.prototype, "idToken", void 0);
|
|
173
|
-
__decorate([
|
|
174
|
-
Firestore.String(),
|
|
175
|
-
__metadata("design:type", String)
|
|
176
|
-
], GoogleCredential.prototype, "refreshToken", void 0);
|
|
177
|
-
__decorate([
|
|
178
|
-
Firestore.Number(),
|
|
179
|
-
__metadata("design:type", Number)
|
|
180
|
-
], GoogleCredential.prototype, "expiresIn", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
Firestore.String(),
|
|
183
|
-
__metadata("design:type", String)
|
|
184
|
-
], GoogleCredential.prototype, "photoUrl", void 0);
|
|
185
|
-
class Google {
|
|
186
|
-
id = 'google';
|
|
187
|
-
userId;
|
|
188
|
-
credential;
|
|
189
|
-
}
|
|
190
|
-
__decorate([
|
|
191
|
-
Firestore.ID(),
|
|
192
|
-
__metadata("design:type", String)
|
|
193
|
-
], Google.prototype, "id", void 0);
|
|
194
|
-
__decorate([
|
|
195
|
-
Firestore.String(),
|
|
196
|
-
__metadata("design:type", String)
|
|
197
|
-
], Google.prototype, "userId", void 0);
|
|
198
|
-
__decorate([
|
|
199
|
-
Firestore.Map(() => GoogleCredential),
|
|
200
|
-
__metadata("design:type", GoogleCredential)
|
|
201
|
-
], Google.prototype, "credential", void 0);
|
|
202
|
-
|
|
203
|
-
class OpenApi {
|
|
204
|
-
openApi;
|
|
205
|
-
constructor(openApi) {
|
|
206
|
-
this.openApi = openApi;
|
|
207
|
-
}
|
|
208
|
-
get apiJsonUrl() {
|
|
209
|
-
return this.openApi.apiJsonUrl;
|
|
210
|
-
}
|
|
211
|
-
getMethods(path) {
|
|
212
|
-
return OpenApiHelper.getMethods(this.openApi, path);
|
|
213
|
-
}
|
|
214
|
-
getMethod(path, method) {
|
|
215
|
-
return OpenApiHelper.getMethod(this.openApi, path, method);
|
|
216
|
-
}
|
|
217
|
-
getContentType(path, method) {
|
|
218
|
-
return OpenApiHelper.getContentType(this.openApi, path, method);
|
|
219
|
-
}
|
|
220
|
-
getSummary(path, method) {
|
|
221
|
-
return OpenApiHelper.getSummary(this.openApi, path, method);
|
|
222
|
-
}
|
|
223
|
-
getDescription(path, method) {
|
|
224
|
-
return get(this.openApi, ['paths', path, method, 'description']);
|
|
225
|
-
}
|
|
226
|
-
getSecurity(path, method) {
|
|
227
|
-
return get(this.openApi, ['paths', path, method, 'security']);
|
|
228
|
-
}
|
|
229
|
-
getRequestBodySchema(path, method, contentType = this.getContentType(path, method)) {
|
|
230
|
-
return OpenApiHelper.getRequestBodySchema(this.openApi, path, method, contentType);
|
|
231
|
-
}
|
|
232
|
-
getResponseContentType(path, method) {
|
|
233
|
-
return Object.keys(get(this.openApi, ['paths', path, method, 'responses', '200', 'content']) ?? {})[0];
|
|
234
|
-
}
|
|
235
|
-
getOperationId(path, method) {
|
|
236
|
-
return OpenApiHelper.getOperationId(this.openApi, path, method);
|
|
237
|
-
}
|
|
238
|
-
getEndpoints() {
|
|
239
|
-
return OpenApiHelper.getEndpoints(this.openApi);
|
|
240
|
-
}
|
|
241
|
-
getPaths() {
|
|
242
|
-
return OpenApiHelper.getPaths(this.openApi);
|
|
243
|
-
}
|
|
244
|
-
getServerUrl() {
|
|
245
|
-
return this.openApi?.servers?.[0]?.url;
|
|
246
|
-
// ?? (this.openApi. as string).replace(/\/api-json$/, '/api'),
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
class OpenApiHelper {
|
|
250
|
-
static getContentType(openApi, endpoint, method) {
|
|
251
|
-
return Object.keys(get(openApi, ['paths', endpoint, method, 'requestBody', 'content']) ?? {})?.[0] ?? null;
|
|
252
|
-
}
|
|
253
|
-
static getSummary(openApi, endpoint, method) {
|
|
254
|
-
return get(openApi, ['paths', endpoint, method, 'summary']);
|
|
255
|
-
}
|
|
256
|
-
static getOperationId(openApi, endpoint, method) {
|
|
257
|
-
return get(openApi, ['paths', endpoint, method, 'operationId']);
|
|
258
|
-
}
|
|
259
|
-
static getParameters(openApi, endpoint, method) {
|
|
260
|
-
return get(openApi, ['paths', endpoint, method, 'parameters']);
|
|
261
|
-
}
|
|
262
|
-
static getRequestBodySchema(openApi, endpoint, method, contentType = this.getContentType(openApi, endpoint, method)) {
|
|
263
|
-
return get(openApi, ['paths', endpoint, method, 'requestBody', 'content', contentType, 'schema']) ?? 'unkown';
|
|
264
|
-
}
|
|
265
|
-
static getMethod(openApi, endpoint, method) {
|
|
266
|
-
return get(openApi, ['paths', endpoint, method]);
|
|
267
|
-
}
|
|
268
|
-
static getMethods(openApi, endpoint) {
|
|
269
|
-
return Object.keys(get(openApi, ['paths', endpoint]) ?? {});
|
|
270
|
-
}
|
|
271
|
-
static getEndpoints(openApi) {
|
|
272
|
-
return Object.keys(OpenApiHelper.getPaths(openApi));
|
|
273
|
-
}
|
|
274
|
-
static getPaths(openApi) {
|
|
275
|
-
return get(openApi, 'paths') ?? {};
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
var OperatorType;
|
|
280
|
-
(function (OperatorType) {
|
|
281
|
-
OperatorType["ASSISTANT"] = "assistant";
|
|
282
|
-
OperatorType["SYSTEM"] = "system";
|
|
283
|
-
OperatorType["WORKFLOW"] = "workflow";
|
|
284
|
-
})(OperatorType || (OperatorType = {}));
|
|
285
|
-
|
|
286
|
-
const GRAPHQL_QUERY_MAKER = {
|
|
287
|
-
id: 'graphql-query-maker',
|
|
288
|
-
type: OperatorType.ASSISTANT,
|
|
289
|
-
name: 'graphql-query-maker',
|
|
290
|
-
description: 'Make a graphql query',
|
|
291
|
-
inputInterfaceId: 'interfaces:default:plain',
|
|
292
|
-
outputInterfaceId: 'interfaces:default:graphql',
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
var AiType;
|
|
296
|
-
(function (AiType) {
|
|
297
|
-
AiType["OPEN_AI"] = "openai";
|
|
298
|
-
AiType["AZURE_OPEN_AI"] = "azureopenai";
|
|
299
|
-
})(AiType || (AiType = {}));
|
|
300
|
-
|
|
301
|
-
class QueryHelper {
|
|
302
|
-
static validate(query) {
|
|
303
|
-
if (query.graphql.endpoint === '')
|
|
304
|
-
return false;
|
|
305
|
-
return this.validateGraphqlQuery(query.graphql.query);
|
|
306
|
-
}
|
|
307
|
-
static validateGraphqlQuery(query) {
|
|
308
|
-
try {
|
|
309
|
-
gql `${query}`;
|
|
310
|
-
return true;
|
|
311
|
-
}
|
|
312
|
-
catch (error) {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
static tryParseJson(value, fallback = {}) {
|
|
317
|
-
try {
|
|
318
|
-
return JSON.parse(value);
|
|
319
|
-
}
|
|
320
|
-
catch (error) {
|
|
321
|
-
return fallback;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
static setup(query, partialVariables = {}) {
|
|
325
|
-
const parsedQuery = this.tryParse(query);
|
|
326
|
-
const variables = this.mergeVariables(parsedQuery.graphql.variables, partialVariables);
|
|
327
|
-
return {
|
|
328
|
-
...parsedQuery,
|
|
329
|
-
graphql: {
|
|
330
|
-
...parsedQuery?.graphql,
|
|
331
|
-
variablesJson: JSON.stringify(variables, null, 2),
|
|
332
|
-
variables,
|
|
333
|
-
},
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
static mergeVariables(variables, params) {
|
|
337
|
-
return merge(variables, pick(params, Object.keys(variables)));
|
|
338
|
-
}
|
|
339
|
-
static getResult(result, key = Object.keys(result)[0]) {
|
|
340
|
-
return deepSnakeToCamelCase(result[key][0]);
|
|
341
|
-
}
|
|
342
|
-
static getResultErrors(result) {
|
|
343
|
-
return result.errors;
|
|
344
|
-
}
|
|
345
|
-
static throwResultError(result) {
|
|
346
|
-
if (result.errors) {
|
|
347
|
-
throw new Error(result.errors[0].message);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
static tryParse(query) {
|
|
351
|
-
const variables = QueryHelper.tryParseJson(query.graphql.variablesJson);
|
|
352
|
-
const headers = QueryHelper.tryParseJson(query.graphql.headersJson);
|
|
353
|
-
return {
|
|
354
|
-
...query,
|
|
355
|
-
graphql: {
|
|
356
|
-
...query.graphql,
|
|
357
|
-
variables,
|
|
358
|
-
headers,
|
|
359
|
-
},
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
static mapFieldsToColumns(ast) {
|
|
363
|
-
const typeMappings = {};
|
|
364
|
-
ast.definitions.forEach(def => {
|
|
365
|
-
if (def.kind === 'ObjectTypeDefinition') {
|
|
366
|
-
const typeDef = def;
|
|
367
|
-
const typeName = typeDef.name.value;
|
|
368
|
-
const fields = typeDef.fields || [];
|
|
369
|
-
typeMappings[typeName] = {};
|
|
370
|
-
fields.forEach((field) => {
|
|
371
|
-
const fieldName = field.name.value;
|
|
372
|
-
const columnName = camelCase(fieldName);
|
|
373
|
-
typeMappings[typeName][fieldName] = columnName;
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
return typeMappings;
|
|
378
|
-
}
|
|
379
|
-
static snakeToCamelObject(obj) {
|
|
380
|
-
if (obj === null || typeof obj !== 'object')
|
|
381
|
-
return obj;
|
|
382
|
-
if (Array.isArray(obj))
|
|
383
|
-
return obj.map(QueryHelper.snakeToCamelObject);
|
|
384
|
-
return Object.fromEntries(Object.entries(obj).map(([key, value]) => {
|
|
385
|
-
// '__typename'のようにunderscoreが含まれる場合はそのまま返す
|
|
386
|
-
if (key.startsWith('__'))
|
|
387
|
-
return [key, value];
|
|
388
|
-
return [key.replace(/_([a-z])/g, (_, c) => c.toUpperCase()), QueryHelper.snakeToCamelObject(value)];
|
|
389
|
-
}));
|
|
390
|
-
}
|
|
391
|
-
static parseResult(result) {
|
|
392
|
-
const keys = Object.keys(result?.data || {});
|
|
393
|
-
const map = keys.reduce((acc, key) => {
|
|
394
|
-
const items = result?.data?.[key] || [];
|
|
395
|
-
return { ...acc, [key]: QueryHelper.snakeToCamelObject(Array.isArray(items) ? items : [items]) };
|
|
396
|
-
}, {});
|
|
397
|
-
return map;
|
|
398
|
-
}
|
|
399
|
-
static extractColumnNames(items, childrenKey) {
|
|
400
|
-
console.debug('[extractColumnNames] items:', items);
|
|
401
|
-
const schema = createCompoundSchema(items);
|
|
402
|
-
if (!schema)
|
|
403
|
-
return [];
|
|
404
|
-
console.debug('[extractColumnNames] schema:', schema);
|
|
405
|
-
const columnNames = extractDisplayFields(schema).filter(name => !name.endsWith('__typename'));
|
|
406
|
-
console.debug('[extractColumnNames] columnNames:', columnNames);
|
|
407
|
-
const results = [
|
|
408
|
-
// '__checkbox'
|
|
409
|
-
];
|
|
410
|
-
if (childrenKey) {
|
|
411
|
-
const primaryKey = columnNames[0];
|
|
412
|
-
const excludeKeySet = new Set([primaryKey, childrenKey]);
|
|
413
|
-
results.push(`__tree_${primaryKey}`);
|
|
414
|
-
results.push(...columnNames.filter(name => !excludeKeySet.has(name)));
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
results.push(...columnNames);
|
|
418
|
-
}
|
|
419
|
-
return results;
|
|
420
|
-
}
|
|
421
|
-
static convertToV2(query) {
|
|
422
|
-
if (query?.type === 'graphql')
|
|
423
|
-
return query;
|
|
424
|
-
return {
|
|
425
|
-
id: query.id,
|
|
426
|
-
projectId: query.projectId,
|
|
427
|
-
type: 'graphql',
|
|
428
|
-
title: query.title,
|
|
429
|
-
summary: query.summary,
|
|
430
|
-
graphql: {
|
|
431
|
-
endpoint: query.endpoint,
|
|
432
|
-
query: query.query,
|
|
433
|
-
headersJson: query.headersJson,
|
|
434
|
-
variablesJson: query.variablesJson,
|
|
435
|
-
},
|
|
436
|
-
createdAt: query.createdAt,
|
|
437
|
-
updatedAt: query.updatedAt,
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
static overwrite(current, preVariables) {
|
|
441
|
-
const overwrite = Object.entries(current).reduce((acc, [key, value]) => {
|
|
442
|
-
if (!(key in preVariables))
|
|
443
|
-
return acc;
|
|
444
|
-
const preValue = preVariables?.[key] ?? '';
|
|
445
|
-
if (typeof preValue === 'string' && preValue.startsWith('%') && preValue.endsWith('%')) {
|
|
446
|
-
acc[key] = `%${value}%`;
|
|
447
|
-
}
|
|
448
|
-
else if (typeof preValue === 'string' && preValue.startsWith('%')) {
|
|
449
|
-
acc[key] = `%${value}`;
|
|
450
|
-
}
|
|
451
|
-
else if (typeof preValue === 'string' && preValue.endsWith('%')) {
|
|
452
|
-
acc[key] = `${value}%`;
|
|
453
|
-
}
|
|
454
|
-
else if (typeof preValue === 'string') {
|
|
455
|
-
acc[key] = `${value}`;
|
|
456
|
-
}
|
|
457
|
-
else if (Array.isArray(preValue)) {
|
|
458
|
-
acc[key] = value ?? [];
|
|
459
|
-
}
|
|
460
|
-
else {
|
|
461
|
-
acc[key] = value;
|
|
462
|
-
}
|
|
463
|
-
return acc;
|
|
464
|
-
}, {});
|
|
465
|
-
return Object.entries(overwrite).reduce((acc, [key, value]) => ({
|
|
466
|
-
...acc,
|
|
467
|
-
[key]: value,
|
|
468
|
-
}), { ...preVariables });
|
|
469
|
-
}
|
|
470
|
-
static formatGraphql(gql) {
|
|
471
|
-
return format(gql, { parser: 'graphql', plugins: [graphqlParser] });
|
|
472
|
-
}
|
|
473
|
-
static buildTemp(query) {
|
|
474
|
-
return merge({
|
|
475
|
-
id: '',
|
|
476
|
-
type: 'graphql',
|
|
477
|
-
projectId: 'default',
|
|
478
|
-
title: 'Temporary Query',
|
|
479
|
-
summary: '',
|
|
480
|
-
graphql: {
|
|
481
|
-
endpoint: '',
|
|
482
|
-
variablesJson: JSON.stringify({
|
|
483
|
-
id: '$id',
|
|
484
|
-
}, null, 2),
|
|
485
|
-
headersJson: JSON.stringify({
|
|
486
|
-
"content-type": "application/json",
|
|
487
|
-
"Authorization": "Bearer $MACHINA_AUTH_ACCESS_TOKEN"
|
|
488
|
-
}, null, 2),
|
|
489
|
-
query: ``,
|
|
490
|
-
},
|
|
491
|
-
createdAt: undefined,
|
|
492
|
-
updatedAt: undefined,
|
|
493
|
-
}, query);
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
class Query {
|
|
498
|
-
id;
|
|
499
|
-
projectId;
|
|
500
|
-
title;
|
|
501
|
-
summary;
|
|
502
|
-
type;
|
|
503
|
-
graphql;
|
|
504
|
-
createdAt;
|
|
505
|
-
updatedAt;
|
|
506
|
-
/** @deprecated use `graphql.endpoint` instead */
|
|
507
|
-
endpoint;
|
|
508
|
-
/** @deprecated use `graphql.query` instead */
|
|
509
|
-
query;
|
|
510
|
-
/** @deprecated use `graphql.headersJson` instead */
|
|
511
|
-
headersJson;
|
|
512
|
-
/** @deprecated use `graphql.variablesJson` instead */
|
|
513
|
-
variablesJson;
|
|
514
|
-
}
|
|
515
|
-
__decorate([
|
|
516
|
-
IsString(),
|
|
517
|
-
Firestore$1.String(),
|
|
518
|
-
Hasura.Text(),
|
|
519
|
-
__metadata("design:type", String)
|
|
520
|
-
], Query.prototype, "id", void 0);
|
|
521
|
-
__decorate([
|
|
522
|
-
IsString(),
|
|
523
|
-
Firestore$1.String(),
|
|
524
|
-
Hasura.Text(),
|
|
525
|
-
__metadata("design:type", String)
|
|
526
|
-
], Query.prototype, "projectId", void 0);
|
|
527
|
-
__decorate([
|
|
528
|
-
IsString(),
|
|
529
|
-
Firestore$1.String(),
|
|
530
|
-
Hasura.Text(),
|
|
531
|
-
__metadata("design:type", String)
|
|
532
|
-
], Query.prototype, "title", void 0);
|
|
533
|
-
__decorate([
|
|
534
|
-
IsString(),
|
|
535
|
-
Firestore$1.String(),
|
|
536
|
-
Hasura.Text(),
|
|
537
|
-
__metadata("design:type", String)
|
|
538
|
-
], Query.prototype, "summary", void 0);
|
|
539
|
-
__decorate([
|
|
540
|
-
Optional(),
|
|
541
|
-
IsString(),
|
|
542
|
-
Firestore$1.String(),
|
|
543
|
-
Hasura.Text(),
|
|
544
|
-
__metadata("design:type", String)
|
|
545
|
-
], Query.prototype, "type", void 0);
|
|
546
|
-
__decorate([
|
|
547
|
-
Optional(),
|
|
548
|
-
ValidateNested(),
|
|
549
|
-
Firestore$1.Map(),
|
|
550
|
-
Hasura.JSON(),
|
|
551
|
-
__metadata("design:type", QueryGraphql)
|
|
552
|
-
], Query.prototype, "graphql", void 0);
|
|
553
|
-
__decorate([
|
|
554
|
-
Nullable(),
|
|
555
|
-
Optional(),
|
|
556
|
-
IsDayjs(),
|
|
557
|
-
TransformToDayjs(),
|
|
558
|
-
Firestore$1.Timestamp(),
|
|
559
|
-
__metadata("design:type", dayjs.Dayjs)
|
|
560
|
-
], Query.prototype, "createdAt", void 0);
|
|
561
|
-
__decorate([
|
|
562
|
-
Nullable(),
|
|
563
|
-
Optional(),
|
|
564
|
-
IsDayjs(),
|
|
565
|
-
TransformToDayjs(),
|
|
566
|
-
Firestore$1.Timestamp(),
|
|
567
|
-
__metadata("design:type", dayjs.Dayjs)
|
|
568
|
-
], Query.prototype, "updatedAt", void 0);
|
|
569
|
-
__decorate([
|
|
570
|
-
Optional(),
|
|
571
|
-
IsString(),
|
|
572
|
-
Firestore$1.String(),
|
|
573
|
-
__metadata("design:type", String)
|
|
574
|
-
], Query.prototype, "endpoint", void 0);
|
|
575
|
-
__decorate([
|
|
576
|
-
Optional(),
|
|
577
|
-
IsString(),
|
|
578
|
-
Firestore$1.String(),
|
|
579
|
-
__metadata("design:type", String)
|
|
580
|
-
], Query.prototype, "query", void 0);
|
|
581
|
-
__decorate([
|
|
582
|
-
Optional(),
|
|
583
|
-
IsString(),
|
|
584
|
-
Firestore$1.String(),
|
|
585
|
-
__metadata("design:type", String)
|
|
586
|
-
], Query.prototype, "headersJson", void 0);
|
|
587
|
-
__decorate([
|
|
588
|
-
Optional(),
|
|
589
|
-
IsString(),
|
|
590
|
-
Firestore$1.String(),
|
|
591
|
-
__metadata("design:type", String)
|
|
592
|
-
], Query.prototype, "variablesJson", void 0);
|
|
593
|
-
class QueryGraphql {
|
|
594
|
-
endpoint;
|
|
595
|
-
query;
|
|
596
|
-
headersJson;
|
|
597
|
-
headers;
|
|
598
|
-
variablesJson;
|
|
599
|
-
variables;
|
|
600
|
-
}
|
|
601
|
-
__decorate([
|
|
602
|
-
IsString(),
|
|
603
|
-
Firestore$1.String(),
|
|
604
|
-
Hasura.Text(),
|
|
605
|
-
__metadata("design:type", String)
|
|
606
|
-
], QueryGraphql.prototype, "endpoint", void 0);
|
|
607
|
-
__decorate([
|
|
608
|
-
IsString(),
|
|
609
|
-
Firestore$1.String(),
|
|
610
|
-
Hasura.Text(),
|
|
611
|
-
__metadata("design:type", String)
|
|
612
|
-
], QueryGraphql.prototype, "query", void 0);
|
|
613
|
-
__decorate([
|
|
614
|
-
Optional(),
|
|
615
|
-
IsString(),
|
|
616
|
-
Firestore$1.String(),
|
|
617
|
-
Hasura.Text(),
|
|
618
|
-
__metadata("design:type", String)
|
|
619
|
-
], QueryGraphql.prototype, "headersJson", void 0);
|
|
620
|
-
__decorate([
|
|
621
|
-
Optional(),
|
|
622
|
-
IsString(),
|
|
623
|
-
Firestore$1.String(),
|
|
624
|
-
Hasura.Text(),
|
|
625
|
-
__metadata("design:type", String)
|
|
626
|
-
], QueryGraphql.prototype, "variablesJson", void 0);
|
|
627
|
-
|
|
628
|
-
class ResourceHelper {
|
|
629
|
-
static getDescription(resource) {
|
|
630
|
-
if (resource.type === 'openapi') {
|
|
631
|
-
return resource?.openapi?.url ?? '';
|
|
632
|
-
}
|
|
633
|
-
else if (resource.type === 'graphql') {
|
|
634
|
-
return resource?.graphql?.url ?? '';
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
let Resource = class Resource {
|
|
640
|
-
id;
|
|
641
|
-
projectId;
|
|
642
|
-
name;
|
|
643
|
-
type;
|
|
644
|
-
openapi;
|
|
645
|
-
graphql;
|
|
646
|
-
createdAt;
|
|
647
|
-
updatedAt;
|
|
648
|
-
};
|
|
649
|
-
__decorate([
|
|
650
|
-
Domain.Lang('ID'),
|
|
651
|
-
Firestore$1.String(),
|
|
652
|
-
Hasura.Text(),
|
|
653
|
-
__metadata("design:type", String)
|
|
654
|
-
], Resource.prototype, "id", void 0);
|
|
655
|
-
__decorate([
|
|
656
|
-
Domain.Lang('プロジェクトID'),
|
|
657
|
-
Firestore$1.String(),
|
|
658
|
-
Hasura.Text(),
|
|
659
|
-
__metadata("design:type", String)
|
|
660
|
-
], Resource.prototype, "projectId", void 0);
|
|
661
|
-
__decorate([
|
|
662
|
-
Domain.Lang('名称'),
|
|
663
|
-
Firestore$1.String(),
|
|
664
|
-
Hasura.Text(),
|
|
665
|
-
__metadata("design:type", String)
|
|
666
|
-
], Resource.prototype, "name", void 0);
|
|
667
|
-
__decorate([
|
|
668
|
-
Domain.Lang('種別'),
|
|
669
|
-
Firestore$1.String(),
|
|
670
|
-
Hasura.Text(),
|
|
671
|
-
__metadata("design:type", String)
|
|
672
|
-
], Resource.prototype, "type", void 0);
|
|
673
|
-
__decorate([
|
|
674
|
-
Domain.Lang('OpenAPI設定'),
|
|
675
|
-
Optional(),
|
|
676
|
-
Firestore$1.Map(),
|
|
677
|
-
Hasura.JSON(),
|
|
678
|
-
__metadata("design:type", Object)
|
|
679
|
-
], Resource.prototype, "openapi", void 0);
|
|
680
|
-
__decorate([
|
|
681
|
-
Domain.Lang('GraphQL設定'),
|
|
682
|
-
Optional(),
|
|
683
|
-
Firestore$1.Map(),
|
|
684
|
-
Hasura.JSON(),
|
|
685
|
-
__metadata("design:type", Object)
|
|
686
|
-
], Resource.prototype, "graphql", void 0);
|
|
687
|
-
__decorate([
|
|
688
|
-
Nullable(),
|
|
689
|
-
Optional(),
|
|
690
|
-
IsDayjs(),
|
|
691
|
-
TransformToDayjs$1(),
|
|
692
|
-
Firestore$1.Timestamp(),
|
|
693
|
-
Hasura.Timestamp(),
|
|
694
|
-
__metadata("design:type", dayjs.Dayjs)
|
|
695
|
-
], Resource.prototype, "createdAt", void 0);
|
|
696
|
-
__decorate([
|
|
697
|
-
Nullable(),
|
|
698
|
-
Optional(),
|
|
699
|
-
IsDayjs(),
|
|
700
|
-
TransformToDayjs$1(),
|
|
701
|
-
Firestore$1.Timestamp(),
|
|
702
|
-
Hasura.Timestamp(),
|
|
703
|
-
__metadata("design:type", dayjs.Dayjs)
|
|
704
|
-
], Resource.prototype, "updatedAt", void 0);
|
|
705
|
-
Resource = __decorate([
|
|
706
|
-
Domain.Entity({ name: 'リソース' })
|
|
707
|
-
], Resource);
|
|
708
|
-
|
|
709
|
-
class Schedule {
|
|
710
|
-
id;
|
|
711
|
-
calendarId;
|
|
712
|
-
url;
|
|
713
|
-
name;
|
|
714
|
-
color;
|
|
715
|
-
startAt;
|
|
716
|
-
endAt;
|
|
717
|
-
static from(params) {
|
|
718
|
-
const schedule = new Schedule();
|
|
719
|
-
Object.assign(schedule, {
|
|
720
|
-
name: '',
|
|
721
|
-
calendarId: 'primary',
|
|
722
|
-
...params
|
|
723
|
-
});
|
|
724
|
-
return schedule;
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
__decorate([
|
|
728
|
-
IsString(),
|
|
729
|
-
__metadata("design:type", String)
|
|
730
|
-
], Schedule.prototype, "id", void 0);
|
|
731
|
-
__decorate([
|
|
732
|
-
IsString(),
|
|
733
|
-
__metadata("design:type", String)
|
|
734
|
-
], Schedule.prototype, "calendarId", void 0);
|
|
735
|
-
__decorate([
|
|
736
|
-
IsString(),
|
|
737
|
-
IsOptional(),
|
|
738
|
-
__metadata("design:type", String)
|
|
739
|
-
], Schedule.prototype, "url", void 0);
|
|
740
|
-
__decorate([
|
|
741
|
-
IsString(),
|
|
742
|
-
__metadata("design:type", String)
|
|
743
|
-
], Schedule.prototype, "name", void 0);
|
|
744
|
-
__decorate([
|
|
745
|
-
IsString(),
|
|
746
|
-
__metadata("design:type", String)
|
|
747
|
-
], Schedule.prototype, "color", void 0);
|
|
748
|
-
__decorate([
|
|
749
|
-
IsDayjs$1(),
|
|
750
|
-
TransformToDayjs$1(),
|
|
751
|
-
__metadata("design:type", dayjs.Dayjs)
|
|
752
|
-
], Schedule.prototype, "startAt", void 0);
|
|
753
|
-
__decorate([
|
|
754
|
-
IsDayjs$1(),
|
|
755
|
-
TransformToDayjs$1(),
|
|
756
|
-
__metadata("design:type", dayjs.Dayjs)
|
|
757
|
-
], Schedule.prototype, "endAt", void 0);
|
|
758
|
-
function isConflict(a, b) {
|
|
759
|
-
if (a.startAt.isSame(b.endAt))
|
|
760
|
-
return false;
|
|
761
|
-
if (a.endAt.isSame(b.startAt))
|
|
762
|
-
return false;
|
|
763
|
-
if (a.startAt.isBefore(b.startAt) && a.endAt.isBefore(b.startAt))
|
|
764
|
-
return false;
|
|
765
|
-
if (a.startAt.isAfter(b.endAt) && a.endAt.isAfter(b.endAt))
|
|
766
|
-
return false;
|
|
767
|
-
return true;
|
|
768
|
-
}
|
|
769
|
-
class Calendar {
|
|
770
|
-
id;
|
|
771
|
-
name;
|
|
772
|
-
color;
|
|
773
|
-
static from(params) {
|
|
774
|
-
const calendar = new Calendar();
|
|
775
|
-
Object.assign(calendar, params);
|
|
776
|
-
return calendar;
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
function buildCalendarDate(dates) {
|
|
780
|
-
const minDate = dates.reduce((min, date) => date.date.isBefore(min) ? date.date : min, dates[0].date);
|
|
781
|
-
const maxDate = dates.reduce((max, date) => date.date.isAfter(max) ? date.date : max, dates[0].date);
|
|
782
|
-
const startDate = minDate.clone().startOf('week');
|
|
783
|
-
const endDate = maxDate.clone().endOf('week');
|
|
784
|
-
// console.debug('startDate', startDate.format('YYYY/MM/DD'));
|
|
785
|
-
// console.debug('endDate', endDate.format('YYYY/MM/DD'));
|
|
786
|
-
const month = [];
|
|
787
|
-
let date = startDate.clone();
|
|
788
|
-
while (date.isBefore(endDate)) {
|
|
789
|
-
const week = [];
|
|
790
|
-
for (let i = 0; i < 7; i++) {
|
|
791
|
-
const found = dates.find(d => d.date.isSame(date, 'day'));
|
|
792
|
-
week.push(found || { schedules: [], date: date.clone() });
|
|
793
|
-
date = date.add(1, 'day');
|
|
794
|
-
}
|
|
795
|
-
month.push(week);
|
|
796
|
-
}
|
|
797
|
-
return month;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* Generated bundle index. Do not edit.
|
|
802
|
-
*/
|
|
803
|
-
|
|
804
|
-
export { AiType, Assistant, Bookmarklet, Calendar, CommandHelper, Database, EndpointHelper, GRAPHQL_QUERY_MAKER, Google, GoogleCredential, OpenApi, OpenApiHelper, OperatorType, Query, QueryGraphql, QueryHelper, Resource, ResourceHelper, Schedule, WebAPiRequestCommand, WebApiRequest, buildCalendarDate, isConflict };
|
|
805
|
-
//# sourceMappingURL=xxmachina-common-domain-models.mjs.map
|