@droz-js/sdk 0.19.36 → 0.19.37
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/package.json +1 -1
- package/src/apiconnectors.d.ts +29 -0
- package/src/apiconnectors.js +23 -0
- package/src/sdks/ai.d.ts +1 -0
- package/src/sdks/apiconnectors.d.ts +419 -0
- package/src/sdks/apiconnectors.js +134 -0
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './sdks/apiconnectors';
|
|
2
|
+
declare const ApiConnectors_base: new (options?: import("./client/http").HttpClientOptions) => {
|
|
3
|
+
readonly http: any;
|
|
4
|
+
forTenant(tenant: string): /*elided*/ any;
|
|
5
|
+
withAuthorization(authorization: import("./client/helpers").AuthorizationProvider): /*elided*/ any;
|
|
6
|
+
withCustomHeaders(headers: () => Record<string, string>): /*elided*/ any;
|
|
7
|
+
withHttpRequestExecutor(httpRequestExecutor: import("./client/http").HttpRequestExecutor): /*elided*/ any;
|
|
8
|
+
} & {
|
|
9
|
+
getConnector(variables: import("./sdks/apiconnectors").Exact<{
|
|
10
|
+
id: import("./sdks/apiconnectors").Scalars["ID"]["input"];
|
|
11
|
+
}>, options?: unknown): Promise<import("./sdks/apiconnectors").GetConnectorQuery>;
|
|
12
|
+
listConnectors(variables?: import("./sdks/apiconnectors").Exact<{
|
|
13
|
+
[key: string]: never;
|
|
14
|
+
}>, options?: unknown): Promise<import("./sdks/apiconnectors").ListConnectorsQuery>;
|
|
15
|
+
createConnector(variables: import("./sdks/apiconnectors").Exact<{
|
|
16
|
+
input: import("./sdks/apiconnectors").CreateConnectorInput;
|
|
17
|
+
}>, options?: unknown): Promise<import("./sdks/apiconnectors").CreateConnectorMutation>;
|
|
18
|
+
updateConnector(variables: import("./sdks/apiconnectors").Exact<{
|
|
19
|
+
input: import("./sdks/apiconnectors").UpdateConnectorInput;
|
|
20
|
+
}>, options?: unknown): Promise<import("./sdks/apiconnectors").UpdateConnectorMutation>;
|
|
21
|
+
removeConnector(variables: import("./sdks/apiconnectors").Exact<{
|
|
22
|
+
input: import("./sdks/apiconnectors").RemoveConnectorInput;
|
|
23
|
+
}>, options?: unknown): Promise<import("./sdks/apiconnectors").RemoveConnectorMutation>;
|
|
24
|
+
executeConnector(variables: import("./sdks/apiconnectors").Exact<{
|
|
25
|
+
input: import("./sdks/apiconnectors").ExecuteConnectorInput;
|
|
26
|
+
}>, options?: unknown): Promise<import("./sdks/apiconnectors").ExecuteConnectorMutation>;
|
|
27
|
+
};
|
|
28
|
+
export declare class ApiConnectors extends ApiConnectors_base {
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ApiConnectors = void 0;
|
|
18
|
+
const http_1 = require("./client/http");
|
|
19
|
+
const apiconnectors_1 = require("./sdks/apiconnectors");
|
|
20
|
+
__exportStar(require("./sdks/apiconnectors"), exports);
|
|
21
|
+
class ApiConnectors extends (0, http_1.HttpClientBuilder)(apiconnectors_1.serviceName, apiconnectors_1.getSdk) {
|
|
22
|
+
}
|
|
23
|
+
exports.ApiConnectors = ApiConnectors;
|
package/src/sdks/ai.d.ts
CHANGED
|
@@ -697,6 +697,7 @@ export type Mutation = {
|
|
|
697
697
|
draftAiAgent?: Maybe<AiAgentVersion>;
|
|
698
698
|
extractImageMetadata: ExtractImageMetadataResult;
|
|
699
699
|
publishAiAgentVersion: Array<AiAgentVersion>;
|
|
700
|
+
/** @deprecated Cadastre o backend da ferramenta como Connector (Nexo > Conectores) em vez de registrar diretamente por aqui. */
|
|
700
701
|
registerAiAgentTool?: Maybe<AiAgentTool>;
|
|
701
702
|
/** Apaga o agente e a autoria dele. Agente no ar precisa ser pausado antes. */
|
|
702
703
|
removeAiAgent: Scalars['Boolean']['output'];
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
export type Maybe<T> = T;
|
|
2
|
+
export type InputMaybe<T> = T;
|
|
3
|
+
export type Exact<T extends {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}> = {
|
|
6
|
+
[K in keyof T]: T[K];
|
|
7
|
+
};
|
|
8
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
+
};
|
|
11
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
+
};
|
|
14
|
+
export type MakeEmpty<T extends {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}, K extends keyof T> = {
|
|
17
|
+
[_ in K]?: never;
|
|
18
|
+
};
|
|
19
|
+
export type Incremental<T> = T | {
|
|
20
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
21
|
+
};
|
|
22
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
|
+
export type Scalars = {
|
|
24
|
+
ID: {
|
|
25
|
+
input: string;
|
|
26
|
+
output: string;
|
|
27
|
+
};
|
|
28
|
+
String: {
|
|
29
|
+
input: string;
|
|
30
|
+
output: string;
|
|
31
|
+
};
|
|
32
|
+
Boolean: {
|
|
33
|
+
input: boolean;
|
|
34
|
+
output: boolean;
|
|
35
|
+
};
|
|
36
|
+
Int: {
|
|
37
|
+
input: number;
|
|
38
|
+
output: number;
|
|
39
|
+
};
|
|
40
|
+
Float: {
|
|
41
|
+
input: number;
|
|
42
|
+
output: number;
|
|
43
|
+
};
|
|
44
|
+
Base64: {
|
|
45
|
+
input: object;
|
|
46
|
+
output: string;
|
|
47
|
+
};
|
|
48
|
+
CountryCode: {
|
|
49
|
+
input: string;
|
|
50
|
+
output: string;
|
|
51
|
+
};
|
|
52
|
+
Currency: {
|
|
53
|
+
input: string;
|
|
54
|
+
output: string;
|
|
55
|
+
};
|
|
56
|
+
DRN: {
|
|
57
|
+
input: string;
|
|
58
|
+
output: string;
|
|
59
|
+
};
|
|
60
|
+
Date: {
|
|
61
|
+
input: Date;
|
|
62
|
+
output: Date;
|
|
63
|
+
};
|
|
64
|
+
DateTime: {
|
|
65
|
+
input: Date;
|
|
66
|
+
output: Date;
|
|
67
|
+
};
|
|
68
|
+
EmailAddress: {
|
|
69
|
+
input: string;
|
|
70
|
+
output: string;
|
|
71
|
+
};
|
|
72
|
+
IPAddress: {
|
|
73
|
+
input: string;
|
|
74
|
+
output: string;
|
|
75
|
+
};
|
|
76
|
+
JSON: {
|
|
77
|
+
input: any;
|
|
78
|
+
output: any;
|
|
79
|
+
};
|
|
80
|
+
JSONObject: {
|
|
81
|
+
input: any;
|
|
82
|
+
output: any;
|
|
83
|
+
};
|
|
84
|
+
Locale: {
|
|
85
|
+
input: string;
|
|
86
|
+
output: string;
|
|
87
|
+
};
|
|
88
|
+
Number: {
|
|
89
|
+
input: string | number;
|
|
90
|
+
output: number;
|
|
91
|
+
};
|
|
92
|
+
PhoneNumber: {
|
|
93
|
+
input: string;
|
|
94
|
+
output: string;
|
|
95
|
+
};
|
|
96
|
+
Set: {
|
|
97
|
+
input: any;
|
|
98
|
+
output: any[];
|
|
99
|
+
};
|
|
100
|
+
Tag: {
|
|
101
|
+
input: string;
|
|
102
|
+
output: string;
|
|
103
|
+
};
|
|
104
|
+
TenantId: {
|
|
105
|
+
input: string;
|
|
106
|
+
output: string;
|
|
107
|
+
};
|
|
108
|
+
Timezone: {
|
|
109
|
+
input: string;
|
|
110
|
+
output: string;
|
|
111
|
+
};
|
|
112
|
+
URL: {
|
|
113
|
+
input: string;
|
|
114
|
+
output: string;
|
|
115
|
+
};
|
|
116
|
+
VariableName: {
|
|
117
|
+
input: string;
|
|
118
|
+
output: string;
|
|
119
|
+
};
|
|
120
|
+
Void: {
|
|
121
|
+
input: void;
|
|
122
|
+
output: void;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export type AgentInfo = {
|
|
126
|
+
id: Scalars['ID']['output'];
|
|
127
|
+
name: Scalars['String']['output'];
|
|
128
|
+
picture?: Maybe<Scalars['String']['output']>;
|
|
129
|
+
};
|
|
130
|
+
export declare enum AppInstanceStatus {
|
|
131
|
+
Active = "Active",
|
|
132
|
+
Failing = "Failing",
|
|
133
|
+
Inactive = "Inactive"
|
|
134
|
+
}
|
|
135
|
+
export declare enum Can {
|
|
136
|
+
Manage = "manage",
|
|
137
|
+
Read = "read",
|
|
138
|
+
Remove = "remove",
|
|
139
|
+
Write = "write"
|
|
140
|
+
}
|
|
141
|
+
export type Connector = {
|
|
142
|
+
createdAt: Scalars['DateTime']['output'];
|
|
143
|
+
credentialId?: Maybe<Scalars['ID']['output']>;
|
|
144
|
+
credentialsHeader?: Maybe<Scalars['String']['output']>;
|
|
145
|
+
drn: Scalars['DRN']['output'];
|
|
146
|
+
failingReason?: Maybe<Scalars['String']['output']>;
|
|
147
|
+
failingSince?: Maybe<Scalars['DateTime']['output']>;
|
|
148
|
+
headers: Array<ConnectorHeader>;
|
|
149
|
+
id: Scalars['ID']['output'];
|
|
150
|
+
method: ConnectorMethod;
|
|
151
|
+
name: Scalars['String']['output'];
|
|
152
|
+
/** Template do corpo (JSON ou form-urlencoded) com variáveis substituíveis. */
|
|
153
|
+
requestBodyTemplate?: Maybe<Scalars['String']['output']>;
|
|
154
|
+
/** Aceita compatibilidade com versões/cifras de TLS mais antigas no destino. */
|
|
155
|
+
requiresLegacyTls: Scalars['Boolean']['output'];
|
|
156
|
+
responseIsArray: Scalars['Boolean']['output'];
|
|
157
|
+
responseIsFile: Scalars['Boolean']['output'];
|
|
158
|
+
/** Template de mapeamento aplicado ao corpo bruto da resposta. */
|
|
159
|
+
responseMappingTemplate?: Maybe<Scalars['String']['output']>;
|
|
160
|
+
/** Nome sob o qual a resposta (mapeada) fica disponível para quem chamou o conector. */
|
|
161
|
+
responseVariableName?: Maybe<Scalars['String']['output']>;
|
|
162
|
+
secretHeaders: Array<ConnectorSecretHeader>;
|
|
163
|
+
status?: Maybe<AppInstanceStatus>;
|
|
164
|
+
stripArrayElementsWithUndefinedVariables: Scalars['Boolean']['output'];
|
|
165
|
+
stripUndefinedBodyVariables: Scalars['Boolean']['output'];
|
|
166
|
+
tags: Array<Scalars['Tag']['output']>;
|
|
167
|
+
timeoutMs: Scalars['Int']['output'];
|
|
168
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
169
|
+
url: Scalars['String']['output'];
|
|
170
|
+
useFormUrlEncoded: Scalars['Boolean']['output'];
|
|
171
|
+
};
|
|
172
|
+
export type ConnectorExecutionResult = {
|
|
173
|
+
data?: Maybe<Scalars['JSON']['output']>;
|
|
174
|
+
status: Scalars['Int']['output'];
|
|
175
|
+
};
|
|
176
|
+
export type ConnectorHeader = {
|
|
177
|
+
key: Scalars['String']['output'];
|
|
178
|
+
value: Scalars['String']['output'];
|
|
179
|
+
};
|
|
180
|
+
export type ConnectorHeaderInput = {
|
|
181
|
+
key: Scalars['String']['input'];
|
|
182
|
+
value: Scalars['String']['input'];
|
|
183
|
+
};
|
|
184
|
+
export declare enum ConnectorMethod {
|
|
185
|
+
Delete = "DELETE",
|
|
186
|
+
Get = "GET",
|
|
187
|
+
Patch = "PATCH",
|
|
188
|
+
Post = "POST",
|
|
189
|
+
Put = "PUT"
|
|
190
|
+
}
|
|
191
|
+
export type ConnectorSecretHeader = {
|
|
192
|
+
credentialId: Scalars['ID']['output'];
|
|
193
|
+
key: Scalars['String']['output'];
|
|
194
|
+
};
|
|
195
|
+
export type ConnectorSecretHeaderInput = {
|
|
196
|
+
credentialId: Scalars['ID']['input'];
|
|
197
|
+
key: Scalars['String']['input'];
|
|
198
|
+
};
|
|
199
|
+
export type CreateConnectorInput = {
|
|
200
|
+
credentialId?: InputMaybe<Scalars['ID']['input']>;
|
|
201
|
+
credentialsHeader?: InputMaybe<Scalars['String']['input']>;
|
|
202
|
+
headers?: InputMaybe<Array<ConnectorHeaderInput>>;
|
|
203
|
+
method: ConnectorMethod;
|
|
204
|
+
name: Scalars['String']['input'];
|
|
205
|
+
requestBodyTemplate?: InputMaybe<Scalars['String']['input']>;
|
|
206
|
+
requiresLegacyTls?: InputMaybe<Scalars['Boolean']['input']>;
|
|
207
|
+
responseIsArray?: InputMaybe<Scalars['Boolean']['input']>;
|
|
208
|
+
responseIsFile?: InputMaybe<Scalars['Boolean']['input']>;
|
|
209
|
+
responseMappingTemplate?: InputMaybe<Scalars['String']['input']>;
|
|
210
|
+
responseVariableName?: InputMaybe<Scalars['String']['input']>;
|
|
211
|
+
secretHeaders?: InputMaybe<Array<ConnectorSecretHeaderInput>>;
|
|
212
|
+
stripArrayElementsWithUndefinedVariables?: InputMaybe<Scalars['Boolean']['input']>;
|
|
213
|
+
stripUndefinedBodyVariables?: InputMaybe<Scalars['Boolean']['input']>;
|
|
214
|
+
tags?: InputMaybe<Array<Scalars['Tag']['input']>>;
|
|
215
|
+
timeoutMs?: InputMaybe<Scalars['Int']['input']>;
|
|
216
|
+
url: Scalars['String']['input'];
|
|
217
|
+
useFormUrlEncoded?: InputMaybe<Scalars['Boolean']['input']>;
|
|
218
|
+
};
|
|
219
|
+
export type ExecuteConnectorInput = {
|
|
220
|
+
/** Variaveis disponiveis para o template da URL/headers/corpo do Connector. Nada alem disso entra no contexto. */
|
|
221
|
+
args?: InputMaybe<Scalars['JSON']['input']>;
|
|
222
|
+
id: Scalars['ID']['input'];
|
|
223
|
+
};
|
|
224
|
+
export type I18nText = {
|
|
225
|
+
lang: Scalars['Locale']['output'];
|
|
226
|
+
value: Scalars['String']['output'];
|
|
227
|
+
};
|
|
228
|
+
export type I18nTextInput = {
|
|
229
|
+
lang: Scalars['Locale']['input'];
|
|
230
|
+
value: Scalars['String']['input'];
|
|
231
|
+
};
|
|
232
|
+
export type Mutation = {
|
|
233
|
+
createConnector: Connector;
|
|
234
|
+
/** Dispara um Connector fora do passo de fluxo e devolve a resposta imediatamente. */
|
|
235
|
+
executeConnector: ConnectorExecutionResult;
|
|
236
|
+
removeConnector?: Maybe<Connector>;
|
|
237
|
+
updateConnector: Connector;
|
|
238
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
239
|
+
};
|
|
240
|
+
export type MutationCreateConnectorArgs = {
|
|
241
|
+
input: CreateConnectorInput;
|
|
242
|
+
};
|
|
243
|
+
export type MutationExecuteConnectorArgs = {
|
|
244
|
+
input: ExecuteConnectorInput;
|
|
245
|
+
};
|
|
246
|
+
export type MutationRemoveConnectorArgs = {
|
|
247
|
+
input: RemoveConnectorInput;
|
|
248
|
+
};
|
|
249
|
+
export type MutationUpdateConnectorArgs = {
|
|
250
|
+
input: UpdateConnectorInput;
|
|
251
|
+
};
|
|
252
|
+
export type NumberMatcher = {
|
|
253
|
+
btw?: Maybe<Array<Scalars['Number']['output']>>;
|
|
254
|
+
eq?: Maybe<Scalars['Number']['output']>;
|
|
255
|
+
gt?: Maybe<Scalars['Number']['output']>;
|
|
256
|
+
gte?: Maybe<Scalars['Number']['output']>;
|
|
257
|
+
lt?: Maybe<Scalars['Number']['output']>;
|
|
258
|
+
lte?: Maybe<Scalars['Number']['output']>;
|
|
259
|
+
ne?: Maybe<Scalars['Number']['output']>;
|
|
260
|
+
};
|
|
261
|
+
export type NumberMatcherInput = {
|
|
262
|
+
btw?: InputMaybe<Array<Scalars['Number']['input']>>;
|
|
263
|
+
eq?: InputMaybe<Scalars['Number']['input']>;
|
|
264
|
+
gt?: InputMaybe<Scalars['Number']['input']>;
|
|
265
|
+
gte?: InputMaybe<Scalars['Number']['input']>;
|
|
266
|
+
lt?: InputMaybe<Scalars['Number']['input']>;
|
|
267
|
+
lte?: InputMaybe<Scalars['Number']['input']>;
|
|
268
|
+
ne?: InputMaybe<Scalars['Number']['input']>;
|
|
269
|
+
};
|
|
270
|
+
export type PageInfo = {
|
|
271
|
+
hasNext: Scalars['Boolean']['output'];
|
|
272
|
+
next?: Maybe<Scalars['Base64']['output']>;
|
|
273
|
+
};
|
|
274
|
+
export type Query = {
|
|
275
|
+
app?: Maybe<Scalars['DRN']['output']>;
|
|
276
|
+
getConnector?: Maybe<Connector>;
|
|
277
|
+
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
278
|
+
listConnectors: Array<Connector>;
|
|
279
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
280
|
+
};
|
|
281
|
+
export type QueryGetConnectorArgs = {
|
|
282
|
+
id: Scalars['ID']['input'];
|
|
283
|
+
};
|
|
284
|
+
export type RemoveConnectorInput = {
|
|
285
|
+
id: Scalars['ID']['input'];
|
|
286
|
+
};
|
|
287
|
+
export type SearchResultsFacet = {
|
|
288
|
+
name: Scalars['String']['output'];
|
|
289
|
+
stats?: Maybe<SearchResultsFacetStats>;
|
|
290
|
+
values?: Maybe<Array<SearchResultsFacetValue>>;
|
|
291
|
+
};
|
|
292
|
+
export type SearchResultsFacetStats = {
|
|
293
|
+
max?: Maybe<Scalars['Float']['output']>;
|
|
294
|
+
min?: Maybe<Scalars['Float']['output']>;
|
|
295
|
+
};
|
|
296
|
+
export type SearchResultsFacetValue = {
|
|
297
|
+
count: Scalars['Float']['output'];
|
|
298
|
+
value: Scalars['String']['output'];
|
|
299
|
+
};
|
|
300
|
+
export type SearchResultsStats = {
|
|
301
|
+
found: Scalars['Float']['output'];
|
|
302
|
+
outOf: Scalars['Float']['output'];
|
|
303
|
+
page: Scalars['Float']['output'];
|
|
304
|
+
perPage: Scalars['Float']['output'];
|
|
305
|
+
searchTime: Scalars['Float']['output'];
|
|
306
|
+
totalPages: Scalars['Float']['output'];
|
|
307
|
+
};
|
|
308
|
+
export type StringMatcher = {
|
|
309
|
+
btw?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
310
|
+
ct?: Maybe<Scalars['String']['output']>;
|
|
311
|
+
cti?: Maybe<Scalars['String']['output']>;
|
|
312
|
+
eq?: Maybe<Scalars['String']['output']>;
|
|
313
|
+
eqi?: Maybe<Scalars['String']['output']>;
|
|
314
|
+
gt?: Maybe<Scalars['String']['output']>;
|
|
315
|
+
gte?: Maybe<Scalars['String']['output']>;
|
|
316
|
+
in?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
317
|
+
lt?: Maybe<Scalars['String']['output']>;
|
|
318
|
+
lte?: Maybe<Scalars['String']['output']>;
|
|
319
|
+
ne?: Maybe<Scalars['String']['output']>;
|
|
320
|
+
};
|
|
321
|
+
export type StringMatcherInput = {
|
|
322
|
+
btw?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
323
|
+
ct?: InputMaybe<Scalars['String']['input']>;
|
|
324
|
+
cti?: InputMaybe<Scalars['String']['input']>;
|
|
325
|
+
eq?: InputMaybe<Scalars['String']['input']>;
|
|
326
|
+
eqi?: InputMaybe<Scalars['String']['input']>;
|
|
327
|
+
gt?: InputMaybe<Scalars['String']['input']>;
|
|
328
|
+
gte?: InputMaybe<Scalars['String']['input']>;
|
|
329
|
+
in?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
330
|
+
lt?: InputMaybe<Scalars['String']['input']>;
|
|
331
|
+
lte?: InputMaybe<Scalars['String']['input']>;
|
|
332
|
+
ne?: InputMaybe<Scalars['String']['input']>;
|
|
333
|
+
};
|
|
334
|
+
export declare enum Typenames {
|
|
335
|
+
Any = "Any",
|
|
336
|
+
Connector = "Connector",
|
|
337
|
+
GraphqlConnections = "GraphqlConnections",
|
|
338
|
+
GraphqlSubscriptions = "GraphqlSubscriptions"
|
|
339
|
+
}
|
|
340
|
+
export type UpdateConnectorInput = {
|
|
341
|
+
credentialId?: InputMaybe<Scalars['ID']['input']>;
|
|
342
|
+
credentialsHeader?: InputMaybe<Scalars['String']['input']>;
|
|
343
|
+
headers?: InputMaybe<Array<ConnectorHeaderInput>>;
|
|
344
|
+
id: Scalars['ID']['input'];
|
|
345
|
+
method?: InputMaybe<ConnectorMethod>;
|
|
346
|
+
name?: InputMaybe<Scalars['String']['input']>;
|
|
347
|
+
requestBodyTemplate?: InputMaybe<Scalars['String']['input']>;
|
|
348
|
+
requiresLegacyTls?: InputMaybe<Scalars['Boolean']['input']>;
|
|
349
|
+
responseIsArray?: InputMaybe<Scalars['Boolean']['input']>;
|
|
350
|
+
responseIsFile?: InputMaybe<Scalars['Boolean']['input']>;
|
|
351
|
+
responseMappingTemplate?: InputMaybe<Scalars['String']['input']>;
|
|
352
|
+
responseVariableName?: InputMaybe<Scalars['String']['input']>;
|
|
353
|
+
secretHeaders?: InputMaybe<Array<ConnectorSecretHeaderInput>>;
|
|
354
|
+
status?: InputMaybe<AppInstanceStatus>;
|
|
355
|
+
stripArrayElementsWithUndefinedVariables?: InputMaybe<Scalars['Boolean']['input']>;
|
|
356
|
+
stripUndefinedBodyVariables?: InputMaybe<Scalars['Boolean']['input']>;
|
|
357
|
+
tags?: InputMaybe<Array<Scalars['Tag']['input']>>;
|
|
358
|
+
timeoutMs?: InputMaybe<Scalars['Int']['input']>;
|
|
359
|
+
url?: InputMaybe<Scalars['String']['input']>;
|
|
360
|
+
useFormUrlEncoded?: InputMaybe<Scalars['Boolean']['input']>;
|
|
361
|
+
};
|
|
362
|
+
export type ConnectorFragment = (Pick<Connector, 'id' | 'name' | 'drn' | 'method' | 'url' | 'requiresLegacyTls' | 'credentialId' | 'credentialsHeader' | 'requestBodyTemplate' | 'stripUndefinedBodyVariables' | 'stripArrayElementsWithUndefinedVariables' | 'useFormUrlEncoded' | 'responseVariableName' | 'responseMappingTemplate' | 'responseIsArray' | 'responseIsFile' | 'timeoutMs' | 'status' | 'failingReason' | 'failingSince' | 'tags' | 'createdAt' | 'updatedAt'> & {
|
|
363
|
+
headers: Array<Pick<ConnectorHeader, 'key' | 'value'>>;
|
|
364
|
+
secretHeaders: Array<Pick<ConnectorSecretHeader, 'key' | 'credentialId'>>;
|
|
365
|
+
});
|
|
366
|
+
export type GetConnectorQueryVariables = Exact<{
|
|
367
|
+
id: Scalars['ID']['input'];
|
|
368
|
+
}>;
|
|
369
|
+
export type GetConnectorQuery = {
|
|
370
|
+
getConnector?: Maybe<ConnectorFragment>;
|
|
371
|
+
};
|
|
372
|
+
export type ListConnectorsQueryVariables = Exact<{
|
|
373
|
+
[key: string]: never;
|
|
374
|
+
}>;
|
|
375
|
+
export type ListConnectorsQuery = {
|
|
376
|
+
listConnectors: Array<ConnectorFragment>;
|
|
377
|
+
};
|
|
378
|
+
export type CreateConnectorMutationVariables = Exact<{
|
|
379
|
+
input: CreateConnectorInput;
|
|
380
|
+
}>;
|
|
381
|
+
export type CreateConnectorMutation = {
|
|
382
|
+
createConnector: ConnectorFragment;
|
|
383
|
+
};
|
|
384
|
+
export type UpdateConnectorMutationVariables = Exact<{
|
|
385
|
+
input: UpdateConnectorInput;
|
|
386
|
+
}>;
|
|
387
|
+
export type UpdateConnectorMutation = {
|
|
388
|
+
updateConnector: ConnectorFragment;
|
|
389
|
+
};
|
|
390
|
+
export type RemoveConnectorMutationVariables = Exact<{
|
|
391
|
+
input: RemoveConnectorInput;
|
|
392
|
+
}>;
|
|
393
|
+
export type RemoveConnectorMutation = {
|
|
394
|
+
removeConnector?: Maybe<ConnectorFragment>;
|
|
395
|
+
};
|
|
396
|
+
export type ExecuteConnectorMutationVariables = Exact<{
|
|
397
|
+
input: ExecuteConnectorInput;
|
|
398
|
+
}>;
|
|
399
|
+
export type ExecuteConnectorMutation = {
|
|
400
|
+
executeConnector: Pick<ConnectorExecutionResult, 'status' | 'data'>;
|
|
401
|
+
};
|
|
402
|
+
export declare const ConnectorFragmentDoc = "\n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
403
|
+
export declare const GetConnectorDocument = "\n query getConnector($id: ID!) {\n getConnector(id: $id) {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
404
|
+
export declare const ListConnectorsDocument = "\n query listConnectors {\n listConnectors {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
405
|
+
export declare const CreateConnectorDocument = "\n mutation createConnector($input: CreateConnectorInput!) {\n createConnector(input: $input) {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
406
|
+
export declare const UpdateConnectorDocument = "\n mutation updateConnector($input: UpdateConnectorInput!) {\n updateConnector(input: $input) {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
407
|
+
export declare const RemoveConnectorDocument = "\n mutation removeConnector($input: RemoveConnectorInput!) {\n removeConnector(input: $input) {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
408
|
+
export declare const ExecuteConnectorDocument = "\n mutation executeConnector($input: ExecuteConnectorInput!) {\n executeConnector(input: $input) {\n status\n data\n }\n}\n ";
|
|
409
|
+
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
410
|
+
export declare function getSdk<C>(requester: Requester<C>): {
|
|
411
|
+
getConnector(variables: GetConnectorQueryVariables, options?: C): Promise<GetConnectorQuery>;
|
|
412
|
+
listConnectors(variables?: ListConnectorsQueryVariables, options?: C): Promise<ListConnectorsQuery>;
|
|
413
|
+
createConnector(variables: CreateConnectorMutationVariables, options?: C): Promise<CreateConnectorMutation>;
|
|
414
|
+
updateConnector(variables: UpdateConnectorMutationVariables, options?: C): Promise<UpdateConnectorMutation>;
|
|
415
|
+
removeConnector(variables: RemoveConnectorMutationVariables, options?: C): Promise<RemoveConnectorMutation>;
|
|
416
|
+
executeConnector(variables: ExecuteConnectorMutationVariables, options?: C): Promise<ExecuteConnectorMutation>;
|
|
417
|
+
};
|
|
418
|
+
export type Sdk = ReturnType<typeof getSdk>;
|
|
419
|
+
export declare const serviceName = "@droz/apiconnectors";
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.serviceName = exports.ExecuteConnectorDocument = exports.RemoveConnectorDocument = exports.UpdateConnectorDocument = exports.CreateConnectorDocument = exports.ListConnectorsDocument = exports.GetConnectorDocument = exports.ConnectorFragmentDoc = exports.Typenames = exports.ConnectorMethod = exports.Can = exports.AppInstanceStatus = void 0;
|
|
5
|
+
exports.getSdk = getSdk;
|
|
6
|
+
var AppInstanceStatus;
|
|
7
|
+
(function (AppInstanceStatus) {
|
|
8
|
+
AppInstanceStatus["Active"] = "Active";
|
|
9
|
+
AppInstanceStatus["Failing"] = "Failing";
|
|
10
|
+
AppInstanceStatus["Inactive"] = "Inactive";
|
|
11
|
+
})(AppInstanceStatus || (exports.AppInstanceStatus = AppInstanceStatus = {}));
|
|
12
|
+
var Can;
|
|
13
|
+
(function (Can) {
|
|
14
|
+
Can["Manage"] = "manage";
|
|
15
|
+
Can["Read"] = "read";
|
|
16
|
+
Can["Remove"] = "remove";
|
|
17
|
+
Can["Write"] = "write";
|
|
18
|
+
})(Can || (exports.Can = Can = {}));
|
|
19
|
+
var ConnectorMethod;
|
|
20
|
+
(function (ConnectorMethod) {
|
|
21
|
+
ConnectorMethod["Delete"] = "DELETE";
|
|
22
|
+
ConnectorMethod["Get"] = "GET";
|
|
23
|
+
ConnectorMethod["Patch"] = "PATCH";
|
|
24
|
+
ConnectorMethod["Post"] = "POST";
|
|
25
|
+
ConnectorMethod["Put"] = "PUT";
|
|
26
|
+
})(ConnectorMethod || (exports.ConnectorMethod = ConnectorMethod = {}));
|
|
27
|
+
var Typenames;
|
|
28
|
+
(function (Typenames) {
|
|
29
|
+
Typenames["Any"] = "Any";
|
|
30
|
+
Typenames["Connector"] = "Connector";
|
|
31
|
+
Typenames["GraphqlConnections"] = "GraphqlConnections";
|
|
32
|
+
Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
|
|
33
|
+
})(Typenames || (exports.Typenames = Typenames = {}));
|
|
34
|
+
exports.ConnectorFragmentDoc = `
|
|
35
|
+
fragment connector on Connector {
|
|
36
|
+
id
|
|
37
|
+
name
|
|
38
|
+
drn
|
|
39
|
+
method
|
|
40
|
+
url
|
|
41
|
+
requiresLegacyTls
|
|
42
|
+
headers {
|
|
43
|
+
key
|
|
44
|
+
value
|
|
45
|
+
}
|
|
46
|
+
secretHeaders {
|
|
47
|
+
key
|
|
48
|
+
credentialId
|
|
49
|
+
}
|
|
50
|
+
credentialId
|
|
51
|
+
credentialsHeader
|
|
52
|
+
requestBodyTemplate
|
|
53
|
+
stripUndefinedBodyVariables
|
|
54
|
+
stripArrayElementsWithUndefinedVariables
|
|
55
|
+
useFormUrlEncoded
|
|
56
|
+
responseVariableName
|
|
57
|
+
responseMappingTemplate
|
|
58
|
+
responseIsArray
|
|
59
|
+
responseIsFile
|
|
60
|
+
timeoutMs
|
|
61
|
+
status
|
|
62
|
+
failingReason
|
|
63
|
+
failingSince
|
|
64
|
+
tags
|
|
65
|
+
createdAt
|
|
66
|
+
updatedAt
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
exports.GetConnectorDocument = `
|
|
70
|
+
query getConnector($id: ID!) {
|
|
71
|
+
getConnector(id: $id) {
|
|
72
|
+
...connector
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
${exports.ConnectorFragmentDoc}`;
|
|
76
|
+
exports.ListConnectorsDocument = `
|
|
77
|
+
query listConnectors {
|
|
78
|
+
listConnectors {
|
|
79
|
+
...connector
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
${exports.ConnectorFragmentDoc}`;
|
|
83
|
+
exports.CreateConnectorDocument = `
|
|
84
|
+
mutation createConnector($input: CreateConnectorInput!) {
|
|
85
|
+
createConnector(input: $input) {
|
|
86
|
+
...connector
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
${exports.ConnectorFragmentDoc}`;
|
|
90
|
+
exports.UpdateConnectorDocument = `
|
|
91
|
+
mutation updateConnector($input: UpdateConnectorInput!) {
|
|
92
|
+
updateConnector(input: $input) {
|
|
93
|
+
...connector
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
${exports.ConnectorFragmentDoc}`;
|
|
97
|
+
exports.RemoveConnectorDocument = `
|
|
98
|
+
mutation removeConnector($input: RemoveConnectorInput!) {
|
|
99
|
+
removeConnector(input: $input) {
|
|
100
|
+
...connector
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
${exports.ConnectorFragmentDoc}`;
|
|
104
|
+
exports.ExecuteConnectorDocument = `
|
|
105
|
+
mutation executeConnector($input: ExecuteConnectorInput!) {
|
|
106
|
+
executeConnector(input: $input) {
|
|
107
|
+
status
|
|
108
|
+
data
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
function getSdk(requester) {
|
|
113
|
+
return {
|
|
114
|
+
getConnector(variables, options) {
|
|
115
|
+
return requester(exports.GetConnectorDocument, variables, options);
|
|
116
|
+
},
|
|
117
|
+
listConnectors(variables, options) {
|
|
118
|
+
return requester(exports.ListConnectorsDocument, variables, options);
|
|
119
|
+
},
|
|
120
|
+
createConnector(variables, options) {
|
|
121
|
+
return requester(exports.CreateConnectorDocument, variables, options);
|
|
122
|
+
},
|
|
123
|
+
updateConnector(variables, options) {
|
|
124
|
+
return requester(exports.UpdateConnectorDocument, variables, options);
|
|
125
|
+
},
|
|
126
|
+
removeConnector(variables, options) {
|
|
127
|
+
return requester(exports.RemoveConnectorDocument, variables, options);
|
|
128
|
+
},
|
|
129
|
+
executeConnector(variables, options) {
|
|
130
|
+
return requester(exports.ExecuteConnectorDocument, variables, options);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
exports.serviceName = '@droz/apiconnectors';
|