Skip to content

Commit bfea50e

Browse files
authored
docs: new integrations method (#4004)
## Changes - Document new integrations method and endpoint <!-- Summary by @propel-code-bot --> --- This PR updates the documentation for the Node SDK to reflect changes in the integration API methods. It introduces a new format for creating and updating integrations with object parameter format, while marking the old method as deprecated. Parameter naming has been changed from 'providerConfigKey' to 'unique_key', and response formats have been updated to align with the new API structure. **Key Changes:** • Added documentation for new integration creation method with object parameter format • Renamed parameter 'providerConfigKey' to 'unique_key' throughout the documentation • Marked old integration methods as deprecated • Updated response examples to show new API structure (changes in response format from 'config' to 'data') **Affected Areas:** • Node SDK documentation (docs-v2/reference/sdks/node.mdx) *This summary was automatically generated by @propel-code-bot*
1 parent 1379113 commit bfea50e

File tree

1 file changed

+29
-56
lines changed

1 file changed

+29
-56
lines changed

docs-v2/reference/sdks/node.mdx

Lines changed: 29 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,6 @@ await nango.getIntegration(<INTEGRATION-ID>);
173173
<ResponseField name="include" type="array">
174174
Include sensitive data. Allowed values: `webhook`
175175
</ResponseField>
176-
177-
<ResponseField name="providerConfigKey" type="string" required deprecated>
178-
The integration ID.
179-
</ResponseField>
180-
181-
<ResponseField name="includeIntegrationCredentials" type="boolean" deprecated>
182-
Defaults to `false`.
183-
</ResponseField>
184176
</Expandable>
185177

186178
**Example Response**
@@ -204,6 +196,9 @@ await nango.getIntegration(<INTEGRATION-ID>);
204196
Create a new integration.
205197

206198
```js
199+
await nango.createIntegration({ provider: <PROVIDER-ID>, unique_key: <UNIQUE_KEY>, [...] });
200+
201+
// Deprecated
207202
await nango.createIntegration(<PROVIDER-ID>, <INTEGRATION-ID>);
208203
```
209204

@@ -214,92 +209,73 @@ await nango.createIntegration(<PROVIDER-ID>, <INTEGRATION-ID>);
214209
The ID of the API provider in Nango (cf. [providers.yaml](https://nango.dev/providers.yaml) for a list of API provider IDs.)
215210
</ResponseField>
216211

217-
<ResponseField name="providerConfigKey" type="string" required>
212+
<ResponseField name="unique_key" type="string" required>
218213
The integration ID.
219214
</ResponseField>
220215

221-
<ResponseField name="credentials" type="Record<string, string>">
222-
The credentials to include depend on the specific integration that you want to create.
216+
<ResponseField name="display_name" type="string">
217+
The display name of this integration
223218
</ResponseField>
224219

225220
<ResponseField name="credentials" type="Record<string, string>">
226-
<Expandable title="credentials" defaultOpen>
227-
<ResponseField name="oauth_client_id" type="string">
228-
The OAuth client ID.
229-
</ResponseField>
230-
231-
<ResponseField name="oauth_client_secret" type="string">
232-
The OAuth client secret.
233-
</ResponseField>
234-
235-
<ResponseField name="oauth_scopes" type="string">
236-
The list of OAuth scopes
237-
</ResponseField>
238-
</Expandable>
239-
</ResponseField>
221+
The credentials to include depend on the specific integration that you want to create.
222+
</ResponseField>
240223
</Expandable>
241224

242225
**Example Response**
243226

244227
<Expandable>
245228
```json
246229
{
247-
"config": {
230+
"data": {
248231
"unique_key": "slack-nango-community",
249-
"provider": "slack"
232+
"provider": "slack",
233+
"logo": "http://localhost:3003/images/template-logos/slack.svg",
234+
"created_at": "2023-10-16T08:45:26.241Z",
235+
"updated_at": "2023-10-16T08:45:26.241Z",
250236
}
251237
}
252238
```
253239
</Expandable>
254240

255241
### Update an integration
256242

257-
Edits an integration (only for OAuth APIs).
243+
Patch an integration, all fields are optional.
258244

259245
```js
246+
await nango.updateIntegration({ uniqueKey: <UNIQUE_KEY> }, { [...body] });
247+
248+
// Deprecated
260249
await nango.updateIntegration(<PROVIDER-ID>, <INTEGRATION-ID>);
261250
```
262251

263252
**Parameters**
264253

265254
<Expandable>
266-
<ResponseField name="provider" type="string" required>
267-
The ID of the API provider in Nango (cf. [providers.yaml](https://nango.dev/providers.yaml) for a list of API provider IDs.)
255+
<ResponseField name="unique_key" type="string">
256+
The integration ID.
268257
</ResponseField>
269258

270-
<ResponseField name="providerConfigKey" type="string" required>
271-
The integration ID.
259+
<ResponseField name="display_name" type="string">
260+
The display name of this integration
272261
</ResponseField>
273262

274263
<ResponseField name="credentials" type="Record<string, string>">
275264
The credentials to include depend on the specific integration that you want to create.
276265
</ResponseField>
277-
278-
<ResponseField name="credentials" type="Record<string, string>">
279-
<Expandable title="credentials" defaultOpen>
280-
<ResponseField name="oauth_client_id" type="string">
281-
The OAuth client ID.
282-
</ResponseField>
283-
284-
<ResponseField name="oauth_client_secret" type="string">
285-
The OAuth client secret.
286-
</ResponseField>
287-
288-
<ResponseField name="oauth_scopes" type="string">
289-
The list of OAuth scopes
290-
</ResponseField>
291-
</Expandable>
292-
</ResponseField>
293266
</Expandable>
294267

295268
**Example Response**
296269

297270
<Expandable>
298271
```json
299272
{
300-
"config": {
273+
"data": {
301274
"unique_key": "slack-nango-community",
302-
"provider": "slack"
275+
"provider": "slack",
276+
"logo": "http://localhost:3003/images/template-logos/slack.svg",
277+
"created_at": "2023-10-16T08:45:26.241Z",
278+
"updated_at": "2023-10-16T08:45:26.241Z",
303279
}
304280
}
305281
```
@@ -310,13 +286,13 @@ await nango.updateIntegration(<PROVIDER-ID>, <INTEGRATION-ID>);
310286
Deletes a specific integration.
311287

312288
```js
313-
await nango.deleteIntegration(<INTEGRATION-ID>);
289+
await nango.deleteIntegration(<UNIQUE_KEY>);
314290
```
315291

316292
**Parameters**
317293

318294
<Expandable>
319-
<ResponseField name="providerConfigKey" type="string" required>
295+
<ResponseField name="uniqueKey" type="string" required>
320296
The integration ID.
321297
</ResponseField>
322298
</Expandable>
@@ -326,10 +302,7 @@ await nango.deleteIntegration(<INTEGRATION-ID>);
326302
<Expandable>
327303
```json
328304
{
329-
"config": {
330-
"unique_key": "slack-nango-community",
331-
"provider": "slack"
332-
}
305+
"success": true
333306
}
334307
```
335308
</Expandable>

0 commit comments

Comments
 (0)