![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
sss-core-lib
Advanced tools
Readme
This Angular package is used to interact with the cloud service.
The service allows you to store data in the cloud about the user, groups, authorizations and other data necessary for any site.
It is also possible to create and edit data collections, which can be of any structure.
Send notification email through our cloud service.
npm i sss-core-lib --save
You can test the library in a test environment. If you want to get a private account for free, write to us denzo1993@gmail.com
Add SssCoreModule
into your app.module.ts
import { SssCoreModule } from "sss-core-lib";
@NgModule({
imports: [SssCoreModule],
})
Component example:
import { Component, OnInit } from '@angular/core';
import {
AuthService,
UserService,
IUser,
GroupService,
IGroup,
WorkspaceService,
IWorkspace,
ConfigService,
IConfig,
CollectionService,
CollectionListService,
ICollection,
NotificationService,
IEmailNotification
} from 'sss-core-lib';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.sass']
})
export class AppComponent implements OnInit {
private readonly testUsername = 'User2083'; // Public account for testing
private readonly testPassword = '123456';
private readonly emailReceiver = ''; // Write email here to receive message
constructor(
private authService: AuthService,
private userService: UserService,
private groupService: GroupService,
private workspaceService: WorkspaceService,
private configService: ConfigService,
private collectionService: CollectionService,
private collectionListService: CollectionListService,
private notificationService: NotificationService,
) { }
ngOnInit(): void {
/**
* If you want to get full access (CREATE, UPDATE, GET, DELETE)
* write denzo1993@gmail.com
*/
// Example 1. Get access token. It automatically save in service.
this.authService.login(this.testUsername, this.testPassword).subscribe(() => {
// Example 2. Get Workspace
this.workspaceService.get().subscribe((workspace: IWorkspace) => {
console.log('workspace');
console.log(workspace);
});
// Example 3. Get Group list
this.groupService.get().subscribe((groups: IGroup[]) => {
console.log('groups');
console.log(groups);
});
// Example 4. Get User list
this.userService.get().subscribe((users: IUser[]) => {
console.log('users');
console.log(users);
});
// Example 5. Get workspace configuration
this.configService.get().subscribe((config: IConfig) => {
console.log('config');
console.log(config);
});
/**
* You can create own collection with unique object structure.
*
* Example 6. Create collection example:
*/
this.collectionService.put<ICollection>({ name: 'cars' })
.subscribe((collection: ICollection) => {
console.log(`Collection '${collection.name}' successfully created!`);
// Example 7. Add item in your collection
this.collectionListService.put<ICar>({
model: 'Bentley',
color: 'black'
}, collection.name).subscribe(() => {
// Example 8. Get list of item in your collection
this.collectionListService.get(collection.name)
.subscribe((cars: ICar[]) => {
console.log(`Collection '${collection.name}' has ${cars.length} items:`);
console.log(cars);
});
});
});
/**
* Example 9.
*
* You can send email via Sss-core.
* A test mailbox is used to send messages from sandbox.
*/
this.notificationService.sendMail({
from: 'smart-site-system@yandex.ru',
to: this.emailReceiver,
subject: 'Sss-core notification test',
text: 'Hello, we are testing notifications!',
}).subscribe((result: IEmailNotification) => {
console.log(`Email sent. Info: ${result.response}`);
});
// Example 10. Upload/download files.
// Use upload and download methods in MediaService.
});
}
}
interface ICar {
model: string;
color: string;
}
FAQs
This package is used to interact with the cloud service.
The npm package sss-core-lib receives a total of 0 weekly downloads. As such, sss-core-lib popularity was classified as not popular.
We found that sss-core-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.