The `oci-workrequests` package is an official Oracle Cloud Infrastructure (OCI) Node.js/TypeScript client specifically designed to interact with the OCI Work Requests service. Currently at version 2.130.0, this package is part of the broader OCI TypeScript SDK and receives very frequent updates, often on a daily or weekly basis, reflecting continuous feature development and alignment with new OCI service capabilities. It provides a type-safe and idiomatic interface for managing asynchronous operations within OCI, allowing developers to programmatically monitor the status and outcomes of long-running tasks across various OCI services. Key differentiators include its tight integration with the OCI ecosystem, comprehensive type definitions, and adherence to OCI's API standards, simplifying the development of robust cloud automation and management scripts.
npm install oci-workrequestsVerified import paths — ran on the pinned version, not inferred.
This code initializes the WorkRequests client and lists the first 10 work requests in a specified compartment, demonstrating basic API interaction.
Ensure your `~/.oci/config` file is properly configured with `user`, `fingerprint`, `key_file`, and `tenancy` details, or ensure your compute instance has appropriate instance principal policies.
Always review the release notes for the main `oci-typescript-sdk` repository before upgrading major versions. Pin exact major versions in your `package.json` to avoid unexpected breaking changes.
Regularly update your dependencies and test thoroughly. Consider using a dependency management tool that allows for minor version updates (`^2.130.0`) but prevents major shifts, or pin specific versions if stability is paramount.
Always ensure the required `compartmentId` is provided in request objects and that the provided OCID is correct and accessible by the authenticated user.
Verify your OCI configuration file (`~/.oci/config`) exists and is correctly formatted, or ensure environment variables like `OCI_CLI_PROFILE` and `OCI_CLI_CONFIG_FILE` are set if using a non-default profile/location.
Check your OCI IAM policies to ensure the user or instance principal has permissions for the Work Requests service. Double-check the OCIDs used in your request for correctness.
Ensure `npm install oci-workrequests` has been run successfully and your import statement is `import { WorkRequestsClient } from 'oci-workrequests';`.No dependency data recorded yet.