New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opportify/sdk-nodejs

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opportify/sdk-nodejs - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

dist/cjs/src/types.d.ts

5

dist/cjs/src/emailInsights.d.ts
import { AnalyzeEmailRequest } from '../lib/v1/models/AnalyzeEmailRequest';
export type EmailInsightsConfiguration = {
apiKey: string;
version: string;
basePath?: string;
};
export declare class EmailInsights {

@@ -8,0 +3,0 @@ private emailInsightsApi;

20

dist/cjs/src/emailInsights.js

@@ -15,9 +15,15 @@ "use strict";

async analyze(request) {
return this.emailInsightsApi.analyzeEmail({
analyzeEmailRequest: {
email: request.email,
enableAutoCorrection: request.enableAutoCorrection,
enableAI: request.enableAI,
}
});
try {
return await this.emailInsightsApi.analyzeEmail({
analyzeEmailRequest: {
email: request.email,
enableAutoCorrection: request.enableAutoCorrection,
enableAI: request.enableAI,
}
});
}
catch (error) {
const errorResponse = await error.response.json();
throw errorResponse;
}
}

@@ -24,0 +30,0 @@ ;

@@ -1,5 +0,7 @@

export { type EmailInsightsConfiguration, EmailInsights } from './emailInsights';
export { EmailInsights } from './emailInsights';
export { type AnalyzeEmailRequest } from '../lib/v1/models/AnalyzeEmailRequest';
export { type IPInsightsConfiguration, IPInsights } from './ipInsights';
export { IPInsights } from './ipInsights';
export { type AnalyzeIpRequest } from '../lib/v1/models/AnalyzeIpRequest';
export { type Configuration } from '../lib/v1/runtime';
export { type ErrorResponse } from './types';
//# sourceMappingURL=index.d.ts.map
import { AnalyzeIpRequest } from '../lib/v1/models/AnalyzeIpRequest';
export type IPInsightsConfiguration = {
apiKey: string;
version: string;
basePath?: string;
};
export declare class IPInsights {

@@ -8,0 +3,0 @@ private ipInsightsApi;

@@ -15,8 +15,14 @@ "use strict";

async analyze(request) {
return this.ipInsightsApi.analyzeIp({
analyzeIpRequest: {
ip: request.ip,
enableAI: request.enableAI,
}
});
try {
return await this.ipInsightsApi.analyzeIp({
analyzeIpRequest: {
ip: request.ip,
enableAI: request.enableAI,
}
});
}
catch (error) {
const errorResponse = await error.response.json();
throw errorResponse;
}
}

@@ -23,0 +29,0 @@ ;

import { AnalyzeEmailRequest } from '../lib/v1/models/AnalyzeEmailRequest';
export type EmailInsightsConfiguration = {
apiKey: string;
version: string;
basePath?: string;
};
export declare class EmailInsights {

@@ -8,0 +3,0 @@ private emailInsightsApi;

@@ -12,9 +12,15 @@ import { EmailInsightsApi } from '../lib/v1/apis/EmailInsightsApi';

async analyze(request) {
return this.emailInsightsApi.analyzeEmail({
analyzeEmailRequest: {
email: request.email,
enableAutoCorrection: request.enableAutoCorrection,
enableAI: request.enableAI,
}
});
try {
return await this.emailInsightsApi.analyzeEmail({
analyzeEmailRequest: {
email: request.email,
enableAutoCorrection: request.enableAutoCorrection,
enableAI: request.enableAI,
}
});
}
catch (error) {
const errorResponse = await error.response.json();
throw errorResponse;
}
}

@@ -21,0 +27,0 @@ ;

@@ -1,5 +0,7 @@

export { type EmailInsightsConfiguration, EmailInsights } from './emailInsights';
export { EmailInsights } from './emailInsights';
export { type AnalyzeEmailRequest } from '../lib/v1/models/AnalyzeEmailRequest';
export { type IPInsightsConfiguration, IPInsights } from './ipInsights';
export { IPInsights } from './ipInsights';
export { type AnalyzeIpRequest } from '../lib/v1/models/AnalyzeIpRequest';
export { type Configuration } from '../lib/v1/runtime';
export { type ErrorResponse } from './types';
//# sourceMappingURL=index.d.ts.map
import { AnalyzeIpRequest } from '../lib/v1/models/AnalyzeIpRequest';
export type IPInsightsConfiguration = {
apiKey: string;
version: string;
basePath?: string;
};
export declare class IPInsights {

@@ -8,0 +3,0 @@ private ipInsightsApi;

@@ -12,8 +12,14 @@ import { IPInsightsApi } from '../lib/v1/apis/IPInsightsApi';

async analyze(request) {
return this.ipInsightsApi.analyzeIp({
analyzeIpRequest: {
ip: request.ip,
enableAI: request.enableAI,
}
});
try {
return await this.ipInsightsApi.analyzeIp({
analyzeIpRequest: {
ip: request.ip,
enableAI: request.enableAI,
}
});
}
catch (error) {
const errorResponse = await error.response.json();
throw errorResponse;
}
}

@@ -20,0 +26,0 @@ ;

@@ -5,3 +5,3 @@ {

"description": "Opportify SDK for NodeJs",
"version": "0.1.0",
"version": "0.1.1",
"license": "Apache-2.0",

@@ -8,0 +8,0 @@ "repository": {

@@ -31,18 +31,23 @@ # Opportify-SDK-NodeJS

```
const { EmailInsights } = require('@opportify/sdk-nodejs');
import { EmailInsights } from '@opportify/sdk-nodejs';
const emailInsights = new EmailInsights({
const clientEmailInsights = new EmailInsights({
version: '1.0',
apiKey: 'YOUR-API-KEY-HERE'
apiKey: 'YOUR_API_KEY'
});
emailInsights.analyze({
email: 'your-test@email.domain.com',
enableAutoCorrection: true,
enableAI: true // only available for paid plans.
}).then(response => {
console.log(response);
}).catch(error => {
console.error(error);
});
async function analyzeEmail() {
try {
const response = await clientEmailInsights.analyze({
email: "email_to_validate@domain.com",
enableAutoCorrection: true,
enableAI: true, // only available on paid plans.
});
console.log('response', response);
} catch (error: unknown) {
console.error('error', error);
}
}
analyzeEmail();
```

@@ -53,5 +58,5 @@

```
const { IPInsights } = require('@opportify/sdk-nodejs');
import { IPInsights } from '@opportify/sdk-nodejs';
const ipInsights = new IPInsights({
const clientIpInsights = new IPInsights({
version: '1.0',

@@ -61,10 +66,15 @@ apiKey: 'YOUR-API-KEY-HERE'

ipInsights.analyze({
ip: '8.8.8.8',
enableAI: true // only available for paid plans.
}).then(response => {
console.log(response);
}).catch(error => {
console.error(error);
});
async function analyzeIP() {
try {
const response = await clientIpInsights.analyze({
ip: '8.8.8.8',
enableAI: true // only available for paid plans.
});
console.log('response', response);
} catch (error: unknown) {
console.error('error', error);
}
}
analyzeIP();
```

@@ -71,0 +81,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc