@unito/integrations-platform-client 1.1.12 → 1.2.1
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 +12 -6
- package/dist/src/addons.js +12 -6
- package/dist/src/api.d.ts +17 -10
- package/dist/src/api.js +10 -5
- package/dist/src/index.cjs +22 -11
- package/package.json +1 -1
package/dist/src/addons.d.ts
CHANGED
|
@@ -91,9 +91,10 @@ type ErrorResponse = ({
|
|
|
91
91
|
* @param opts Additional options
|
|
92
92
|
* @returns A successful response containing an Item, or an ErrorResponse
|
|
93
93
|
*/
|
|
94
|
-
export declare function getProxyGraphItem(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
94
|
+
export declare function getProxyGraphItem(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, }?: {
|
|
95
95
|
xUnitoCorrelationId?: string;
|
|
96
96
|
xUnitoAdditionalLoggingContext?: string;
|
|
97
|
+
xUnitoOperationDeadline?: string;
|
|
97
98
|
}, opts?: Oazapfts.RequestOpts): Promise<Response<IntegrationApi.Item> | ErrorResponse>;
|
|
98
99
|
/**
|
|
99
100
|
* Wrapper of getProxyGraph that returns a typed response containing a Collection upon success.
|
|
@@ -104,9 +105,10 @@ export declare function getProxyGraphItem(xUnitoCredentialId: string, path: stri
|
|
|
104
105
|
* @param opts Additional options
|
|
105
106
|
* @returns A successful response containing an Collection, or an ErrorResponse
|
|
106
107
|
*/
|
|
107
|
-
export declare function getProxyGraphCollection(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
108
|
+
export declare function getProxyGraphCollection(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, }?: {
|
|
108
109
|
xUnitoCorrelationId?: string;
|
|
109
110
|
xUnitoAdditionalLoggingContext?: string;
|
|
111
|
+
xUnitoOperationDeadline?: string;
|
|
110
112
|
}, opts?: Oazapfts.RequestOpts): Promise<Response<IntegrationApi.Collection> | ErrorResponse>;
|
|
111
113
|
/**
|
|
112
114
|
* Wrapper of patchProxyGraph that returns a typed response containing the updated Item upon success.
|
|
@@ -117,9 +119,10 @@ export declare function getProxyGraphCollection(xUnitoCredentialId: string, path
|
|
|
117
119
|
* @param opts Additional options
|
|
118
120
|
* @returns A successful response containing an Item, or an ErrorResponse
|
|
119
121
|
*/
|
|
120
|
-
export declare function patchProxyGraphItem(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
122
|
+
export declare function patchProxyGraphItem(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, }?: {
|
|
121
123
|
xUnitoCorrelationId?: string;
|
|
122
124
|
xUnitoAdditionalLoggingContext?: string;
|
|
125
|
+
xUnitoOperationDeadline?: string;
|
|
123
126
|
}, opts?: Oazapfts.RequestOpts): Promise<Response<IntegrationApi.Item> | ErrorResponse>;
|
|
124
127
|
/**
|
|
125
128
|
* Wrapper of postProxyGraph that returns a typed response containing the created ItemSummary upon success.
|
|
@@ -130,9 +133,10 @@ export declare function patchProxyGraphItem(xUnitoCredentialId: string, path: st
|
|
|
130
133
|
* @param opts Additional options
|
|
131
134
|
* @returns A successful response containing an ItemSummary, or an ErrorResponse
|
|
132
135
|
*/
|
|
133
|
-
export declare function postProxyGraphCollection(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
136
|
+
export declare function postProxyGraphCollection(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, }?: {
|
|
134
137
|
xUnitoCorrelationId?: string;
|
|
135
138
|
xUnitoAdditionalLoggingContext?: string;
|
|
139
|
+
xUnitoOperationDeadline?: string;
|
|
136
140
|
}, opts?: Oazapfts.RequestOpts): Promise<Response<IntegrationApi.ItemSummary> | ErrorResponse>;
|
|
137
141
|
/**
|
|
138
142
|
* Wrapper of deleteProxyGraph that returns a typed response.
|
|
@@ -143,9 +147,10 @@ export declare function postProxyGraphCollection(xUnitoCredentialId: string, pat
|
|
|
143
147
|
* @param opts Additional options
|
|
144
148
|
* @returns A successful response or an ErrorResponse
|
|
145
149
|
*/
|
|
146
|
-
export declare function deleteProxyGraphItem(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
150
|
+
export declare function deleteProxyGraphItem(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, }?: {
|
|
147
151
|
xUnitoCorrelationId?: string;
|
|
148
152
|
xUnitoAdditionalLoggingContext?: string;
|
|
153
|
+
xUnitoOperationDeadline?: string;
|
|
149
154
|
}, opts?: Oazapfts.RequestOpts): Promise<Response<object> | ErrorResponse>;
|
|
150
155
|
/**
|
|
151
156
|
* Call an integration's graph and returns the fetch response directly to enable streaming of the body as it comes in.
|
|
@@ -156,8 +161,9 @@ export declare function deleteProxyGraphItem(xUnitoCredentialId: string, path: s
|
|
|
156
161
|
* @param additionalHeaders Additional headers to add to the request
|
|
157
162
|
* @returns fetch's response
|
|
158
163
|
*/
|
|
159
|
-
export declare function fetchProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, }?: {
|
|
164
|
+
export declare function fetchProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, accept, }?: {
|
|
160
165
|
xUnitoCorrelationId?: string;
|
|
161
166
|
xUnitoAdditionalLoggingContext?: string;
|
|
167
|
+
xUnitoOperationDeadline?: string;
|
|
162
168
|
accept?: string;
|
|
163
169
|
}, init?: RequestInit): Promise<globalThis.Response>;
|
package/dist/src/addons.js
CHANGED
|
@@ -69,10 +69,11 @@ export async function optimistic(asyncResponse) {
|
|
|
69
69
|
* @param opts Additional options
|
|
70
70
|
* @returns A successful response containing an Item, or an ErrorResponse
|
|
71
71
|
*/
|
|
72
|
-
export async function getProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
72
|
+
export async function getProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
73
73
|
const response = await getProxyGraph(xUnitoCredentialId, path, {
|
|
74
74
|
xUnitoCorrelationId,
|
|
75
75
|
xUnitoAdditionalLoggingContext,
|
|
76
|
+
xUnitoOperationDeadline,
|
|
76
77
|
}, opts);
|
|
77
78
|
if (isItemResponse(response) || isErrorResponse(response)) {
|
|
78
79
|
return response;
|
|
@@ -90,10 +91,11 @@ export async function getProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrel
|
|
|
90
91
|
* @param opts Additional options
|
|
91
92
|
* @returns A successful response containing an Collection, or an ErrorResponse
|
|
92
93
|
*/
|
|
93
|
-
export async function getProxyGraphCollection(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
94
|
+
export async function getProxyGraphCollection(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
94
95
|
const response = await getProxyGraph(xUnitoCredentialId, path, {
|
|
95
96
|
xUnitoCorrelationId,
|
|
96
97
|
xUnitoAdditionalLoggingContext,
|
|
98
|
+
xUnitoOperationDeadline,
|
|
97
99
|
}, opts);
|
|
98
100
|
if (isCollectionResponse(response) || isErrorResponse(response)) {
|
|
99
101
|
return response;
|
|
@@ -111,10 +113,11 @@ export async function getProxyGraphCollection(xUnitoCredentialId, path, { xUnito
|
|
|
111
113
|
* @param opts Additional options
|
|
112
114
|
* @returns A successful response containing an Item, or an ErrorResponse
|
|
113
115
|
*/
|
|
114
|
-
export async function patchProxyGraphItem(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
116
|
+
export async function patchProxyGraphItem(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
115
117
|
const response = await patchProxyGraph(xUnitoCredentialId, path, body, {
|
|
116
118
|
xUnitoCorrelationId,
|
|
117
119
|
xUnitoAdditionalLoggingContext,
|
|
120
|
+
xUnitoOperationDeadline,
|
|
118
121
|
}, opts);
|
|
119
122
|
if (isItemResponse(response) || isErrorResponse(response)) {
|
|
120
123
|
return response;
|
|
@@ -132,10 +135,11 @@ export async function patchProxyGraphItem(xUnitoCredentialId, path, body, { xUni
|
|
|
132
135
|
* @param opts Additional options
|
|
133
136
|
* @returns A successful response containing an ItemSummary, or an ErrorResponse
|
|
134
137
|
*/
|
|
135
|
-
export async function postProxyGraphCollection(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
138
|
+
export async function postProxyGraphCollection(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
136
139
|
const response = await postProxyGraph(xUnitoCredentialId, path, body, {
|
|
137
140
|
xUnitoCorrelationId,
|
|
138
141
|
xUnitoAdditionalLoggingContext,
|
|
142
|
+
xUnitoOperationDeadline,
|
|
139
143
|
}, opts);
|
|
140
144
|
if (isItemSummaryResponse(response) || isErrorResponse(response)) {
|
|
141
145
|
return response;
|
|
@@ -153,10 +157,11 @@ export async function postProxyGraphCollection(xUnitoCredentialId, path, body, {
|
|
|
153
157
|
* @param opts Additional options
|
|
154
158
|
* @returns A successful response or an ErrorResponse
|
|
155
159
|
*/
|
|
156
|
-
export async function deleteProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
160
|
+
export async function deleteProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
157
161
|
return await deleteProxyGraph(xUnitoCredentialId, path, {
|
|
158
162
|
xUnitoCorrelationId,
|
|
159
163
|
xUnitoAdditionalLoggingContext,
|
|
164
|
+
xUnitoOperationDeadline,
|
|
160
165
|
}, opts);
|
|
161
166
|
}
|
|
162
167
|
/**
|
|
@@ -168,7 +173,7 @@ export async function deleteProxyGraphItem(xUnitoCredentialId, path, { xUnitoCor
|
|
|
168
173
|
* @param additionalHeaders Additional headers to add to the request
|
|
169
174
|
* @returns fetch's response
|
|
170
175
|
*/
|
|
171
|
-
export async function fetchProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, } = {}, init) {
|
|
176
|
+
export async function fetchProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, accept, } = {}, init) {
|
|
172
177
|
return fetch(`${defaults.baseUrl}/proxy/graph${QS.query(QS.explode({ path }))}`, {
|
|
173
178
|
...(init ?? {}),
|
|
174
179
|
headers: oazapfts.mergeHeaders({
|
|
@@ -177,6 +182,7 @@ export async function fetchProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelat
|
|
|
177
182
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
178
183
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
179
184
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
185
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
180
186
|
Accept: accept,
|
|
181
187
|
}),
|
|
182
188
|
});
|
package/dist/src/api.d.ts
CHANGED
|
@@ -93,6 +93,8 @@ export type AuthorizationOAuth2 = {
|
|
|
93
93
|
authorizationUrl?: string;
|
|
94
94
|
/** The URL to obtain or refresh an access token. */
|
|
95
95
|
tokenUrl: string;
|
|
96
|
+
/** The callback URL which the provider will redirect the user after granting or denying access. */
|
|
97
|
+
legacyRedirectUrl?: string;
|
|
96
98
|
grantType: AuthorizationGrantType;
|
|
97
99
|
scopes: AuthorizationScope[];
|
|
98
100
|
requestContentType: AuthorizationOAuth2ContentType;
|
|
@@ -143,7 +145,7 @@ export type IntegrationEvent = {
|
|
|
143
145
|
};
|
|
144
146
|
export type Credential = Base & {
|
|
145
147
|
/** The id of the credential. */
|
|
146
|
-
id:
|
|
148
|
+
id: string;
|
|
147
149
|
/** The id of the integration. */
|
|
148
150
|
integrationId: number;
|
|
149
151
|
/** The name of the integration. */
|
|
@@ -545,7 +547,7 @@ export declare function getCredentials({ pagination, filters, }?: {
|
|
|
545
547
|
/** The integration id of the credential. */
|
|
546
548
|
integrationId?: number;
|
|
547
549
|
/** List of credential ids. */
|
|
548
|
-
id?:
|
|
550
|
+
id?: string[];
|
|
549
551
|
/** The scope of the credential. */
|
|
550
552
|
credentialScope?: 'development' | 'compliance' | 'production' | 'service';
|
|
551
553
|
/** The id of the Unito User for which this credential belongs to. */
|
|
@@ -618,7 +620,7 @@ export declare function createCredential(body?: {
|
|
|
618
620
|
/**
|
|
619
621
|
* Get a credential
|
|
620
622
|
*/
|
|
621
|
-
export declare function getCredentialById(credentialId:
|
|
623
|
+
export declare function getCredentialById(credentialId: string, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
|
|
622
624
|
status: 200;
|
|
623
625
|
data: Credential;
|
|
624
626
|
} | {
|
|
@@ -643,7 +645,7 @@ export declare function getCredentialById(credentialId: number, opts?: Oazapfts.
|
|
|
643
645
|
/**
|
|
644
646
|
* Update a credential
|
|
645
647
|
*/
|
|
646
|
-
export declare function updateCredential(credentialId:
|
|
648
|
+
export declare function updateCredential(credentialId: string, body?: {
|
|
647
649
|
payload?: {
|
|
648
650
|
[key: string]: any;
|
|
649
651
|
};
|
|
@@ -676,7 +678,7 @@ export declare function updateCredential(credentialId: number, body?: {
|
|
|
676
678
|
/**
|
|
677
679
|
* Delete a credential
|
|
678
680
|
*/
|
|
679
|
-
export declare function deleteCredential(credentialId:
|
|
681
|
+
export declare function deleteCredential(credentialId: string, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
|
|
680
682
|
status: 204;
|
|
681
683
|
} | {
|
|
682
684
|
status: 400;
|
|
@@ -975,10 +977,11 @@ export declare function updateWebhookSubscription(xUnitoCredentialId: string, bo
|
|
|
975
977
|
/**
|
|
976
978
|
* Call an integration's graph
|
|
977
979
|
*/
|
|
978
|
-
export declare function getProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, }?: {
|
|
980
|
+
export declare function getProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, xUnitoOperationDeadline, }?: {
|
|
979
981
|
xUnitoCorrelationId?: string;
|
|
980
982
|
xUnitoAdditionalLoggingContext?: string;
|
|
981
983
|
accept?: string;
|
|
984
|
+
xUnitoOperationDeadline?: string;
|
|
982
985
|
}, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
|
|
983
986
|
status: 200;
|
|
984
987
|
data: object | any;
|
|
@@ -1013,10 +1016,11 @@ export declare function getProxyGraph(xUnitoCredentialId: string, path: string,
|
|
|
1013
1016
|
/**
|
|
1014
1017
|
* Call an integration's graph
|
|
1015
1018
|
*/
|
|
1016
|
-
export declare function patchProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, }?: {
|
|
1019
|
+
export declare function patchProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, xUnitoOperationDeadline, }?: {
|
|
1017
1020
|
xUnitoCorrelationId?: string;
|
|
1018
1021
|
xUnitoAdditionalLoggingContext?: string;
|
|
1019
1022
|
contentType?: string;
|
|
1023
|
+
xUnitoOperationDeadline?: string;
|
|
1020
1024
|
}, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
|
|
1021
1025
|
status: 200;
|
|
1022
1026
|
data: object | any;
|
|
@@ -1051,10 +1055,11 @@ export declare function patchProxyGraph(xUnitoCredentialId: string, path: string
|
|
|
1051
1055
|
/**
|
|
1052
1056
|
* Call an integration's graph
|
|
1053
1057
|
*/
|
|
1054
|
-
export declare function postProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, }?: {
|
|
1058
|
+
export declare function postProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, xUnitoOperationDeadline, }?: {
|
|
1055
1059
|
xUnitoCorrelationId?: string;
|
|
1056
1060
|
xUnitoAdditionalLoggingContext?: string;
|
|
1057
1061
|
contentType?: string;
|
|
1062
|
+
xUnitoOperationDeadline?: string;
|
|
1058
1063
|
}, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
|
|
1059
1064
|
status: 200;
|
|
1060
1065
|
data: object | any;
|
|
@@ -1089,9 +1094,10 @@ export declare function postProxyGraph(xUnitoCredentialId: string, path: string,
|
|
|
1089
1094
|
/**
|
|
1090
1095
|
* Call an integration's graph
|
|
1091
1096
|
*/
|
|
1092
|
-
export declare function deleteProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
1097
|
+
export declare function deleteProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, }?: {
|
|
1093
1098
|
xUnitoCorrelationId?: string;
|
|
1094
1099
|
xUnitoAdditionalLoggingContext?: string;
|
|
1100
|
+
xUnitoOperationDeadline?: string;
|
|
1095
1101
|
}, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
|
|
1096
1102
|
status: 200;
|
|
1097
1103
|
data: object | any;
|
|
@@ -1128,9 +1134,10 @@ export declare function deleteProxyGraph(xUnitoCredentialId: string, path: strin
|
|
|
1128
1134
|
*/
|
|
1129
1135
|
export declare function postProxyGraphMultipart(xUnitoCredentialId: string, path: string, body?: {
|
|
1130
1136
|
[key: string]: any;
|
|
1131
|
-
}, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
1137
|
+
}, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, }?: {
|
|
1132
1138
|
xUnitoCorrelationId?: string;
|
|
1133
1139
|
xUnitoAdditionalLoggingContext?: string;
|
|
1140
|
+
xUnitoOperationDeadline?: string;
|
|
1134
1141
|
}, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
|
|
1135
1142
|
status: 200;
|
|
1136
1143
|
data: object | any;
|
package/dist/src/api.js
CHANGED
|
@@ -275,7 +275,7 @@ export function updateWebhookSubscription(xUnitoCredentialId, body, { xUnitoCorr
|
|
|
275
275
|
/**
|
|
276
276
|
* Call an integration's graph
|
|
277
277
|
*/
|
|
278
|
-
export function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, } = {}, opts) {
|
|
278
|
+
export function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, xUnitoOperationDeadline, } = {}, opts) {
|
|
279
279
|
return oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
280
280
|
path,
|
|
281
281
|
}))}`, {
|
|
@@ -285,13 +285,14 @@ export function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, x
|
|
|
285
285
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
286
286
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
287
287
|
Accept: accept,
|
|
288
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
288
289
|
}),
|
|
289
290
|
});
|
|
290
291
|
}
|
|
291
292
|
/**
|
|
292
293
|
* Call an integration's graph
|
|
293
294
|
*/
|
|
294
|
-
export function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
|
|
295
|
+
export function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, xUnitoOperationDeadline, } = {}, opts) {
|
|
295
296
|
return oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
296
297
|
path,
|
|
297
298
|
}))}`, oazapfts.json({
|
|
@@ -303,13 +304,14 @@ export function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelat
|
|
|
303
304
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
304
305
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
305
306
|
'Content-Type': contentType,
|
|
307
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
306
308
|
}),
|
|
307
309
|
}));
|
|
308
310
|
}
|
|
309
311
|
/**
|
|
310
312
|
* Call an integration's graph
|
|
311
313
|
*/
|
|
312
|
-
export function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
|
|
314
|
+
export function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, xUnitoOperationDeadline, } = {}, opts) {
|
|
313
315
|
return oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
314
316
|
path,
|
|
315
317
|
}))}`, oazapfts.json({
|
|
@@ -321,13 +323,14 @@ export function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelati
|
|
|
321
323
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
322
324
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
323
325
|
'Content-Type': contentType,
|
|
326
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
324
327
|
}),
|
|
325
328
|
}));
|
|
326
329
|
}
|
|
327
330
|
/**
|
|
328
331
|
* Call an integration's graph
|
|
329
332
|
*/
|
|
330
|
-
export function deleteProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
333
|
+
export function deleteProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
331
334
|
return oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
332
335
|
path,
|
|
333
336
|
}))}`, {
|
|
@@ -337,13 +340,14 @@ export function deleteProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId
|
|
|
337
340
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
338
341
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
339
342
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
343
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
340
344
|
}),
|
|
341
345
|
});
|
|
342
346
|
}
|
|
343
347
|
/**
|
|
344
348
|
* Call an integration's graph with multipart/form-data
|
|
345
349
|
*/
|
|
346
|
-
export function postProxyGraphMultipart(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
350
|
+
export function postProxyGraphMultipart(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
347
351
|
return oazapfts.fetchJson(`/proxy/graph/multipart${QS.query(QS.explode({
|
|
348
352
|
path,
|
|
349
353
|
}))}`, oazapfts.multipart({
|
|
@@ -354,6 +358,7 @@ export function postProxyGraphMultipart(xUnitoCredentialId, path, body, { xUnito
|
|
|
354
358
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
355
359
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
356
360
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
361
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
357
362
|
}),
|
|
358
363
|
}));
|
|
359
364
|
}
|
package/dist/src/index.cjs
CHANGED
|
@@ -298,7 +298,7 @@ function updateWebhookSubscription(xUnitoCredentialId, body, { xUnitoCorrelation
|
|
|
298
298
|
/**
|
|
299
299
|
* Call an integration's graph
|
|
300
300
|
*/
|
|
301
|
-
function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, } = {}, opts) {
|
|
301
|
+
function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, xUnitoOperationDeadline, } = {}, opts) {
|
|
302
302
|
return oazapfts$1.fetchJson(`/proxy/graph${QS__namespace.query(QS__namespace.explode({
|
|
303
303
|
path,
|
|
304
304
|
}))}`, {
|
|
@@ -308,13 +308,14 @@ function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAd
|
|
|
308
308
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
309
309
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
310
310
|
Accept: accept,
|
|
311
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
311
312
|
}),
|
|
312
313
|
});
|
|
313
314
|
}
|
|
314
315
|
/**
|
|
315
316
|
* Call an integration's graph
|
|
316
317
|
*/
|
|
317
|
-
function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
|
|
318
|
+
function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, xUnitoOperationDeadline, } = {}, opts) {
|
|
318
319
|
return oazapfts$1.fetchJson(`/proxy/graph${QS__namespace.query(QS__namespace.explode({
|
|
319
320
|
path,
|
|
320
321
|
}))}`, oazapfts$1.json({
|
|
@@ -326,13 +327,14 @@ function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId,
|
|
|
326
327
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
327
328
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
328
329
|
'Content-Type': contentType,
|
|
330
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
329
331
|
}),
|
|
330
332
|
}));
|
|
331
333
|
}
|
|
332
334
|
/**
|
|
333
335
|
* Call an integration's graph
|
|
334
336
|
*/
|
|
335
|
-
function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
|
|
337
|
+
function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, xUnitoOperationDeadline, } = {}, opts) {
|
|
336
338
|
return oazapfts$1.fetchJson(`/proxy/graph${QS__namespace.query(QS__namespace.explode({
|
|
337
339
|
path,
|
|
338
340
|
}))}`, oazapfts$1.json({
|
|
@@ -344,13 +346,14 @@ function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, x
|
|
|
344
346
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
345
347
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
346
348
|
'Content-Type': contentType,
|
|
349
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
347
350
|
}),
|
|
348
351
|
}));
|
|
349
352
|
}
|
|
350
353
|
/**
|
|
351
354
|
* Call an integration's graph
|
|
352
355
|
*/
|
|
353
|
-
function deleteProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
356
|
+
function deleteProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
354
357
|
return oazapfts$1.fetchJson(`/proxy/graph${QS__namespace.query(QS__namespace.explode({
|
|
355
358
|
path,
|
|
356
359
|
}))}`, {
|
|
@@ -360,13 +363,14 @@ function deleteProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnit
|
|
|
360
363
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
361
364
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
362
365
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
366
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
363
367
|
}),
|
|
364
368
|
});
|
|
365
369
|
}
|
|
366
370
|
/**
|
|
367
371
|
* Call an integration's graph with multipart/form-data
|
|
368
372
|
*/
|
|
369
|
-
function postProxyGraphMultipart(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
373
|
+
function postProxyGraphMultipart(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
370
374
|
return oazapfts$1.fetchJson(`/proxy/graph/multipart${QS__namespace.query(QS__namespace.explode({
|
|
371
375
|
path,
|
|
372
376
|
}))}`, oazapfts$1.multipart({
|
|
@@ -377,6 +381,7 @@ function postProxyGraphMultipart(xUnitoCredentialId, path, body, { xUnitoCorrela
|
|
|
377
381
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
378
382
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
379
383
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
384
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
380
385
|
}),
|
|
381
386
|
}));
|
|
382
387
|
}
|
|
@@ -502,10 +507,11 @@ async function optimistic(asyncResponse) {
|
|
|
502
507
|
* @param opts Additional options
|
|
503
508
|
* @returns A successful response containing an Item, or an ErrorResponse
|
|
504
509
|
*/
|
|
505
|
-
async function getProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
510
|
+
async function getProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
506
511
|
const response = await getProxyGraph(xUnitoCredentialId, path, {
|
|
507
512
|
xUnitoCorrelationId,
|
|
508
513
|
xUnitoAdditionalLoggingContext,
|
|
514
|
+
xUnitoOperationDeadline,
|
|
509
515
|
}, opts);
|
|
510
516
|
if (isItemResponse(response) || isErrorResponse(response)) {
|
|
511
517
|
return response;
|
|
@@ -523,10 +529,11 @@ async function getProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId
|
|
|
523
529
|
* @param opts Additional options
|
|
524
530
|
* @returns A successful response containing an Collection, or an ErrorResponse
|
|
525
531
|
*/
|
|
526
|
-
async function getProxyGraphCollection(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
532
|
+
async function getProxyGraphCollection(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
527
533
|
const response = await getProxyGraph(xUnitoCredentialId, path, {
|
|
528
534
|
xUnitoCorrelationId,
|
|
529
535
|
xUnitoAdditionalLoggingContext,
|
|
536
|
+
xUnitoOperationDeadline,
|
|
530
537
|
}, opts);
|
|
531
538
|
if (isCollectionResponse(response) || isErrorResponse(response)) {
|
|
532
539
|
return response;
|
|
@@ -544,10 +551,11 @@ async function getProxyGraphCollection(xUnitoCredentialId, path, { xUnitoCorrela
|
|
|
544
551
|
* @param opts Additional options
|
|
545
552
|
* @returns A successful response containing an Item, or an ErrorResponse
|
|
546
553
|
*/
|
|
547
|
-
async function patchProxyGraphItem(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
554
|
+
async function patchProxyGraphItem(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
548
555
|
const response = await patchProxyGraph(xUnitoCredentialId, path, body, {
|
|
549
556
|
xUnitoCorrelationId,
|
|
550
557
|
xUnitoAdditionalLoggingContext,
|
|
558
|
+
xUnitoOperationDeadline,
|
|
551
559
|
}, opts);
|
|
552
560
|
if (isItemResponse(response) || isErrorResponse(response)) {
|
|
553
561
|
return response;
|
|
@@ -565,10 +573,11 @@ async function patchProxyGraphItem(xUnitoCredentialId, path, body, { xUnitoCorre
|
|
|
565
573
|
* @param opts Additional options
|
|
566
574
|
* @returns A successful response containing an ItemSummary, or an ErrorResponse
|
|
567
575
|
*/
|
|
568
|
-
async function postProxyGraphCollection(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
576
|
+
async function postProxyGraphCollection(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
569
577
|
const response = await postProxyGraph(xUnitoCredentialId, path, body, {
|
|
570
578
|
xUnitoCorrelationId,
|
|
571
579
|
xUnitoAdditionalLoggingContext,
|
|
580
|
+
xUnitoOperationDeadline,
|
|
572
581
|
}, opts);
|
|
573
582
|
if (isItemSummaryResponse(response) || isErrorResponse(response)) {
|
|
574
583
|
return response;
|
|
@@ -586,10 +595,11 @@ async function postProxyGraphCollection(xUnitoCredentialId, path, body, { xUnito
|
|
|
586
595
|
* @param opts Additional options
|
|
587
596
|
* @returns A successful response or an ErrorResponse
|
|
588
597
|
*/
|
|
589
|
-
async function deleteProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
598
|
+
async function deleteProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, } = {}, opts) {
|
|
590
599
|
return await deleteProxyGraph(xUnitoCredentialId, path, {
|
|
591
600
|
xUnitoCorrelationId,
|
|
592
601
|
xUnitoAdditionalLoggingContext,
|
|
602
|
+
xUnitoOperationDeadline,
|
|
593
603
|
}, opts);
|
|
594
604
|
}
|
|
595
605
|
/**
|
|
@@ -601,7 +611,7 @@ async function deleteProxyGraphItem(xUnitoCredentialId, path, { xUnitoCorrelatio
|
|
|
601
611
|
* @param additionalHeaders Additional headers to add to the request
|
|
602
612
|
* @returns fetch's response
|
|
603
613
|
*/
|
|
604
|
-
async function fetchProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, } = {}, init) {
|
|
614
|
+
async function fetchProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, xUnitoOperationDeadline, accept, } = {}, init) {
|
|
605
615
|
return fetch(`${defaults.baseUrl}/proxy/graph${QS__namespace.query(QS__namespace.explode({ path }))}`, {
|
|
606
616
|
...(init ?? {}),
|
|
607
617
|
headers: oazapfts.mergeHeaders({
|
|
@@ -610,6 +620,7 @@ async function fetchProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId,
|
|
|
610
620
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
611
621
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
612
622
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
623
|
+
'X-Unito-Operation-Deadline': xUnitoOperationDeadline,
|
|
613
624
|
Accept: accept,
|
|
614
625
|
}),
|
|
615
626
|
});
|