{"id":41659,"library":"oci-functions","title":"OCI Functions SDK","description":"OCI NodeJS client for the Oracle Cloud Infrastructure Functions service. Current stable version is 2.132.0, released as part of the OCI TypeScript SDK. This module enables management of Functions resources (applications, functions) and invocation of functions. Key differentiators: official Oracle SDK, full TypeScript support, supports API key and instance principal authentication. Requires OCI account, user with appropriate policies, and a key pair for signing API requests. Release cadence follows the OCI TypeScript SDK releases.","status":"active","version":"2.132.0","language":"javascript","source_language":"en","source_url":"https://github.com/oracle/oci-typescript-sdk","tags":["javascript","typescript"],"install":[{"cmd":"npm install oci-functions","lang":"bash","label":"npm"},{"cmd":"yarn add oci-functions","lang":"bash","label":"yarn"},{"cmd":"pnpm add oci-functions","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core module providing authentication, HTTP handling, and common utilities required by all OCI service clients.","package":"oci-common","optional":false}],"imports":[{"note":"ESM import recommended. The client is used for CRUD operations on applications and functions.","wrong":"const FunctionsManagementClient = require('oci-functions').FunctionsManagementClient; // Works but not tree-shakable","symbol":"FunctionsManagementClient","correct":"import { FunctionsManagementClient } from 'oci-functions'"},{"note":"ESM import. Used to invoke functions. Requires different endpoint configuration than management client.","wrong":"","symbol":"FunctionsInvokeClient","correct":"import { FunctionsInvokeClient } from 'oci-functions'"},{"note":"Models are exported under the 'lib/model' path. Access types like models.CreateFunctionDetails.","wrong":"import { models } from 'oci-functions' // Does not export models as a top-level named export","symbol":"models","correct":"import * as models from 'oci-functions/lib/model'"}],"quickstart":{"code":"import { FunctionsManagementClient } from 'oci-functions';\nimport { Region, SimpleAuthenticationDetailsProvider } from 'oci-common';\n\nconst provider = new SimpleAuthenticationDetailsProvider(\n  'ocid1.tenancy.oc1..example',\n  'ocid1.user.oc1..example',\n  'your-api-key-fingerprint',\n  'path-to-private-key.pem',\n  Region.US_PHOENIX_1\n);\n\nconst client = new FunctionsManagementClient({ authenticationDetailsProvider: provider });\n\nasync function listApplications(compartmentId: string) {\n  const response = await client.listApplications({ compartmentId });\n  console.log(response.items);\n}","lang":"typescript","description":"Demonstrates initialization of FunctionsManagementClient with authentication provider from oci-common and listing applications."},"warnings":[{"fix":"Always pass Region enum value or set endpoint via setEndpoint() after construction.","message":"Client constructors require explicit region or endpoint configuration; default region is not assumed.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use SimpleAuthenticationDetailsProvider or ResourcePrincipalAuthenticationDetailsProvider for newer versions.","message":"OCI SDK v1 authentication pattern (using ConfigFileAuthenticationDetailsProvider) is deprecated in favor of SimpleAuthenticationDetailsProvider.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Set the invoke endpoint to the function's invoke endpoint (e.g., https://<region>.functions.oraclecloud.com).","message":"The FunctionsInvokeClient requires a different endpoint than FunctionsManagementClient; using management endpoint for invocation will fail.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Import types from 'oci-functions/lib/model' or use deep import paths.","message":"TypeScript definitions are not exported under the main module; models and request types are under 'oci-functions/lib/model'.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Replace import OciFunctions from 'oci-functions' with import { FunctionsManagementClient } from 'oci-functions'.","message":"As of v2, default export is no longer available; use named exports.","severity":"breaking","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'2.132.0':18 'account':57 'api':49,68 'applic':34 'appropri':60 'authent':54 'cadenc':71 'client':6 'cloud':10 'current':14 'differenti':41 'enabl':29 'follow':72 'full':45 'function':2,12,32,35,39 'infrastructur':11 'instanc':52 'invoc':37 'javascript':78 'key':40,50,64 'manag':30 'modul':28 'nodej':5 'oci':1,4,24,56,74 'offici':42 'oracl':9,43 'pair':65 'part':21 'polici':61 'princip':53 'releas':19,70,77 'request':69 'requir':55 'resourc':33 'sdk':3,26,44,76 'servic':13 'sign':67 'stabl':15 'support':47,48 'typescript':25,46,75,79 'user':58 'version':16","created_at":"2026-06-04T18:53:29.618210+00:00","updated_at":"2026-06-04T18:53:29.618210+00:00","problems":[{"fix":"Pass Region enum to client constructor or call client.setEndpoint() before making API calls.","cause":"Client created without setting region via Region enum or setEndpoint().","error":"Error: A region must be specified when building the client"},{"fix":"Use named import: import { FunctionsManagementClient } from 'oci-functions'.","cause":"Using default import (import OciFunctions from 'oci-functions') which is not available in v2.","error":"TypeError: oci_functions_1.default is not a constructor"},{"fix":"Ensure your bundler supports deep imports, or import root and access models via index if available.","cause":"Using incorrect import path for models; models are under 'oci-functions/lib/model' but bundler may not resolve due to deep imports.","error":"Module not found: Can't resolve 'oci-functions/lib/model'"},{"fix":"Provide tenantId, userId, fingerprint, privateKeyPath/privateKey string, and region to SimpleAuthenticationDetailsProvider.","cause":"Authentication details provider not properly configured or missing required parameters.","error":"Error: Invalid provider. Ensure you have set up authentication correctly."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/oracle/oci-typescript-sdk#readme","github":"https://github.com/oracle/oci-typescript-sdk","docs":null,"changelog":null,"pypi":null,"npm":"oci-functions","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}