minikai 1.6.1 → 1.7.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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/skills/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/skills/client/Client.js +51 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/skills/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/skills/client/Client.mjs +51 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +63 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "minikai",
|
|
46
|
-
"X-Fern-SDK-Version": "1.
|
|
47
|
-
"User-Agent": "minikai/1.
|
|
46
|
+
"X-Fern-SDK-Version": "1.7.0",
|
|
47
|
+
"User-Agent": "minikai/1.7.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -97,6 +97,20 @@ export declare class SkillsClient {
|
|
|
97
97
|
*/
|
|
98
98
|
submitDraftSkill(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
|
|
99
99
|
private __submitDraftSkill;
|
|
100
|
+
/**
|
|
101
|
+
* Return an archived skill to active, making it available to the workspace again.
|
|
102
|
+
*
|
|
103
|
+
* @param {string} id
|
|
104
|
+
* @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link Minikai.BadRequestError}
|
|
107
|
+
* @throws {@link Minikai.NotFoundError}
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* await client.skills.restoreSkill("id")
|
|
111
|
+
*/
|
|
112
|
+
restoreSkill(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
|
|
113
|
+
private __restoreSkill;
|
|
100
114
|
/**
|
|
101
115
|
* Permanently remove a draft skill and its assets.
|
|
102
116
|
*
|
|
@@ -369,6 +369,57 @@ class SkillsClient {
|
|
|
369
369
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/v1/Skills/drafts/{id}/submit");
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
+
/**
|
|
373
|
+
* Return an archived skill to active, making it available to the workspace again.
|
|
374
|
+
*
|
|
375
|
+
* @param {string} id
|
|
376
|
+
* @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
377
|
+
*
|
|
378
|
+
* @throws {@link Minikai.BadRequestError}
|
|
379
|
+
* @throws {@link Minikai.NotFoundError}
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* await client.skills.restoreSkill("id")
|
|
383
|
+
*/
|
|
384
|
+
restoreSkill(id, requestOptions) {
|
|
385
|
+
return core.HttpResponsePromise.fromPromise(this.__restoreSkill(id, requestOptions));
|
|
386
|
+
}
|
|
387
|
+
__restoreSkill(id, requestOptions) {
|
|
388
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
389
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
390
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
391
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
392
|
+
const _response = yield core.fetcher({
|
|
393
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Default, `api/v1/Skills/${core.url.encodePathParam(id)}/restore`),
|
|
394
|
+
method: "POST",
|
|
395
|
+
headers: _headers,
|
|
396
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
397
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
398
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
399
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
400
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
401
|
+
logging: this._options.logging,
|
|
402
|
+
});
|
|
403
|
+
if (_response.ok) {
|
|
404
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
405
|
+
}
|
|
406
|
+
if (_response.error.reason === "status-code") {
|
|
407
|
+
switch (_response.error.statusCode) {
|
|
408
|
+
case 400:
|
|
409
|
+
throw new Minikai.BadRequestError(_response.error.body, _response.rawResponse);
|
|
410
|
+
case 404:
|
|
411
|
+
throw new Minikai.NotFoundError(_response.error.body, _response.rawResponse);
|
|
412
|
+
default:
|
|
413
|
+
throw new errors.MinikaiError({
|
|
414
|
+
statusCode: _response.error.statusCode,
|
|
415
|
+
body: _response.error.body,
|
|
416
|
+
rawResponse: _response.rawResponse,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/v1/Skills/{id}/restore");
|
|
421
|
+
});
|
|
422
|
+
}
|
|
372
423
|
/**
|
|
373
424
|
* Permanently remove a draft skill and its assets.
|
|
374
425
|
*
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.7.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "minikai",
|
|
9
|
-
"X-Fern-SDK-Version": "1.
|
|
10
|
-
"User-Agent": "minikai/1.
|
|
9
|
+
"X-Fern-SDK-Version": "1.7.0",
|
|
10
|
+
"User-Agent": "minikai/1.7.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -97,6 +97,20 @@ export declare class SkillsClient {
|
|
|
97
97
|
*/
|
|
98
98
|
submitDraftSkill(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
|
|
99
99
|
private __submitDraftSkill;
|
|
100
|
+
/**
|
|
101
|
+
* Return an archived skill to active, making it available to the workspace again.
|
|
102
|
+
*
|
|
103
|
+
* @param {string} id
|
|
104
|
+
* @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link Minikai.BadRequestError}
|
|
107
|
+
* @throws {@link Minikai.NotFoundError}
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* await client.skills.restoreSkill("id")
|
|
111
|
+
*/
|
|
112
|
+
restoreSkill(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
|
|
113
|
+
private __restoreSkill;
|
|
100
114
|
/**
|
|
101
115
|
* Permanently remove a draft skill and its assets.
|
|
102
116
|
*
|
|
@@ -333,6 +333,57 @@ export class SkillsClient {
|
|
|
333
333
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/v1/Skills/drafts/{id}/submit");
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Return an archived skill to active, making it available to the workspace again.
|
|
338
|
+
*
|
|
339
|
+
* @param {string} id
|
|
340
|
+
* @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
341
|
+
*
|
|
342
|
+
* @throws {@link Minikai.BadRequestError}
|
|
343
|
+
* @throws {@link Minikai.NotFoundError}
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* await client.skills.restoreSkill("id")
|
|
347
|
+
*/
|
|
348
|
+
restoreSkill(id, requestOptions) {
|
|
349
|
+
return core.HttpResponsePromise.fromPromise(this.__restoreSkill(id, requestOptions));
|
|
350
|
+
}
|
|
351
|
+
__restoreSkill(id, requestOptions) {
|
|
352
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
353
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
354
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
355
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
356
|
+
const _response = yield core.fetcher({
|
|
357
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Default, `api/v1/Skills/${core.url.encodePathParam(id)}/restore`),
|
|
358
|
+
method: "POST",
|
|
359
|
+
headers: _headers,
|
|
360
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
361
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
362
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
363
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
364
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
365
|
+
logging: this._options.logging,
|
|
366
|
+
});
|
|
367
|
+
if (_response.ok) {
|
|
368
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
369
|
+
}
|
|
370
|
+
if (_response.error.reason === "status-code") {
|
|
371
|
+
switch (_response.error.statusCode) {
|
|
372
|
+
case 400:
|
|
373
|
+
throw new Minikai.BadRequestError(_response.error.body, _response.rawResponse);
|
|
374
|
+
case 404:
|
|
375
|
+
throw new Minikai.NotFoundError(_response.error.body, _response.rawResponse);
|
|
376
|
+
default:
|
|
377
|
+
throw new errors.MinikaiError({
|
|
378
|
+
statusCode: _response.error.statusCode,
|
|
379
|
+
body: _response.error.body,
|
|
380
|
+
rawResponse: _response.rawResponse,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/v1/Skills/{id}/restore");
|
|
385
|
+
});
|
|
386
|
+
}
|
|
336
387
|
/**
|
|
337
388
|
* Permanently remove a draft skill and its assets.
|
|
338
389
|
*
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.7.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.7.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -3600,6 +3600,69 @@ await client.skills.submitDraftSkill("id");
|
|
|
3600
3600
|
</dl>
|
|
3601
3601
|
|
|
3602
3602
|
|
|
3603
|
+
</dd>
|
|
3604
|
+
</dl>
|
|
3605
|
+
</details>
|
|
3606
|
+
|
|
3607
|
+
<details><summary><code>client.skills.<a href="/src/api/resources/skills/client/Client.ts">restoreSkill</a>(id) -> Minikai.SkillDto</code></summary>
|
|
3608
|
+
<dl>
|
|
3609
|
+
<dd>
|
|
3610
|
+
|
|
3611
|
+
#### 📝 Description
|
|
3612
|
+
|
|
3613
|
+
<dl>
|
|
3614
|
+
<dd>
|
|
3615
|
+
|
|
3616
|
+
<dl>
|
|
3617
|
+
<dd>
|
|
3618
|
+
|
|
3619
|
+
Return an archived skill to active, making it available to the workspace again.
|
|
3620
|
+
</dd>
|
|
3621
|
+
</dl>
|
|
3622
|
+
</dd>
|
|
3623
|
+
</dl>
|
|
3624
|
+
|
|
3625
|
+
#### 🔌 Usage
|
|
3626
|
+
|
|
3627
|
+
<dl>
|
|
3628
|
+
<dd>
|
|
3629
|
+
|
|
3630
|
+
<dl>
|
|
3631
|
+
<dd>
|
|
3632
|
+
|
|
3633
|
+
```typescript
|
|
3634
|
+
await client.skills.restoreSkill("id");
|
|
3635
|
+
|
|
3636
|
+
```
|
|
3637
|
+
</dd>
|
|
3638
|
+
</dl>
|
|
3639
|
+
</dd>
|
|
3640
|
+
</dl>
|
|
3641
|
+
|
|
3642
|
+
#### ⚙️ Parameters
|
|
3643
|
+
|
|
3644
|
+
<dl>
|
|
3645
|
+
<dd>
|
|
3646
|
+
|
|
3647
|
+
<dl>
|
|
3648
|
+
<dd>
|
|
3649
|
+
|
|
3650
|
+
**id:** `string`
|
|
3651
|
+
|
|
3652
|
+
</dd>
|
|
3653
|
+
</dl>
|
|
3654
|
+
|
|
3655
|
+
<dl>
|
|
3656
|
+
<dd>
|
|
3657
|
+
|
|
3658
|
+
**requestOptions:** `SkillsClient.RequestOptions`
|
|
3659
|
+
|
|
3660
|
+
</dd>
|
|
3661
|
+
</dl>
|
|
3662
|
+
</dd>
|
|
3663
|
+
</dl>
|
|
3664
|
+
|
|
3665
|
+
|
|
3603
3666
|
</dd>
|
|
3604
3667
|
</dl>
|
|
3605
3668
|
</details>
|