@vtex/api 6.45.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/CHANGELOG.md +1685 -0
- package/README.md +65 -0
- package/gen/manifest.schema +189 -0
- package/lib/HttpClient/GraphQLClient.d.ts +28 -0
- package/lib/HttpClient/GraphQLClient.js +30 -0
- package/lib/HttpClient/HttpClient.d.ts +29 -0
- package/lib/HttpClient/HttpClient.js +130 -0
- package/lib/HttpClient/agents.d.ts +3 -0
- package/lib/HttpClient/agents.js +24 -0
- package/lib/HttpClient/index.d.ts +6 -0
- package/lib/HttpClient/index.js +14 -0
- package/lib/HttpClient/middlewares/cache.d.ts +35 -0
- package/lib/HttpClient/middlewares/cache.js +173 -0
- package/lib/HttpClient/middlewares/cancellationToken.d.ts +3 -0
- package/lib/HttpClient/middlewares/cancellationToken.js +72 -0
- package/lib/HttpClient/middlewares/inflight.d.ts +5 -0
- package/lib/HttpClient/middlewares/inflight.js +50 -0
- package/lib/HttpClient/middlewares/memoization.d.ts +7 -0
- package/lib/HttpClient/middlewares/memoization.js +40 -0
- package/lib/HttpClient/middlewares/metrics.d.ts +9 -0
- package/lib/HttpClient/middlewares/metrics.js +110 -0
- package/lib/HttpClient/middlewares/notFound.d.ts +7 -0
- package/lib/HttpClient/middlewares/notFound.js +20 -0
- package/lib/HttpClient/middlewares/recorder.d.ts +3 -0
- package/lib/HttpClient/middlewares/recorder.js +21 -0
- package/lib/HttpClient/middlewares/request/HttpAgentSingleton.d.ts +14 -0
- package/lib/HttpClient/middlewares/request/HttpAgentSingleton.js +37 -0
- package/lib/HttpClient/middlewares/request/index.d.ts +18 -0
- package/lib/HttpClient/middlewares/request/index.js +83 -0
- package/lib/HttpClient/middlewares/request/setupAxios/index.d.ts +1 -0
- package/lib/HttpClient/middlewares/request/setupAxios/index.js +20 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/exponentialBackoff.d.ts +2 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/exponentialBackoff.js +48 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/index.d.ts +2 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/index.js +7 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/index.d.ts +8 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/index.js +51 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/spanSetup.d.ts +4 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/spanSetup.js +29 -0
- package/lib/HttpClient/middlewares/tracing.d.ts +15 -0
- package/lib/HttpClient/middlewares/tracing.js +54 -0
- package/lib/HttpClient/typings.d.ts +123 -0
- package/lib/HttpClient/typings.js +11 -0
- package/lib/caches/CacheLayer.d.ts +7 -0
- package/lib/caches/CacheLayer.js +2 -0
- package/lib/caches/DiskCache.d.ts +17 -0
- package/lib/caches/DiskCache.js +70 -0
- package/lib/caches/LRUCache.d.ts +16 -0
- package/lib/caches/LRUCache.js +48 -0
- package/lib/caches/LRUDiskCache.d.ts +21 -0
- package/lib/caches/LRUDiskCache.js +132 -0
- package/lib/caches/MultilayeredCache.d.ts +14 -0
- package/lib/caches/MultilayeredCache.js +68 -0
- package/lib/caches/index.d.ts +6 -0
- package/lib/caches/index.js +9 -0
- package/lib/caches/typings.d.ts +48 -0
- package/lib/caches/typings.js +2 -0
- package/lib/clients/IOClient.d.ts +13 -0
- package/lib/clients/IOClient.js +19 -0
- package/lib/clients/IOClients.d.ts +37 -0
- package/lib/clients/IOClients.js +89 -0
- package/lib/clients/IOGraphQLClient.d.ts +13 -0
- package/lib/clients/IOGraphQLClient.js +16 -0
- package/lib/clients/apps/AppClient.d.ts +9 -0
- package/lib/clients/apps/AppClient.js +34 -0
- package/lib/clients/apps/AppGraphQLClient.d.ts +9 -0
- package/lib/clients/apps/AppGraphQLClient.js +34 -0
- package/lib/clients/apps/Billing.d.ts +12 -0
- package/lib/clients/apps/Billing.js +21 -0
- package/lib/clients/apps/Builder.d.ts +45 -0
- package/lib/clients/apps/Builder.js +114 -0
- package/lib/clients/apps/MessagesGraphQL.d.ts +61 -0
- package/lib/clients/apps/MessagesGraphQL.js +121 -0
- package/lib/clients/apps/Settings.d.ts +14 -0
- package/lib/clients/apps/Settings.js +38 -0
- package/lib/clients/apps/catalogGraphQL/brand.d.ts +13 -0
- package/lib/clients/apps/catalogGraphQL/brand.js +18 -0
- package/lib/clients/apps/catalogGraphQL/category.d.ts +11 -0
- package/lib/clients/apps/catalogGraphQL/category.js +16 -0
- package/lib/clients/apps/catalogGraphQL/index.d.ts +22 -0
- package/lib/clients/apps/catalogGraphQL/index.js +88 -0
- package/lib/clients/apps/catalogGraphQL/product.d.ts +25 -0
- package/lib/clients/apps/catalogGraphQL/product.js +30 -0
- package/lib/clients/apps/catalogGraphQL/sku.d.ts +26 -0
- package/lib/clients/apps/catalogGraphQL/sku.js +30 -0
- package/lib/clients/apps/index.d.ts +7 -0
- package/lib/clients/apps/index.js +12 -0
- package/lib/clients/external/ExternalClient.d.ts +9 -0
- package/lib/clients/external/ExternalClient.js +21 -0
- package/lib/clients/external/ID.d.ts +23 -0
- package/lib/clients/external/ID.js +60 -0
- package/lib/clients/external/Masterdata.d.ts +93 -0
- package/lib/clients/external/Masterdata.js +223 -0
- package/lib/clients/external/PaymentProvider.d.ts +31 -0
- package/lib/clients/external/PaymentProvider.js +42 -0
- package/lib/clients/external/index.d.ts +4 -0
- package/lib/clients/external/index.js +9 -0
- package/lib/clients/index.d.ts +9 -0
- package/lib/clients/index.js +17 -0
- package/lib/clients/infra/Apps.d.ts +88 -0
- package/lib/clients/infra/Apps.js +508 -0
- package/lib/clients/infra/Assets.d.ts +34 -0
- package/lib/clients/infra/Assets.js +165 -0
- package/lib/clients/infra/BillingMetrics.d.ts +13 -0
- package/lib/clients/infra/BillingMetrics.js +15 -0
- package/lib/clients/infra/Events.d.ts +12 -0
- package/lib/clients/infra/Events.js +33 -0
- package/lib/clients/infra/Housekeeper.d.ts +10 -0
- package/lib/clients/infra/Housekeeper.js +30 -0
- package/lib/clients/infra/InfraClient.d.ts +9 -0
- package/lib/clients/infra/InfraClient.js +34 -0
- package/lib/clients/infra/Metadata.d.ts +26 -0
- package/lib/clients/infra/Metadata.js +83 -0
- package/lib/clients/infra/Registry.d.ts +59 -0
- package/lib/clients/infra/Registry.js +207 -0
- package/lib/clients/infra/Router.d.ts +34 -0
- package/lib/clients/infra/Router.js +81 -0
- package/lib/clients/infra/Sphinx.d.ts +13 -0
- package/lib/clients/infra/Sphinx.js +29 -0
- package/lib/clients/infra/VBase.d.ts +60 -0
- package/lib/clients/infra/VBase.js +171 -0
- package/lib/clients/infra/Workspaces.d.ts +18 -0
- package/lib/clients/infra/Workspaces.js +65 -0
- package/lib/clients/infra/index.d.ts +12 -0
- package/lib/clients/infra/index.js +17 -0
- package/lib/clients/janus/JanusClient.d.ts +21 -0
- package/lib/clients/janus/JanusClient.js +30 -0
- package/lib/clients/janus/LicenseManager.d.ts +7 -0
- package/lib/clients/janus/LicenseManager.js +58 -0
- package/lib/clients/janus/Segment.d.ts +36 -0
- package/lib/clients/janus/Segment.js +79 -0
- package/lib/clients/janus/Session.d.ts +15 -0
- package/lib/clients/janus/Session.js +75 -0
- package/lib/clients/janus/Tenant.d.ts +29 -0
- package/lib/clients/janus/Tenant.js +28 -0
- package/lib/clients/janus/index.d.ts +5 -0
- package/lib/clients/janus/index.js +10 -0
- package/lib/constants.d.ts +59 -0
- package/lib/constants.js +65 -0
- package/lib/errors/AuthenticationError.d.ts +18 -0
- package/lib/errors/AuthenticationError.js +24 -0
- package/lib/errors/ForbiddenError.d.ts +18 -0
- package/lib/errors/ForbiddenError.js +24 -0
- package/lib/errors/NotFoundError.d.ts +18 -0
- package/lib/errors/NotFoundError.js +24 -0
- package/lib/errors/RequestCancelledError.d.ts +6 -0
- package/lib/errors/RequestCancelledError.js +11 -0
- package/lib/errors/ResolverError.d.ts +29 -0
- package/lib/errors/ResolverError.js +35 -0
- package/lib/errors/ResolverWarning.d.ts +21 -0
- package/lib/errors/ResolverWarning.js +28 -0
- package/lib/errors/TooManyRequestsError.d.ts +4 -0
- package/lib/errors/TooManyRequestsError.js +9 -0
- package/lib/errors/UserInputError.d.ts +18 -0
- package/lib/errors/UserInputError.js +24 -0
- package/lib/errors/customGraphQLError.d.ts +4 -0
- package/lib/errors/customGraphQLError.js +9 -0
- package/lib/errors/index.d.ts +8 -0
- package/lib/errors/index.js +13 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.js +21 -0
- package/lib/metrics/MetricsAccumulator.d.ts +35 -0
- package/lib/metrics/MetricsAccumulator.js +125 -0
- package/lib/responses.d.ts +79 -0
- package/lib/responses.js +2 -0
- package/lib/service/index.d.ts +2 -0
- package/lib/service/index.js +30 -0
- package/lib/service/loaders.d.ts +8 -0
- package/lib/service/loaders.js +54 -0
- package/lib/service/logger/console.d.ts +10 -0
- package/lib/service/logger/console.js +36 -0
- package/lib/service/logger/index.d.ts +2 -0
- package/lib/service/logger/index.js +7 -0
- package/lib/service/logger/logger.d.ts +35 -0
- package/lib/service/logger/logger.js +73 -0
- package/lib/service/logger/metricsLogger.d.ts +40 -0
- package/lib/service/logger/metricsLogger.js +149 -0
- package/lib/service/master.d.ts +2 -0
- package/lib/service/master.js +91 -0
- package/lib/service/tracing/TracerSingleton.d.ts +7 -0
- package/lib/service/tracing/TracerSingleton.js +54 -0
- package/lib/service/tracing/metrics/MetricNames.d.ts +60 -0
- package/lib/service/tracing/metrics/MetricNames.js +44 -0
- package/lib/service/tracing/metrics/instruments.d.ts +9 -0
- package/lib/service/tracing/metrics/instruments.js +11 -0
- package/lib/service/tracing/metrics/measurers/EventLoopLagMeasurer.d.ts +9 -0
- package/lib/service/tracing/metrics/measurers/EventLoopLagMeasurer.js +25 -0
- package/lib/service/tracing/tracingMiddlewares.d.ts +5 -0
- package/lib/service/tracing/tracingMiddlewares.js +119 -0
- package/lib/service/worker/index.d.ts +11 -0
- package/lib/service/worker/index.js +193 -0
- package/lib/service/worker/listeners.d.ts +3 -0
- package/lib/service/worker/listeners.js +43 -0
- package/lib/service/worker/runtime/Service.d.ts +17 -0
- package/lib/service/worker/runtime/Service.js +23 -0
- package/lib/service/worker/runtime/builtIn/handlers.d.ts +4 -0
- package/lib/service/worker/runtime/builtIn/handlers.js +27 -0
- package/lib/service/worker/runtime/builtIn/middlewares.d.ts +4 -0
- package/lib/service/worker/runtime/builtIn/middlewares.js +40 -0
- package/lib/service/worker/runtime/events/index.d.ts +4 -0
- package/lib/service/worker/runtime/events/index.js +46 -0
- package/lib/service/worker/runtime/events/middlewares/body.d.ts +3 -0
- package/lib/service/worker/runtime/events/middlewares/body.js +22 -0
- package/lib/service/worker/runtime/events/middlewares/context.d.ts +3 -0
- package/lib/service/worker/runtime/events/middlewares/context.js +22 -0
- package/lib/service/worker/runtime/events/router.d.ts +2 -0
- package/lib/service/worker/runtime/events/router.js +27 -0
- package/lib/service/worker/runtime/graphql/index.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/index.js +27 -0
- package/lib/service/worker/runtime/graphql/middlewares/context.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/context.js +16 -0
- package/lib/service/worker/runtime/graphql/middlewares/error.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/error.js +93 -0
- package/lib/service/worker/runtime/graphql/middlewares/query.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/query.js +52 -0
- package/lib/service/worker/runtime/graphql/middlewares/response.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/response.js +38 -0
- package/lib/service/worker/runtime/graphql/middlewares/run.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/run.js +19 -0
- package/lib/service/worker/runtime/graphql/middlewares/updateSchema.d.ts +4 -0
- package/lib/service/worker/runtime/graphql/middlewares/updateSchema.js +28 -0
- package/lib/service/worker/runtime/graphql/middlewares/upload.d.ts +4 -0
- package/lib/service/worker/runtime/graphql/middlewares/upload.js +12 -0
- package/lib/service/worker/runtime/graphql/schema/index.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/index.js +31 -0
- package/lib/service/worker/runtime/graphql/schema/messagesLoaderV2.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/schema/messagesLoaderV2.js +79 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Auth.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Auth.js +73 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/CacheControl.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/CacheControl.js +37 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Deprecated.d.ts +11 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Deprecated.js +61 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Metric.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Metric.js +40 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Sanitize.d.ts +9 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Sanitize.js +35 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Settings.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Settings.js +34 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/SmartCacheDirective.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/SmartCacheDirective.js +29 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.js +39 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslateTo.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslateTo.js +33 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/index.d.ts +22 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/index.js +36 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/index.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/index.js +12 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/ioUpload.d.ts +3 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/ioUpload.js +16 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.d.ts +10 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.js +39 -0
- package/lib/service/worker/runtime/graphql/typings.d.ts +31 -0
- package/lib/service/worker/runtime/graphql/typings.js +2 -0
- package/lib/service/worker/runtime/graphql/utils/cacheControl.d.ts +1 -0
- package/lib/service/worker/runtime/graphql/utils/cacheControl.js +32 -0
- package/lib/service/worker/runtime/graphql/utils/error.d.ts +1 -0
- package/lib/service/worker/runtime/graphql/utils/error.js +76 -0
- package/lib/service/worker/runtime/graphql/utils/pathname.d.ts +1 -0
- package/lib/service/worker/runtime/graphql/utils/pathname.js +7 -0
- package/lib/service/worker/runtime/graphql/utils/translations.d.ts +14 -0
- package/lib/service/worker/runtime/graphql/utils/translations.js +38 -0
- package/lib/service/worker/runtime/http/index.d.ts +5 -0
- package/lib/service/worker/runtime/http/index.js +58 -0
- package/lib/service/worker/runtime/http/middlewares/authTokens.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/authTokens.js +12 -0
- package/lib/service/worker/runtime/http/middlewares/cancellationToken.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/cancellationToken.js +18 -0
- package/lib/service/worker/runtime/http/middlewares/clients.d.ts +4 -0
- package/lib/service/worker/runtime/http/middlewares/clients.js +12 -0
- package/lib/service/worker/runtime/http/middlewares/context.d.ts +4 -0
- package/lib/service/worker/runtime/http/middlewares/context.js +36 -0
- package/lib/service/worker/runtime/http/middlewares/error.d.ts +2 -0
- package/lib/service/worker/runtime/http/middlewares/error.js +84 -0
- package/lib/service/worker/runtime/http/middlewares/rateLimit.d.ts +6 -0
- package/lib/service/worker/runtime/http/middlewares/rateLimit.js +42 -0
- package/lib/service/worker/runtime/http/middlewares/requestStats.d.ts +17 -0
- package/lib/service/worker/runtime/http/middlewares/requestStats.js +40 -0
- package/lib/service/worker/runtime/http/middlewares/setCookie.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/setCookie.js +52 -0
- package/lib/service/worker/runtime/http/middlewares/settings.d.ts +9 -0
- package/lib/service/worker/runtime/http/middlewares/settings.js +43 -0
- package/lib/service/worker/runtime/http/middlewares/timings.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/timings.js +45 -0
- package/lib/service/worker/runtime/http/middlewares/vary.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/vary.js +52 -0
- package/lib/service/worker/runtime/http/router.d.ts +2 -0
- package/lib/service/worker/runtime/http/router.js +23 -0
- package/lib/service/worker/runtime/http/routes.d.ts +19 -0
- package/lib/service/worker/runtime/http/routes.js +12 -0
- package/lib/service/worker/runtime/method.d.ts +9 -0
- package/lib/service/worker/runtime/method.js +23 -0
- package/lib/service/worker/runtime/statusTrack.d.ts +14 -0
- package/lib/service/worker/runtime/statusTrack.js +37 -0
- package/lib/service/worker/runtime/typings.d.ts +172 -0
- package/lib/service/worker/runtime/typings.js +2 -0
- package/lib/service/worker/runtime/utils/compose.d.ts +5 -0
- package/lib/service/worker/runtime/utils/compose.js +11 -0
- package/lib/service/worker/runtime/utils/context.d.ts +2 -0
- package/lib/service/worker/runtime/utils/context.js +40 -0
- package/lib/service/worker/runtime/utils/diff.d.ts +12 -0
- package/lib/service/worker/runtime/utils/diff.js +21 -0
- package/lib/service/worker/runtime/utils/recorder.d.ts +8 -0
- package/lib/service/worker/runtime/utils/recorder.js +37 -0
- package/lib/service/worker/runtime/utils/toArray.d.ts +1 -0
- package/lib/service/worker/runtime/utils/toArray.js +3 -0
- package/lib/service/worker/runtime/utils/tokenBucket.d.ts +2 -0
- package/lib/service/worker/runtime/utils/tokenBucket.js +16 -0
- package/lib/tracing/LogEvents.d.ts +31 -0
- package/lib/tracing/LogEvents.js +3 -0
- package/lib/tracing/LogFields.d.ts +61 -0
- package/lib/tracing/LogFields.js +3 -0
- package/lib/tracing/Tags.d.ts +79 -0
- package/lib/tracing/Tags.js +7 -0
- package/lib/tracing/UserLandTracer.d.ts +27 -0
- package/lib/tracing/UserLandTracer.js +55 -0
- package/lib/tracing/errorReporting/ErrorReport.d.ts +31 -0
- package/lib/tracing/errorReporting/ErrorReport.js +61 -0
- package/lib/tracing/index.d.ts +9 -0
- package/lib/tracing/index.js +19 -0
- package/lib/tracing/spanReference/SpanReferenceTypes.d.ts +4 -0
- package/lib/tracing/spanReference/SpanReferenceTypes.js +7 -0
- package/lib/tracing/spanReference/createSpanReference.d.ts +3 -0
- package/lib/tracing/spanReference/createSpanReference.js +8 -0
- package/lib/tracing/utils.d.ts +13 -0
- package/lib/tracing/utils.js +40 -0
- package/lib/utils/MineWinsConflictsResolver.d.ts +28 -0
- package/lib/utils/MineWinsConflictsResolver.js +130 -0
- package/lib/utils/app.d.ts +23 -0
- package/lib/utils/app.js +48 -0
- package/lib/utils/appsStaleIfError.d.ts +11 -0
- package/lib/utils/appsStaleIfError.js +63 -0
- package/lib/utils/billingOptions.d.ts +36 -0
- package/lib/utils/billingOptions.js +9 -0
- package/lib/utils/binding.d.ts +13 -0
- package/lib/utils/binding.js +38 -0
- package/lib/utils/cancel.d.ts +3 -0
- package/lib/utils/cancel.js +12 -0
- package/lib/utils/domain.d.ts +1 -0
- package/lib/utils/domain.js +5 -0
- package/lib/utils/error.d.ts +8 -0
- package/lib/utils/error.js +94 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.js +14 -0
- package/lib/utils/message.d.ts +25 -0
- package/lib/utils/message.js +23 -0
- package/lib/utils/renameBy.d.ts +1 -0
- package/lib/utils/renameBy.js +4 -0
- package/lib/utils/retry.d.ts +4 -0
- package/lib/utils/retry.js +32 -0
- package/lib/utils/status.d.ts +1 -0
- package/lib/utils/status.js +11 -0
- package/lib/utils/tenant.d.ts +5 -0
- package/lib/utils/tenant.js +6 -0
- package/lib/utils/throwOnGraphQLErrors.d.ts +2 -0
- package/lib/utils/throwOnGraphQLErrors.js +15 -0
- package/lib/utils/time.d.ts +31 -0
- package/lib/utils/time.js +118 -0
- package/package.json +127 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.query = `
|
|
4
|
+
query GetBrand($id: ID!) {
|
|
5
|
+
brand (id: $id) {
|
|
6
|
+
id
|
|
7
|
+
name
|
|
8
|
+
text
|
|
9
|
+
keywords
|
|
10
|
+
siteTitle
|
|
11
|
+
active
|
|
12
|
+
menuHome
|
|
13
|
+
adWordsRemarketingCode
|
|
14
|
+
lomadeeCampaignCode
|
|
15
|
+
score
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const query = "\nquery GetCategory($id: ID!) {\n category (id: $id) {\n id\n name\n title\n parentCategoryId\n description\n isActive\n globalCategoryId\n score\n }\n}\n";
|
|
2
|
+
export interface Category {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
parentCategoryId?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
globalCategoryId: number;
|
|
10
|
+
score?: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.query = `
|
|
4
|
+
query GetCategory($id: ID!) {
|
|
5
|
+
category (id: $id) {
|
|
6
|
+
id
|
|
7
|
+
name
|
|
8
|
+
title
|
|
9
|
+
parentCategoryId
|
|
10
|
+
description
|
|
11
|
+
isActive
|
|
12
|
+
globalCategoryId
|
|
13
|
+
score
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AppGraphQLClient } from '..';
|
|
2
|
+
import { InstanceOptions, IOContext } from '../../..';
|
|
3
|
+
import { RequestTracingConfig } from '../../../HttpClient';
|
|
4
|
+
import { Brand } from './brand';
|
|
5
|
+
import { Category } from './category';
|
|
6
|
+
import { Product } from './product';
|
|
7
|
+
import { SKU } from './sku';
|
|
8
|
+
export declare class CatalogGraphQL extends AppGraphQLClient {
|
|
9
|
+
constructor(ctx: IOContext, opts?: InstanceOptions);
|
|
10
|
+
sku: (id: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<{
|
|
11
|
+
sku: SKU;
|
|
12
|
+
} | undefined>;
|
|
13
|
+
product: (id: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<{
|
|
14
|
+
product: Product;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
category: (id: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<{
|
|
17
|
+
category: Category;
|
|
18
|
+
} | undefined>;
|
|
19
|
+
brand: (id: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<{
|
|
20
|
+
brand: Brand;
|
|
21
|
+
} | undefined>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ramda_1 = require("ramda");
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const brand_1 = require("./brand");
|
|
6
|
+
const category_1 = require("./category");
|
|
7
|
+
const product_1 = require("./product");
|
|
8
|
+
const sku_1 = require("./sku");
|
|
9
|
+
class CatalogGraphQL extends __1.AppGraphQLClient {
|
|
10
|
+
constructor(ctx, opts) {
|
|
11
|
+
super('vtex.catalog-graphql@1.x', ctx, {
|
|
12
|
+
...opts,
|
|
13
|
+
headers: {
|
|
14
|
+
...opts && opts.headers,
|
|
15
|
+
cookie: `VtexIdclientAutCookie=${ctx.authToken}`,
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
this.sku = (id, tracingConfig) => {
|
|
19
|
+
const variables = {
|
|
20
|
+
identifier: {
|
|
21
|
+
field: 'id',
|
|
22
|
+
value: id,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
return this.graphql
|
|
26
|
+
.query({
|
|
27
|
+
inflight: true,
|
|
28
|
+
query: sku_1.query,
|
|
29
|
+
variables,
|
|
30
|
+
}, {
|
|
31
|
+
forceMaxAge: 5,
|
|
32
|
+
tracing: {
|
|
33
|
+
requestSpanNameSuffix: 'catalog-sku',
|
|
34
|
+
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
|
|
35
|
+
},
|
|
36
|
+
})
|
|
37
|
+
.then(ramda_1.prop('data'));
|
|
38
|
+
};
|
|
39
|
+
this.product = (id, tracingConfig) => {
|
|
40
|
+
const variables = {
|
|
41
|
+
identifier: {
|
|
42
|
+
field: 'id',
|
|
43
|
+
value: id,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
return this.graphql
|
|
47
|
+
.query({
|
|
48
|
+
inflight: true,
|
|
49
|
+
query: product_1.query,
|
|
50
|
+
variables,
|
|
51
|
+
}, {
|
|
52
|
+
forceMaxAge: 5,
|
|
53
|
+
tracing: {
|
|
54
|
+
requestSpanNameSuffix: 'catalog-product',
|
|
55
|
+
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
|
|
56
|
+
},
|
|
57
|
+
})
|
|
58
|
+
.then(ramda_1.prop('data'));
|
|
59
|
+
};
|
|
60
|
+
this.category = (id, tracingConfig) => this.graphql
|
|
61
|
+
.query({
|
|
62
|
+
inflight: true,
|
|
63
|
+
query: category_1.query,
|
|
64
|
+
variables: { id },
|
|
65
|
+
}, {
|
|
66
|
+
forceMaxAge: 5,
|
|
67
|
+
tracing: {
|
|
68
|
+
requestSpanNameSuffix: 'catalog-category',
|
|
69
|
+
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
|
|
70
|
+
},
|
|
71
|
+
})
|
|
72
|
+
.then(ramda_1.prop('data'));
|
|
73
|
+
this.brand = (id, tracingConfig) => this.graphql
|
|
74
|
+
.query({
|
|
75
|
+
inflight: true,
|
|
76
|
+
query: brand_1.query,
|
|
77
|
+
variables: { id },
|
|
78
|
+
}, {
|
|
79
|
+
forceMaxAge: 5,
|
|
80
|
+
tracing: {
|
|
81
|
+
requestSpanNameSuffix: 'catalog-brand',
|
|
82
|
+
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
.then(ramda_1.prop('data'));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.CatalogGraphQL = CatalogGraphQL;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const query = "\nquery GetProduct ($identifier: ProductUniqueIdentifier!) {\n product (identifier: $identifier) {\n id\n brandId\n categoryId\n departmentId\n name\n linkId\n refId\n isVisible\n description\n shortDescription\n releaseDate\n keywords\n title\n isActive\n taxCode\n metaTagDescription\n supplierId\n showWithoutStock\n score\n salesChannel {\n id\n }\n }\n}\n";
|
|
2
|
+
export interface Product {
|
|
3
|
+
id: string;
|
|
4
|
+
brandId: string;
|
|
5
|
+
categoryId: string;
|
|
6
|
+
departmentId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
linkId: string;
|
|
9
|
+
refId?: string;
|
|
10
|
+
isVisible: boolean;
|
|
11
|
+
description?: string;
|
|
12
|
+
shortDescription?: string;
|
|
13
|
+
releaseDate?: string;
|
|
14
|
+
keywords: string[];
|
|
15
|
+
title?: string;
|
|
16
|
+
isActive: boolean;
|
|
17
|
+
taxCode?: string;
|
|
18
|
+
metaTagDescription?: string;
|
|
19
|
+
supplierId?: string;
|
|
20
|
+
showWithoutStock: boolean;
|
|
21
|
+
score?: number;
|
|
22
|
+
salesChannel?: Array<{
|
|
23
|
+
id: string;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.query = `
|
|
4
|
+
query GetProduct ($identifier: ProductUniqueIdentifier!) {
|
|
5
|
+
product (identifier: $identifier) {
|
|
6
|
+
id
|
|
7
|
+
brandId
|
|
8
|
+
categoryId
|
|
9
|
+
departmentId
|
|
10
|
+
name
|
|
11
|
+
linkId
|
|
12
|
+
refId
|
|
13
|
+
isVisible
|
|
14
|
+
description
|
|
15
|
+
shortDescription
|
|
16
|
+
releaseDate
|
|
17
|
+
keywords
|
|
18
|
+
title
|
|
19
|
+
isActive
|
|
20
|
+
taxCode
|
|
21
|
+
metaTagDescription
|
|
22
|
+
supplierId
|
|
23
|
+
showWithoutStock
|
|
24
|
+
score
|
|
25
|
+
salesChannel {
|
|
26
|
+
id
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const query = "\nquery GetSKU ($identifier: SKUUniqueIdentifier!) {\n sku (identifier: $identifier) {\n id\n productId\n isActive\n name\n height\n length\n width\n weightKg\n packagedHeight\n packagedWidth\n packagedLength\n packagedWeightKg\n cubicWeight\n isKit\n creationDate\n rewardValue\n manufacturerCode\n commercialConditionId\n measurementUnit\n unitMultiplier\n modalType\n kitItensSellApart\n }\n}\n";
|
|
2
|
+
export interface SKU {
|
|
3
|
+
id: string;
|
|
4
|
+
productId: string;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
name: string;
|
|
7
|
+
height?: number;
|
|
8
|
+
length?: number;
|
|
9
|
+
width?: number;
|
|
10
|
+
weightKg?: number;
|
|
11
|
+
packagedHeight?: number;
|
|
12
|
+
packagedWidth?: number;
|
|
13
|
+
packagedLength?: number;
|
|
14
|
+
packagedWeightKg?: number;
|
|
15
|
+
cubicWeight: number;
|
|
16
|
+
isKit: boolean;
|
|
17
|
+
creationDate: string;
|
|
18
|
+
rewardValue?: number;
|
|
19
|
+
estimatedDateArrival?: string;
|
|
20
|
+
manufacturerCode: string;
|
|
21
|
+
commercialConditionId: string;
|
|
22
|
+
measurementUnit: string;
|
|
23
|
+
unitMultiplier: number;
|
|
24
|
+
modalType?: string;
|
|
25
|
+
kitItensSellApart: boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.query = `
|
|
4
|
+
query GetSKU ($identifier: SKUUniqueIdentifier!) {
|
|
5
|
+
sku (identifier: $identifier) {
|
|
6
|
+
id
|
|
7
|
+
productId
|
|
8
|
+
isActive
|
|
9
|
+
name
|
|
10
|
+
height
|
|
11
|
+
length
|
|
12
|
+
width
|
|
13
|
+
weightKg
|
|
14
|
+
packagedHeight
|
|
15
|
+
packagedWidth
|
|
16
|
+
packagedLength
|
|
17
|
+
packagedWeightKg
|
|
18
|
+
cubicWeight
|
|
19
|
+
isKit
|
|
20
|
+
creationDate
|
|
21
|
+
rewardValue
|
|
22
|
+
manufacturerCode
|
|
23
|
+
commercialConditionId
|
|
24
|
+
measurementUnit
|
|
25
|
+
unitMultiplier
|
|
26
|
+
modalType
|
|
27
|
+
kitItensSellApart
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function __export(m) {
|
|
3
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
4
|
+
}
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
__export(require("./AppClient"));
|
|
7
|
+
__export(require("./AppGraphQLClient"));
|
|
8
|
+
__export(require("./Billing"));
|
|
9
|
+
__export(require("./Builder"));
|
|
10
|
+
__export(require("./MessagesGraphQL"));
|
|
11
|
+
__export(require("./Settings"));
|
|
12
|
+
__export(require("./catalogGraphQL"));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InstanceOptions } from '../../HttpClient/typings';
|
|
2
|
+
import { IOContext } from '../../service/worker/runtime/typings';
|
|
3
|
+
import { IOClient } from '../IOClient';
|
|
4
|
+
/**
|
|
5
|
+
* Used to perform calls to external endpoints for which you have declared outbound access policies in your manifest.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExternalClient extends IOClient {
|
|
8
|
+
constructor(baseURL: string, context: IOContext, options?: InstanceOptions);
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const IOClient_1 = require("../IOClient");
|
|
4
|
+
/**
|
|
5
|
+
* Used to perform calls to external endpoints for which you have declared outbound access policies in your manifest.
|
|
6
|
+
*/
|
|
7
|
+
class ExternalClient extends IOClient_1.IOClient {
|
|
8
|
+
constructor(baseURL, context, options) {
|
|
9
|
+
const { authToken } = context;
|
|
10
|
+
const headers = options && options.headers || {};
|
|
11
|
+
super(context, {
|
|
12
|
+
...options,
|
|
13
|
+
baseURL,
|
|
14
|
+
headers: {
|
|
15
|
+
...headers,
|
|
16
|
+
'Proxy-Authorization': authToken,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.ExternalClient = ExternalClient;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InstanceOptions, RequestTracingConfig } from '../../HttpClient';
|
|
2
|
+
import { IOContext } from '../../service/worker/runtime/typings';
|
|
3
|
+
import { ExternalClient } from './ExternalClient';
|
|
4
|
+
export declare class ID extends ExternalClient {
|
|
5
|
+
constructor(context: IOContext, opts?: InstanceOptions);
|
|
6
|
+
getTemporaryToken: (tracingConfig?: RequestTracingConfig | undefined) => Promise<string>;
|
|
7
|
+
sendCodeToEmail: (token: string, email: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<any>;
|
|
8
|
+
getEmailCodeAuthenticationToken: (token: string, email: string, code: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<AuthenticationResponse>;
|
|
9
|
+
getPasswordAuthenticationToken: (token: string, email: string, password: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<AuthenticationResponse>;
|
|
10
|
+
}
|
|
11
|
+
export interface AuthenticationResponse {
|
|
12
|
+
promptMFA: boolean;
|
|
13
|
+
clientToken: any;
|
|
14
|
+
authCookie: {
|
|
15
|
+
Name: string;
|
|
16
|
+
Value: string;
|
|
17
|
+
};
|
|
18
|
+
accountAuthCookie: any;
|
|
19
|
+
expiresIn: number;
|
|
20
|
+
userId: string;
|
|
21
|
+
phoneNumber: string;
|
|
22
|
+
scope: any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ExternalClient_1 = require("./ExternalClient");
|
|
4
|
+
const routes = {
|
|
5
|
+
SEND: '/accesskey/send',
|
|
6
|
+
START: '/start',
|
|
7
|
+
VALIDATE: '/accesskey/validate',
|
|
8
|
+
VALIDATE_CLASSIC: '/classic/validate',
|
|
9
|
+
};
|
|
10
|
+
const VTEXID_ENDPOINTS = {
|
|
11
|
+
STABLE: 'https://vtexid.vtex.com.br/api/vtexid/pub/authentication',
|
|
12
|
+
};
|
|
13
|
+
const endpoint = (env) => {
|
|
14
|
+
return VTEXID_ENDPOINTS[env] || env;
|
|
15
|
+
};
|
|
16
|
+
class ID extends ExternalClient_1.ExternalClient {
|
|
17
|
+
constructor(context, opts) {
|
|
18
|
+
super(endpoint(VTEXID_ENDPOINTS.STABLE), context, opts);
|
|
19
|
+
this.getTemporaryToken = (tracingConfig) => {
|
|
20
|
+
const metric = 'vtexid-temp-token';
|
|
21
|
+
return this.http.get(routes.START, { metric, tracing: {
|
|
22
|
+
requestSpanNameSuffix: metric,
|
|
23
|
+
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
|
|
24
|
+
} }).then(({ authenticationToken }) => authenticationToken);
|
|
25
|
+
};
|
|
26
|
+
this.sendCodeToEmail = (token, email, tracingConfig) => {
|
|
27
|
+
const params = { authenticationToken: token, email };
|
|
28
|
+
const metric = 'vtexid-send-code';
|
|
29
|
+
return this.http.get(routes.SEND, { metric, params, tracing: {
|
|
30
|
+
requestSpanNameSuffix: metric,
|
|
31
|
+
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
|
|
32
|
+
} });
|
|
33
|
+
};
|
|
34
|
+
this.getEmailCodeAuthenticationToken = (token, email, code, tracingConfig) => {
|
|
35
|
+
const params = {
|
|
36
|
+
accesskey: code,
|
|
37
|
+
authenticationToken: token,
|
|
38
|
+
login: email,
|
|
39
|
+
};
|
|
40
|
+
const metric = 'vtexid-email-token';
|
|
41
|
+
return this.http.get(routes.VALIDATE, { metric, params, tracing: {
|
|
42
|
+
requestSpanNameSuffix: metric,
|
|
43
|
+
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
|
|
44
|
+
} });
|
|
45
|
+
};
|
|
46
|
+
this.getPasswordAuthenticationToken = (token, email, password, tracingConfig) => {
|
|
47
|
+
const params = {
|
|
48
|
+
authenticationToken: token,
|
|
49
|
+
login: email,
|
|
50
|
+
password,
|
|
51
|
+
};
|
|
52
|
+
const metric = 'vtexid-pass-token';
|
|
53
|
+
return this.http.get(routes.VALIDATE_CLASSIC, { metric, params, tracing: {
|
|
54
|
+
requestSpanNameSuffix: metric,
|
|
55
|
+
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
|
|
56
|
+
} });
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ID = ID;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { InstanceOptions, IOContext, RequestTracingConfig } from '../..';
|
|
2
|
+
import { ExternalClient } from './ExternalClient';
|
|
3
|
+
export declare class MasterData extends ExternalClient {
|
|
4
|
+
constructor(ctx: IOContext, options?: InstanceOptions);
|
|
5
|
+
getSchema<T>({ dataEntity, schema }: GetSchemaInput, tracingConfig?: RequestTracingConfig): Promise<T>;
|
|
6
|
+
createOrUpdateSchema<T>({ dataEntity, schemaName, schemaBody }: CreateSchemaInput, tracingConfig?: RequestTracingConfig): Promise<T>;
|
|
7
|
+
getPublicSchema<T>({ dataEntity, schema }: GetSchemaInput, tracingConfig?: RequestTracingConfig): Promise<T>;
|
|
8
|
+
getDocument<T>({ dataEntity, id, fields }: GetDocumentInput, tracingConfig?: RequestTracingConfig): Promise<T>;
|
|
9
|
+
createDocument({ dataEntity, fields, schema }: CreateDocumentInput, tracingConfig?: RequestTracingConfig): Promise<DocumentResponse>;
|
|
10
|
+
createOrUpdateEntireDocument({ dataEntity, fields, id, schema }: CreateOrUpdateInput, tracingConfig?: RequestTracingConfig): Promise<DocumentResponse>;
|
|
11
|
+
createOrUpdatePartialDocument({ dataEntity, fields, id, schema }: CreateOrUpdateInput, tracingConfig?: RequestTracingConfig): Promise<DocumentResponse>;
|
|
12
|
+
updateEntireDocument({ dataEntity, id, fields, schema }: UpdateInput, tracingConfig?: RequestTracingConfig): Promise<void>;
|
|
13
|
+
updatePartialDocument({ dataEntity, id, fields, schema }: UpdateInput, tracingConfig?: RequestTracingConfig): Promise<void>;
|
|
14
|
+
searchDocuments<T>({ dataEntity, fields, where, pagination, schema, sort }: SearchInput, tracingConfig?: RequestTracingConfig): Promise<T[]>;
|
|
15
|
+
searchDocumentsWithPaginationInfo<T>({ dataEntity, fields, where, pagination, schema, sort }: SearchInput, tracingConfig?: RequestTracingConfig): Promise<{
|
|
16
|
+
data: T[];
|
|
17
|
+
pagination: {
|
|
18
|
+
total: number;
|
|
19
|
+
page: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
scrollDocuments<T>({ dataEntity, fields, mdToken, schema, size, sort }: ScrollInput, tracingConfig?: RequestTracingConfig): Promise<{
|
|
24
|
+
mdToken: string;
|
|
25
|
+
data: ScrollResponse<T>;
|
|
26
|
+
}>;
|
|
27
|
+
deleteDocument({ dataEntity, id }: DeleteInput, tracingConfig?: RequestTracingConfig): Promise<import("../..").IOResponse<void>>;
|
|
28
|
+
}
|
|
29
|
+
interface PaginationArgs {
|
|
30
|
+
page: number;
|
|
31
|
+
pageSize: number;
|
|
32
|
+
}
|
|
33
|
+
interface DocumentResponse {
|
|
34
|
+
Id: string;
|
|
35
|
+
Href: string;
|
|
36
|
+
DocumentId: string;
|
|
37
|
+
}
|
|
38
|
+
interface GetSchemaInput {
|
|
39
|
+
dataEntity: string;
|
|
40
|
+
schema: string;
|
|
41
|
+
}
|
|
42
|
+
interface CreateSchemaInput {
|
|
43
|
+
dataEntity: string;
|
|
44
|
+
schemaName: string;
|
|
45
|
+
schemaBody: object;
|
|
46
|
+
}
|
|
47
|
+
interface GetDocumentInput {
|
|
48
|
+
dataEntity: string;
|
|
49
|
+
id: string;
|
|
50
|
+
fields: string[];
|
|
51
|
+
}
|
|
52
|
+
interface CreateDocumentInput {
|
|
53
|
+
dataEntity: string;
|
|
54
|
+
fields: object;
|
|
55
|
+
schema?: string;
|
|
56
|
+
}
|
|
57
|
+
interface CreateOrUpdateInput {
|
|
58
|
+
dataEntity: string;
|
|
59
|
+
fields: object;
|
|
60
|
+
id?: string;
|
|
61
|
+
schema?: string;
|
|
62
|
+
}
|
|
63
|
+
interface UpdateInput {
|
|
64
|
+
dataEntity: string;
|
|
65
|
+
id: string;
|
|
66
|
+
fields: object;
|
|
67
|
+
schema?: string;
|
|
68
|
+
}
|
|
69
|
+
interface SearchInput {
|
|
70
|
+
dataEntity: string;
|
|
71
|
+
fields: string[];
|
|
72
|
+
where?: string;
|
|
73
|
+
pagination: PaginationArgs;
|
|
74
|
+
schema?: string;
|
|
75
|
+
sort?: string;
|
|
76
|
+
}
|
|
77
|
+
interface ScrollInput {
|
|
78
|
+
dataEntity: string;
|
|
79
|
+
fields: string[];
|
|
80
|
+
schema?: string;
|
|
81
|
+
sort?: string;
|
|
82
|
+
size?: number;
|
|
83
|
+
mdToken?: string;
|
|
84
|
+
}
|
|
85
|
+
interface DeleteInput {
|
|
86
|
+
dataEntity: string;
|
|
87
|
+
id: string;
|
|
88
|
+
}
|
|
89
|
+
interface ScrollResponse<T> {
|
|
90
|
+
data: T[];
|
|
91
|
+
mdToken: string;
|
|
92
|
+
}
|
|
93
|
+
export {};
|