Registry / communication / oci-email

oci-email

JSON →
library2.132.0jsnpmunverified

Official Oracle Cloud Infrastructure (OCI) SDK for Node.js to manage the Email Delivery service. Version 2.132.0 is the current stable release. The SDK is part of the monolithic oci-typescript-sdk monorepo, which sees weekly releases. Key differentiators: provides full OCI email management (senders, suppressions, domains, DKIM, email return paths) via a single package; requires OCI IAM authentication with API signing keys (not OAuth). Alternatives include the OCI CLI or REST API.

npm install oci-email
INSTALL
IMPORT
SIG · OCI-EMAIL
O
oci-email
communicationjavascriptv2.132.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EmailClient
import { EmailClient } from 'oci-email'
const EmailClient = require('oci-email').EmailClient
ESM import works in Node 12+ with ESM support; commonjs require also works but must access the named export.
models
import * as models from 'oci-email/lib/model'
import { models } from 'oci-email'
models is not re-exported from top-level; must import from 'oci-email/lib/model'. TypeScript types are available.
EmailPaginators
import { EmailPaginators } from 'oci-email'
const paginators = require('oci-email/paginators').EmailPaginators
Paginators are exported from the package root; commonjs require path is different.
EmailWaiter
import { EmailWaiter } from 'oci-email'
const EmailWaiter = require('oci-email').EmailWaiter
Waiters are exported as named exports from the package root.

Shows how to authenticate with OCI config file and list email senders using the EmailClient.

import { EmailClient, models } from 'oci-email'; import common from 'oci-common'; const provider = new common.ConfigFileAuthenticationDetailsProvider(); const client = new EmailClient({ authenticationDetailsProvider: provider }); async function listSenders() { const request: models.ListSendersRequest = { compartmentId: process.env.OCI_COMPARTMENT_ID ?? '' }; const response = await client.listSenders(request); console.log(response.senderCollection); } listSenders().catch(console.error);
Debug
Known issues
breakingVersion 2.x removed the old synchronous client and renamed several methods (e.g., 'listSenders' now returns a Promise).
fix
Update all calls to use 'await' or Promise chaining. Check method signatures in SDK docs.
affects: >=2.0.0
gotchaThe 'oci-common' package must be installed separately and configured with a valid authentication provider; omitting it leads to runtime errors.
fix
Run 'npm install oci-common' and set up the authentication provider as shown in the quickstart.
affects: >=2.0.0
gotchaImporting models from the top-level 'oci-email' will fail because models are in 'oci-email/lib/model'.
fix
Use import { ... } from 'oci-email/lib/model' or import * as models from 'oci-email/lib/model'.
affects: >=2.0.0
deprecatedThe use of 'oci-common.ConfigFileAuthenticationDetailsProvider' with environment variables is deprecated; prefer using resource principals or instance principals.
fix
Refer to OCI SDK authentication documentation for recommended methods.
affects: >=2.120.0
Errors
Common errors & fixes
Cannot find module 'oci-common'
Missing peer dependency 'oci-common' not installed.
fix
Run: npm install oci-common
TypeError: Cannot read property 'listSenders' of undefined
Client created without proper authentication details provider or without awaiting creation.
fix
Ensure you pass an authenticationDetailsProvider to the constructor and do not use the client before provider is resolved.
Error: ESM modules are not supported in this version (Node 10)
Using ES import syntax with Node.js < 12 or without ESM support.
fix
Use CommonJS require: const { EmailClient } = require('oci-email'); or upgrade to Node >=12 with 'type: module' in package.json.
Upgrade
Version history
2.132.0latest on npm
Audit
Dependencies
oci-commonrequiredProvides base client, authentication, and region handling.
Agent activity
13 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
oci-email — npm install oci-email · libregistry