Code Monkey home page Code Monkey logo

nestjs-slack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nestjs-slack's Issues

How to work with webhook?

Hi. Thanks for solution!
I see that your lib can't work with webhook. Only with slack web api. Can you add this opportunity? I have a chat and i would like to send a data via webhook there.

[Feature] Expose the WebClient to make other REST API calls

Hello, just wondering if it's possible to add a getter to the SlackService to allow the application to get a hold of the WebClient instance? I want to use it to make calls to users apis (lookupByEmail for example)

Doesn't seem to be a way to do this without installing @slack/web-api and making an external instance of the WebClient

Love the repo!

Making nestjs-slack a pure ESM package

While there is soon to be a breaking change (moving this package to v2), I think it's time to discuss when to move to pure ESM.

I know there are a lot of teams that still use CommonJS, and from what I can understand the nest community is slowly moving that way. This means we can start planning for a new major release (v3).

Feel free to add feedback on this, and maybe share a timeline for when you are going ESM! I think we will keep maintaining v2 for quite some time, regardless of when v3 comes out.

Thanks ❤️

WebClient not available

Hello, the webclient is still not available as public from the slack service.

Capture d’écran 2023-10-19 à 15 51 56 Capture d’écran 2023-10-19 à 15 52 22

On version 2.0.0

The package.json has to be fixed there is a typo for this dependency "@nestjs/platform-express": "^^9.0.0",

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency reflect-metadata to ^0.2.0
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update codecov/codecov-action action to v4
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-plugin-jest to v28
  • chore(deps): update dependency eslint-plugin-unicorn to v53
  • chore(deps): update dependency husky to v9
  • chore(deps): update github/codeql-action action to v3
  • chore(deps): update google-github-actions/release-please-action action to v4
  • chore(deps): update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency @slack/web-api to v7
  • chore(deps): lock file maintenance
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codeql-analysis.yml
  • actions/checkout v3
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
.github/workflows/pull_request.yml
  • actions/checkout v3
  • actions/setup-node v3
  • codecov/codecov-action v3
.github/workflows/workflow.yml
  • actions/checkout v3
  • actions/setup-node v3
  • codecov/codecov-action v3
  • google-github-actions/release-please-action v3
npm
package.json
  • @bjerk/eslint-config ^5.0.0
  • @google-cloud/logging ^10.0.1
  • @slack/web-api ^6
  • axios ^1.0.0
  • node-fetch ^2.6.7
  • slack-block-builder ^2
  • ts-invariant ^0.10.3
  • @nestjs/common ^9.0.3
  • @nestjs/core ^9.0.3
  • @nestjs/testing ^9.0.3
  • @simenandre/prettier ^5.0.0
  • @slack-wrench/jest-mock-web-client ^1.4.0
  • @types/jest ^28.1.5
  • @typescript-eslint/eslint-plugin ^6
  • @typescript-eslint/parser ^6
  • eslint ^8.20.0
  • eslint-config-prettier ^8.8.0
  • eslint-plugin-eslint-comments ^3.2.0
  • eslint-plugin-import ^2.27.5
  • eslint-plugin-jest ^27.2.3
  • eslint-plugin-promise ^6.1.1
  • eslint-plugin-unicorn ^47.0.0
  • husky ^8
  • jest ^28.1.3
  • lint-staged ^13.0.3
  • nock ^13.2.8
  • prettier ^2.7.1
  • reflect-metadata ^0.1.13
  • ts-jest ^28.0.5
  • typescript ^4.7.4
  • @nestjs/common >=9 <=10
  • @nestjs/core >=9 <=10

  • Check this box to trigger a request for Renovate to run again on this repository

Remove Google Cloud logger dependency?

I'm wondering if having the Google Cloud logger as a dependency is really neccessary? It's adding a few Mb to my lambda bundle which is a bit large for a lightweight slack nestjs wrapper. Is it possible to remove that with the default nestjs logger? I feel like that would make this a bit more nestjs friendly.

Nest v9 not supported

Hiho @cobraz ,
how are you ?
May I ask you to kindly upgrade the dependencies to support nest v9 ?
Thank you very much in advance :)

Kind regards
Meywether

Missing function postEphemeral in the service.

Hi everyone,
Currently, we're using the nest-slack: ^2.0.0.
Which is lacking of the API postEphemeral from slack.
Can you guys help me exposing this function?
For those who is facing the same problem with me, I have a solution which is.
We can make it any to use the client not being exposed like this:

(this.service as any).client.chat.postEphemeral({
      channel: 'some-channel',
      text: 'Hello, I'm only visible to you',
      user: theRequestedUserId,
});

SlackConfig Types for Async Providers

I'm trying to use this module with Config
image

I'd like to override it myself but the SlackConfig types seems to be not exported
image

useFactory: async (configService: ConfigService) => {
        return {
          token: configService.get(slackMonitorEnum.API_TOKEN)
        } as SlackConfig;
      }

How to instantiate the SlackService class in main.ts

Hi.

I hope you are well.

In the main.ts I want to pass the SlackService configuration to the global exception filter which receives that class in the constructor, but I don't understand the way to achieve this.

public async bootstrap(): Promise<INestApplication> {
  this.app = await NestFactory.create(AppModule, { cors: true });
  const configService = await this.app.resolve(ConfigService);
  this.setGlobalFilters(configService);
  await this.listen(configService.get('app.port'));
  return this.app;
}

public setGlobalFilters(configService: ConfigService) {
  const httpAdapter: HttpAdapterHost =
    this.app.get<HttpAdapterHost>(HttpAdapterHost);
  const slackService = new SlackService({
    type: 'webhook',
    webhookOptions: {
      url: configService.get('SLACK_WEBHOOK_URL'),
    },
  });

  this.app.useGlobalFilters(
    new AllExceptionsFilter(httpAdapter, slackService),
  );
}

Node-fetch - Only absolute URL are supported?

Hi @cobraz,
hope you re doing well,
i am suddenly running into this issue, and do not know why. Here are the relevant code parts.

The error and a apart of the url:
image

The initialization:
image

The call:
image

I really do not know why this is happening, because the webhook url ist valid and working...

Do you have any ideas for me ?

Kind regards
Meywether

ERROR [ExceptionsHandler] An API error occurred: not_authed

Hi Everyone,

Hope you guys are doing great. I am using this package to send messages to the slack using SlackServide.postMessage() method. While calling it I am getting this issue. Can anyone help to resolve that issue?

Here is the sample code:

constructor(private readonly slackService: SlackService) {}

this.slackService.postMessage(payload);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.