openapi: 3.0.3
info:
  title: Meroku dApp store
  version: "1.13"
  description: "Open API specs for Meroku DApp store.

    This documentation is the guide to Backend API. These APIs are required
    to build the frontend.


    You can choose to build on top of this API or use the npm package available at
    [some link](https://www.example.com)


    # Authentication


    The endpoints themselves are public. The CORS policy restricts browser usage beyond `*.meroku.store`.
    This means that you can use these APIs in your backend services, but if called directly from frontend,
    it has to be hosted at *.meroku.store.


    The `GET` calls are public without rate limiting.


    The `POST`, `UPDATE`, `DELETE` calls ensure that only the dApp developer can make changes to their own dApp listing.
    This is done by sending the Github (user - server) token in these API calls. The mechanism to get the Github access
    tokens is up to the frontend to decide. They can for example create a Github App or use a service like Auth0.


    ## Installing Github App for automated workflow

    Use the [/paths/app-ghID--installed/get](/paths/app-ghID--installed/get) to check if the required github app is installed on the account.
    If not, then get the URL from [/paths/app-installUrl/get](/paths/app-installUrl/get) and visit the URL to install the app.


    In this server, you will be able to see your github details on the top left. You can use those
    details to enter values in the update calls.



    # FAQs


    1. I am getting a `400 Resource not accessible by integration` error on update calls.

    This can happen when the github token supplied does not have valid permissions. Ensure that
    you are not sending `org` param. Right now, the fork can only happen on individual and not
    at org level.



    2. I am getting a `400 Not Found` error on update calls.

    Ensure that you are passing the correct github ID or the user who wants to make the update.


    3. I am getting `400 Bad Credentials`.

    This can happen when the github token supplied is invalid. Ensure that you are sending the
    correct token. If the token is correct, then try signing out and signing in."
servers:
  - url: https://api-a.meroku.store
    description: Testing Server
  - url: http://localhost:8001
    description: Development Server
tags:
  - name: DApp Registry
    description: DApp registry endpoint to `get`, `create`, `update`, `delete` dApp in meroku store and `get` registry title
  - name: Featured Section
    description: Meroku Featured Section to `get` the store title
paths:
  /dapp:
    get:
      tags:
        - DApp Registry
      summary: Get dApp
      description:
        Get all dApps or search by a keyword. Optionally, filter on specific attributes of the dApp.


        This API call will get all the dApps or perform a text search.
      operationId: getDApp
      parameters:
        - in: query
          name: page
          description: Current page
          required: false
          schema:
            type: integer
        - in: query
          name: limit
          description: Page size
          required: false
          schema:
            type: integer
        - in: query
          name: search
          description:
            A string to be used for search. The search happens on the `name` and
            `tags` fields of the dApp. If this is not present, all dApps are returned.
          required: false
          schema:
            type: string
        - in: query
          name: isListed
          required: false
          schema:
            type: boolean
          description: DApp is listed or not
          example: true
        - in: query
          name: chainId
          required: false
          schema:
            type: integer
          description: DApp supported chainId's. Only dApps belonging to this chainID will be returned.
          example: 137
        - in: query
          name: language
          required: false
          schema:
            type: string
          description: DApp's language
          example: en
        - in: query
          name: availableOnPlatform
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - ios
                - web
                - android
          description: DApp is listed or not
        - in: query
          name: matureForAudience
          required: false
          schema:
            type: boolean
          description: Mentions if the app is for all ages or only mature audience
          example: false
        - in: query
          name: minAge
          required: false
          schema:
            type: integer
          description: Minimum age
          example: 13
        - in: query
          name: listedOnOrAfter
          required: false
          schema:
            type: string
            format: date
          description: The date dApp was listed on or after. Date should be in ISO format.
          example: 2021-11-13
        - in: query
          name: listedOnOrBefore
          required: false
          schema:
            type: string
            format: date
          description: The date dApp was listed on or before. Date should be in ISO format.
          example: 2021-11-13
        - in: query
          name: allowedInCountries
          required: false
          schema:
            type: array
            items:
              type: string
          description: dApp allowed countries
        - in: query
          name: blockedInCountries
          required: false
          schema:
            type: array
            items:
              type: string
          description: dApp blocked countries
        - in: query
          name: categories
          required: false
          description:
            The categories in which dApps belong. Multiple categories are
            joined using OR operator.
          schema:
            type: array
            items:
              type: array
              items:
                type: string
                enum:
                  - books
                  - business
                  - developer tools
                  - education
                  - entertainment
                  - finance
                  - food and drink
                  - games
                  - graphics and design
                  - health and fitness
                  - lifestyle
                  - kids
                  - magazines and newspapers
                  - medical
                  - music
                  - navigation
                  - news
                  - photo and video
                  - productivity
                  - reference
                  - shopping
                  - social networking
                  - sports
                  - travel
                  - utilities
                  - weather
        - in: query
          name: orderBy
          required: false
          description:
            Want to get dapp by order(asc, desc) by one or more params.
          schema:
            type: string
          example:
            - 'name:asc'
            - 'name:desc'
            - 'rating:asc'
            - 'rating:desc'
            - 'installs:asc'
            - 'installs:desc'
            - 'visits:asc'
            - 'visits:desc'
            - 'listDate:asc'
            - 'listDate:desc'
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    type: integer
                    description: Current page.
                  limit:
                    type: integer
                    description: Page size.
                  pageCount:
                    type: integer
                  response:
                    type: array
                    items:
                      $ref: "#/components/schemas/Dapp"
        "400":
          description: Invalid status value

    post:
      tags:
        - DApp Registry
      summary: Add dApp
      description: Adding new dApp to the store
      operationId: addDApp
      requestBody:
        description: Send the request with dApp schema parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DappWithDevCreds"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception

    put:
      tags:
        - DApp Registry
      summary: Update dApp
      description: For updating the existing dApp
      operationId: updateDApp
      requestBody:
        description: Send the request with the updated parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DappWithDevCreds"
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception

  /dapp/deleteApp:
    post:
      tags:
        - DApp Registry
      summary: Delete dApp
      description: Removes the dApp from the store
      operationId: deleteDApp
      requestBody:
        description: Send the request with dApp parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DappIdWithDevCreds"
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "405":
          description: Invalid input

  /store/featured:
    get:
      tags:
        - Featured Section
      description: Fetch featured sections of registry OR if you provide storeKey in query it will fetch featured sections from store.
      summary: Get Featured Sections
      operationId: getFeaturedDApps
      parameters:
        - in: query
          name: storeKey
          description: Unique Id of a particular store. provide only if you want to fetch feature section form a particular store.
          required: false
          schema:
            type: string
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/FeaturedSection"
        "400":
          description: Invalid status value

    put:
      tags:
        - Featured Section
      summary: Add a featured Section
      description: This is to add a featured section to dapp
      operationId: putFeaturedSection
      requestBody:
        description: Send the request with the parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FeaturedSectionAddReq"
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception

    post:
      tags:
        - "Featured Section"
      summary: Delete a featured Section
      description: This is to delete a featured section to dapp
      operationId: deleteFeaturedSection
      requestBody:
        description: Send the request with the parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FeaturedSectionDelReq"
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception

  /store/featured/dapps:
    post:
      tags:
        - "Featured Section"
      summary: Toggle dApps in featured section
      description: This is to toggle the dApps for a featured section. If these
        dapps are not listed in the featured section, they will be added. If they
        are already added, they will be removed.


        If the section by the key does not exist, will return a HTTP 400 error.
      operationId: putFeaturedDApps
      requestBody:
        description: Send the request with the parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FeaturedDAppsAddReq"
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception

  /store/title/:
    get:
      tags:
        - Featured Section
      summary: Registry title
      description: Returns the store title
      operationId: getStoreTitle
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid status value

  /app/{ghID}/installed:
    get:
      tags:
        - User Permissions
      summary: GH App Installed?
      description: Checks if the Github App is installed for this user or not
      parameters:
        - in: path
          name: ghID
          description: Github Username of the user whose permissions have to check
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  isInstalled:
                    type: boolean

  /app/installUrl:
    get:
      tags:
        - "User Permissions"
      summary: Github App Install Location
      description: Get the URL where Github app can be installed
      responses:
        "200":
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri

  /dapp/upload:
    post:
      tags:
        - DApp Registry
      summary: Upload dApp files
      description: Uploading dapp screenshots | logo | banner | dApp file to the servers
      operationId: dAppFiles
      requestBody:
        description: Send the request with following parameters
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                dappId:
                  type: string
                  description: "DApp Id is Key value of file in servers"
                field:
                  type: string
                  description: "It tells about the dAppFiles content"
                  enum:
                    - build
                    - screenshots
                    - logo
                    - banner
                dAppFiles:
                  type: array
                  description: "Add files to upload"
                  items:
                    type: string
                    format: binary
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        fileName:
                          type: string
                        url:
                          type: string
        "400":
          description: Operation failed

  /dapp/{dappId}/build:
    get:
      tags:
        - DApp Registry
      summary: Build Download URL
      operationId: downloadBuildUrl
      parameters:
        - in: path
          name: dappId
          description: Dapp Id where upload will happen
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PreSignedUrlResponse"
        "400":
          description: Operation failed

  /o/view/{dappId}:
    get:
      tags:
        - Analytics
      summary: Visit dapp's homepage
      operationId: visitDapp
      parameters:
        - in: path
          name: dappId
          required: true
          description: The dappId of dapp where to visit.
          schema:
            type: string
        - in: query
          name: userId
          required: false
          schema:
            type: string
        - in: query
          name: userAddress
          required: false
          schema:
            type: string
      responses:
        "302":
          description: Redirect to the app URL

  /o/download/{dappId}:
    get:
      tags:
        - Analytics
      summary: Download dapp Build
      operationId: downloadDapp
      parameters:
        - in: path
          name: dappId
          required: true
          description: The dappId of dapp where to visit.
          schema:
            type: string
        - in: query
          name: userId
          required: false
          schema:
            type: string
        - in: query
          name: userAddress
          required: false
          schema:
            type: string
      responses:
        "302":
          description: Redirect to the app URL

  /dapp/rate:
    post:
      tags:
        - Analytics
      summary: Rate the dApp
      description: Use this to register a rating from a user for a dApp
      requestBody:
        description: Send the request with dApp parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DappRating"
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DappRatingRes"

    get:
      tags:
        - "Analytics"
      summary: Get User dApp Rating
      description: Use this to get a user's rating for a dapp
      parameters:
        - in: query
          name: dappId
          required: true
          schema:
            type: string
        - in: query
          name: userId
          schema:
            type: string
        - in: query
          name: userAddress
          schema:
            type: string
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DappRatingRes"

  /domainverification/getVerificationId:
    post:
      tags:
        - Domain Verification
      summary: Get a domain verification code
      description: Use this to get a domain verification to code to verify domain ownership.
      requestBody:
        description: Send the request with githubId and domain.
        content:
          application/json:
            schema:
              type: object
              required:
                - githubId
                - domain
              properties:
                githubId:
                  type: string
                domain:
                  type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DappGetVerificationId"

  /domainverification/verify:
    post:
      tags:
        - Domain Verification
      summary: Verify domain txt records.
      description: Use this to verify your domain ownership.
      requestBody:
        description: Send the request with githubId and domain.
        content:
          application/json:
            schema:
              type: object
              required:
                - githubId
                - domain
              properties:
                githubId:
                  type: string
                domain:
                  type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DappVerify"

  /dapp/searchById:
    get:
      tags:
        - DApp Registry
      summary: Search DApp By Dapp Id
      parameters:
        - in: query
          name: dappId
          required: true
          schema:
            type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Dapp"

  /dapp/categories:
    get:
      tags:
        - DApp Registry
      summary: Get All category with subcategories.
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  data:
                      type: array
                      items:
                        $ref: "#/components/schemas/Categories"

  /store:
    get:
      tags:
        - Store Registry
      summary: Get Store
      description:
        Get the particular store
      operationId: getStore
      parameters:
        - in: query
          name: key
          description: unique id of a store.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Store"

    post:
      tags:
        - Store Registry
      summary: Add store
      description: Adding a new store 
      operationId: addStore
      requestBody:
        description: Send the request with store schema parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StoreWithDevCreds"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception

    put:
      tags:
        - Store Registry
      summary: Update store
      description: For updating the existing store
      operationId: updateStore
      requestBody:
        description: Send the request with the updated parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StoreWithDevCreds"
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception

  /store/deleteStore:
    post:
      tags:
        - Store Registry
      summary: Delete store
      description: Removes the store from the resgitry
      operationId: deleteStore
      requestBody:
        description: Send the request with  parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StoreKeyWithDevCreds"
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "405":
          description: Invalid input

  /store/bannedDapps:
    post:
      tags:
        - "Store Registry"
      summary: Toggle dApps in banned list of store
      description: This is to toggle the dApps from a banned list. If these
        dapps are not listed in the banned list, they will be added. If they
        are already added, they will be removed.


        If the section by the key does not exist, will return a HTTP 400 error.
      operationId: putBannedDApps
      requestBody:
        description: Send the request with the parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BannedDAppsAddReq"
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception

  /api/v1/dapp/search:
    get:
      tags:
        - DApp Registry
      summary: Search Dapps
      description:
        Get all dApps or search by a keyword. Optionally, filter on specific attributes of the dApp.

        This API call will get all the dApps or perform a text search.
      operationId: searchDapps
      parameters:
        - $ref: "#/components/parameters/pageParams"
        - $ref: "#/components/parameters/limitParams"
        - $ref: "#/components/parameters/orderByParams"
        - $ref: "#/components/parameters/searchParams"
        - $ref: "#/components/parameters/categoriesParams"
        - $ref: "#/components/parameters/isListedParams"
        - $ref: "#/components/parameters/languageParams"
        - $ref: "#/components/parameters/chainIdParams"
        - $ref: "#/components/parameters/allowedInCountriesParams"
        - $ref: "#/components/parameters/blockedInCountriesParams"
        - $ref: "#/components/parameters/availableOnPlatformParams"
        - $ref: "#/components/parameters/matureForAudienceParams"
        - $ref: "#/components/parameters/minAgeParams"
        - $ref: "#/components/parameters/listedOnOrAfterParams"
        - $ref: "#/components/parameters/listedOnOrBeforeParams"
      
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: number
                    example: 200
                  message:
                    type: array
                    items:
                      type: string
                      example: "success"
                  page:
                    type: number
                    example: 1
                  limit:
                    type: number
                    example: 20
                  pageCount:
                    type: number
                    example: 20
                  data:
                    type: array
                    items:
                      - $ref: "#/components/schemas/Dapp"

        "400":
          description: Invalid status value
  /api/v1/dapp/search/{dappId}:
    get:
      tags:
        - DApp Registry
      summary: Search DApp By Dapp Id
      parameters:
        - in: path
          name: dappId
          required: true
          schema:
            type: string

      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: number
                    example: 200
                  message:
                    type: array
                    items:
                      type: string
                      example: "success"
                  data:
                    type: array
                    items:
                      - $ref: "#/components/schemas/Dapp"

  /store/{storeKey}/dapp/{dappId}:
    put:
      tags:
        - "Store Registry"
      summary: Add dapp details which want to be replace for dapp store
      description: If a dapp store want to change details of app(allowed only) for only their dapp store.
        Then they can change the values from here
      operationId: putDappDetailsDappStore
      parameters:
        - in: path
          name: storeKey
          schema:
            type: string
          required: true
        - in: path
          name: dappId
          schema:
            type: string
          required: true
      requestBody:
        description: Send the request with the parameters
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatedDappDetailsDappStoreReq"
        required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: string
        "400":
          description: Invalid ID supplied
        "404":
          description: DApp not found
        "405":
          description: Validation exception
      
  /api/v1/dapp/autocomplete:
    get:
      tags:
        - DApp Registry
      summary: Auto-Complete search
      parameters:
        - in: query
          name: search
          required: true
          schema:
            type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: number
                    example: 200
                  message:
                    type: array
                    items:
                      type: string
                      example: "success"
                  data:
                    type: array
                    items:
                      - $ref: "#/components/schemas/AutoComplete"

components:
  schemas:
    DappGetVerificationId:
      type: object
      properties:
        verificationCode:
          type: string
        domain:
          type: string
    DappVerify:
      type: object
      properties:
        verificationCode:
          type: string
        domain:
          type: string
        isVerified:
          type: boolean
    DappRatingReq:
      type: object
      required:
        - dappId
      properties:
        dappId:
          type: string
        userId:
          type: string
        userAddress:
          type: string
    DappRating:
      type: object
      required:
        - dappId
        - rating
      properties:
        dappId:
          type: string
        rating:
          type: number
        comment:
          type: string
        userId:
          type: string
        userAddress:
          type: string
        version:
          type: string
    DappRatingRes:
      type: object
      properties:
        status:
          type: number
        id:
          type: string
        dappId:
          type: string
        rating:
          type: number
        comment:
          type: string
        userId:
          type: string
        userAddress:
          type: string
        version:
          type: string
    DappIdWithDevCreds:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: email@example.com
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: ghu_HziKDuS1L15JOAZSTMzJU2WkN2rmNe2zvV4
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r488it
        dappId:
          type: integer
          description: The ID of the dApp
          example: example.store.dapp
        org:
          type: string
          description: The GitHub organization to fork the repo to.
      required:
        - name
        - email
        - accessToken
        - githubID
        - dappId
    DappWithDevCreds:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: name@email.org
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: ghu_clhzH0E07dPHKLCxnIC3okyITV0BVk18XwkE
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r488it
        dapp:
          $ref: "#/components/schemas/Dapp"
        org:
          type: string
          description: The GitHub organization to fork the repo to.
      required:
        - name
        - email
        - accessToken
        - githubID
        - dapp
    FeaturedSectionDelReq:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: test@example.com
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: "ghu_cSB18uvyUKmNaC0adq3aAwIQTRY9U53RgMI"
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r4881t
        sectionKey:
          type: string
          description: Key of the featured section which will be deleted.
          example: "curated-list"
        storeKey:
          type: string
          description: Unique Id of a particular store. provide only if you want to delete feature section in the particular store.
          example: "example.dappstore"
      required:
        - name
        - email
        - accessToken
        - githubID
        - sectionKey

    FeaturedDAppsAddReq:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: example@email.com
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: "ghu_cSB18uvyUKmNaC0adq3aAwIQTRY9U53RgMI"
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r4881t
        sectionKey:
          type: string
          description: Key of the featured section where the dapp will be added.
          example: "curated-list"
        dappIds:
          type: array
          description: List of dApp IDs that are part of this featured section.
            The dApp IDs should be the same as the ones in the dApp Store's dApps
            list. All the dApps in this list should be published.
          items:
            type: string
            example: "example.store.dapp"
        storeKey:
          type: string
          description: Unique Id of a particular store. provide only if you want to add dapps to feature section in the particular store.
          example: "example.dappstore"
      required:
        - name
        - email
        - accessToken
        - githubID
        - sectionKey
        - dappIds
    FeaturedSectionAddReq:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: john@example.com
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: "ghu_cSB18uvyUKmNaC0adq3aAwIQTRY9U53RgMI"
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r4881t
        sectionTitle:
          type: string
          description: Title of the Featured Section. This will be displayed on the dApp Store. It should be simple and clear.
          example: "Our Curated list"
        description:
          type: string
          description: Description of the Featured Section. This will be displayed on the dApp Store. It should be simple and clear.
          example: "This is a curated list of dApps that we think you will like. Our curators have used these dApps and found them worthy of your attention."
        dappIds:
          type: array
          description: List of dApp IDs that are part of this featured section.
            The dApp IDs should be the same as the ones in the dApp Store's dApps
            list. All the dApps in this list should be published.
          items:
            type: string
            example: "example.store.dapp"
        storeKey:
          type: string
          description: Unique Id of a particular store. provide only if you want to add feature section in the particular store.
          example: "example.dappstore"
      required:
        - name
        - email
        - accessToken
        - githubID
        - sectionTitle
        - description
        - dappIds
    FeaturedSection:
      type: object
      properties:
        title:
          type: string
          description: Title of the Featured Section. This will be displayed on the dApp Store. It should be simple and clear.
          example: "Our Curated list"
        description:
          type: string
          description: Description of the Featured Section. This will be displayed on the dApp Store. It should be simple and clear.
          example: "This is a curated list of dApps that we think you will like. Our curators have used these dApps and found them worthy of your attention."
        key:
          type: string
          description: Key of the Featured Section. This will be used to identify the Featured Section. It should be simple and clear
          example: "curated-list-1"
        dappIds:
          type: array
          description: List of dApp IDs that are part of this featured section.
            The dApp IDs should be the same as the ones in the dApp Store's dApps
            list. All the dappIds specified must already exist in the registry.
            There must be at least one dappId in the list.
          items:
            type: string
          example:
            - "example.store.dapp"
      required:
        - title
        - description
        - key
        - dappIds
    PreSignedUrlsResponse:
      type: object
      properties:
        success:
          type: boolean
        urls:
          type: array
          items:
            type: string
            example:
              - https://meroku-app-images-dev.s3.amazonaws.com/asdf/logo?Content-Type=image%2F%2A&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=OAUBBB7%2F20230112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230112T083913Z&X-Amz-Expires=900&X-Amz-Signature=d3d42b06af1fe5afc83a6f89810c5e3ec1d88eff560&X-Amz-SignedHeaders=hos

    PreSignedUrlResponse:
      type: object
      properties:
        success:
          type: boolean
        url:
          type: string
          example: https://meroku-app-images-dev.s3.amazonaws.com/asdf/logo?Content-Type=image%2F%2A&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=OAUBBB7%2F20230112%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230112T083913Z&X-Amz-Expires=900&X-Amz-Signature=d3d42b06af1fe5afc83a6f89810c5e3ec1d88eff560&X-Amz-SignedHeaders=hos
    Registry:
      type: object
      properties:
        title:
          type: string
          example: meroku store
          description: Title of the dApp Store
        chains:
          type: array
          description: List of chains supported by the dApp. This should be chainID of an EVM powered network. Ref https://chainlist.org/
          example: [1, 80001]
          items:
            type: integer
            xml:
              name: chain
        dapps:
          type: array
          description: List of dApps
          items:
            $ref: "#/components/schemas/Dapp"
        featuredSections:
          type: array
          description: List of featured sections
          items:
            $ref: "#/components/schemas/FeaturedSection"
      required:
        - title
        - chains
        - dapps
    Dapp:
      type: object
      properties:
        name:
          type: string
          description: Dapp Name
          example: My Cool NFT Creator dApp
        description:
          type: string
          description: About dApp
          example: A really cool NFT Creator dApp
        appUrl:
          type: string
          description: The URL of the dApp from where the webview will be loaded.
          example: https://www.example.com
        images:
          type: object
          properties:
            logo:
              type: string
              format: binary
              description: A URL to the logo of the dApp. Should be square and 512x512 in PNG format
              example: "https://example.com/logo.png"
            banner:
              type: string
              format: binary
              description: A URL to the banner of the dApp. Should be 1920x1080 and in PNG format
              example: https://www.example.com/banner.png
            screenshots:
              type: array
              description: A list of URLs to the screenshots of the dApp. Should be 1284 x 2778 and in PNG format
              items:
                type: string
                format: binary
              example:
                - https://www.example.com/screenshot_1.png
                - https://www.example.com/screenshot_2.png
        repoUrl:
          type: string
          format: uri
          description: If this is in OpenSource, the URL of the repository
        dappId:
          type: string
          description: A Unique ID for each dApp
          example: example.store.dapp
        minAge:
          type: integer
          description: The min age of user who should access this dApp
          example: 13
        isForMatureAudience:
          type: boolean
          description: Boolean to signify if the dApp is for mature audience
          example: false
        isSelfModerated:
          type: boolean
          description: Boolean to signify if the dApp developers have a moderation in place for the content posted/generated by the dApp or it's users
          example: true
        language:
          type: string
          description: A string in ISO-639-1 which signifies the language of the dApp
          example: en
        version:
          type: string
          description: The version of the dApp that is available on the dApp store
          example: 0.1.0
        isListed:
          type: boolean
          description: Boolean to signify if the dApp is listed on the dApp store
          example: true
        listDate:
          type: string
          format: date
          description: The date on which this dApp is listed on dApp store. This date can be a future date as well. This can not be in past.
          example: 2021-11-13
        availableOnPlatform:
          type: array
          description: A string signifying if the dApp is available on which platform - web, iOS, android
          items:
            type: string
            enum:
              - ios
              - web
              - android
            example: web
        geoRestrictions:
          type: object
          description: A list of countries where the dApp is available or unavailable. If this is not present, the dApp is available everywhere. If this is present, then one of either allowedCountries or blockedCountries should be present. If both are present, then the dApp is available in allowedCountries and unavailable in blockedCountries. The name of countries should be in ISO-3661-1 Alpha-2 Code.
          properties:
            allowedCountries:
              type: array
              description: A list of countries where the dApp is available
              items:
                type: string
              example:
                - US
                - IN
            blockedCountries:
              type: array
              description: A list of countries where the dApp is unavailable
              items:
                type: string
              example:
                - CN
        developer:
          type: object
          required:
            - legalName
            - logo
            - website
            - privacyPolicyUrl
            - support
            - githubID
          properties:
            legalName:
              type: string
              description: Legal name of the developer or the company
              example: John Doe & Sons
            logo:
              type: string
              description: A URL to the logo of the developer or the company. Should be square and 512x512 in PNG format
              example: https://www.example.com/logo_small.png
            website:
              type: string
              example: https://www.example.com
            privacyPolicyUrl:
              type: string
              example: https://www.example.com/privacy
            support:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  example: https://www.example.com/support
                email:
                  type: string
                  format: email
                  example: support@example.com
            githubID:
              type: string
              description: The github ID of the developer
              example: r488it
        tags:
          type: array
          items:
            type: string
          example:
            - nft maker
        chains:
          type: array
          items:
            type: integer
          example:
            - 1
            - 137
        category:
          type: string
          description:
            The category of the dApp. You can assign one category to your dApp.
            The category you select is particularly important for your app's discoverability on
            the dApp Store. This will be the category in which the app appears when users browse
            the dApp Store or filter search results, and it determines placement on the dApps tab
            or Games.
          example: books
          enum:
            - books
            - business
            - developer tools
            - education
            - entertainment
            - finance
            - food and drink
            - games
            - graphics and design
            - health and fitness
            - lifestyle
            - kids
            - magazines and newspapers
            - medical
            - music
            - navigation
            - news
            - photo and video
            - productivity
            - reference
            - shopping
            - social networking
            - sports
            - travel
            - utilities
            - weather
        walletApiVersion:
          type: array
          items:
            type: string
          example:
            - v1
            - v2
        downloadBaseUrls:
          type: array
          items:
            type: object
            required:
              - url
              - plaform
              - minVersion
              - packageId
            properties:
              url:
                type: string
                format: binary
                description: The url to download the dapp.
                example: https://ipfs.io/ipfs/qWEWEFDVSDVERGREqdyqqgQWEVSDWWDVW?filename=packageId.apk
              platform:
                type: string
                description: The device/platform in which dapp could be intalled.
                example: android
                enum:
                  - android
                  - ios
                  - web
              architecture:
                type: string
                description: The dapp is supported on which architecture of the platform.
                example: ARMv7-A
                enum:
                  - ARMv7-A
                  - ARM64-v8a
                  - x86
                  - x86_64
                  - MIPS
                  - MIPS64
                  - ARMv8-A
                  - ARMv7s
                  - ARM64
              minVersion:
                type: string
                description: The minimum version of platform where this dapp could be functional.
                example: 11.0.0
                enum:
                  - android(11.0.0)
                  - android(12.0.0)
                  - android(14.0.0)
              maxVersion:
                type: string
                description: The maximum version of platform where this dapp could be functional.
                example: 14.0.0
                enum:
                  - android(11.0.0)
                  - android(12.0.0)
                  - android(14.0.0)
              screenDPI:
                type: string
                description: The screen DPI for which the dApp is optimised. If it is not specified, it's assumed to be optimised for all resolutions.
              packageId:
                type: string
                description: Unique id for dapp regading platform.
                example: com.packageid.app
        contracts:
          type: array
          items:
            type: object
            required:
              - chainId
              - address
            properties:
              chainId:
                type: string
                description: The chainId of the contract.
                example: 1
                enum:
                  - 1
                  - 56
                  - 137
              address:
                type: string
                description: The address of the contract.
                example: 0x0000000000000000000000000000000000000000
        metrics:
          type: object
          properties:
            dappId:
              type: string
              example: mint.buidl.dapp
            downloads:
              type: number
              example: 122872
            installs:
              type: number
              example: 120293
            uninstalls:
              type: number
              example: 726
            ratingsCount:
              type: number
              example: 6872
              description: Count of unique ratings received by this dapp.
            visits:
              type: number
              example: 283633
            rating:
              type: number
              example: 2.34
              description: Average rating of the dapp

      required:
        - name
        - description
        - dappId
        - minAge
        - isForMatureAudience
        - isSelfModerated
        - language
        - version
        - availableOnPlatform
        - developer
        - tags
        - chains
        - listDate
        - isListed
        - category

    AutoComplete:
      type: object
      properties:
        name:
          type: string
          description: Dapp Name
          example: My Cool NFT Creator dApp
        appUrl:
          type: string
          description: The URL of the dApp from where the webview will be loaded.
          example: https://www.example.com
        dappId:
          type: string
          description: A Unique ID for each dApp
          example: example.store.dapp
        minAge:
          type: integer
          description: The min age of user who should access this dApp
          example: 13
        isForMatureAudience:
          type: boolean
          description: Boolean to signify if the dApp is for mature audience
          example: false
        category:
          type: string
          description: Dapp category
          example: books

    Store:
      type: object
      properties:
        githubId:
          type: string
          example: reeshi
          description: githubId of a developer
        featuredSections:
          $ref: "#/components/schemas/FeaturedSection"
        key:
          type: string
          description: Unique id of a store. it always end with .dappstore
          example: "example.dappstore"
        bannedDAppIds:
          type: array
          description: List of dapp ids that are banned in the store
          items:
            type: string
          example: "example.store.dapp"
      required:
        - githubId
        - featuredSections
        - key

    StoreWithDevCreds:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: name@email.org
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: ghu_clhzH0E07dPHKLCxnIC3okyITV0BVk18XwkE
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r488it
        store:
          $ref: "#/components/schemas/Store"
        org:
          type: string
          description: The GitHub organization to fork the repo to.
      required:
        - name
        - email
        - accessToken
        - githubID
        - store

    StoreKeyWithDevCreds:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: email@example.com
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: ghu_HziKDuS1L15JOAZSTMzJU2WkN2rmNe2zvV4
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r488it
        key:
          type: string
          description: The ID of the store
          example: example.dappstore
        org:
          type: string
          description: The GitHub organization to fork the repo to.
      required:
        - name
        - email
        - accessToken
        - githubID
        - key

    BannedDAppsAddReq:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: example@email.com
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: "ghu_cSB18uvyUKmNaC0adq3aAwIQTRY9U53RgMI"
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r4881t
        dappIds:
          type: array
          items:
            type: string
            example: "example.store.dapp"
        storeKey:
          type: string
          description: Unique Id of a particular store. provide only if you want to add dapps to feature section in the particular store.
          example: "example.dappstore"
      required:
        - name
        - email
        - accessToken
        - githubID
        - storeKey
        - dappIds
    UpdatedDappDetailsDappStoreReq:
      type: object
      properties:
        name:
          type: string
          description: The name of the developer (from GitHub)
          example: r488it
        email:
          type: string
          description: The email of the developer (from Github)
          example: example@email.com
        accessToken:
          type: string
          description: The JWT access token of the developer (from Github) for user to server API Calls
          example: "ghu_cSB18uvyUKmNaC0adq3aAwIQTRY9U53RgMI"
        githubID:
          type: string
          description: The GitHub ID of the developer
          example: r4881t
        store:
          type: object
          required:
            - githubId
          properties:
            githubId:
              type: string
              example: reeshi
              description: githubId of a developer
            remove:
              type: array
              items:
                type: string
                example: 'image.screenshots.0'
            add:
              type: object
              properties:
                minAge:
                  type: string
                  example: 13
                isForMatureAudience:
                  type: boolean
                  example: true
                description:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                    example: nft
                geoRestrictions:
                  type: object
                  properties:
                    allowedCountries:
                      type: array
                      items:
                        type: string
                        example: in
                    blockedCountries:
                      type: array
                      items:
                        type: string
                        example: ru
                images:
                  type: object
                  properties:
                    logo:
                      type: string
                      description: ipfs link of image
                    banner:
                      type: string
                      description: ipfs link of image
                    screenshots:
                      type: array
                      items:
                        type: object
                        properties:
                          index:
                            type: number
                          value:
                            type: string
                            description: ipfs link of image
      required:
      - name
      - email
      - accessToken
      - githubID
      - store
    
    Categories:
      type: 'object'
      properties:
        category:
          type: string
        subcategory:
          type: "array"
          items:
            type: string
          
  parameters:
    pageParams:
      in: query
      name: page
      schema:
        type: integer
      required: false
      description: Current page
    limitParams:
      in: query
      name: limit
      description: Page size
      required: false
      schema:
        type: integer
    searchParams:
      in: query
      name: search
      description:
        A string to be used for search. The search happens on the `name` and
        `tags` fields of the dApp. If this is not present, all dApps are returned.
      required: false
      schema:
        type: string
    isListedParams:
      in: query
      name: isListed
      required: false
      schema:
        type: boolean
      description: DApp is listed or not
      example: true
    chainIdParams:
      in: query
      name: chainId
      required: false
      schema:
        type: integer
      description: DApp supported chainId's. Only dApps belonging to this chainID will be returned.
      example: 137
    languageParams:
      in: query
      name: language
      required: false
      schema:
        type: string
      description: DApp's language
      example: en
    availableOnPlatformParams:
      in: query
      name: availableOnPlatform
      required: false
      schema:
        type: array
        items:
          type: string
          enum:
            - ios
            - web
            - android
      description: DApp is listed or not
    matureForAudienceParams:
      in: query
      name: matureForAudience
      required: false
      schema:
        type: boolean
      description: Mentions if the app is for all ages or only mature audience
      example: false
    minAgeParams:
      in: query
      name: minAge
      required: false
      schema:
        type: integer
      description: Minimum age
      example: 13
    listedOnOrAfterParams:
      in: query
      name: listedOnOrAfter
      required: false
      schema:
        type: string
        format: date
      description: The date dApp was listed on or after. Date should be in ISO format.
      example: 2021-11-13
    listedOnOrBeforeParams:
      in: query
      name: listedOnOrBefore
      required: false
      schema:
        type: string
        format: date
      description: The date dApp was listed on or before. Date should be in ISO format.
      example: 2021-11-13
    allowedInCountriesParams:
      in: query
      name: allowedInCountries
      required: false
      schema:
        type: array
        items:
          type: string
      description: dApp allowed countries
    blockedInCountriesParams:
      in: query
      name: blockedInCountries
      required: false
      schema:
        type: array
        items:
          type: string
      description: dApp blocked countries
    categoriesParams:
      in: query
      name: categories
      required: false
      description:
        The categories in which dApps belong. Multiple categories are
        joined using OR operator.
      schema:
        type: array
        items:
          type: string
          enum:
            - books
            - business
            - developer tools
            - education
            - entertainment
            - finance
            - food and drink
            - games
            - graphics and design
            - health and fitness
            - lifestyle
            - kids
            - magazines and newspapers
            - medical
            - music
            - navigation
            - news
            - photo and video
            - productivity
            - reference
            - shopping
            - social networking
            - sports
            - travel
            - utilities
            - weather
    orderByParams:
      in: query
      name: orderBy
      required: false
      description:
        Want to get dapp by order(asc, desc) by one or more params.
      schema:
        type: string
      example:
        - 'name:asc'
        - 'name:desc'
        - 'rating:asc'
        - 'rating:desc'
        - 'installs:asc'
        - 'installs:desc'
        - 'visits:asc'
        - 'visits:desc'
        - 'listDate:asc'
        - 'listDate:desc'
