Registry / messaging / oci-queue

oci-queue

JSON →
library2.132.0jsnpmunverified

Official Oracle Cloud Infrastructure (OCI) Node.js SDK client for the Queue service, version 2.132.0. This module enables management of Queue resources (create, update, delete queues and messages) via OCI APIs. It follows the monthly release cadence of the OCI TypeScript SDK and requires OCI authentication (API key, instance principal, etc.). Compared to lower-level REST calls, this SDK provides typed interfaces, automatic request signing, and integration with OCI identity and IAM policies. It ships TypeScript types and supports both ESM and CJS.

npm install oci-queue
INSTALL
IMPORT
SIG · OCI-QUEUE
O
oci-queue
messagingjavascriptv2.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.

QueueClient
import { QueueClient } from 'oci-queue'
const QueueClient = require('oci-queue').QueueClient
Works in both ESM and CJS, but named import is preferred for tree-shaking.
models
import * as models from 'oci-queue/lib/models'
import { models } from 'oci-queue'
models namespace is not exported from the main entry; you must import from the specific subpath.
UpdateQueueDetails
import { UpdateQueueDetails } from 'oci-queue/lib/models'
import { UpdateQueueDetails } from 'oci-queue'
Model types are in 'oci-queue/lib/models'. Direct import from 'oci-queue' does not re-export them.

Demonstrates how to authenticate and list queues using the OCI Queue client.

import { QueueClient } from 'oci-queue'; import common from 'oci-common'; // Set up authentication provider const provider = new common.ConfigFileAuthenticationDetailsProvider(); // Or use Instance Principals: // const provider = new common.InstancePrincipalsAuthenticationDetailsProvider(); // Create a client for the Queue service const client = new QueueClient({ authenticationDetailsProvider: provider }); async function listQueues() { // Replace with your compartment OCID const compartmentId = process.env.OCI_COMPARTMENT_ID ?? ''; try { const response = await client.listQueues({ compartmentId }); console.log('Queues:', response.items); } catch (error) { console.error('Error listing queues:', error); } } listQueues();
Debug
Known issues
breakingIn v2.x, the client constructor now requires an explicit authenticationDetailsProvider object. Passing only a config file path without creating a provider is no longer supported.
fix
Create a provider using 'new common.ConfigFileAuthenticationDetailsProvider()' and pass it in the constructor.
affects: >=2.0.0
deprecatedThe method 'deleteQueue' is deprecated; use 'deleteQueueWithResponse' instead.
fix
Replace client.deleteQueue(queueId) with client.deleteQueueWithResponse({ queueId }).
affects: >=2.50.0
gotchaWhen using Instance Principals, you must also install 'oci-identity' for the provider.
fix
npm install oci-identity and import 'InstancePrincipalsAuthenticationDetailsProvider' from 'oci-common' (it is re-exported).
affects: >=2.0.0
gotchaModel types (e.g., UpdateQueueDetails) are not re-exported from the main package entry point. Attempting 'import { UpdateQueueDetails } from 'oci-queue'' will result in undefined.
fix
Import from the subpath: 'import { UpdateQueueDetails } from 'oci-queue/lib/models'.
affects: >=2.0.0
deprecatedThe 'oci-common' package is being deprecated in favor of 'oci-common-sdk'. Migrate to the new package for future updates.
fix
Replace 'oci-common' with 'oci-common-sdk' and update imports accordingly.
affects: >=2.100.0
Errors
Common errors & fixes
Error: No authentication details provider found. Please provide one.
The client constructor was called without a valid authenticationDetailsProvider.
fix
Instantiate a provider (e.g., new common.ConfigFileAuthenticationDetailsProvider()) and pass it in the options object.
TypeError: Cannot read properties of undefined (reading 'items')
The response object from listQueues does not contain 'items' because the request failed and returned an error object.
fix
Check response.error or wrap the call in a try-catch. Use response.items only on success.
Model 'model' not found in 'oci-queue/lib/models'
Import path is incorrect or the model does not exist in that subpath.
fix
Verify the exact model name by checking the SDK documentation or the installed package's lib/models directory.
Upgrade
Version history
2.132.0latest on npm
Audit
Dependencies
oci-commonrequiredCore authentication and HTTP signing utilities required by all OCI service clients
oci-identityoptionalProvides types and helpers for authentication providers (e.g., ResourcePrincipalAuthenticationDetailsProvider)
Agent activity
14 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
oci-queue — npm install oci-queue · libregistry