@unito/integrations-platform-client 0.48.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/addons.d.ts +66 -0
- package/dist/src/addons.js +84 -0
- package/dist/src/api.d.ts +813 -95
- package/dist/src/api.js +76 -151
- package/dist/src/index.cjs +145 -134
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.js +4 -2
- package/package.json +1 -1
package/dist/src/api.js
CHANGED
|
@@ -20,248 +20,248 @@ export const servers = {
|
|
|
20
20
|
* Get all the integrations
|
|
21
21
|
*/
|
|
22
22
|
export function getIntegrations({ pagination, unitoOrganizationId, search, } = {}, opts) {
|
|
23
|
-
return oazapfts.
|
|
23
|
+
return oazapfts.fetchJson(`/integrations${QS.query(QS.explode({
|
|
24
24
|
pagination,
|
|
25
25
|
unitoOrganizationId,
|
|
26
26
|
search,
|
|
27
27
|
}))}`, {
|
|
28
28
|
...opts,
|
|
29
|
-
})
|
|
29
|
+
});
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Create an integration
|
|
33
33
|
*/
|
|
34
34
|
export function createIntegration(body, opts) {
|
|
35
|
-
return oazapfts.
|
|
35
|
+
return oazapfts.fetchJson('/integrations', oazapfts.json({
|
|
36
36
|
...opts,
|
|
37
37
|
method: 'POST',
|
|
38
38
|
body,
|
|
39
|
-
}))
|
|
39
|
+
}));
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Publish an integration
|
|
43
43
|
*/
|
|
44
44
|
export function publishIntegration(body, opts) {
|
|
45
|
-
return oazapfts.
|
|
45
|
+
return oazapfts.fetchJson('/integrations/publish', oazapfts.multipart({
|
|
46
46
|
...opts,
|
|
47
47
|
method: 'POST',
|
|
48
48
|
body,
|
|
49
|
-
}))
|
|
49
|
+
}));
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Find an integration by exact name
|
|
53
53
|
*/
|
|
54
54
|
export function getIntegrationByName(integrationName, opts) {
|
|
55
|
-
return oazapfts.
|
|
55
|
+
return oazapfts.fetchJson(`/integrations/find/${encodeURIComponent(integrationName)}`, {
|
|
56
56
|
...opts,
|
|
57
|
-
})
|
|
57
|
+
});
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Invite a user to an integration
|
|
61
61
|
*/
|
|
62
62
|
export function inviteUser(integrationId, body, opts) {
|
|
63
|
-
return oazapfts.
|
|
63
|
+
return oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}/users/invite`, oazapfts.json({
|
|
64
64
|
...opts,
|
|
65
65
|
method: 'POST',
|
|
66
66
|
body,
|
|
67
|
-
}))
|
|
67
|
+
}));
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Invite a unito organization to an integration
|
|
71
71
|
*/
|
|
72
72
|
export function inviteOrganization(integrationId, body, opts) {
|
|
73
|
-
return oazapfts.
|
|
73
|
+
return oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}/organizations/invite`, oazapfts.json({
|
|
74
74
|
...opts,
|
|
75
75
|
method: 'POST',
|
|
76
76
|
body,
|
|
77
|
-
}))
|
|
77
|
+
}));
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
* Get an integration
|
|
81
81
|
*/
|
|
82
82
|
export function getIntegrationById(integrationId, opts) {
|
|
83
|
-
return oazapfts.
|
|
83
|
+
return oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}`, {
|
|
84
84
|
...opts,
|
|
85
|
-
})
|
|
85
|
+
});
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* Update an integration
|
|
89
89
|
*/
|
|
90
90
|
export function updateIntegration(integrationId, body, opts) {
|
|
91
|
-
return oazapfts.
|
|
91
|
+
return oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}`, oazapfts.json({
|
|
92
92
|
...opts,
|
|
93
93
|
method: 'PATCH',
|
|
94
94
|
body,
|
|
95
|
-
}))
|
|
95
|
+
}));
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Delete an integration
|
|
99
99
|
*/
|
|
100
100
|
export function deleteIntegration(integrationId, name, opts) {
|
|
101
|
-
return oazapfts.
|
|
101
|
+
return oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}${QS.query(QS.explode({
|
|
102
102
|
name,
|
|
103
103
|
}))}`, {
|
|
104
104
|
...opts,
|
|
105
105
|
method: 'DELETE',
|
|
106
|
-
})
|
|
106
|
+
});
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* Get the events associated with this integration.
|
|
110
110
|
*/
|
|
111
111
|
export function getIntegrationEvents(integrationId, { search, $from, limit, } = {}, opts) {
|
|
112
|
-
return oazapfts.
|
|
112
|
+
return oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}/events${QS.query(QS.explode({
|
|
113
113
|
search,
|
|
114
114
|
from: $from,
|
|
115
115
|
limit,
|
|
116
116
|
}))}`, {
|
|
117
117
|
...opts,
|
|
118
|
-
})
|
|
118
|
+
});
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* Get the logo of the integration, in SVG format.
|
|
122
122
|
*/
|
|
123
123
|
export function getIntegrationLogo(integrationName, opts) {
|
|
124
|
-
return oazapfts.
|
|
124
|
+
return oazapfts.fetchJson(`/public/${encodeURIComponent(integrationName)}/logo.svg`, {
|
|
125
125
|
...opts,
|
|
126
|
-
})
|
|
126
|
+
});
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* Get all the credentials
|
|
130
130
|
*/
|
|
131
131
|
export function getCredentials({ pagination, filters, } = {}, opts) {
|
|
132
|
-
return oazapfts.
|
|
132
|
+
return oazapfts.fetchJson(`/credentials${QS.query(QS.explode({
|
|
133
133
|
pagination,
|
|
134
134
|
filters,
|
|
135
135
|
}))}`, {
|
|
136
136
|
...opts,
|
|
137
|
-
})
|
|
137
|
+
});
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Create a credential
|
|
141
141
|
*/
|
|
142
142
|
export function createCredential(body, opts) {
|
|
143
|
-
return oazapfts.
|
|
143
|
+
return oazapfts.fetchJson('/credentials', oazapfts.json({
|
|
144
144
|
...opts,
|
|
145
145
|
method: 'POST',
|
|
146
146
|
body,
|
|
147
|
-
}))
|
|
147
|
+
}));
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* Get a credential
|
|
151
151
|
*/
|
|
152
152
|
export function getCredentialById(credentialId, opts) {
|
|
153
|
-
return oazapfts.
|
|
153
|
+
return oazapfts.fetchJson(`/credentials/${encodeURIComponent(credentialId)}`, {
|
|
154
154
|
...opts,
|
|
155
|
-
})
|
|
155
|
+
});
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* Update a credential
|
|
159
159
|
*/
|
|
160
160
|
export function updateCredential(credentialId, body, opts) {
|
|
161
|
-
return oazapfts.
|
|
161
|
+
return oazapfts.fetchJson(`/credentials/${encodeURIComponent(credentialId)}`, oazapfts.json({
|
|
162
162
|
...opts,
|
|
163
163
|
method: 'PATCH',
|
|
164
164
|
body,
|
|
165
|
-
}))
|
|
165
|
+
}));
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* Delete a credential
|
|
169
169
|
*/
|
|
170
170
|
export function deleteCredential(credentialId, opts) {
|
|
171
|
-
return oazapfts.
|
|
171
|
+
return oazapfts.fetchJson(`/credentials/${encodeURIComponent(credentialId)}`, {
|
|
172
172
|
...opts,
|
|
173
173
|
method: 'DELETE',
|
|
174
|
-
})
|
|
174
|
+
});
|
|
175
175
|
}
|
|
176
176
|
/**
|
|
177
177
|
* Returns the credentialAccount either from the integration's /me endpoint, if available, or the credential's latestCredentialAccount
|
|
178
178
|
*/
|
|
179
179
|
export function getCredentialAccount(xUnitoCredentialId, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
180
|
-
return oazapfts.
|
|
180
|
+
return oazapfts.fetchJson('/credentialAccount', {
|
|
181
181
|
...opts,
|
|
182
182
|
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
183
183
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
184
184
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
185
185
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
186
186
|
}),
|
|
187
|
-
})
|
|
187
|
+
});
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
190
|
* Used by the frontend to send analytics data
|
|
191
191
|
*/
|
|
192
192
|
export function postTrack(body, opts) {
|
|
193
|
-
return oazapfts.
|
|
193
|
+
return oazapfts.fetchJson('/track', oazapfts.json({
|
|
194
194
|
...opts,
|
|
195
195
|
method: 'POST',
|
|
196
196
|
body,
|
|
197
|
-
}))
|
|
197
|
+
}));
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
200
|
* Encrypt data
|
|
201
201
|
*/
|
|
202
202
|
export function encryptData(body, opts) {
|
|
203
|
-
return oazapfts.
|
|
203
|
+
return oazapfts.fetchJson('/encryptions/encrypt', oazapfts.json({
|
|
204
204
|
...opts,
|
|
205
205
|
method: 'POST',
|
|
206
206
|
body,
|
|
207
|
-
}))
|
|
207
|
+
}));
|
|
208
208
|
}
|
|
209
209
|
/**
|
|
210
210
|
* Decrypt data
|
|
211
211
|
*/
|
|
212
212
|
export function decryptData(body, opts) {
|
|
213
|
-
return oazapfts.
|
|
213
|
+
return oazapfts.fetchJson('/encryptions/decrypt', oazapfts.json({
|
|
214
214
|
...opts,
|
|
215
215
|
method: 'POST',
|
|
216
216
|
body,
|
|
217
|
-
}))
|
|
217
|
+
}));
|
|
218
218
|
}
|
|
219
219
|
/**
|
|
220
220
|
* Decrypt and encrypt data
|
|
221
221
|
*/
|
|
222
222
|
export function reencryptData(body, opts) {
|
|
223
|
-
return oazapfts.
|
|
223
|
+
return oazapfts.fetchJson('/encryptions/reencrypt', oazapfts.json({
|
|
224
224
|
...opts,
|
|
225
225
|
method: 'POST',
|
|
226
226
|
body,
|
|
227
|
-
}))
|
|
227
|
+
}));
|
|
228
228
|
}
|
|
229
229
|
/**
|
|
230
230
|
* Get my profile
|
|
231
231
|
*/
|
|
232
232
|
export function getProfile(opts) {
|
|
233
|
-
return oazapfts.
|
|
233
|
+
return oazapfts.fetchJson('/profile', {
|
|
234
234
|
...opts,
|
|
235
|
-
})
|
|
235
|
+
});
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
238
|
* Update my profile
|
|
239
239
|
*/
|
|
240
240
|
export function updateProfile(body, opts) {
|
|
241
|
-
return oazapfts.
|
|
241
|
+
return oazapfts.fetchJson('/profile', oazapfts.json({
|
|
242
242
|
...opts,
|
|
243
243
|
method: 'PATCH',
|
|
244
244
|
body,
|
|
245
|
-
}))
|
|
245
|
+
}));
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
248
|
* Call an integration's me
|
|
249
249
|
*/
|
|
250
250
|
export function getProxyMe(xUnitoCredentialId, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
251
|
-
return oazapfts.
|
|
251
|
+
return oazapfts.fetchJson('/proxy/me', {
|
|
252
252
|
...opts,
|
|
253
253
|
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
254
254
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
255
255
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
256
256
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
257
257
|
}),
|
|
258
|
-
})
|
|
258
|
+
});
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
261
|
* Update a webhook subscription
|
|
262
262
|
*/
|
|
263
263
|
export function updateWebhookSubscription(xUnitoCredentialId, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
264
|
-
return oazapfts.
|
|
264
|
+
return oazapfts.fetchJson('/proxy/webhooks/subscriptions', oazapfts.json({
|
|
265
265
|
...opts,
|
|
266
266
|
method: 'PUT',
|
|
267
267
|
body,
|
|
@@ -270,13 +270,13 @@ export function updateWebhookSubscription(xUnitoCredentialId, body, { xUnitoCorr
|
|
|
270
270
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
271
271
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
272
272
|
}),
|
|
273
|
-
}))
|
|
273
|
+
}));
|
|
274
274
|
}
|
|
275
275
|
/**
|
|
276
276
|
* Call an integration's graph
|
|
277
277
|
*/
|
|
278
|
-
export function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
279
|
-
return oazapfts.
|
|
278
|
+
export function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, } = {}, opts) {
|
|
279
|
+
return oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
280
280
|
path,
|
|
281
281
|
}))}`, {
|
|
282
282
|
...opts,
|
|
@@ -284,14 +284,15 @@ export function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, x
|
|
|
284
284
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
285
285
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
286
286
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
287
|
+
Accept: accept,
|
|
287
288
|
}),
|
|
288
|
-
})
|
|
289
|
+
});
|
|
289
290
|
}
|
|
290
291
|
/**
|
|
291
292
|
* Call an integration's graph
|
|
292
293
|
*/
|
|
293
|
-
export function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
294
|
-
return oazapfts.
|
|
294
|
+
export function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
|
|
295
|
+
return oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
295
296
|
path,
|
|
296
297
|
}))}`, oazapfts.json({
|
|
297
298
|
...opts,
|
|
@@ -301,14 +302,15 @@ export function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelat
|
|
|
301
302
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
302
303
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
303
304
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
305
|
+
'Content-Type': contentType,
|
|
304
306
|
}),
|
|
305
|
-
}))
|
|
307
|
+
}));
|
|
306
308
|
}
|
|
307
309
|
/**
|
|
308
310
|
* Call an integration's graph
|
|
309
311
|
*/
|
|
310
|
-
export function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
311
|
-
return oazapfts.
|
|
312
|
+
export function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
|
|
313
|
+
return oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
312
314
|
path,
|
|
313
315
|
}))}`, oazapfts.json({
|
|
314
316
|
...opts,
|
|
@@ -318,14 +320,15 @@ export function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelati
|
|
|
318
320
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
319
321
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
320
322
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
323
|
+
'Content-Type': contentType,
|
|
321
324
|
}),
|
|
322
|
-
}))
|
|
325
|
+
}));
|
|
323
326
|
}
|
|
324
327
|
/**
|
|
325
328
|
* Call an integration's graph
|
|
326
329
|
*/
|
|
327
330
|
export function deleteProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
328
|
-
return oazapfts.
|
|
331
|
+
return oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
329
332
|
path,
|
|
330
333
|
}))}`, {
|
|
331
334
|
...opts,
|
|
@@ -335,138 +338,60 @@ export function deleteProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId
|
|
|
335
338
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
336
339
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
337
340
|
}),
|
|
338
|
-
})
|
|
341
|
+
});
|
|
339
342
|
}
|
|
340
343
|
/**
|
|
341
344
|
* Get all the users
|
|
342
345
|
*/
|
|
343
346
|
export function getUsers({ pagination, } = {}, opts) {
|
|
344
|
-
return oazapfts.
|
|
347
|
+
return oazapfts.fetchJson(`/users${QS.query(QS.explode({
|
|
345
348
|
pagination,
|
|
346
349
|
}))}`, {
|
|
347
350
|
...opts,
|
|
348
|
-
})
|
|
351
|
+
});
|
|
349
352
|
}
|
|
350
353
|
/**
|
|
351
354
|
* Create a user
|
|
352
355
|
*/
|
|
353
356
|
export function createUser(body, opts) {
|
|
354
|
-
return oazapfts.
|
|
357
|
+
return oazapfts.fetchJson('/users', oazapfts.json({
|
|
355
358
|
...opts,
|
|
356
359
|
method: 'POST',
|
|
357
360
|
body,
|
|
358
|
-
}))
|
|
361
|
+
}));
|
|
359
362
|
}
|
|
360
363
|
/**
|
|
361
364
|
* Get a user
|
|
362
365
|
*/
|
|
363
366
|
export function getUserById(userId, opts) {
|
|
364
|
-
return oazapfts.
|
|
367
|
+
return oazapfts.fetchJson(`/users/${encodeURIComponent(userId)}`, {
|
|
365
368
|
...opts,
|
|
366
|
-
})
|
|
369
|
+
});
|
|
367
370
|
}
|
|
368
371
|
/**
|
|
369
372
|
* Update a user
|
|
370
373
|
*/
|
|
371
374
|
export function updateUser(userId, body, opts) {
|
|
372
|
-
return oazapfts.
|
|
375
|
+
return oazapfts.fetchJson(`/users/${encodeURIComponent(userId)}`, oazapfts.json({
|
|
373
376
|
...opts,
|
|
374
377
|
method: 'PATCH',
|
|
375
378
|
body,
|
|
376
|
-
}))
|
|
379
|
+
}));
|
|
377
380
|
}
|
|
378
381
|
/**
|
|
379
382
|
* Regenerate the api key of a user
|
|
380
383
|
*/
|
|
381
384
|
export function regenerateApiKey(userId, opts) {
|
|
382
|
-
return oazapfts.
|
|
385
|
+
return oazapfts.fetchJson(`/users/${encodeURIComponent(userId)}/apiKey`, {
|
|
383
386
|
...opts,
|
|
384
387
|
method: 'POST',
|
|
385
|
-
})
|
|
388
|
+
});
|
|
386
389
|
}
|
|
387
390
|
/**
|
|
388
391
|
* Get a user by its email address
|
|
389
392
|
*/
|
|
390
393
|
export function getUserByEmail(email, opts) {
|
|
391
|
-
return oazapfts.
|
|
394
|
+
return oazapfts.fetchJson(`/users/find/${encodeURIComponent(email)}`, {
|
|
392
395
|
...opts,
|
|
393
|
-
})
|
|
394
|
-
}
|
|
395
|
-
// MANUAL ADDONS
|
|
396
|
-
import { HttpError } from '@oazapfts/runtime';
|
|
397
|
-
export { HttpError };
|
|
398
|
-
/**
|
|
399
|
-
* Return true if object has the shape of an item, false otherwise.
|
|
400
|
-
* @param object
|
|
401
|
-
*/
|
|
402
|
-
export function isIntegrationApiItem(object) {
|
|
403
|
-
return object && typeof object === 'object' && 'fields' in object && 'relations' in object;
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Return true if object has the shape of an item, false otherwise.
|
|
407
|
-
* @param object
|
|
408
|
-
*/
|
|
409
|
-
export function isIntegrationApiItemSummary(object) {
|
|
410
|
-
return object && typeof object === 'object' && 'path' in object;
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Return true if object has the shape of a collection, false otherwise.
|
|
414
|
-
* @param object
|
|
415
|
-
*/
|
|
416
|
-
export function isIntegrationApiCollection(object) {
|
|
417
|
-
return object && typeof object === 'object' && 'info' in object && 'data' in object && Array.isArray(object.data);
|
|
418
|
-
}
|
|
419
|
-
export async function getProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
420
|
-
const response = await getProxyGraph(xUnitoCredentialId, path, {
|
|
421
|
-
xUnitoCorrelationId,
|
|
422
|
-
xUnitoAdditionalLoggingContext,
|
|
423
|
-
}, opts);
|
|
424
|
-
if (isIntegrationApiItem(response)) {
|
|
425
|
-
return response;
|
|
426
|
-
}
|
|
427
|
-
else {
|
|
428
|
-
throw new Error(`Response does not match expected Item shape`);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
export async function getProxyGraphCollection(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
432
|
-
const response = await getProxyGraph(xUnitoCredentialId, path, {
|
|
433
|
-
xUnitoCorrelationId,
|
|
434
|
-
xUnitoAdditionalLoggingContext,
|
|
435
|
-
}, opts);
|
|
436
|
-
if (isIntegrationApiCollection(response)) {
|
|
437
|
-
return response;
|
|
438
|
-
}
|
|
439
|
-
else {
|
|
440
|
-
throw new Error(`Response does not match expected Collection shape`);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
export async function patchProxyGraphItem(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
444
|
-
const response = await patchProxyGraph(xUnitoCredentialId, path, body, {
|
|
445
|
-
xUnitoCorrelationId,
|
|
446
|
-
xUnitoAdditionalLoggingContext,
|
|
447
|
-
}, opts);
|
|
448
|
-
if (isIntegrationApiItem(response)) {
|
|
449
|
-
return response;
|
|
450
|
-
}
|
|
451
|
-
else {
|
|
452
|
-
throw new Error(`Response does not match expected Item shape`);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
export async function postProxyGraphCollection(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
456
|
-
const response = await postProxyGraph(xUnitoCredentialId, path, body, {
|
|
457
|
-
xUnitoCorrelationId,
|
|
458
|
-
xUnitoAdditionalLoggingContext,
|
|
459
|
-
}, opts);
|
|
460
|
-
if (isIntegrationApiItemSummary(response)) {
|
|
461
|
-
return response;
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
throw new Error(`Response does not match expected ItemSummary shape`);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
export async function deleteProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
468
|
-
await deleteProxyGraph(xUnitoCredentialId, path, {
|
|
469
|
-
xUnitoCorrelationId,
|
|
470
|
-
xUnitoAdditionalLoggingContext,
|
|
471
|
-
}, opts);
|
|
396
|
+
});
|
|
472
397
|
}
|