/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.8.18 * User agent: apibuilder app.apibuilder.io/flow/dependency/0.8.18/http4s_0_20 */ package io.flow.dependency.v0.mock { class Client[F[_]: cats.Applicative] extends io.flow.dependency.v0.interfaces.Client[F] { val baseUrl: org.http4s.Uri = org.http4s.Uri.unsafeFromString("http://mock.localhost") override def binaries: io.flow.dependency.v0.Binaries[F] = new MockBinaries[F] override def binaryVersions: io.flow.dependency.v0.BinaryVersions[F] = new MockBinaryVersions[F] override def githubUsers: io.flow.dependency.v0.GithubUsers[F] = new MockGithubUsers[F] override def githubWebhooks: io.flow.dependency.v0.GithubWebhooks[F] = new MockGithubWebhooks[F] override def users: io.flow.dependency.v0.Users[F] = new MockUsers[F] override def healthchecks: io.flow.dependency.v0.Healthchecks[F] = new MockHealthchecks[F] override def items: io.flow.dependency.v0.Items[F] = new MockItems[F] override def libraries: io.flow.dependency.v0.Libraries[F] = new MockLibraries[F] override def libraryVersions: io.flow.dependency.v0.LibraryVersions[F] = new MockLibraryVersions[F] override def memberships: io.flow.dependency.v0.Memberships[F] = new MockMemberships[F] override def organizations: io.flow.dependency.v0.Organizations[F] = new MockOrganizations[F] override def projects: io.flow.dependency.v0.Projects[F] = new MockProjects[F] override def projectBinaries: io.flow.dependency.v0.ProjectBinaries[F] = new MockProjectBinaries[F] override def projectDependencyResolutions: io.flow.dependency.v0.ProjectDependencyResolutions[F] = new MockProjectDependencyResolutions[F] override def projectLibraries: io.flow.dependency.v0.ProjectLibraries[F] = new MockProjectLibraries[F] override def recommendations: io.flow.dependency.v0.Recommendations[F] = new MockRecommendations[F] override def repositories: io.flow.dependency.v0.Repositories[F] = new MockRepositories[F] override def resolvers: io.flow.dependency.v0.Resolvers[F] = new MockResolvers[F] override def subscriptions: io.flow.dependency.v0.Subscriptions[F] = new MockSubscriptions[F] override def syncs: io.flow.dependency.v0.Syncs[F] = new MockSyncs[F] override def tokens: io.flow.dependency.v0.Tokens[F] = new MockTokens[F] } class MockBinaries[F[_]: cats.Applicative] extends io.flow.dependency.v0.Binaries[F] { /** * Search binaries. Results are paginated * * @param id Find binary with this id. Exact match * @param ids Filter by any one of these ids * @param projectId Find binaries associated with this project * @param name Find project with this name. Case in-sensitive. Exact match * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, projectId: _root_.scala.Option[String] = None, name: _root_.scala.Option[String] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Binary]] = cats.Applicative[F].pure { Nil } /** * Returns information about the binary with this id. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Binary] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeBinary() } /** * Create a new binary. */ def post( binaryForm: io.flow.dependency.v0.models.BinaryForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Binary] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeBinary() } def deleteById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockBinaryVersions[F[_]: cats.Applicative] extends io.flow.dependency.v0.BinaryVersions[F] { /** * Search binary versions. Results are paginated * * @param id Find binary version with this id. Exact match * @param ids Filter by any one of these ids * @param binaryId Find binaries associated with this binary * @param projectId Find binaries associated with this project * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, binaryId: _root_.scala.Option[String] = None, projectId: _root_.scala.Option[String] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.BinaryVersion]] = cats.Applicative[F].pure { Nil } /** * Returns information about the binary version with this id. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.BinaryVersion] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeBinaryVersion() } } class MockGithubUsers[F[_]: cats.Applicative] extends io.flow.dependency.v0.GithubUsers[F] { /** * Used to authenticate a user via github */ def postGithub( githubAuthenticationForm: io.flow.dependency.v0.models.GithubAuthenticationForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.common.v0.models.User] = cats.Applicative[F].pure { io.flow.common.v0.mock.Factories.makeUser() } } class MockGithubWebhooks[F[_]: cats.Applicative] extends io.flow.dependency.v0.GithubWebhooks[F] { /** * Receives a webhook on push for this particular project */ def postByProjectId( projectId: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockUsers[F[_]: cats.Applicative] extends io.flow.dependency.v0.Users[F] { /** * Search for a specific user. You must specify at least 1 parameter - either a id * or email - and will receive back either 0 or 1 users. * * @param id Find user with this id. Exact match * @param email Find user with this email address. Case in-sensitive. Exact match * @param identifier Find user associated with this randomly generated identifier. Exact match */ def get( id: _root_.scala.Option[String] = None, email: _root_.scala.Option[String] = None, identifier: _root_.scala.Option[String] = None, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.common.v0.models.User]] = cats.Applicative[F].pure { Nil } /** * Returns information about the user with this id. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.common.v0.models.User] = cats.Applicative[F].pure { io.flow.common.v0.mock.Factories.makeUser() } /** * Returns the latest identifier for this user. The basic use case is to enable * things like unsubscribe w/out login (and thus once you have an identifier, you * can GET /users?identifier=xxx). Identifiers are rotated regularly with last n * identifiers being valid (allowing eventual expiration). */ def getIdentifierById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.UserIdentifier] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeUserIdentifier() } /** * Create a new user. */ def post( userForm: io.flow.dependency.v0.models.UserForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.common.v0.models.User] = cats.Applicative[F].pure { io.flow.common.v0.mock.Factories.makeUser() } } class MockHealthchecks[F[_]: cats.Applicative] extends io.flow.dependency.v0.Healthchecks[F] { def getHealthcheck( requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.healthcheck.v0.models.Healthcheck] = cats.Applicative[F].pure { io.flow.healthcheck.v0.mock.Factories.makeHealthcheck() } } class MockItems[F[_]: cats.Applicative] extends io.flow.dependency.v0.Items[F] { /** * Returns a list of all matching items * * @param q Actual search query * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( q: _root_.scala.Option[String] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Item]] = cats.Applicative[F].pure { Nil } } class MockLibraries[F[_]: cats.Applicative] extends io.flow.dependency.v0.Libraries[F] { /** * Search libraries. Results are paginated * * @param id Find library with this id. Exact match * @param ids Filter by any one of these ids * @param projectId Find binaries associated with this project * @param groupId Find library with this group_id. Case sensitive. Exact match * @param artifactId Find library with this artifact_id. Case sensitive. Exact match * @param resolverId Find libraries resolved with this resolver * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, projectId: _root_.scala.Option[String] = None, groupId: _root_.scala.Option[String] = None, artifactId: _root_.scala.Option[String] = None, resolverId: _root_.scala.Option[String] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Library]] = cats.Applicative[F].pure { Nil } /** * Returns information about the library with this id. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Library] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeLibrary() } /** * Create a new library. */ def post( libraryForm: io.flow.dependency.v0.models.LibraryForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Library] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeLibrary() } def deleteById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockLibraryVersions[F[_]: cats.Applicative] extends io.flow.dependency.v0.LibraryVersions[F] { /** * Search library versions. Results are paginated * * @param id Find library version with this id. Exact match * @param ids Filter by any one of these ids * @param libraryId Find binaries associated with this binary * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, libraryId: _root_.scala.Option[String] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.LibraryVersion]] = cats.Applicative[F].pure { Nil } /** * Returns information about the library version with this id. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.LibraryVersion] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeLibraryVersion() } } class MockMemberships[F[_]: cats.Applicative] extends io.flow.dependency.v0.Memberships[F] { /** * Search all memberships. Results are always paginated. * * @param id Find organization with this id. Exact match * @param ids Filter by any one of these ids * @param organization Filter to organization with this key. Case insensitive * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, organization: _root_.scala.Option[String] = None, userId: _root_.scala.Option[String] = None, role: _root_.scala.Option[io.flow.dependency.v0.models.Role] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Membership]] = cats.Applicative[F].pure { Nil } def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Membership] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeMembership() } def post( membershipForm: io.flow.dependency.v0.models.MembershipForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Membership] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeMembership() } def deleteById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockOrganizations[F[_]: cats.Applicative] extends io.flow.dependency.v0.Organizations[F] { /** * Search organizations. Results are paginated * * @param id Find organization with this id. Exact match * @param ids Filter by any one of these ids * @param userId Find organizations that this user has access to * @param key Find organization with this key. Case in-sensitive. Exact match * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, userId: _root_.scala.Option[String] = None, key: _root_.scala.Option[String] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Organization]] = cats.Applicative[F].pure { Nil } /** * Returns the organization representing the individual user. * * @param userId Find organization representing this user */ def getUsersByUserId( userId: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Organization] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeOrganization() } /** * Returns information about the organization with this id. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Organization] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeOrganization() } /** * Create a new organization. */ def post( organizationForm: io.flow.dependency.v0.models.OrganizationForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Organization] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeOrganization() } /** * Update an existing organization. */ def putById( id: String, organizationForm: io.flow.dependency.v0.models.OrganizationForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Organization] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeOrganization() } def deleteById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockProjects[F[_]: cats.Applicative] extends io.flow.dependency.v0.Projects[F] { /** * Search projects. Results are paginated * * @param id Find project with this id. Exact match * @param ids Filter by any one of these ids * @param organization Filter to resolvers belongs to the organization with this key * @param name Find project with this name. Case in-sensitive. Exact match * @param groupId Find projects that are dependent on a library with this group ID. Exact match * @param artifactId Find projects that are dependent on a library with this artifact ID. Exact match * @param version Find projects that are dependent on a library with this version number. Exact * match * @param libraryId Find projects that are dependent on a library * @param binary Find projects that are dependent on this binary. Case in-sensitive. Exact match * @param binaryId Find projects that are dependent on a binary * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, organization: _root_.scala.Option[String] = None, name: _root_.scala.Option[String] = None, groupId: _root_.scala.Option[String] = None, artifactId: _root_.scala.Option[String] = None, version: _root_.scala.Option[String] = None, libraryId: _root_.scala.Option[String] = None, binary: _root_.scala.Option[String] = None, binaryId: _root_.scala.Option[String] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Project]] = cats.Applicative[F].pure { Nil } /** * Returns information about the project with this id. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Project] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeProject() } /** * Create a new project. */ def post( projectForm: io.flow.dependency.v0.models.ProjectForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Project] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeProject() } /** * Update an existing project. */ def putById( id: String, projectForm: io.flow.dependency.v0.models.ProjectForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Project] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeProject() } /** * Patch an existing project */ def patchById( id: String, projectPatchForm: io.flow.dependency.v0.models.ProjectPatchForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Project] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeProject() } def deleteById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockProjectBinaries[F[_]: cats.Applicative] extends io.flow.dependency.v0.ProjectBinaries[F] { /** * Search project binaries. Results are paginated * * @param id Find project binary with this id. Exact match * @param ids Filter by any one of these ids * @param projectId filter by this project * @param binaryId filter by this binary * @param isSynced If true, filter by project binaries that have been synced. False to filter by * project binaries that have not yet been synced. Main purpose of this filter is * to see what binaries we are still evaluating after a project is added for the * first time. * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, projectId: _root_.scala.Option[String] = None, binaryId: _root_.scala.Option[String] = None, isSynced: _root_.scala.Option[Boolean] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.ProjectBinary]] = cats.Applicative[F].pure { Nil } } class MockProjectDependencyResolutions[F[_]: cats.Applicative] extends io.flow.dependency.v0.ProjectDependencyResolutions[F] { def get( organization: String, groupId: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.ProjectDependencyResolution] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeProjectDependencyResolution() } } class MockProjectLibraries[F[_]: cats.Applicative] extends io.flow.dependency.v0.ProjectLibraries[F] { /** * Search project libraries. Results are paginated * * @param id Find project library with this id. Exact match * @param ids Filter by any one of these ids * @param projectId filter by this project * @param libraryId filter by this library * @param isSynced If true, filter by project libraries that have been synced. False to filter by * project libraries that have not yet been synced. Main purpose of this filter is * to see what libraries we are still evaluating after a project is added for the * first time. * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, projectId: _root_.scala.Option[String] = None, libraryId: _root_.scala.Option[String] = None, isSynced: _root_.scala.Option[Boolean] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.ProjectLibrary]] = cats.Applicative[F].pure { Nil } } class MockRecommendations[F[_]: cats.Applicative] extends io.flow.dependency.v0.Recommendations[F] { /** * Returns a list of recommendations for this user * * @param organization Optionally filter to recommendations for this organization * @param projectId Optionally filter by project * @param type Optionally filter by type of recommendation. * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( organization: _root_.scala.Option[String] = None, projectId: _root_.scala.Option[String] = None, `type`: _root_.scala.Option[io.flow.dependency.v0.models.RecommendationType] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Recommendation]] = cats.Applicative[F].pure { Nil } } class MockRepositories[F[_]: cats.Applicative] extends io.flow.dependency.v0.Repositories[F] { /** * Returns a list of repositories from github * * @param owner Optionally filter by owner name. Case in-sensitive. Exact match * @param name Optionally filter by repo name. Case in-sensitive. Exact match * @param organizationId If specified, we enable additional filtering by this organization (see * existing_project parameter). * @param existingProject Optionally filter by repositories that are either already mapped to existing * projects or not. Requires organization_id parameter to also be specified. * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def getGithub( owner: _root_.scala.Option[String] = None, name: _root_.scala.Option[String] = None, organizationId: _root_.scala.Option[String] = None, existingProject: _root_.scala.Option[Boolean] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.github.v0.models.Repository]] = cats.Applicative[F].pure { Nil } } class MockResolvers[F[_]: cats.Applicative] extends io.flow.dependency.v0.Resolvers[F] { /** * Search resolvers. Results are paginated * * @param id Find resolver with this id. Exact match * @param ids Filter by any one of these ids * @param organization Filter to resolvers belongs to the organization with this key * @param visibility Filter based on visibility * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, organization: _root_.scala.Option[String] = None, visibility: _root_.scala.Option[io.flow.dependency.v0.models.Visibility] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Resolver]] = cats.Applicative[F].pure { Nil } /** * Returns information about the resolver with this id. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Resolver] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeResolver() } /** * Create a new resolver. */ def post( resolverForm: io.flow.dependency.v0.models.ResolverForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Resolver] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeResolver() } def deleteById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockSubscriptions[F[_]: cats.Applicative] extends io.flow.dependency.v0.Subscriptions[F] { /** * Search subscriptions. Always paginated. * * @param id Find the subscription with this id. * @param ids Filter by any one of these ids * @param userId Find subscriptions for this user. * @param identifier Find subscriptions associated with this user identifier. Exact match * @param publication Find subscriptions for this publication. * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[String] = None, ids: _root_.scala.Option[Seq[String]] = None, userId: _root_.scala.Option[String] = None, identifier: _root_.scala.Option[String] = None, publication: _root_.scala.Option[io.flow.dependency.v0.models.Publication] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Subscription]] = cats.Applicative[F].pure { Nil } /** * Returns information about a specific subscription. */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Subscription] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeSubscription() } /** * Create a new subscription. * * @param identifier If a user identifier is provided, authentication is bypassed */ def post( subscriptionForm: io.flow.dependency.v0.models.SubscriptionForm, identifier: _root_.scala.Option[String] = None, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Subscription] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeSubscription() } /** * @param identifier If a user identifier is provided, authentication is bypassed */ def deleteById( id: String, identifier: _root_.scala.Option[String] = None, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockSyncs[F[_]: cats.Applicative] extends io.flow.dependency.v0.Syncs[F] { /** * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( objectId: _root_.scala.Option[String] = None, event: _root_.scala.Option[io.flow.dependency.v0.models.SyncEvent] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Sync]] = cats.Applicative[F].pure { Nil } /** * Synchronize libraries for resolvers associated with this organization */ def postLibrariesByOrganization( organization: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } def postBinariesById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } /** * Will sync all libraries where the artifact id starts with the specified * artifact_id_refix* */ def postLibrariesAndPrefixByArtifactIdPrefix( artifactIdPrefix: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } def postLibrariesById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } def postProjectsById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } class MockTokens[F[_]: cats.Applicative] extends io.flow.dependency.v0.Tokens[F] { /** * @param id Filter by any one of these ids * @param userId Find tokens for this user. * @param limit The number of records to return * @param offset Used to paginate. First page of results is 0. */ def get( id: _root_.scala.Option[Seq[String]] = None, userId: _root_.scala.Option[String] = None, limit: Long = 25L, offset: Long = 0L, requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.flow.dependency.v0.models.Token]] = cats.Applicative[F].pure { Nil } /** * Used to fetch one token */ def getById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Token] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeToken() } /** * Create a new API token for this user */ def post( tokenForm: io.flow.dependency.v0.models.TokenForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.flow.dependency.v0.models.Token] = cats.Applicative[F].pure { io.flow.dependency.v0.mock.Factories.makeToken() } def deleteById( id: String, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeBinaryType(): io.flow.dependency.v0.models.BinaryType = io.flow.dependency.v0.models.BinaryType.Scala def makePublication(): io.flow.dependency.v0.models.Publication = io.flow.dependency.v0.models.Publication.DailySummary def makeRecommendationType(): io.flow.dependency.v0.models.RecommendationType = io.flow.dependency.v0.models.RecommendationType.Library def makeRole(): io.flow.dependency.v0.models.Role = io.flow.dependency.v0.models.Role.Member def makeScms(): io.flow.dependency.v0.models.Scms = io.flow.dependency.v0.models.Scms.Github def makeSyncEvent(): io.flow.dependency.v0.models.SyncEvent = io.flow.dependency.v0.models.SyncEvent.Started def makeSyncType(): io.flow.dependency.v0.models.SyncType = io.flow.dependency.v0.models.SyncType.Project def makeVisibility(): io.flow.dependency.v0.models.Visibility = io.flow.dependency.v0.models.Visibility.Public def makeBinary(): io.flow.dependency.v0.models.Binary = io.flow.dependency.v0.models.Binary( id = Factories.randomString(24), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), name = io.flow.dependency.v0.mock.Factories.makeBinaryType() ) def makeBinaryForm(): io.flow.dependency.v0.models.BinaryForm = io.flow.dependency.v0.models.BinaryForm( organizationId = Factories.randomString(24), name = io.flow.dependency.v0.mock.Factories.makeBinaryType() ) def makeBinarySummary(): io.flow.dependency.v0.models.BinarySummary = io.flow.dependency.v0.models.BinarySummary( id = Factories.randomString(24), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), name = io.flow.dependency.v0.mock.Factories.makeBinaryType() ) def makeBinaryVersion(): io.flow.dependency.v0.models.BinaryVersion = io.flow.dependency.v0.models.BinaryVersion( id = Factories.randomString(24), binary = io.flow.dependency.v0.mock.Factories.makeBinary(), version = Factories.randomString(24) ) def makeGithubAuthenticationForm(): io.flow.dependency.v0.models.GithubAuthenticationForm = io.flow.dependency.v0.models.GithubAuthenticationForm( code = Factories.randomString(24) ) def makeGithubUser(): io.flow.dependency.v0.models.GithubUser = io.flow.dependency.v0.models.GithubUser( id = Factories.randomString(24), user = io.flow.common.v0.mock.Factories.makeUserReference(), githubUserId = 1L, login = Factories.randomString(24) ) def makeGithubUserForm(): io.flow.dependency.v0.models.GithubUserForm = io.flow.dependency.v0.models.GithubUserForm( userId = Factories.randomString(24), githubUserId = 1L, login = Factories.randomString(24) ) def makeGithubWebhook(): io.flow.dependency.v0.models.GithubWebhook = io.flow.dependency.v0.models.GithubWebhook( id = 1L ) def makeItem(): io.flow.dependency.v0.models.Item = io.flow.dependency.v0.models.Item( id = Factories.randomString(24), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), visibility = io.flow.dependency.v0.mock.Factories.makeVisibility(), summary = io.flow.dependency.v0.mock.Factories.makeItemSummary(), label = Factories.randomString(24), description = None ) def makeLibrary(): io.flow.dependency.v0.models.Library = io.flow.dependency.v0.models.Library( id = Factories.randomString(24), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), groupId = Factories.randomString(24), artifactId = Factories.randomString(24), resolver = io.flow.dependency.v0.mock.Factories.makeResolverSummary() ) def makeLibraryForm(): io.flow.dependency.v0.models.LibraryForm = io.flow.dependency.v0.models.LibraryForm( organizationId = Factories.randomString(24), groupId = Factories.randomString(24), artifactId = Factories.randomString(24), resolverId = Factories.randomString(24), version = None ) def makeLibrarySummary(): io.flow.dependency.v0.models.LibrarySummary = io.flow.dependency.v0.models.LibrarySummary( id = Factories.randomString(24), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), groupId = Factories.randomString(24), artifactId = Factories.randomString(24) ) def makeLibraryVersion(): io.flow.dependency.v0.models.LibraryVersion = io.flow.dependency.v0.models.LibraryVersion( id = Factories.randomString(24), library = io.flow.dependency.v0.mock.Factories.makeLibrary(), version = Factories.randomString(24), crossBuildVersion = None ) def makeMembership(): io.flow.dependency.v0.models.Membership = io.flow.dependency.v0.models.Membership( id = Factories.randomString(24), user = io.flow.dependency.v0.mock.Factories.makeUserSummary(), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), role = io.flow.dependency.v0.mock.Factories.makeRole() ) def makeMembershipForm(): io.flow.dependency.v0.models.MembershipForm = io.flow.dependency.v0.models.MembershipForm( userId = Factories.randomString(24), organization = Factories.randomString(24), role = io.flow.dependency.v0.mock.Factories.makeRole() ) def makeOrganization(): io.flow.dependency.v0.models.Organization = io.flow.dependency.v0.models.Organization( id = Factories.randomString(24), user = io.flow.common.v0.mock.Factories.makeUserReference(), key = Factories.randomString(24) ) def makeOrganizationForm(): io.flow.dependency.v0.models.OrganizationForm = io.flow.dependency.v0.models.OrganizationForm( key = Factories.randomString(24) ) def makeOrganizationSummary(): io.flow.dependency.v0.models.OrganizationSummary = io.flow.dependency.v0.models.OrganizationSummary( id = Factories.randomString(24), key = Factories.randomString(24) ) def makeProject(): io.flow.dependency.v0.models.Project = io.flow.dependency.v0.models.Project( id = Factories.randomString(24), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), user = io.flow.common.v0.mock.Factories.makeUserReference(), visibility = io.flow.dependency.v0.mock.Factories.makeVisibility(), scms = io.flow.dependency.v0.mock.Factories.makeScms(), name = Factories.randomString(24), uri = Factories.randomString(24), branch = Factories.randomString(24) ) def makeProjectBinary(): io.flow.dependency.v0.models.ProjectBinary = io.flow.dependency.v0.models.ProjectBinary( id = Factories.randomString(24), project = io.flow.dependency.v0.mock.Factories.makeProjectDetail(), name = Factories.randomString(24), version = Factories.randomString(24), path = Factories.randomString(24), binary = None ) def makeProjectDependencyResolution(): io.flow.dependency.v0.models.ProjectDependencyResolution = io.flow.dependency.v0.models.ProjectDependencyResolution( resolved = Nil, unresolved = Nil, steps = Map() ) def makeProjectDependencyResolutionResolved(): io.flow.dependency.v0.models.ProjectDependencyResolutionResolved = io.flow.dependency.v0.models.ProjectDependencyResolutionResolved( projects = Nil ) def makeProjectDetail(): io.flow.dependency.v0.models.ProjectDetail = io.flow.dependency.v0.models.ProjectDetail( id = Factories.randomString(24), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), name = Factories.randomString(24) ) def makeProjectForm(): io.flow.dependency.v0.models.ProjectForm = io.flow.dependency.v0.models.ProjectForm( organization = Factories.randomString(24), name = Factories.randomString(24), visibility = io.flow.dependency.v0.mock.Factories.makeVisibility(), scms = io.flow.dependency.v0.mock.Factories.makeScms(), uri = Factories.randomString(24), branch = Factories.randomString(24) ) def makeProjectLibrary(): io.flow.dependency.v0.models.ProjectLibrary = io.flow.dependency.v0.models.ProjectLibrary( id = Factories.randomString(24), project = io.flow.dependency.v0.mock.Factories.makeProjectDetail(), groupId = Factories.randomString(24), artifactId = Factories.randomString(24), version = Factories.randomString(24), crossBuildVersion = None, path = Factories.randomString(24), library = None ) def makeProjectPatchForm(): io.flow.dependency.v0.models.ProjectPatchForm = io.flow.dependency.v0.models.ProjectPatchForm( name = None, visibility = None, scms = None, uri = None, branch = None ) def makeProjectSummary(): io.flow.dependency.v0.models.ProjectSummary = io.flow.dependency.v0.models.ProjectSummary( id = Factories.randomString(24), organization = io.flow.dependency.v0.mock.Factories.makeOrganizationSummary(), name = Factories.randomString(24) ) def makeProjectUnresolvedSummary(): io.flow.dependency.v0.models.ProjectUnresolvedSummary = io.flow.dependency.v0.models.ProjectUnresolvedSummary( project = io.flow.dependency.v0.mock.Factories.makeProjectSummary(), resolvedLibraries = Nil, unresolvedLibraries = Nil ) def makeRecommendation(): io.flow.dependency.v0.models.Recommendation = io.flow.dependency.v0.models.Recommendation( id = Factories.randomString(24), project = io.flow.dependency.v0.mock.Factories.makeProjectDetail(), `type` = io.flow.dependency.v0.mock.Factories.makeRecommendationType(), `object` = io.flow.dependency.v0.mock.Factories.makeReference(), name = Factories.randomString(24), from = Factories.randomString(24), to = Factories.randomString(24), createdAt = _root_.java.time.Instant.now ) def makeReference(): io.flow.dependency.v0.models.Reference = io.flow.dependency.v0.models.Reference( id = Factories.randomString(24) ) def makeRepository(): io.flow.dependency.v0.models.Repository = io.flow.dependency.v0.models.Repository( name = Factories.randomString(24), visibility = io.flow.dependency.v0.mock.Factories.makeVisibility(), uri = Factories.randomString(24) ) def makeResolver(): io.flow.dependency.v0.models.Resolver = io.flow.dependency.v0.models.Resolver( id = Factories.randomString(24), visibility = io.flow.dependency.v0.mock.Factories.makeVisibility(), organization = None, uri = Factories.randomString(24), credentials = None ) def makeResolverForm(): io.flow.dependency.v0.models.ResolverForm = io.flow.dependency.v0.models.ResolverForm( visibility = io.flow.dependency.v0.mock.Factories.makeVisibility(), organization = Factories.randomString(24), uri = Factories.randomString(24), credentials = None ) def makeResolverSummary(): io.flow.dependency.v0.models.ResolverSummary = io.flow.dependency.v0.models.ResolverSummary( id = Factories.randomString(24), organization = None, visibility = io.flow.dependency.v0.mock.Factories.makeVisibility(), uri = Factories.randomString(24) ) def makeSubscription(): io.flow.dependency.v0.models.Subscription = io.flow.dependency.v0.models.Subscription( id = Factories.randomString(24), user = io.flow.common.v0.mock.Factories.makeUserReference(), publication = io.flow.dependency.v0.mock.Factories.makePublication() ) def makeSubscriptionForm(): io.flow.dependency.v0.models.SubscriptionForm = io.flow.dependency.v0.models.SubscriptionForm( userId = Factories.randomString(24), publication = io.flow.dependency.v0.mock.Factories.makePublication() ) def makeSync(): io.flow.dependency.v0.models.Sync = io.flow.dependency.v0.models.Sync( id = Factories.randomString(24), objectId = Factories.randomString(24), event = io.flow.dependency.v0.mock.Factories.makeSyncEvent(), createdAt = _root_.java.time.Instant.now ) def makeTaskDataSync(): io.flow.dependency.v0.models.TaskDataSync = io.flow.dependency.v0.models.TaskDataSync( `type` = None ) def makeTaskDataSyncLibrariesByPrefix(): io.flow.dependency.v0.models.TaskDataSyncLibrariesByPrefix = io.flow.dependency.v0.models.TaskDataSyncLibrariesByPrefix( userId = Factories.randomString(24), prefix = Factories.randomString(24) ) def makeTaskDataSyncOne(): io.flow.dependency.v0.models.TaskDataSyncOne = io.flow.dependency.v0.models.TaskDataSyncOne( id = Factories.randomString(24), `type` = io.flow.dependency.v0.mock.Factories.makeSyncType() ) def makeTaskDataSyncOrganizationLibraries(): io.flow.dependency.v0.models.TaskDataSyncOrganizationLibraries = io.flow.dependency.v0.models.TaskDataSyncOrganizationLibraries( organizationId = Factories.randomString(24) ) def makeTaskDataUpserted(): io.flow.dependency.v0.models.TaskDataUpserted = io.flow.dependency.v0.models.TaskDataUpserted( id = Factories.randomString(24), `type` = io.flow.dependency.v0.mock.Factories.makeSyncType() ) def makeToken(): io.flow.dependency.v0.models.Token = io.flow.dependency.v0.models.Token( id = Factories.randomString(24), user = io.flow.common.v0.mock.Factories.makeUserReference(), masked = Factories.randomString(24), cleartext = None, description = None ) def makeTokenForm(): io.flow.dependency.v0.models.TokenForm = io.flow.dependency.v0.models.TokenForm( userId = Factories.randomString(24), description = None ) def makeUserForm(): io.flow.dependency.v0.models.UserForm = io.flow.dependency.v0.models.UserForm( email = None, name = None ) def makeUserIdentifier(): io.flow.dependency.v0.models.UserIdentifier = io.flow.dependency.v0.models.UserIdentifier( id = Factories.randomString(24), user = io.flow.common.v0.mock.Factories.makeUserReference(), value = Factories.randomString(24) ) def makeUserSummary(): io.flow.dependency.v0.models.UserSummary = io.flow.dependency.v0.models.UserSummary( id = Factories.randomString(24), email = None, name = io.flow.common.v0.mock.Factories.makeName() ) def makeUsernamePassword(): io.flow.dependency.v0.models.UsernamePassword = io.flow.dependency.v0.models.UsernamePassword( username = Factories.randomString(24), password = None ) def makeVersionForm(): io.flow.dependency.v0.models.VersionForm = io.flow.dependency.v0.models.VersionForm( version = Factories.randomString(24), crossBuildVersion = None ) def makeCredentials(): io.flow.dependency.v0.models.Credentials = io.flow.dependency.v0.mock.Factories.makeUsernamePassword() def makeItemSummary(): io.flow.dependency.v0.models.ItemSummary = io.flow.dependency.v0.mock.Factories.makeBinarySummary() def makeTaskData(): io.flow.dependency.v0.models.TaskData = io.flow.dependency.v0.mock.Factories.makeTaskDataUpserted() } }