Skip to content

Commit f33d95c

Browse files
feat(api): Updated node-sdk to adopt Code Engine API specification changes
1 parent 7c4efea commit f33d95c

7 files changed

Lines changed: 566 additions & 181 deletions

File tree

README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
[![npm-version](https://img.shields.io/npm/v/IBM/code-engine-node-sdk.svg)](https://www.npmjs.com/package/code-engine-sdk)
55
[![codecov](https://codecov.io/gh/IBM/code-engine-node-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/IBM/code-engine-node-sdk)
66
-->
7+
78
# NodeJS SDK for IBM Cloud Code Engine
9+
810
Node.js client library to interact with the [Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
911

1012
## Table of Contents
@@ -23,6 +25,7 @@ Node.js client library to interact with the [Code Engine API](https://cloud.ibm.
2325

2426
- [Overview](#overview)
2527
- [Prerequisites](#prerequisites)
28+
- [Breaking Changes (March 2026)](#breaking-changes-march-2026)
2629
- [Installation](#installation)
2730
- [Using the SDK](#using-the-sdk)
2831
- [Questions](#questions)
@@ -47,6 +50,94 @@ Service Name | Import Path
4750
* You need an [IBM Cloud][ibm-cloud-onboarding] account.
4851
* **Node.js >=14**: This SDK is tested with Node.js versions 14 and up. It may work on previous versions but this is not officially supported.
4952

53+
## Breaking Changes (March 2026)
54+
55+
For consistency, the March 2026 update introduces **pluralized list APIs**, **new outbound destination types**, and updated **constructor/patch models**. These changes require updates to existing client code.
56+
57+
- **Method renames (pluralization)**
58+
Update all list calls:
59+
60+
```javascript
61+
// before
62+
const response = await codeEngineService.listAllowedOutboundDestination(params);
63+
64+
// after
65+
const response = await codeEngineService.listAllowedOutboundDestinations(params);
66+
```
67+
68+
```javascript
69+
// before
70+
const response = await codeEngineService.listPersistentDataStore(params);
71+
72+
// after
73+
const response = await codeEngineService.listPersistentDataStores(params);
74+
```
75+
76+
- **Pager class renames**
77+
Switch to the new pager names:
78+
79+
```javascript
80+
// before
81+
const pager = new CodeEngineV2.AllowedOutboundDestinationPager(codeEngineService, params);
82+
83+
// after
84+
const pager = new CodeEngineV2.AllowedOutboundDestinationsPager(codeEngineService, params);
85+
```
86+
87+
```javascript
88+
// before
89+
const pager = new CodeEngineV2.PersistentDataStorePager(codeEngineService, params);
90+
91+
// after
92+
const pager = new CodeEngineV2.PersistentDataStoresPager(codeEngineService, params);
93+
```
94+
95+
- **Allowed outbound destination patch payloads changed**
96+
Do **not** send `type` in patch payloads anymore. Use the specific fields instead:
97+
98+
```javascript
99+
// before
100+
const patch = {
101+
type: 'cidr_block',
102+
cidr_block: '10.0.1.0/24',
103+
};
104+
105+
// after (remove type field)
106+
const patch = {
107+
cidr_block: '10.0.1.0/24',
108+
};
109+
```
110+
111+
- **Allowed outbound destination prototypes now require `name`**
112+
The `name` field is now required when creating allowed outbound destinations. Ensure you set it for all create flows:
113+
114+
```javascript
115+
const prototype = {
116+
type: 'cidr_block',
117+
name: 'allow-all', // now required
118+
cidr_block: '10.0.0.0/24',
119+
};
120+
```
121+
122+
For Private Path service gateway (new type):
123+
124+
```javascript
125+
const prototype = {
126+
type: 'private_path_service_gateway',
127+
name: 'pps-to-service-x',
128+
private_path_service_gateway_crn: '<private-path-service-gateway-crn>',
129+
isolation_policy: 'shared', // optional: 'shared' or 'dedicated'
130+
};
131+
```
132+
133+
> **Action checklist:**
134+
>
135+
> - [ ] Rename the list methods and pager classes as shown above.
136+
> - [ ] Adjust parameter order for CIDR block prototypes (name before cidr_block).
137+
> - [ ] Remove `type` from allowed-outbound-destination patch payloads.
138+
> - [ ] Ensure `name` is provided when creating allowed outbound destinations.
139+
> - [ ] Include the new `private_path_service_gateway` type in any client-side branching/validation.
140+
50141
[ibm-cloud-onboarding]: http://cloud.ibm.com/registration
51142

52143
## Installation

0 commit comments

Comments
 (0)