@aui.io/aui-client 1.2.30 → 1.2.31
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/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/controllerApi/client/Client.d.ts +11 -0
- package/dist/cjs/api/resources/controllerApi/client/Client.js +61 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/controllerApi/client/Client.d.mts +11 -0
- package/dist/esm/api/resources/controllerApi/client/Client.mjs +61 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +49 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -45,8 +45,8 @@ class ApolloClient {
|
|
|
45
45
|
"x-network-api-key": _options === null || _options === void 0 ? void 0 : _options.networkApiKey,
|
|
46
46
|
"X-Fern-Language": "JavaScript",
|
|
47
47
|
"X-Fern-SDK-Name": "@aui.io/aui-client",
|
|
48
|
-
"X-Fern-SDK-Version": "1.2.
|
|
49
|
-
"User-Agent": "@aui.io/aui-client/1.2.
|
|
48
|
+
"X-Fern-SDK-Version": "1.2.31",
|
|
49
|
+
"User-Agent": "@aui.io/aui-client/1.2.31",
|
|
50
50
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
51
51
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
52
52
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -39,6 +39,17 @@ export declare class ControllerApi {
|
|
|
39
39
|
*/
|
|
40
40
|
createTask(request: Apollo.CreateTaskRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.CreateTaskResponse>;
|
|
41
41
|
private __createTask;
|
|
42
|
+
/**
|
|
43
|
+
* @param {string} taskId
|
|
44
|
+
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @throws {@link Apollo.UnprocessableEntityError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.controllerApi.getTask("task_id")
|
|
50
|
+
*/
|
|
51
|
+
getTask(taskId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.CreateTaskResponse>;
|
|
52
|
+
private __getTask;
|
|
42
53
|
/**
|
|
43
54
|
* @param {string} taskId
|
|
44
55
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -205,6 +205,67 @@ class ControllerApi {
|
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* @param {string} taskId
|
|
210
|
+
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
211
|
+
*
|
|
212
|
+
* @throws {@link Apollo.UnprocessableEntityError}
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* await client.controllerApi.getTask("task_id")
|
|
216
|
+
*/
|
|
217
|
+
getTask(taskId, requestOptions) {
|
|
218
|
+
return core.HttpResponsePromise.fromPromise(this.__getTask(taskId, requestOptions));
|
|
219
|
+
}
|
|
220
|
+
__getTask(taskId, requestOptions) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
223
|
+
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
224
|
+
"x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
|
|
225
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
226
|
+
const _response = yield core.fetcher({
|
|
227
|
+
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, `api/v1/external/tasks/${core.url.encodePathParam(taskId)}`),
|
|
228
|
+
method: "GET",
|
|
229
|
+
headers: _headers,
|
|
230
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
231
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
232
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
233
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
234
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
235
|
+
logging: this._options.logging,
|
|
236
|
+
});
|
|
237
|
+
if (_response.ok) {
|
|
238
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
239
|
+
}
|
|
240
|
+
if (_response.error.reason === "status-code") {
|
|
241
|
+
switch (_response.error.statusCode) {
|
|
242
|
+
case 422:
|
|
243
|
+
throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
244
|
+
default:
|
|
245
|
+
throw new errors.ApolloError({
|
|
246
|
+
statusCode: _response.error.statusCode,
|
|
247
|
+
body: _response.error.body,
|
|
248
|
+
rawResponse: _response.rawResponse,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
switch (_response.error.reason) {
|
|
253
|
+
case "non-json":
|
|
254
|
+
throw new errors.ApolloError({
|
|
255
|
+
statusCode: _response.error.statusCode,
|
|
256
|
+
body: _response.error.rawBody,
|
|
257
|
+
rawResponse: _response.rawResponse,
|
|
258
|
+
});
|
|
259
|
+
case "timeout":
|
|
260
|
+
throw new errors.ApolloTimeoutError("Timeout exceeded when calling GET /api/v1/external/tasks/{task_id}.");
|
|
261
|
+
case "unknown":
|
|
262
|
+
throw new errors.ApolloError({
|
|
263
|
+
message: _response.error.errorMessage,
|
|
264
|
+
rawResponse: _response.rawResponse,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
208
269
|
/**
|
|
209
270
|
* @param {string} taskId
|
|
210
271
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.31";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -9,8 +9,8 @@ export class ApolloClient {
|
|
|
9
9
|
"x-network-api-key": _options === null || _options === void 0 ? void 0 : _options.networkApiKey,
|
|
10
10
|
"X-Fern-Language": "JavaScript",
|
|
11
11
|
"X-Fern-SDK-Name": "@aui.io/aui-client",
|
|
12
|
-
"X-Fern-SDK-Version": "1.2.
|
|
13
|
-
"User-Agent": "@aui.io/aui-client/1.2.
|
|
12
|
+
"X-Fern-SDK-Version": "1.2.31",
|
|
13
|
+
"User-Agent": "@aui.io/aui-client/1.2.31",
|
|
14
14
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
15
15
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
16
16
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -39,6 +39,17 @@ export declare class ControllerApi {
|
|
|
39
39
|
*/
|
|
40
40
|
createTask(request: Apollo.CreateTaskRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.CreateTaskResponse>;
|
|
41
41
|
private __createTask;
|
|
42
|
+
/**
|
|
43
|
+
* @param {string} taskId
|
|
44
|
+
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @throws {@link Apollo.UnprocessableEntityError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.controllerApi.getTask("task_id")
|
|
50
|
+
*/
|
|
51
|
+
getTask(taskId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.CreateTaskResponse>;
|
|
52
|
+
private __getTask;
|
|
42
53
|
/**
|
|
43
54
|
* @param {string} taskId
|
|
44
55
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -169,6 +169,67 @@ export class ControllerApi {
|
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* @param {string} taskId
|
|
174
|
+
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
175
|
+
*
|
|
176
|
+
* @throws {@link Apollo.UnprocessableEntityError}
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* await client.controllerApi.getTask("task_id")
|
|
180
|
+
*/
|
|
181
|
+
getTask(taskId, requestOptions) {
|
|
182
|
+
return core.HttpResponsePromise.fromPromise(this.__getTask(taskId, requestOptions));
|
|
183
|
+
}
|
|
184
|
+
__getTask(taskId, requestOptions) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
187
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
188
|
+
"x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
|
|
189
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
190
|
+
const _response = yield core.fetcher({
|
|
191
|
+
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, `api/v1/external/tasks/${core.url.encodePathParam(taskId)}`),
|
|
192
|
+
method: "GET",
|
|
193
|
+
headers: _headers,
|
|
194
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
195
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
196
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
197
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
198
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
199
|
+
logging: this._options.logging,
|
|
200
|
+
});
|
|
201
|
+
if (_response.ok) {
|
|
202
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
203
|
+
}
|
|
204
|
+
if (_response.error.reason === "status-code") {
|
|
205
|
+
switch (_response.error.statusCode) {
|
|
206
|
+
case 422:
|
|
207
|
+
throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
208
|
+
default:
|
|
209
|
+
throw new errors.ApolloError({
|
|
210
|
+
statusCode: _response.error.statusCode,
|
|
211
|
+
body: _response.error.body,
|
|
212
|
+
rawResponse: _response.rawResponse,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
switch (_response.error.reason) {
|
|
217
|
+
case "non-json":
|
|
218
|
+
throw new errors.ApolloError({
|
|
219
|
+
statusCode: _response.error.statusCode,
|
|
220
|
+
body: _response.error.rawBody,
|
|
221
|
+
rawResponse: _response.rawResponse,
|
|
222
|
+
});
|
|
223
|
+
case "timeout":
|
|
224
|
+
throw new errors.ApolloTimeoutError("Timeout exceeded when calling GET /api/v1/external/tasks/{task_id}.");
|
|
225
|
+
case "unknown":
|
|
226
|
+
throw new errors.ApolloError({
|
|
227
|
+
message: _response.error.errorMessage,
|
|
228
|
+
rawResponse: _response.rawResponse,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
172
233
|
/**
|
|
173
234
|
* @param {string} taskId
|
|
174
235
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.31";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.2.
|
|
1
|
+
export const SDK_VERSION = "1.2.31";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -101,6 +101,55 @@ await client.controllerApi.createTask({
|
|
|
101
101
|
</dl>
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
</dd>
|
|
105
|
+
</dl>
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
<details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getTask</a>(taskId) -> Apollo.CreateTaskResponse</code></summary>
|
|
109
|
+
<dl>
|
|
110
|
+
<dd>
|
|
111
|
+
|
|
112
|
+
#### 🔌 Usage
|
|
113
|
+
|
|
114
|
+
<dl>
|
|
115
|
+
<dd>
|
|
116
|
+
|
|
117
|
+
<dl>
|
|
118
|
+
<dd>
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
await client.controllerApi.getTask("task_id");
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
</dd>
|
|
125
|
+
</dl>
|
|
126
|
+
</dd>
|
|
127
|
+
</dl>
|
|
128
|
+
|
|
129
|
+
#### ⚙️ Parameters
|
|
130
|
+
|
|
131
|
+
<dl>
|
|
132
|
+
<dd>
|
|
133
|
+
|
|
134
|
+
<dl>
|
|
135
|
+
<dd>
|
|
136
|
+
|
|
137
|
+
**taskId:** `string`
|
|
138
|
+
|
|
139
|
+
</dd>
|
|
140
|
+
</dl>
|
|
141
|
+
|
|
142
|
+
<dl>
|
|
143
|
+
<dd>
|
|
144
|
+
|
|
145
|
+
**requestOptions:** `ControllerApi.RequestOptions`
|
|
146
|
+
|
|
147
|
+
</dd>
|
|
148
|
+
</dl>
|
|
149
|
+
</dd>
|
|
150
|
+
</dl>
|
|
151
|
+
|
|
152
|
+
|
|
104
153
|
</dd>
|
|
105
154
|
</dl>
|
|
106
155
|
</details>
|