
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
amocrm-nestjs
Advanced tools
Через npm:
npm install amocrm-nestjs
Через yarn:
yarn add amocrm-nestjs
Импортировать модуль:
import { AmoModule } from 'amocrm-nestjs';
Два способа зарегистрировать модуль через forRoot или forRootAsync
ForRoot:
@Module({
imports: [
AmoModule.forRoot({
href: 'https://***.amocrm.ru/',
client_id: '***-***-***-***-***',
client_secret: '***',
redirect_uri: 'https://***.amocrm.ru/',
code: '***',
access_token: '***',
refresh_token: '***',
}),
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
ForRootAsync:
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
}),
AmoModule.forRootAsync({
inject: [ConfigService],
useFactory: (configService: ConfigService) => ({
href: configService.get<string>('HREF'),
client_id: configService.get<string>('CLIENT_ID'),
client_secret: configService.get<string>('CLIENT_SECRET'),
redirect_uri: configService.get<string>('REDIRECT_URI'),
code: configService.get<string>('CODE'),
access_token: configService.get<string>('ACCESS_TOKEN'),
refresh_token: configService.get<string>('REFRESH_TOKEN'),
}),
}),
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
Два способа авторизации через code или access_token и refresh_token, code в приоритете
Внедрить зависимости:
import { AmoService } from 'amocrm-nestjs';
@Injectable()
export class AppService {
constructor(private amoService: AmoService) {
(async () => {
// Получим информацию по аккаунту
const account = await this.amoService.getAccount();
console.log(account);
})();
}
}
Доступные методы:
Вы можете отправить свой вопрос, отзыв, предложение на адрес электронной почты: webproject67nodejs@gmail.com
FAQs
NestJS library AmoCRM
The npm package amocrm-nestjs receives a total of 3 weekly downloads. As such, amocrm-nestjs popularity was classified as not popular.
We found that amocrm-nestjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.