diff --git a/npmextra.json b/npmextra.json index e775ac4..2bf4acb 100644 --- a/npmextra.json +++ b/npmextra.json @@ -5,10 +5,32 @@ "githost": "gitlab.com", "gitscope": "serve.zone", "gitrepo": "platformservice", - "description": "contains the platformservice container with mail, sms, letter, ai services.", + "description": "A multifaceted platform service handling mail, SMS, letter delivery, and AI services.", "npmPackagename": "@serve.zone/platformservice", "license": "MIT", - "projectDomain": "serve.zone" + "projectDomain": "serve.zone", + "keywords": [ + "mail service", + "SMS", + "letter delivery", + "AI services", + "SMTP server", + "mail parsing", + "DKIM", + "platform service", + "mailgun integration", + "letterXpress", + "OpenAI", + "Anthropic AI", + "DKIM signing", + "mail forwarding", + "SMTP TLS", + "domain management", + "email templating", + "rule management", + "SMTP STARTTLS", + "DNS management" + ] } }, "npmci": { diff --git a/package.json b/package.json index bd926b8..b71ba0e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@serve.zone/platformservice", "private": true, "version": "1.0.10", - "description": "contains the platformservice container with mail, sms, letter, ai services.", + "description": "A multifaceted platform service handling mail, SMS, letter delivery, and AI services.", "main": "dist_ts/index.js", "typings": "dist_ts/index.d.ts", "type": "module", @@ -45,5 +45,27 @@ "mailparser": "^3.6.9", "openai": "^4.29.2", "uuid": "^9.0.1" - } -} + }, + "keywords": [ + "mail service", + "SMS", + "letter delivery", + "AI services", + "SMTP server", + "mail parsing", + "DKIM", + "platform service", + "mailgun integration", + "letterXpress", + "OpenAI", + "Anthropic AI", + "DKIM signing", + "mail forwarding", + "SMTP TLS", + "domain management", + "email templating", + "rule management", + "SMTP STARTTLS", + "DNS management" + ] +} \ No newline at end of file diff --git a/readme.hints.md b/readme.hints.md new file mode 100644 index 0000000..e69de29 diff --git a/readme.md b/readme.md index bb01a19..67ccf08 100644 --- a/readme.md +++ b/readme.md @@ -1,31 +1,126 @@ # @serve.zone/platformservice + contains the platformservice container with mail, sms, letter, ai services. -## Availabililty and Links -* [npmjs.org (npm package)](https://www.npmjs.com/package/@serve.zone/platformservice) -* [gitlab.com (source)](https://gitlab.com/serve.zone/platformservice) -* [github.com (source mirror)](https://github.com/serve.zone/platformservice) -* [docs (typedoc)](https://serve.zone.gitlab.io/platformservice/) +## Install -## Status for master +To install `@serve.zone/platformservice`, run the following command: -Status Category | Status Badge --- | -- -GitLab Pipelines | [![pipeline status](https://gitlab.com/serve.zone/platformservice/badges/master/pipeline.svg)](https://lossless.cloud) -GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/serve.zone/platformservice/badges/master/coverage.svg)](https://lossless.cloud) -npm | [![npm downloads per month](https://badgen.net/npm/dy/@serve.zone/platformservice)](https://lossless.cloud) -Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/serve.zone/platformservice)](https://lossless.cloud) -TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud) -node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) -Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud) -PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@serve.zone/platformservice)](https://lossless.cloud) -PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@serve.zone/platformservice)](https://lossless.cloud) -BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@serve.zone/platformservice)](https://lossless.cloud) +```sh +npm install @serve.zone/platformservice --save +``` + +Make sure you have Node.js and npm installed on your system to use this package. ## Usage -Use TypeScript for best in class intellisense. -For further information read the linked docs at the top of this readme. -## Legal -> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc) -| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) +This document provides extensive usage scenarios for the `@serve.zone/platformservice`, a comprehensive ESM module written in TypeScript offering a wide range of services such as mail, SMS, letter, and artificial intelligence (AI) functionalities. This service is an exemplar of a modular design, allowing users to leverage various communication methods and AI services efficiently. Key features provided by this platform include sending and receiving emails, managing SMS services, letter dispatching, and utilizing AI for diverse purposes. + +### Prerequisites + +Before diving into the examples, ensure you have the platform service installed and configured correctly. The package leverages environment variables for configuration, so you must set up the necessary variables, including service endpoints, authentication tokens, and database connections. + +### Initialization + +First, initialize the platform service, ensuring all dependencies are correctly loaded and configured: + +```ts +import { SzPlatformService } from '@serve.zone/platformservice'; + +async function initService() { + const platformService = new SzPlatformService(); + await platformService.start(); + console.log('Platform service initialized successfully.'); +} + +initService(); +``` + +### Sending Emails + +One of the primary services offered is email management. Here's how to send an email using the platform service: + +```ts +import { EmailService, IEmailOptions } from '@serve.zone/platformservice'; + +async function sendEmail() { + const emailOptions: IEmailOptions = { + from: 'no-reply@example.com', + to: 'recipient@example.com', + subject: 'Test Email', + body: '