@hypertestco/node-sdk-v3 0.0.1-8
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/Date/DateMock.d.ts +27 -0
- package/Date/HtDate.d.ts +3 -0
- package/helpers/appCrashHandlers.d.ts +1 -0
- package/helpers/backendClient.d.ts +22 -0
- package/helpers/cliClient.d.ts +21 -0
- package/helpers/coverageProxy.d.ts +1 -0
- package/helpers/discardRequest.d.ts +2 -0
- package/helpers/generateMockMapForMemoryStore.d.ts +4 -0
- package/helpers/getRequestAttributes.d.ts +6 -0
- package/helpers/getRootMocks.d.ts +6 -0
- package/helpers/htConfigHelper.d.ts +25 -0
- package/helpers/htTraceExporter.d.ts +2 -0
- package/helpers/inMemorySpanExporter.d.ts +3 -0
- package/helpers/isContinuousCoverageActive.d.ts +1 -0
- package/helpers/isValidUuidV4.d.ts +1 -0
- package/helpers/killAppUnderTest.d.ts +1 -0
- package/helpers/markAppAsReady.d.ts +1 -0
- package/helpers/pingOtelCollector.d.ts +7 -0
- package/helpers/posthog.d.ts +2 -0
- package/helpers/removeUnicodeFromReplayResult.d.ts +7 -0
- package/helpers/requestFilter.d.ts +3 -0
- package/helpers/syncWaitPort.d.ts +6 -0
- package/helpers/synchronousHttpCall.d.ts +15 -0
- package/helpers/transformDbObjToReadableInputHelpers.d.ts +15 -0
- package/hooks/index.d.ts +140 -0
- package/hooks.mjs +3 -0
- package/htKvStore/env-proxy.d.ts +1 -0
- package/htKvStore/index.d.ts +6 -0
- package/htKvStore/kvMock.d.ts +32 -0
- package/index.cjs +224732 -0
- package/index.d.ts +52 -0
- package/index.mjs +232251 -0
- package/instrumentation/core/baseClasses/HtInstrumentationAbstract.d.ts +36 -0
- package/instrumentation/core/baseClasses/HtInstrumentationBase.d.ts +34 -0
- package/instrumentation/core/baseClasses/HtInstrumentationMockAbstract.d.ts +117 -0
- package/instrumentation/core/baseClasses/HtInstrumentationMockAbstractForAxiosError.d.ts +11 -0
- package/instrumentation/core/baseClasses/HtInstrumentationNodeModule.d.ts +9 -0
- package/instrumentation/core/baseClasses/HtInstrumentationNodeModuleFile.d.ts +8 -0
- package/instrumentation/core/baseClasses/HtServerMockAbstract.d.ts +68 -0
- package/instrumentation/core/constants/index.d.ts +12 -0
- package/instrumentation/core/helpers/createNewSpanHelper.d.ts +21 -0
- package/instrumentation/core/helpers/executeFnOrInitClassWithContext.d.ts +23 -0
- package/instrumentation/core/helpers/generateHtRequestId.d.ts +2 -0
- package/instrumentation/core/helpers/getContextForServerInstrumentations.d.ts +9 -0
- package/instrumentation/core/helpers/htMode.d.ts +6 -0
- package/instrumentation/core/helpers/instrumentationTestingMode.d.ts +1 -0
- package/instrumentation/core/helpers/memoryStore.d.ts +345 -0
- package/instrumentation/core/helpers/rootMockCounter.d.ts +8 -0
- package/instrumentation/core/helpers/selectBestMatchMockForReplayHelpers.d.ts +7 -0
- package/instrumentation/core/helpers/shimmer.d.ts +6 -0
- package/instrumentation/core/helpers/utils.d.ts +56 -0
- package/instrumentation/core/types/ExperimentalFlagEnums.d.ts +8 -0
- package/instrumentation/core/types/HtInstrumentationEnums.d.ts +37 -0
- package/instrumentation/core/types/HtInstrumentationModuleNames.d.ts +1 -0
- package/instrumentation/core/types/index.d.ts +77 -0
- package/instrumentation/helpers/blockRequestsHelpers.d.ts +70 -0
- package/instrumentation/helpers/callbackHelpers.d.ts +3 -0
- package/instrumentation/helpers/commitHash.d.ts +3 -0
- package/instrumentation/helpers/getConstitentKeysAndTypesMap.d.ts +2 -0
- package/instrumentation/helpers/measureContinuousCoverage.d.ts +9 -0
- package/instrumentation/helpers/memoryUsageLimiter.d.ts +8 -0
- package/instrumentation/helpers/outboundClusterPathConfigFromUsers.d.ts +14 -0
- package/instrumentation/helpers/samplingLogic.d.ts +112 -0
- package/instrumentation/helpers/setBranchName.d.ts +2 -0
- package/instrumentation/helpers/sqlParser.d.ts +17 -0
- package/instrumentation/helpers/toJSONHandlers.d.ts +7 -0
- package/instrumentation/helpers/utils.d.ts +10 -0
- package/instrumentation/index.d.ts +4 -0
- package/instrumentation/libraries/amqplib/instrumentation.d.ts +16 -0
- package/instrumentation/libraries/amqplib/mocks/AckMock.d.ts +3 -0
- package/instrumentation/libraries/amqplib/mocks/AmqpConsumerMock.d.ts +71 -0
- package/instrumentation/libraries/amqplib/mocks/AssertExchangeMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/AssertQueueMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/BindUnbindExchangeMock.d.ts +6 -0
- package/instrumentation/libraries/amqplib/mocks/BindUnbindQueueMock.d.ts +6 -0
- package/instrumentation/libraries/amqplib/mocks/CancelMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/CheckExchangeMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/CheckQueueMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/ConsumeMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/DeleteExchangeMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/DeleteQueueMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/EmptyMock.d.ts +13 -0
- package/instrumentation/libraries/amqplib/mocks/GetMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/NackAllMock.d.ts +3 -0
- package/instrumentation/libraries/amqplib/mocks/NackMock.d.ts +51 -0
- package/instrumentation/libraries/amqplib/mocks/PrefetchMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/PublishMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/PurgeQueueMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/mocks/RejectMock.d.ts +3 -0
- package/instrumentation/libraries/amqplib/mocks/SendToQueueMock.d.ts +4 -0
- package/instrumentation/libraries/amqplib/patchFnImports.d.ts +71 -0
- package/instrumentation/libraries/amqplib/replayModeHandlers.d.ts +9 -0
- package/instrumentation/libraries/amqplib/utils.d.ts +24 -0
- package/instrumentation/libraries/auth0/instrumentation.d.ts +16 -0
- package/instrumentation/libraries/auth0/mocks/authenticationClient/GetProfileMock.d.ts +40 -0
- package/instrumentation/libraries/auth0/mocks/authenticationClient/RequestChangePasswordEmailMock.d.ts +34 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/AssignRolestoUserMock.d.ts +40 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/CreateUserMock.d.ts +57 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/DeleteUserMock.d.ts +32 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/GetRoleMock.d.ts +36 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/GetRolesMock.d.ts +40 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/GetUserMock.d.ts +50 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/GetUsersByEmail.d.ts +54 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/GetUsersMock.d.ts +54 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/RemoveRolesFromUserMock.d.ts +40 -0
- package/instrumentation/libraries/auth0/mocks/managementClient/UpdateUserMock.d.ts +57 -0
- package/instrumentation/libraries/auth0/patchFnImports.d.ts +31 -0
- package/instrumentation/libraries/aws-sdk/instrumentation.d.ts +12 -0
- package/instrumentation/libraries/aws-sdk/mocks/AwsClientMock.d.ts +28 -0
- package/instrumentation/libraries/aws-sdk/utils.d.ts +5 -0
- package/instrumentation/libraries/cassandra/instrumentation.d.ts +13 -0
- package/instrumentation/libraries/cassandra/utils.d.ts +10 -0
- package/instrumentation/libraries/couchbase/instrumentation.d.ts +37 -0
- package/instrumentation/libraries/couchbase/mocks/CouchbaseMock.d.ts +30 -0
- package/instrumentation/libraries/couchbase/utils.d.ts +1 -0
- package/instrumentation/libraries/date/helpers/dateInstrumentationConfigHelpers.d.ts +49 -0
- package/instrumentation/libraries/date/instrumentation.d.ts +8 -0
- package/instrumentation/libraries/elastic-search/instrumentation.d.ts +20 -0
- package/instrumentation/libraries/elastic-search/mocks/EsInfoMock.d.ts +32 -0
- package/instrumentation/libraries/elastic-search/mocks/EsTransportV7RequestMock.d.ts +51 -0
- package/instrumentation/libraries/elastic-search/mocks/EsTransportV8RequestMock.d.ts +51 -0
- package/instrumentation/libraries/elastic-search/utils.d.ts +13 -0
- package/instrumentation/libraries/etcd3/helpers/processBuffers.d.ts +4 -0
- package/instrumentation/libraries/etcd3/htFakeClasses/HtFakeCampaign.d.ts +7 -0
- package/instrumentation/libraries/etcd3/htFakeClasses/HtFakeElection.d.ts +13 -0
- package/instrumentation/libraries/etcd3/htFakeClasses/HtFakeElectionObserver.d.ts +6 -0
- package/instrumentation/libraries/etcd3/htFakeClasses/HtFakeWatcher.d.ts +15 -0
- package/instrumentation/libraries/etcd3/instrumentation.d.ts +8 -0
- package/instrumentation/libraries/etcd3/modules/builders/comparatorBuilder/Etcd3ComparatorBuilderMock.d.ts +107 -0
- package/instrumentation/libraries/etcd3/modules/builders/deleteBuilder/Etcd3DeleteBuilderExecMock.d.ts +77 -0
- package/instrumentation/libraries/etcd3/modules/builders/multiRangeBuilder/Etcd3MultiRangeBuilderCountMock.d.ts +56 -0
- package/instrumentation/libraries/etcd3/modules/builders/multiRangeBuilder/Etcd3MultiRangeBuilderExecMock.d.ts +83 -0
- package/instrumentation/libraries/etcd3/modules/builders/putBuilder/Etcd3PutBuilderExecMock.d.ts +74 -0
- package/instrumentation/libraries/etcd3/modules/builders/singleRangeBuilder/Etcd3SingleRangeBuilderExecMock.d.ts +78 -0
- package/instrumentation/libraries/etcd3/modules/builders/singleRangeBuilder/Etcd3SingleRangeBuilderExistsMock.d.ts +49 -0
- package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientCloseMock.d.ts +29 -0
- package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientElectionMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientGetRolesMock.d.ts +30 -0
- package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientGetUsersMock.d.ts +30 -0
- package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientLeaseMock.d.ts +8 -0
- package/instrumentation/libraries/etcd3/modules/kvClient/Etcd3kvClientMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/lease/Etcd3LeaseGrantMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/lease/Etcd3LeaseKeepaliveOnceMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/lease/Etcd3LeaseReleaseMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/lease/Etcd3LeaseRevokeMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/lock/Etcd3LockAcquireMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/lock/Etcd3LockLeaseIdMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/lock/Etcd3LockReleaseMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/lock/Etcd3LockTtlMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleAddUserMock.d.ts +31 -0
- package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleCreateMock.d.ts +30 -0
- package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleDeleteMock.d.ts +30 -0
- package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleGrantMock.d.ts +66 -0
- package/instrumentation/libraries/etcd3/modules/role/Etcd3RolePermissionsMock.d.ts +57 -0
- package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleRemoveUserMock.d.ts +31 -0
- package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleRevokeMock.d.ts +66 -0
- package/instrumentation/libraries/etcd3/modules/transaction/Etcd3TransactionCommitMock.d.ts +28 -0
- package/instrumentation/libraries/etcd3/modules/transaction/Etcd3TransactionTransactMock.d.ts +3 -0
- package/instrumentation/libraries/etcd3/modules/user/Etcd3UserAddRoleMock.d.ts +31 -0
- package/instrumentation/libraries/etcd3/modules/user/Etcd3UserCreateMock.d.ts +33 -0
- package/instrumentation/libraries/etcd3/modules/user/Etcd3UserDeleteMock.d.ts +30 -0
- package/instrumentation/libraries/etcd3/modules/user/Etcd3UserRemoveRole.d.ts +31 -0
- package/instrumentation/libraries/etcd3/modules/user/Etcd3UserRolesMock.d.ts +32 -0
- package/instrumentation/libraries/etcd3/modules/user/Etcd3UserSetPasswordMock.d.ts +33 -0
- package/instrumentation/libraries/etcd3/modules/watchBuilder/Etcd3WatchBuilderWatcherMock.d.ts +3 -0
- package/instrumentation/libraries/express/instrumentation.d.ts +12 -0
- package/instrumentation/libraries/express/utils.d.ts +3 -0
- package/instrumentation/libraries/fastify/instrumentation.d.ts +8 -0
- package/instrumentation/libraries/graphql/instrumentation.d.ts +24 -0
- package/instrumentation/libraries/graphql/mocks/GraphqlClientMock.d.ts +41 -0
- package/instrumentation/libraries/graphql/mocks/GraphqlServerRequestMock.d.ts +30 -0
- package/instrumentation/libraries/graphql/utils.d.ts +64 -0
- package/instrumentation/libraries/grpc/instrumentation.d.ts +28 -0
- package/instrumentation/libraries/grpc/mocks/GetDeadlineMock.d.ts +29 -0
- package/instrumentation/libraries/grpc/mocks/GrpcClientMock.d.ts +42 -0
- package/instrumentation/libraries/grpc/mocks/GrpcServerMock.d.ts +40 -0
- package/instrumentation/libraries/grpc/replayModeHandlers.d.ts +8 -0
- package/instrumentation/libraries/grpc/utils.d.ts +33 -0
- package/instrumentation/libraries/http/HtHttpMockSocket.d.ts +51 -0
- package/instrumentation/libraries/http/HtMockClientRequest.d.ts +28 -0
- package/instrumentation/libraries/http/helpers/decodeBody.d.ts +1 -0
- package/instrumentation/libraries/http/helpers/eventPropagator.d.ts +3 -0
- package/instrumentation/libraries/http/helpers/getClusterPathForClientReqDuringReplay.d.ts +7 -0
- package/instrumentation/libraries/http/helpers/htHttpBodyParser.d.ts +34 -0
- package/instrumentation/libraries/http/helpers/processedInputOutputSchemaHelper.d.ts +5 -0
- package/instrumentation/libraries/http/httpHooks.d.ts +59 -0
- package/instrumentation/libraries/http/instrumentation.d.ts +24 -0
- package/instrumentation/libraries/http/mocks/HttpClientRequestMock.d.ts +19 -0
- package/instrumentation/libraries/http/mocks/HttpServerRequestMock.d.ts +47 -0
- package/instrumentation/libraries/http/utils.d.ts +52 -0
- package/instrumentation/libraries/ioredis/instrumentation.d.ts +11 -0
- package/instrumentation/libraries/ioredis/mocks/IORedisClusterMock.d.ts +42 -0
- package/instrumentation/libraries/ioredis/mocks/IORedisMock.d.ts +42 -0
- package/instrumentation/libraries/ioredis/mocks/IORedisPipelineExecMock.d.ts +43 -0
- package/instrumentation/libraries/ioredis/patchFnImports.d.ts +11 -0
- package/instrumentation/libraries/jsonwebtoken/instrumentation.d.ts +13 -0
- package/instrumentation/libraries/jsonwebtoken/mocks/JwtVerifyMock.d.ts +27 -0
- package/instrumentation/libraries/kafka/instrumentation.d.ts +68 -0
- package/instrumentation/libraries/kafka/mocks/KafkaClientMock.d.ts +29 -0
- package/instrumentation/libraries/kafka/mocks/KafkaSendBatchMock.d.ts +55 -0
- package/instrumentation/libraries/kafka/mocks/KafkaSendMock.d.ts +51 -0
- package/instrumentation/libraries/kafka/mocks/KafkaServerMock.d.ts +35 -0
- package/instrumentation/libraries/kafka/replayModeHandlers.d.ts +18 -0
- package/instrumentation/libraries/kafka/utils.d.ts +30 -0
- package/instrumentation/libraries/mongodb/instrumentation.d.ts +8 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminAddUserMock.d.ts +45 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminCommandMock.d.ts +48 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminListDatabasesMock.d.ts +51 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminPingMock.d.ts +42 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminRemoveUserMock.d.ts +45 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminReplGetSetStatusMock.d.ts +42 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminServerInfoMock.d.ts +42 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminServerStatusMock.d.ts +42 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminValidateCollectionMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/admin/MongoDbBuildInfoMock.d.ts +42 -0
- package/instrumentation/libraries/mongodb/modules/bulkOperation/MongoDbBulkOpExecuteMock.d.ts +56 -0
- package/instrumentation/libraries/mongodb/modules/client/MongoDbClientCloseMock.d.ts +33 -0
- package/instrumentation/libraries/mongodb/modules/client/MongoDbClientDbMock.d.ts +9 -0
- package/instrumentation/libraries/mongodb/modules/client/MongoDbClientStartSessionPatch.d.ts +16 -0
- package/instrumentation/libraries/mongodb/modules/client/MongoDbConnectMock.d.ts +7 -0
- package/instrumentation/libraries/mongodb/modules/clientSession/MongoDbClientSessionMock.d.ts +42 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbAggregateMock.d.ts +50 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbBulkOpMock.d.ts +9 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbBulkWriteMock.d.ts +53 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbCountDocumentsMock.d.ts +52 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbDeleteMock.d.ts +53 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbDistinctMock.d.ts +56 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropAllIndexesMock.d.ts +35 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropIndexMock.d.ts +51 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropIndexesMock.d.ts +47 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropSearchIndexMock.d.ts +41 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbEnsureIndexMock.d.ts +44 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbEstimatedDocumentCountMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindAndModifyMock.d.ts +60 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindAndRemoveMock.d.ts +48 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindMock.d.ts +58 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindOneAndDeleteMock.d.ts +58 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindOneAndReplaceMock.d.ts +63 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindOneMock.d.ts +59 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbGeoHaystackSearchMock.d.ts +45 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbGroupMock.d.ts +56 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbIndexExistsMock.d.ts +51 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbIndexInformationMock.d.ts +48 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbIndexMock.d.ts +74 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbIndexesMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbInsertMock.d.ts +47 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbInsertionMock.d.ts +53 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbIsCappedMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbListIndexesMock.d.ts +47 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbListSearchIndexesMock.d.ts +43 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbMapReduceMock.d.ts +42 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbOptionsMock.d.ts +47 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbParallelCollectionScanMock.d.ts +2 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbReindexMock.d.ts +40 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbRemoveMock.d.ts +58 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbRenameMock.d.ts +50 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbReplaceOneMock.d.ts +59 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbSaveMock.d.ts +45 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbSearchIndexMock.d.ts +50 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbStatsMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbUpdateMock.d.ts +66 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbUpdateOneOrManyMock.d.ts +59 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbUpdateSearchIndexMock.d.ts +49 -0
- package/instrumentation/libraries/mongodb/modules/collection/MongoDbWatchMock.d.ts +2 -0
- package/instrumentation/libraries/mongodb/modules/cursor/MongoDbCountMock.d.ts +41 -0
- package/instrumentation/libraries/mongodb/modules/cursor/MongoDbCursorMock.d.ts +25 -0
- package/instrumentation/libraries/mongodb/modules/cursor/MongoDbExplainMock.d.ts +35 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbAddUserMock.d.ts +45 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbCollectionsMock.d.ts +41 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbCommandMock.d.ts +47 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbCreateCollection.d.ts +45 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbCreateIndexMock.d.ts +56 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbDbAggregateMock.d.ts +50 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbDbEnsureIndexMock.d.ts +44 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbDropCollection.d.ts +45 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbDropDbMock.d.ts +41 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbExecuteDbAdminCommandMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbIndexInformationMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbListCollectionsMock.d.ts +50 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbProfilingLevel.d.ts +40 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbRemoveUserMock.d.ts +43 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbRenameCollection.d.ts +48 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbRunCursorCommandMock.d.ts +48 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbSetProfilingLevelMock.d.ts +46 -0
- package/instrumentation/libraries/mongodb/modules/db/MongoDbUnrefMock.d.ts +2 -0
- package/instrumentation/libraries/mongodb/modules/db/MongodbStatsMock.d.ts +42 -0
- package/instrumentation/libraries/mongodb/modules/db/MongodbWatchMock.d.ts +2 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/FakeBulkWriteResult.d.ts +113 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/FakeTopology.d.ts +7 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeAggregationCursor.d.ts +28 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeChangeStream.d.ts +4 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeCommandCursor.d.ts +16 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeCoreCursor.d.ts +26 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeCursor.d.ts +30 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeFindCursor.d.ts +15 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeAggregationCursor.d.ts +27 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeChangeStream.d.ts +4 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeCoreCursor.d.ts +37 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeFindCursor.d.ts +33 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeListCollectionsCursor.d.ts +12 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeListIndexesCursor.d.ts +12 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeRunCommandCursor.d.ts +24 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/cursorErrors.d.ts +63 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/getInternalSymbol.d.ts +1 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/makeReadableInputForBulkOpExecute.d.ts +18 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/maybeCallback.d.ts +1 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/processPayloadHelpers.d.ts +16 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/removeConnectionAndMessageObj.d.ts +1 -0
- package/instrumentation/libraries/mongodb/mongoHelpers/removeSessionAndSanitizeOptions.d.ts +6 -0
- package/instrumentation/libraries/mongodb/utils.d.ts +34 -0
- package/instrumentation/libraries/mongoose/MongooseCursor.d.ts +21 -0
- package/instrumentation/libraries/mongoose/instrumentation.d.ts +32 -0
- package/instrumentation/libraries/mongoose/internalTypes.d.ts +19 -0
- package/instrumentation/libraries/mongoose/mocks/MongooseMock.d.ts +40 -0
- package/instrumentation/libraries/mongoose/mongooseHelpers/processPayloadHelpers.d.ts +13 -0
- package/instrumentation/libraries/mongoose/utils.d.ts +25 -0
- package/instrumentation/libraries/mysql/defaultMocks/index.d.ts +690 -0
- package/instrumentation/libraries/mysql/instrumentation.d.ts +34 -0
- package/instrumentation/libraries/mysql/mocks/MysqlErrOnlyCallbackMock.d.ts +28 -0
- package/instrumentation/libraries/mysql/mocks/MysqlQueryMock.d.ts +62 -0
- package/instrumentation/libraries/mysql2/defaultMocks/getMysql2DefaultMocks.d.ts +1334 -0
- package/instrumentation/libraries/mysql2/instrumentation.d.ts +62 -0
- package/instrumentation/libraries/mysql2/internalTypes.d.ts +26 -0
- package/instrumentation/libraries/mysql2/mocks/Mysql2ConnectMock.d.ts +27 -0
- package/instrumentation/libraries/mysql2/mocks/Mysql2ErrOnlyCallbackMock.d.ts +29 -0
- package/instrumentation/libraries/mysql2/mocks/Mysql2PrepareMock.d.ts +36 -0
- package/instrumentation/libraries/mysql2/mocks/Mysql2QueryMock.d.ts +60 -0
- package/instrumentation/libraries/mysql2/utils.d.ts +12 -0
- package/instrumentation/libraries/node-cache/instrumentation.d.ts +9 -0
- package/instrumentation/libraries/node-cache/mocks/NodeCacheMock.d.ts +37 -0
- package/instrumentation/libraries/nodemailer/instrumentation.d.ts +11 -0
- package/instrumentation/libraries/nodemailer/mocks/NodemailerSendMailMock.d.ts +32 -0
- package/instrumentation/libraries/nodemailer/mocks/NodemailerVerifyMock.d.ts +28 -0
- package/instrumentation/libraries/nodemailer/utils.d.ts +10 -0
- package/instrumentation/libraries/opossum/instrumentation.d.ts +9 -0
- package/instrumentation/libraries/pg/defaultMocks/getPgDefaultMocks.d.ts +591 -0
- package/instrumentation/libraries/pg/instrumentation.d.ts +16 -0
- package/instrumentation/libraries/pg/internalTypes.d.ts +47 -0
- package/instrumentation/libraries/pg/mockPgClient.d.ts +16 -0
- package/instrumentation/libraries/pg/mocks/ConnectMock.d.ts +28 -0
- package/instrumentation/libraries/pg/mocks/CursorReadMock.d.ts +27 -0
- package/instrumentation/libraries/pg/mocks/CursorSubmitMock.d.ts +30 -0
- package/instrumentation/libraries/pg/mocks/PgQueryMock.d.ts +44 -0
- package/instrumentation/libraries/pg/utils.d.ts +12 -0
- package/instrumentation/libraries/prisma/instrumentation.d.ts +14 -0
- package/instrumentation/libraries/prisma/mocks/PrismaMock.d.ts +45 -0
- package/instrumentation/libraries/redis/instrumentation.d.ts +16 -0
- package/instrumentation/libraries/redis/mocks/RedisMock.d.ts +41 -0
- package/instrumentation/libraries/redis/utils.d.ts +18 -0
- package/instrumentation/libraries/redis3/instrumentation.d.ts +10 -0
- package/instrumentation/libraries/redis3/mocks/CreateClientMock.d.ts +6 -0
- package/instrumentation/libraries/redis3/mocks/InternalSendCommandMock.d.ts +13 -0
- package/instrumentation/libraries/redis3/mocks/MultiMock.d.ts +13 -0
- package/instrumentation/libraries/sentry/instrumentation.d.ts +10 -0
- package/instrumentation/libraries/sequelize/helpers/processPayloadHelpers.d.ts +12 -0
- package/instrumentation/libraries/sequelize/instrumentation.d.ts +36 -0
- package/instrumentation/libraries/sequelize/internalTypes.d.ts +22 -0
- package/instrumentation/libraries/sequelize/mocks/SequelizeMock.d.ts +38 -0
- package/instrumentation/libraries/sequelize/mocks/SequelizeRawQueryMock.d.ts +55 -0
- package/instrumentation/libraries/sequelize/utils.d.ts +6 -0
- package/instrumentation/libraries/socket.io/instrumentation.d.ts +26 -0
- package/instrumentation/libraries/sqlite3/instrumentation.d.ts +20 -0
- package/instrumentation/libraries/sqlite3/mocks/sqlite3DatabaseMock.d.ts +38 -0
- package/instrumentation/libraries/sqlite3/mocks/sqlite3DbCloseMock.d.ts +30 -0
- package/instrumentation/libraries/sqlite3/mocks/sqlite3DbPrepareMock.d.ts +37 -0
- package/instrumentation/libraries/sqlite3/mocks/sqlite3EachMock.d.ts +41 -0
- package/instrumentation/libraries/sqlite3/mocks/sqlite3MapMock.d.ts +38 -0
- package/instrumentation/libraries/sqlite3/mocks/sqlite3StatementMock.d.ts +40 -0
- package/instrumentation/libraries/typeorm/helpers.d.ts +4 -0
- package/instrumentation/libraries/typeorm/instrumentation.d.ts +68 -0
- package/instrumentation/libraries/typeorm/internalTypes.d.ts +71 -0
- package/instrumentation/libraries/typeorm/mocks/TypeormEntityUpdateMock.d.ts +46 -0
- package/instrumentation/libraries/typeorm/mocks/TypeormGetManyAndCountMock.d.ts +36 -0
- package/instrumentation/libraries/typeorm/mocks/TypeormGetRawAndEntitiesMock.d.ts +39 -0
- package/instrumentation/libraries/typeorm/mocks/TypeormInsertUpsertMock.d.ts +52 -0
- package/instrumentation/libraries/typeorm/mocks/TypeormMock.d.ts +28 -0
- package/instrumentation/libraries/typeorm/mocks/TypeormQueryBuilderStreamMock.d.ts +30 -0
- package/instrumentation/libraries/typeorm/mocks/TypeormRawQueryMock.d.ts +26 -0
- package/instrumentation/libraries/typeorm/mocks/TypeormRunMigrationMock.d.ts +37 -0
- package/instrumentation/libraries/zookeeper/instrumentation.d.ts +30 -0
- package/instrumentation/libraries/zookeeper/mocks/NodeZookeeperClientMock.d.ts +35 -0
- package/instrumentation/libraries/zookeeper/utils.d.ts +9 -0
- package/manualMock/index.d.ts +30 -0
- package/manualMock/manualMock.d.ts +33 -0
- package/manualMock/manualMockV2.d.ts +44 -0
- package/manualRequest/ManualServerRequestMock.d.ts +35 -0
- package/manualRequest/index.d.ts +15 -0
- package/manualRequest/replayModeHandlers.d.ts +5 -0
- package/package.json +17 -0
- package/server/index.d.ts +13 -0
- package/server/zodSchemaAndTypes.d.ts +1368 -0
package/instrumentation/libraries/mongodb/modules/collection/MongoDbGeoHaystackSearchMock.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
2
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
3
|
+
import type { Jsonable } from '../../../../../../../utils/types/jsonableTypes';
|
|
4
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
5
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
6
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
7
|
+
import { type Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
8
|
+
type InputMeta = {
|
|
9
|
+
optionsPathMeta: PathMeta;
|
|
10
|
+
};
|
|
11
|
+
type ReadableInput = {
|
|
12
|
+
collectionName: string;
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
options: Record<string, Jsonable>;
|
|
16
|
+
};
|
|
17
|
+
type ProcessedInput = {
|
|
18
|
+
collectionName: string;
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
type ProcessedInputSchema = {
|
|
23
|
+
collectionName: string;
|
|
24
|
+
};
|
|
25
|
+
type RealOutput = Record<string, Jsonable>;
|
|
26
|
+
type OutputMeta = {
|
|
27
|
+
pathMeta: PathMeta;
|
|
28
|
+
};
|
|
29
|
+
type ReadableOutput = RealOutput;
|
|
30
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
31
|
+
export declare class MongoDbGeoHaystackSearchMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
32
|
+
static mockSymbol: symbol;
|
|
33
|
+
static get mockVersion(): number;
|
|
34
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
35
|
+
plugin: HtInstrumentationBase;
|
|
36
|
+
submoduleName: string;
|
|
37
|
+
functionType: FunctionTypeEnum;
|
|
38
|
+
});
|
|
39
|
+
generateProcessedInput(): ProcessedInput;
|
|
40
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
41
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
42
|
+
generateProcessedOutputSchema(): ProcessedOutputSchema;
|
|
43
|
+
}
|
|
44
|
+
export declare function patchgeoHaystackSearch(plugin: HtMongoDbInstrumentation, version: string): (originalFn: any) => (this: any, ...args: any[]) => any;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
2
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
3
|
+
import type { Jsonable, JsonableArray, JsonableMap } from '../../../../../../../utils/types/jsonableTypes';
|
|
4
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
5
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
6
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
7
|
+
import { type Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
8
|
+
type InputMeta = {
|
|
9
|
+
keysPathMeta: PathMeta;
|
|
10
|
+
conditionPathMeta: PathMeta;
|
|
11
|
+
initialPathMeta: PathMeta;
|
|
12
|
+
optionsPathMeta: PathMeta;
|
|
13
|
+
};
|
|
14
|
+
type ReadableInput = {
|
|
15
|
+
collectionName: string;
|
|
16
|
+
keys: JsonableMap | JsonableArray;
|
|
17
|
+
condition: JsonableMap;
|
|
18
|
+
initial: JsonableMap;
|
|
19
|
+
command: boolean;
|
|
20
|
+
options: JsonableMap;
|
|
21
|
+
};
|
|
22
|
+
type ProcessedInput = {
|
|
23
|
+
collectionName: string;
|
|
24
|
+
keys: JsonableMap | JsonableArray;
|
|
25
|
+
condition: JsonableMap;
|
|
26
|
+
initial: JsonableMap;
|
|
27
|
+
command: boolean;
|
|
28
|
+
};
|
|
29
|
+
type ProcessedInputSchema = {
|
|
30
|
+
collectionName: string;
|
|
31
|
+
keys: JsonSchemaWithoutValues;
|
|
32
|
+
condition: JsonSchemaWithoutValues;
|
|
33
|
+
initial: JsonSchemaWithoutValues;
|
|
34
|
+
command: boolean;
|
|
35
|
+
};
|
|
36
|
+
type RealOutput = Record<string, Jsonable>;
|
|
37
|
+
type OutputMeta = {
|
|
38
|
+
pathMeta: PathMeta;
|
|
39
|
+
};
|
|
40
|
+
type ReadableOutput = RealOutput;
|
|
41
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
42
|
+
export declare class MongoDbGroupMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
43
|
+
static mockSymbol: symbol;
|
|
44
|
+
static get mockVersion(): number;
|
|
45
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
46
|
+
plugin: HtInstrumentationBase;
|
|
47
|
+
submoduleName: string;
|
|
48
|
+
functionType: FunctionTypeEnum;
|
|
49
|
+
});
|
|
50
|
+
generateProcessedInput(): ProcessedInput;
|
|
51
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
52
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
53
|
+
generateProcessedOutputSchema(realOutput: RealOutput): ProcessedOutputSchema;
|
|
54
|
+
}
|
|
55
|
+
export declare function patchGroup(plugin: HtMongoDbInstrumentation, version: string): (originalFn: any) => (this: any, ...args: any[]) => any;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { Collection as Collection_v5 } from 'mongov5';
|
|
3
|
+
import type { Collection as Collection_v6 } from 'mongov6';
|
|
4
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
5
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
6
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
7
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
8
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
9
|
+
import { type Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
10
|
+
type InputArgs = Parameters<Collection_v4['indexExists'] | Collection_v5['indexExists'] | Collection_v6['indexExists']>;
|
|
11
|
+
type OutputType = ReturnType<Collection_v4['indexExists'] | Collection_v5['indexExists'] | Collection_v6['indexExists']>;
|
|
12
|
+
type QueryIndexes = Parameters<Collection_v6['indexExists'] | Collection_v5['indexExists'] | Collection_v4['indexExists']>[0];
|
|
13
|
+
type QueryOptions = Parameters<Collection_v6['indexExists'] | Collection_v5['indexExists'] | Collection_v4['indexExists']>[1];
|
|
14
|
+
type Collection = Collection_v4 | Collection_v5 | Collection_v6;
|
|
15
|
+
type InputMeta = {
|
|
16
|
+
optionsPathMeta: PathMeta;
|
|
17
|
+
};
|
|
18
|
+
type ReadableInput = {
|
|
19
|
+
collectionName: string;
|
|
20
|
+
indexes: QueryIndexes;
|
|
21
|
+
options: QueryOptions;
|
|
22
|
+
};
|
|
23
|
+
type ProcessedInput = {
|
|
24
|
+
collectionName: string;
|
|
25
|
+
indexes: QueryIndexes;
|
|
26
|
+
};
|
|
27
|
+
type ProcessedInputSchema = {
|
|
28
|
+
collectionName: string;
|
|
29
|
+
indexes: QueryIndexes;
|
|
30
|
+
};
|
|
31
|
+
type RealOutput = boolean | null;
|
|
32
|
+
type OutputMeta = {
|
|
33
|
+
pathMeta: PathMeta;
|
|
34
|
+
};
|
|
35
|
+
type ReadableOutput = RealOutput;
|
|
36
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
37
|
+
export declare class MongoDbIndexExistsMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
38
|
+
static mockSymbol: symbol;
|
|
39
|
+
static get mockVersion(): number;
|
|
40
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
41
|
+
plugin: HtInstrumentationBase;
|
|
42
|
+
submoduleName: string;
|
|
43
|
+
functionType: FunctionTypeEnum;
|
|
44
|
+
});
|
|
45
|
+
generateProcessedInput(): ProcessedInput;
|
|
46
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
47
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
48
|
+
generateProcessedOutputSchema(): ProcessedOutputSchema;
|
|
49
|
+
}
|
|
50
|
+
export declare function patchIndexExists(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["indexExists"]) => (this: Collection, ...args: InputArgs) => OutputType;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { Collection as Collection_v5 } from 'mongov5';
|
|
3
|
+
import type { Collection as Collection_v6 } from 'mongov6';
|
|
4
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
5
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
6
|
+
import type { Jsonable } from '../../../../../../../utils/types/jsonableTypes';
|
|
7
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
8
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
9
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
10
|
+
import { type Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
11
|
+
type InputArgs = Parameters<Collection_v4['indexInformation'] | Collection_v5['indexInformation'] | Collection_v6['indexInformation']>;
|
|
12
|
+
type OutputType = ReturnType<Collection_v4['indexInformation'] | Collection_v5['indexInformation'] | Collection_v6['indexInformation']>;
|
|
13
|
+
type QueryOptions = Parameters<Collection_v6['indexInformation'] | Collection_v5['indexInformation'] | Collection_v4['indexInformation']>[0];
|
|
14
|
+
type Collection = Collection_v4 | Collection_v5 | Collection_v6;
|
|
15
|
+
type InputMeta = {
|
|
16
|
+
optionsPathMeta: PathMeta;
|
|
17
|
+
};
|
|
18
|
+
type ReadableInput = {
|
|
19
|
+
collectionName: string;
|
|
20
|
+
options: QueryOptions;
|
|
21
|
+
};
|
|
22
|
+
type ProcessedInput = {
|
|
23
|
+
collectionName: string;
|
|
24
|
+
};
|
|
25
|
+
type ProcessedInputSchema = {
|
|
26
|
+
collectionName: string;
|
|
27
|
+
};
|
|
28
|
+
type RealOutput = Record<string, Jsonable> | null;
|
|
29
|
+
type OutputMeta = {
|
|
30
|
+
pathMeta: PathMeta;
|
|
31
|
+
};
|
|
32
|
+
type ReadableOutput = RealOutput;
|
|
33
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
34
|
+
export declare class MongoDbIndexInfoMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
35
|
+
static mockSymbol: symbol;
|
|
36
|
+
static get mockVersion(): number;
|
|
37
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
38
|
+
plugin: HtInstrumentationBase;
|
|
39
|
+
submoduleName: string;
|
|
40
|
+
functionType: FunctionTypeEnum;
|
|
41
|
+
});
|
|
42
|
+
generateProcessedInput(): ProcessedInput;
|
|
43
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
44
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
45
|
+
generateProcessedOutputSchema(): ProcessedOutputSchema;
|
|
46
|
+
}
|
|
47
|
+
export declare function patchIndexInformation(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["indexInformation"]) => (this: Collection, ...args: InputArgs) => OutputType;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { Collection as Collection_v5 } from 'mongov5';
|
|
3
|
+
import type { Collection as Collection_v6 } from 'mongov6';
|
|
4
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
5
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
6
|
+
import type { Jsonable } from '../../../../../../../utils/types/jsonableTypes';
|
|
7
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
8
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
9
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
10
|
+
import { type Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
11
|
+
type InputArgs = Parameters<Collection_v4['createIndex'] | Collection_v5['createIndex'] | Collection_v6['createIndex']>;
|
|
12
|
+
type OutputType = ReturnType<Collection_v4['createIndex'] | Collection_v5['createIndex'] | Collection_v6['createIndex']>;
|
|
13
|
+
type CreateIndexQueryIndexSpec = Parameters<Collection_v6['createIndex'] | Collection_v5['createIndex'] | Collection_v4['createIndex']>[0];
|
|
14
|
+
type CreateIndexQueryOptions = Parameters<Collection_v6['createIndex'] | Collection_v5['createIndex'] | Collection_v4['createIndex']>[1];
|
|
15
|
+
type CreateIndexesInputArgs = Parameters<Collection_v4['createIndexes'] | Collection_v5['createIndexes'] | Collection_v6['createIndexes']>;
|
|
16
|
+
type CreateIndexesOutputType = Parameters<Collection_v4['createIndexes'] | Collection_v5['createIndexes'] | Collection_v6['createIndexes']>;
|
|
17
|
+
type CreateIndexesQueryIndexSpecs = Parameters<Collection_v6['createIndexes'] | Collection_v5['createIndexes'] | Collection_v4['createIndexes']>[0];
|
|
18
|
+
type CreateIndexesQueryOptions = Parameters<Collection_v6['createIndexes'] | Collection_v5['createIndexes'] | Collection_v4['createIndexes']>[1];
|
|
19
|
+
type Collection = Collection_v4 | Collection_v5 | Collection_v6;
|
|
20
|
+
type InputMeta = {
|
|
21
|
+
indexSpecPathMeta: PathMeta;
|
|
22
|
+
optionsPathMeta: PathMeta;
|
|
23
|
+
};
|
|
24
|
+
type ReadableInput = {
|
|
25
|
+
collectionName: string;
|
|
26
|
+
indexSpec: CreateIndexQueryIndexSpec;
|
|
27
|
+
options: CreateIndexesQueryOptions;
|
|
28
|
+
} | {
|
|
29
|
+
collectionName: string;
|
|
30
|
+
indexSpecs: CreateIndexesQueryIndexSpecs;
|
|
31
|
+
options: CreateIndexQueryOptions;
|
|
32
|
+
};
|
|
33
|
+
type ProcessedInput = {
|
|
34
|
+
collectionName: string;
|
|
35
|
+
indexSpec: CreateIndexQueryIndexSpec;
|
|
36
|
+
options: {
|
|
37
|
+
wildcardProjection?: Record<string, Jsonable>;
|
|
38
|
+
};
|
|
39
|
+
} | {
|
|
40
|
+
collectionName: string;
|
|
41
|
+
indexSpecs: CreateIndexesQueryIndexSpecs;
|
|
42
|
+
options: {
|
|
43
|
+
wildcardProjection?: Record<string, Jsonable>;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
type ProcessedInputSchema = {
|
|
47
|
+
collectionName: string;
|
|
48
|
+
indexSpec: CreateIndexQueryIndexSpec;
|
|
49
|
+
} | {
|
|
50
|
+
collectionName: string;
|
|
51
|
+
indexSpecs: CreateIndexesQueryIndexSpecs;
|
|
52
|
+
};
|
|
53
|
+
type RealOutput = string;
|
|
54
|
+
type OutputMeta = {
|
|
55
|
+
pathMeta?: PathMeta;
|
|
56
|
+
};
|
|
57
|
+
type ReadableOutput = RealOutput;
|
|
58
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
59
|
+
export declare class MongoDbIndexMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
60
|
+
static mockSymbol: symbol;
|
|
61
|
+
static get mockVersion(): number;
|
|
62
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
63
|
+
plugin: HtInstrumentationBase;
|
|
64
|
+
submoduleName: string;
|
|
65
|
+
functionType: FunctionTypeEnum;
|
|
66
|
+
});
|
|
67
|
+
generateProcessedInput(): ProcessedInput;
|
|
68
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
69
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
70
|
+
generateProcessedOutputSchema(realOutput: RealOutput): ProcessedOutputSchema;
|
|
71
|
+
}
|
|
72
|
+
export declare function patchCreateIndex(plugin: HtMongoDbInstrumentation): (originalFn: Collection["createIndex"]) => (this: Collection, ...args: InputArgs) => OutputType;
|
|
73
|
+
export declare function patchCreateIndexes(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["createIndexes"]) => (this: Collection, ...args: CreateIndexesInputArgs) => CreateIndexesOutputType;
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { Collection as Collection_v5 } from 'mongov5';
|
|
3
|
+
import type { Collection as Collection_v6 } from 'mongov6';
|
|
4
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
5
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
6
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
7
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
8
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
9
|
+
import { type Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
10
|
+
type InputArgs = Parameters<Collection_v4['indexes'] | Collection_v5['indexes'] | Collection_v6['indexes']>;
|
|
11
|
+
type QueryOptions = Parameters<Collection_v6['indexes'] | Collection_v5['indexes'] | Collection_v4['indexes']>[0];
|
|
12
|
+
type Collection = Collection_v4 | Collection_v5 | Collection_v6;
|
|
13
|
+
type InputMeta = {
|
|
14
|
+
optionsPathMeta: PathMeta;
|
|
15
|
+
};
|
|
16
|
+
type ReadableInput = {
|
|
17
|
+
collectionName: string;
|
|
18
|
+
options: QueryOptions;
|
|
19
|
+
};
|
|
20
|
+
type ProcessedInput = {
|
|
21
|
+
collectionName: string;
|
|
22
|
+
};
|
|
23
|
+
type ProcessedInputSchema = {
|
|
24
|
+
collectionName: string;
|
|
25
|
+
};
|
|
26
|
+
type RealOutput = string;
|
|
27
|
+
type OutputMeta = {
|
|
28
|
+
pathMeta: PathMeta;
|
|
29
|
+
};
|
|
30
|
+
type ReadableOutput = RealOutput;
|
|
31
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
32
|
+
export declare class MongoDbIndexesMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
33
|
+
static mockSymbol: symbol;
|
|
34
|
+
static get mockVersion(): number;
|
|
35
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
36
|
+
plugin: HtInstrumentationBase;
|
|
37
|
+
submoduleName: string;
|
|
38
|
+
functionType: FunctionTypeEnum;
|
|
39
|
+
});
|
|
40
|
+
generateProcessedInput(): ProcessedInput;
|
|
41
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
42
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
43
|
+
generateProcessedOutputSchema(realOutput: RealOutput): ProcessedOutputSchema;
|
|
44
|
+
}
|
|
45
|
+
export declare function patchIndexes(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["indexes"]) => (this: Collection, ...args: InputArgs) => any;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
3
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
4
|
+
import type { JsonableArray, JsonableMap } from '../../../../../../../utils/types/jsonableTypes';
|
|
5
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
6
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
7
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
8
|
+
import { type Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
9
|
+
type Collection = Collection_v4;
|
|
10
|
+
type InputMeta = {
|
|
11
|
+
docsPathMeta: PathMeta;
|
|
12
|
+
optionsPathMeta: PathMeta;
|
|
13
|
+
};
|
|
14
|
+
type ReadableInput = {
|
|
15
|
+
collectionName: string;
|
|
16
|
+
docs: JsonableMap | JsonableArray;
|
|
17
|
+
options: JsonableMap;
|
|
18
|
+
};
|
|
19
|
+
type ProcessedInput = {
|
|
20
|
+
collectionName: string;
|
|
21
|
+
docs: JsonableMap | JsonableArray;
|
|
22
|
+
};
|
|
23
|
+
type ProcessedInputSchema = {
|
|
24
|
+
collectionName: string;
|
|
25
|
+
docs: JsonSchemaWithoutValues;
|
|
26
|
+
};
|
|
27
|
+
type RealOutput = JsonableMap;
|
|
28
|
+
type OutputMeta = {
|
|
29
|
+
pathMeta: PathMeta;
|
|
30
|
+
};
|
|
31
|
+
type ReadableOutput = RealOutput;
|
|
32
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
33
|
+
export declare class MongoDbInsertMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
34
|
+
static mockSymbol: symbol;
|
|
35
|
+
static get mockVersion(): number;
|
|
36
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
37
|
+
plugin: HtInstrumentationBase;
|
|
38
|
+
submoduleName: string;
|
|
39
|
+
functionType: FunctionTypeEnum;
|
|
40
|
+
});
|
|
41
|
+
generateProcessedInput(): ProcessedInput;
|
|
42
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
43
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
44
|
+
generateProcessedOutputSchema(realOutput: RealOutput): ProcessedOutputSchema;
|
|
45
|
+
}
|
|
46
|
+
export declare function patchInsert(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["insert"]) => (this: Collection, docs: import("mongov4").OptionalId<import("bson").Document>[], options: import("mongov4").BulkWriteOptions, callback: import("mongov4").Callback<import("mongov4").InsertManyResult<import("bson").Document>>) => unknown;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { Collection as Collection_v5 } from 'mongov5';
|
|
3
|
+
import type { Collection as Collection_v6 } from 'mongov6';
|
|
4
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
5
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
6
|
+
import type { JsonableArray, JsonableMap } from '../../../../../../../utils/types/jsonableTypes';
|
|
7
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
8
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
9
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
10
|
+
import type { Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
11
|
+
type InputArgs = Parameters<Collection_v4['insertOne'] | Collection_v5['insertOne'] | Collection_v6['insertOne']>;
|
|
12
|
+
type QueryDocs = Parameters<Collection_v6['insertOne'] | Collection_v5['insertOne'] | Collection_v4['insertOne']>[0];
|
|
13
|
+
type QueryOptions = Parameters<Collection_v6['insertOne'] | Collection_v5['insertOne'] | Collection_v4['insertOne']>[1];
|
|
14
|
+
type Collection = Collection_v4 | Collection_v5 | Collection_v6;
|
|
15
|
+
type InputMeta = {
|
|
16
|
+
optionsPathMeta: PathMeta;
|
|
17
|
+
docsPathMeta: PathMeta;
|
|
18
|
+
};
|
|
19
|
+
type ReadableInput = {
|
|
20
|
+
collectionName: string;
|
|
21
|
+
docs: QueryDocs;
|
|
22
|
+
options: QueryOptions;
|
|
23
|
+
};
|
|
24
|
+
type ProcessedInput = {
|
|
25
|
+
collectionName: string;
|
|
26
|
+
docs: QueryDocs;
|
|
27
|
+
};
|
|
28
|
+
type ProcessedInputSchema = {
|
|
29
|
+
collectionName: string;
|
|
30
|
+
docs: QueryDocs;
|
|
31
|
+
};
|
|
32
|
+
type RealOutput = JsonableArray | JsonableMap;
|
|
33
|
+
type OutputMeta = {
|
|
34
|
+
pathMeta: PathMeta;
|
|
35
|
+
};
|
|
36
|
+
type ReadableOutput = RealOutput;
|
|
37
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
38
|
+
export declare class MongoDbInsertionMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
39
|
+
static mockSymbol: symbol;
|
|
40
|
+
static get mockVersion(): number;
|
|
41
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
42
|
+
plugin: HtInstrumentationBase;
|
|
43
|
+
submoduleName: string;
|
|
44
|
+
functionType: FunctionTypeEnum;
|
|
45
|
+
});
|
|
46
|
+
generateProcessedInput(): ProcessedInput;
|
|
47
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
48
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
49
|
+
generateProcessedOutputSchema(realOutput: RealOutput): ProcessedOutputSchema;
|
|
50
|
+
}
|
|
51
|
+
export declare function patchInsertOne(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["insertOne"]) => (this: Collection, ...args: InputArgs) => any;
|
|
52
|
+
export declare function patchInsertMany(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["insertMany"]) => (this: Collection, ...args: InputArgs) => any;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { Collection as Collection_v5 } from 'mongov5';
|
|
3
|
+
import type { Collection as Collection_v6 } from 'mongov6';
|
|
4
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
5
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
6
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
7
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
8
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
9
|
+
import { type Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
10
|
+
type InputArgs = Parameters<Collection_v4['isCapped'] | Collection_v5['isCapped'] | Collection_v6['isCapped']>;
|
|
11
|
+
type QueryOptions = Parameters<Collection_v6['isCapped'] | Collection_v5['isCapped'] | Collection_v4['isCapped']>[0];
|
|
12
|
+
type Collection = Collection_v4 | Collection_v5 | Collection_v6;
|
|
13
|
+
type InputMeta = {
|
|
14
|
+
optionsPathMeta: PathMeta;
|
|
15
|
+
};
|
|
16
|
+
type ReadableInput = {
|
|
17
|
+
collectionName: string;
|
|
18
|
+
options: QueryOptions;
|
|
19
|
+
};
|
|
20
|
+
type ProcessedInput = {
|
|
21
|
+
collectionName: string;
|
|
22
|
+
};
|
|
23
|
+
type ProcessedInputSchema = {
|
|
24
|
+
collectionName: string;
|
|
25
|
+
};
|
|
26
|
+
type RealOutput = boolean;
|
|
27
|
+
type OutputMeta = {
|
|
28
|
+
pathMeta: PathMeta;
|
|
29
|
+
};
|
|
30
|
+
type ReadableOutput = RealOutput;
|
|
31
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
32
|
+
export declare class MongoDbIsCappedMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
33
|
+
static mockSymbol: symbol;
|
|
34
|
+
static get mockVersion(): number;
|
|
35
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
36
|
+
plugin: HtInstrumentationBase;
|
|
37
|
+
submoduleName: string;
|
|
38
|
+
functionType: FunctionTypeEnum;
|
|
39
|
+
});
|
|
40
|
+
generateProcessedInput(): ProcessedInput;
|
|
41
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
42
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
43
|
+
generateProcessedOutputSchema(realOutput: RealOutput): ProcessedOutputSchema;
|
|
44
|
+
}
|
|
45
|
+
export declare function patchIsCapped(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["isCapped"]) => (this: Collection, ...args: InputArgs) => any;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { Collection as Collection_v5 } from 'mongov5';
|
|
3
|
+
import type { Collection as Collection_v6 } from 'mongov6';
|
|
4
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
5
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
6
|
+
import type { JsonableMap } from '../../../../../../../utils/types/jsonableTypes';
|
|
7
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
8
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
9
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
10
|
+
import type { Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
11
|
+
type InputArgsCountDocuments = Parameters<Collection_v4['listIndexes'] | Collection_v5['listIndexes'] | Collection_v6['listIndexes']>;
|
|
12
|
+
type QueryOptions = Parameters<Collection_v6['listIndexes'] | Collection_v5['listIndexes'] | Collection_v4['listIndexes']>[0];
|
|
13
|
+
type Collection = Collection_v4 | Collection_v5 | Collection_v6;
|
|
14
|
+
type InputMeta = {
|
|
15
|
+
optionsPathMeta: PathMeta;
|
|
16
|
+
};
|
|
17
|
+
type ReadableInput = {
|
|
18
|
+
collectionName: string;
|
|
19
|
+
options: QueryOptions;
|
|
20
|
+
};
|
|
21
|
+
type ProcessedInput = {
|
|
22
|
+
collectionName: string;
|
|
23
|
+
};
|
|
24
|
+
type ProcessedInputSchema = {
|
|
25
|
+
collectionName: string;
|
|
26
|
+
};
|
|
27
|
+
type RealOutput = JsonableMap;
|
|
28
|
+
type OutputMeta = {
|
|
29
|
+
pathMeta: PathMeta;
|
|
30
|
+
};
|
|
31
|
+
type ReadableOutput = RealOutput;
|
|
32
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
33
|
+
export declare class MongoDbListIndexesMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
34
|
+
static mockSymbol: symbol;
|
|
35
|
+
static get mockVersion(): number;
|
|
36
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
37
|
+
plugin: HtInstrumentationBase;
|
|
38
|
+
submoduleName: string;
|
|
39
|
+
functionType: FunctionTypeEnum;
|
|
40
|
+
});
|
|
41
|
+
generateProcessedInput(): ProcessedInput;
|
|
42
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
43
|
+
generateReadableOutput(): ReadableOutput;
|
|
44
|
+
generateProcessedOutputSchema(): ProcessedOutputSchema;
|
|
45
|
+
}
|
|
46
|
+
export declare function patchListIndexes(plugin: HtMongoDbInstrumentation, version: string): (originalFn: any) => (this: Collection, ...args: InputArgsCountDocuments) => any;
|
|
47
|
+
export {};
|
package/instrumentation/libraries/mongodb/modules/collection/MongoDbListSearchIndexesMock.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Collection as Collection_v4 } from 'mongov4';
|
|
2
|
+
import type { Collection as Collection_v5 } from 'mongov5';
|
|
3
|
+
import type { Collection as Collection_v6 } from 'mongov6';
|
|
4
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
5
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
6
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
7
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
8
|
+
import type { Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
9
|
+
type QueryOptions = Parameters<Collection_v6['listSearchIndexes']>[0];
|
|
10
|
+
type Collection = Collection_v4 | Collection_v5 | Collection_v6;
|
|
11
|
+
type EmptyObject = Record<string, never>;
|
|
12
|
+
type InputMeta = {
|
|
13
|
+
optionsPathMeta: PathMeta;
|
|
14
|
+
};
|
|
15
|
+
type ReadableInput = {
|
|
16
|
+
collectionName: string;
|
|
17
|
+
options: QueryOptions;
|
|
18
|
+
};
|
|
19
|
+
type ProcessedInput = {
|
|
20
|
+
collectionName: string;
|
|
21
|
+
};
|
|
22
|
+
type ProcessedInputSchema = {
|
|
23
|
+
collectionName: string;
|
|
24
|
+
};
|
|
25
|
+
type RealOutput = EmptyObject;
|
|
26
|
+
type OutputMeta = EmptyObject;
|
|
27
|
+
type ReadableOutput = EmptyObject;
|
|
28
|
+
type ProcessedOutputSchema = EmptyObject;
|
|
29
|
+
export declare class MongoDbListSearchIndexesMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
30
|
+
static mockSymbol: symbol;
|
|
31
|
+
static get mockVersion(): number;
|
|
32
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
33
|
+
plugin: HtInstrumentationBase;
|
|
34
|
+
submoduleName: string;
|
|
35
|
+
functionType: FunctionTypeEnum;
|
|
36
|
+
});
|
|
37
|
+
generateProcessedInput(): ProcessedInput;
|
|
38
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
39
|
+
generateReadableOutput(): ReadableOutput;
|
|
40
|
+
generateProcessedOutputSchema(): ProcessedOutputSchema;
|
|
41
|
+
}
|
|
42
|
+
export declare function patchListSearchIndexes(plugin: HtMongoDbInstrumentation, version: string): (originalFn: any) => (this: Collection, name: string, options?: import("mongov6").ListSearchIndexesOptions) => any;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Collection, Document } from 'mongov4';
|
|
2
|
+
import type { JsonSchemaWithoutValues } from '../../../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
|
|
3
|
+
import { FunctionTypeEnum } from '../../../../../../../utils/types';
|
|
4
|
+
import type { Jsonable, JsonableArray, JsonableMap } from '../../../../../../../utils/types/jsonableTypes';
|
|
5
|
+
import type { HtInstrumentationBase } from '../../../../core/baseClasses/HtInstrumentationBase';
|
|
6
|
+
import { HtInstrumentationMockAbstract } from '../../../../core/baseClasses/HtInstrumentationMockAbstract';
|
|
7
|
+
import type { HtMongoDbInstrumentation } from '../../instrumentation';
|
|
8
|
+
import type { Meta as PathMeta } from '../../mongoHelpers/processPayloadHelpers';
|
|
9
|
+
type InputMeta = {
|
|
10
|
+
optionsPathMeta: PathMeta;
|
|
11
|
+
};
|
|
12
|
+
type ReadableInput = {
|
|
13
|
+
collectionName: string;
|
|
14
|
+
options: Record<string, Jsonable>;
|
|
15
|
+
};
|
|
16
|
+
type ProcessedInput = {
|
|
17
|
+
collectionName: string;
|
|
18
|
+
};
|
|
19
|
+
type ProcessedInputSchema = {
|
|
20
|
+
collectionName: string;
|
|
21
|
+
};
|
|
22
|
+
type RealOutput = JsonableMap | JsonableArray;
|
|
23
|
+
type OutputMeta = {
|
|
24
|
+
pathMeta: PathMeta;
|
|
25
|
+
};
|
|
26
|
+
type ReadableOutput = RealOutput;
|
|
27
|
+
type ProcessedOutputSchema = JsonSchemaWithoutValues;
|
|
28
|
+
export declare class MongoDbMapReduceMock extends HtInstrumentationMockAbstract<InputMeta, ReadableInput, ProcessedInput, ProcessedInputSchema, OutputMeta, RealOutput, ReadableOutput, ProcessedOutputSchema> {
|
|
29
|
+
static mockSymbol: symbol;
|
|
30
|
+
static get mockVersion(): number;
|
|
31
|
+
constructor({ plugin, submoduleName, functionType, }: {
|
|
32
|
+
plugin: HtInstrumentationBase;
|
|
33
|
+
submoduleName: string;
|
|
34
|
+
functionType: FunctionTypeEnum;
|
|
35
|
+
});
|
|
36
|
+
generateProcessedInput(): ProcessedInput;
|
|
37
|
+
generateProcessedInputSchema(): ProcessedInputSchema;
|
|
38
|
+
generateReadableOutput(realOutput: RealOutput): ReadableOutput;
|
|
39
|
+
generateProcessedOutputSchema(realOutput: RealOutput): ProcessedOutputSchema;
|
|
40
|
+
}
|
|
41
|
+
export declare function patchMapReduce(plugin: HtMongoDbInstrumentation, version: string): (originalFn: Collection["mapReduce"]) => (this: any, map: string | import("mongov4").MapFunction<Document>, reduce: string | import("mongov4").ReduceFunction<unknown, unknown>, options: import("mongov4").MapReduceOptions<unknown, unknown>, callback: import("mongov4").Callback<Document | Document[]>) => unknown;
|
|
42
|
+
export {};
|