# gls-channel-banner-config-plugin

> Este é um plugin para o [framework de e-commerce Vendure](https://www.vendure.io/) que adiciona funcionalidades relacionadas a banners em canais. Ele permite a criação, atualização, exclusão e listagem de banners associados a canais específicos no Adminis

Latest version **0.0.9** (published 2024-02-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install gls-channel-banner-config-plugin
pnpm add gls-channel-banner-config-plugin
yarn add gls-channel-banner-config-plugin
bun add gls-channel-banner-config-plugin
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2024-02-19 |
| First published | 2024-02-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 51.4 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | caiquereis |

## Links

- npm: https://www.npmjs.com/package/gls-channel-banner-config-plugin
- npm.io page: https://npm.io/package/gls-channel-banner-config-plugin

## Dependencies (2)

- [@vendure/core](https://npm.io/package/@vendure/core.md) ^2.1.6
- [class-validator](https://npm.io/package/class-validator.md) ^0.14.1

## Recent versions

- 0.0.9 (latest) — 2024-02-19
- 0.0.8 — 2024-02-05
- 0.0.7 — 2024-02-05
- 0.0.6 — 2024-02-05
- 0.0.5 — 2024-02-05
- 0.0.4 — 2024-02-05
- 0.0.3 — 2024-02-05
- 0.0.2 — 2024-02-05
- 0.0.1 — 2024-02-05

## README

# Plugin de `Channel Banner Plugin` Vendure

Este é um plugin para o [framework de e-commerce Vendure](https://www.vendure.io/) que adiciona funcionalidades relacionadas a banners em canais. Ele permite a criação, atualização, exclusão e listagem de banners associados a canais específicos no Administrator e Lista os banners criados para a loja nos  projetos [Gseller](https://gseller.com.br/).




Após configurar o seu projeto Vendure, você pode usar este plugin via npm install:

```npm install channel-banner-plugin```

e inclua-o no arquivo vendure-config conforme abaixo:

```

import { ChannelBannerPlugin } from "channel-banner-plugin";
...
export const config: VendureConfig = {
  ...
  plugins: [
    ...,
	ChannelBannerPlugin
  ]
}

```

Os tipos, entradas e mutações atualizadas após a instalação do plugin são:


# Admin Api Main Type

```
  type CreateChannelBannerReponse {
      active: Boolean
      description: String
      startAt: DateTime
      link: String
      title: String
      endAt: DateTime
      channel: Channel
      assetId: String
      id: Int
    }

    type ChannelBanner {
      active: Boolean
      description: String
      startAt: DateTime
      link: String
      title: String
      endAt: DateTime
      channel: Channel
      assetId: String
      id: Int
      asset: Asset
    }

    type NotUpdatedError {
      errorCode: String!
      message: String!
    }

    type BannerNotDeletedError {
      errorCode: String!
      message: String!
    }

    type ChannelNotFoundError {
       errorCode: String!
       message: String!
    }


    type AssetNotDeletedError {
      errorCode: String!
      message: String!
    }

    type BannerNotFoundError {
      errorCode: String!
      message: String!
    }

    type BannerNotUpdatedError {
      errorCode: String!
      message: String!
    }

    type UpdatedSuccess {
      success: Boolean!
    }

    type DeletedSuccess {
      success: Boolean!
    }

```

# Admin Api Schema Inputs

```
input CreateChannelBannerInput {
      title: String!
      description: String
      link: String
      startAt: DateTime!
      endAt: DateTime!
      active: Boolean
      asset: Upload!
    }

    input CreateChannelBannerWithAssetIdInput {
      title: String!
      description: String
      link: String
      startAt: String
      endAt: String
      active: Boolean
      assetId: String!
    }

    input UpdateChannelBannerInput {
      title: String
      description: String
      link: String
      startAt: DateTime
      endAt: DateTime
      active: Boolean
      asset: Upload
      bannerId: String
    }

```



# Admin Schema  Unions

```
  union updateChannelBannerResponse =
        NotUpdatedError
      | UpdatedSuccess
      | ChannelNotFoundError
      | BannerNotUpdatedError

    union deleteChannelBannerResponse =
        BannerNotDeletedError
      | DeletedSuccess
      | ChannelNotFoundError
      | AssetNotDeletedError
      | BannerNotFoundError

```

# Admin Mutation  and Query

```
 extend type Mutation {
      setChannelBanner(
        args: CreateChannelBannerInput
      ): CreateChannelBannerReponse

      setChannelBannerWithAssetId(
        args: CreateChannelBannerWithAssetIdInput
      ): CreateChannelBannerReponse

      updateChannelBanner(
        args: UpdateChannelBannerInput
      ): updateChannelBannerResponse!

      deleteChannelBanner(bannerId: String): deleteChannelBannerResponse!
    }

    extend type Query {
      getAllBanners: [ChannelBanner!]!
    }

```


# Shop Api Main Type

```
 type channelBannersByChannelResponse {
      title: String
      description: String
      link: String
      startAt: DateTime
      endAt: DateTime
      active: Boolean
      assetId: String
      id: Int
      asset: Asset
    }

    type channelBannersResult {
      items: [channelBannersByChannelResponse]
      totalItems: Int
    }

```

# Shop Query

```
    extend type Query {
      channelBanners: channelBannersResult!
    }

```

---
_Source: https://npm.io/package/gls-channel-banner-config-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
