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

@epilot/email-settings-client

Package Overview
Dependencies
Maintainers
24
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epilot/email-settings-client - npm Package Compare versions

Comparing version 0.0.3 to 0.0.5

LICENSE

17

dist/client.js
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -7,9 +18,13 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

exports.getClient = void 0;
var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
var definition_1 = __importDefault(require("./definition"));
var getClient = function () {
var _a;
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
return api.initSync();
var apiClient = api.initSync();
apiClient.defaults.headers.common = __assign(__assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {})), (lambda_powertools_correlation_ids_1.default.get() || {}));
return apiClient;
};
exports.getClient = getClient;
//# sourceMappingURL=client.js.map

2

dist/definition.js

@@ -1,1 +0,1 @@

!function(e,t){for(var s in t)e[s]=t[s];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=i(s(279));t.default=n.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Email settings API","version":"1.0.0"},"tags":[{"name":"Email settings","description":"Email settings service"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]},{"EpilotOrg":[]}],"paths":{"/v1/email-settings":{"get":{"operationId":"getSettings","summary":"getSettings","description":"Get all settings by type","tags":["Settings"],"parameters":[{"name":"type","description":"Setting types:\\n* signature\\n* email_domain\\n* email_address\\n","in":"query","required":true,"schema":{"type":"string","enum":["signature","email_domain","email_address","whitelist_email_address"]},"example":"signature"},{"name":"id","description":"ID of setting","in":"query","schema":{"type":"string"},"example":"a10bd0ff-4391-4cfc-88ee-b19d718a9bf7"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}},"post":{"operationId":"addSetting","summary":"addSetting","description":"Add setting","tags":["Settings"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}},"delete":{"operationId":"deleteSetting","summary":"deleteSetting","description":"delete setting by ID and type","tags":["Settings"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type"],"properties":{"type":{"type":"string","example":"signature","enum":["signature","email_domain","email_address","whitelist_email_address"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/v1/email-settings/{id}":{"post":{"operationId":"updateSetting","summary":"updateSetting","description":"Update setting by ID","tags":["Settings"],"parameters":[{"name":"id","description":"ID of setting","in":"path","required":true,"schema":{"type":"string"},"example":"a10bd0ff-4391-4cfc-88ee-b19d718a9bf7"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/v1/email-settings/domain":{"post":{"operationId":"addDomain","summary":"addDomain","description":"Add domain","tags":["Domains"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}},"delete":{"operationId":"deleteDomain","summary":"deleteDomain","description":"Delete domain","tags":["Domains"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","summary":"verifyNameServers","description":"Verify name servers","tags":["Domains"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/v1/email-settings/domain:verify":{"post":{"operationId":"verifyDomain","summary":"verifyDomain","description":"Verify domain","tags":["Domains"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"},"EpilotOrg":{"description":"Overrides the target organization to allow shared tenant access","name":"x-epilot-org-id","in":"header","type":"apiKey"}},"schemas":{"SettingsResponse":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}},"Setting":{"type":"object","required":["type"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"org_id":{"type":"string"},"type":{"type":"string","example":"signature","enum":["signature","email_domain","email_address","whitelist_email_address"]},"html":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by":{"type":"string"},"updated_by":{"type":"string"}},"additionalProperties":true},"Domain":{"type":"object","properties":{"domain":{"type":"string","example":"subdomain.epilot.cloud"}}}}}}')}},t={};return function s(i){if(t[i])return t[i].exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,s),n.exports}(914)})());
!function(e,t){for(var s in t)e[s]=t[s];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=i(s(279));t.default=n.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Email settings API","version":"1.0.0"},"tags":[{"name":"Email settings","description":"Email settings service"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]},{"EpilotOrg":[]}],"paths":{"/v1/email-settings":{"get":{"operationId":"getSettings","summary":"getSettings","description":"Get all settings by type","tags":["Settings"],"parameters":[{"name":"type","description":"Setting types:\\n* signature\\n* email_domain\\n* email_address\\n","in":"query","required":true,"schema":{"type":"string","enum":["signature","email_domain","email_address","whitelist_email_address"]},"example":"signature"},{"name":"id","description":"ID of setting","in":"query","schema":{"type":"string"},"example":"a10bd0ff-4391-4cfc-88ee-b19d718a9bf7"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}},"post":{"operationId":"addSetting","summary":"addSetting","description":"Add setting","tags":["Settings"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}},"delete":{"operationId":"deleteSetting","summary":"deleteSetting","description":"delete setting by ID and type","tags":["Settings"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["id","type"],"properties":{"type":{"type":"string","example":"signature","enum":["signature","email_domain","email_address","whitelist_email_address"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/v1/email-settings/{id}":{"post":{"operationId":"updateSetting","summary":"updateSetting","description":"Update setting by ID","tags":["Settings"],"parameters":[{"name":"id","description":"ID of setting","in":"path","required":true,"schema":{"type":"string"},"example":"a10bd0ff-4391-4cfc-88ee-b19d718a9bf7"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/v1/email-settings/domain":{"post":{"operationId":"addDomain","summary":"addDomain","description":"Add domain","tags":["Domains"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}},"delete":{"operationId":"deleteDomain","summary":"deleteDomain","description":"Delete domain","tags":["Domains"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","summary":"verifyNameServers","description":"Verify name servers","tags":["Domains"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/v1/email-settings/domain:verify":{"post":{"operationId":"verifyDomain","summary":"verifyDomain","description":"Verify domain","tags":["Domains"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"},"EpilotOrg":{"description":"Overrides the target organization to allow shared tenant access","name":"x-epilot-org-id","in":"header","type":"apiKey"}},"schemas":{"SettingsResponse":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}},"Setting":{"type":"object","required":["type"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"org_id":{"type":"string"},"type":{"type":"string","example":"signature","enum":["signature","email_domain","email_address","whitelist_email_address"]},"html":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by":{"type":"string"},"updated_by":{"type":"string"}},"additionalProperties":true},"Domain":{"type":"object","properties":{"domain":{"type":"string","example":"subdomain.epilot.cloud"}}}}},"servers":[{"url":"https://email-settings.sls.epilot.io"},{"url":"https://email-settings.sls.epilot.io"}]}')}},t={};return function s(i){if(t[i])return t[i].exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,s),n.exports}(914)})());
{
"name": "@epilot/email-settings-client",
"version": "0.0.3",
"description": "API Client for epilot email-settings API",
"version": "0.0.5",
"description": "API Client for epilot Email Settings API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/epilot-dev/sdk-js.git",
"directory": "clients/email-setting-client"
},
"bugs": {
"url": "https://github.com/epilot-dev/sdk-js/issues"
},
"homepage": "https://github.com/epilot-dev/sdk-js/tree/main/clients/email-setting-client#readme",
"keywords": [
"epilot",
"sdk",
"email-settings"
],
"scripts": {

@@ -11,7 +25,8 @@ "test": "jest",

"bundle-definition": "webpack",
"openapi": "openapi read --json ../lambda/ApiHandlerFunction/openapi.yml > src/openapi.json",
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ../lambda/ApiHandlerFunction/openapi.yml >> src/openapi.d.ts",
"build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition",
"eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml",
"prepublishOnly": "npm run build"
"openapi": "../../scripts/update-openapi.sh https://docs.api.epilot.io/email-settings.yaml",
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
"build": "tsc && npm run bundle-definition",
"build:watch": "npm run build && tsc -w",
"prepublishOnly": "npm run typegen && npm run build",
"lint": "../../node_modules/eslint/bin/eslint.js src"
},

@@ -29,17 +44,12 @@ "files": [

],
"repository": {
"type": "git",
"url": "https://github.com/epilot-dev/sdk-js",
"directory": "clients/email-settings-client"
},
"keywords": [],
"author": "epilot GmbH",
"license": "UNLICENSED",
"peerDependencies": {
"axios": "^0.21.4"
"axios": "^0.25.0"
},
"dependencies": {
"@dazn/lambda-powertools-correlation-ids": "^1.28.1",
"buffer": "^6.0.3",
"https-browserify": "^1.0.0",
"openapi-client-axios": "^4.4.9",
"openapi-client-axios": "^5.3.0",
"stream-http": "^3.1.1",

@@ -51,15 +61,16 @@ "url": "^0.11.0",

"@types/jest": "^26.0.20",
"axios": "^0.21.1",
"axios": "^0.25.0",
"copy-webpack-plugin": "^7.0.0",
"jest": "^26.6.3",
"json-loader": "^0.5.7",
"openapi-client-axios-typegen": "^4.4.9",
"openapicmd": "^1.8.2",
"ts-jest": "^26.5.6",
"ts-loader": "^8.3.0",
"ts-node": "^9.1.1",
"typescript": "^4.5.4",
"webpack": "^5.18.0",
"openapi-client-axios-typegen": "^5.0.1",
"openapicmd": "^1.6.2",
"ts-jest": "^26.5.0",
"ts-loader": "^8.0.14",
"ts-node": "^10.9.1",
"typescript": "^4.1.3",
"webpack": "~5.18.0",
"webpack-cli": "^4.4.0"
}
},
"gitHead": "1cd202255ce447f3167d54b2589f6a90386850cb"
}

@@ -1,43 +0,30 @@

# `@epilot/email-settings-client`
# @epilot/email-settings-client
API Client for epilot email-settings API.
[![CI](https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg)](https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI)
[![npm version](https://img.shields.io/npm/v/@epilot/email-settings-client.svg)](https://www.npmjs.com/package/@epilot/email-settings-client)
[![bundle size](https://img.shields.io/bundlephobia/minzip/@epilot/email-settings-client?label=gzip%20bundle)](https://bundlephobia.com/package/@epilot/email-settings-client)
[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/epilot-dev/sdk-js/blob/main/LICENSE)
API Client for epilot [Email Settings API](https://docs.epilot.io/api/email-settings).
Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios)
## Getting Started
## Installation
Install the package:
```bash
npm install --save-dev @epilot/email-settings-client
npm install --save @epilot/email-settings-client
```
Import the package:
## Usage
```typescript
import { getClient } from '@epilot/email-settings-client';
```
const emailSettingsClient = getClient();
Use the client:
```typescript
// get typed client
const client = await getClient();
// call an operation
const res = await client.testS3();
const getResponse = await emailSettingsClient.getSettings({ type: 'signature', id: 'a10bd0ff-4391-4cfc-88ee-b19d718a9bf7' });
```
## BaseURL & Authorization
## Documentation
To pass an authorization header and set up the API url, you can use axios
defaults:
https://docs.epilot.io/docs/messaging/email-settings
```typescript
const client = getClient();
client.defaults.baseURL = config.API_URL;
client.defaults.headers['authorization'] = `Bearer ${token}`;
```
## API Docs:
https://docs.api.epilot.io/
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