minikai 1.7.0 → 1.17.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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/labels/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/labels/client/Client.js +2 -2
- package/dist/cjs/api/resources/labels/client/requests/UpdateLabelCommand.d.ts +2 -1
- package/dist/cjs/api/resources/minis/client/requests/SearchMinisFullTextQuery.d.ts +1 -1
- package/dist/cjs/api/resources/records/client/Client.d.ts +26 -1
- package/dist/cjs/api/resources/records/client/Client.js +106 -23
- package/dist/cjs/api/resources/records/client/requests/ExportRecordsForMinisQuery.d.ts +14 -0
- package/dist/cjs/api/resources/records/client/requests/ExportRecordsForMinisQuery.js +3 -0
- package/dist/cjs/api/resources/records/client/requests/ExportRecordsRequest.d.ts +1 -2
- package/dist/cjs/api/resources/records/client/requests/GetRecordsRequest.d.ts +1 -2
- package/dist/cjs/api/resources/records/client/requests/SearchRecordsFullTextQuery.d.ts +1 -1
- package/dist/cjs/api/resources/records/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/CursorPaginatedListOfMiniVersionDto.d.ts +1 -1
- package/dist/cjs/api/types/CursorPaginatedListOfRecordDto.d.ts +1 -1
- package/dist/cjs/api/types/CursorPaginatedListOfRecordVersionDto.d.ts +1 -1
- package/dist/cjs/api/types/HttpValidationProblemDetails.d.ts +1 -1
- package/dist/cjs/api/types/IdentityKind.d.ts +1 -0
- package/dist/cjs/api/types/IdentityKind.js +1 -0
- package/dist/cjs/api/types/LabelDto.d.ts +1 -0
- package/dist/cjs/api/types/LabelRenameStateDto.d.ts +3 -0
- package/dist/cjs/api/types/LabelRenameStateDto.js +3 -0
- package/dist/cjs/api/types/RecordAttachmentDto.d.ts +0 -1
- package/dist/cjs/api/types/RecordDto.d.ts +1 -1
- package/dist/cjs/api/types/RecordState.d.ts +0 -1
- package/dist/cjs/api/types/RecordState.js +0 -1
- package/dist/cjs/api/types/SkillAssetDto.d.ts +1 -0
- package/dist/cjs/api/types/SkillDto.d.ts +2 -0
- package/dist/cjs/api/types/SkillSummaryDto.d.ts +1 -0
- package/dist/cjs/api/types/UpsertRecordDto.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -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/labels/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/labels/client/Client.mjs +2 -2
- package/dist/esm/api/resources/labels/client/requests/UpdateLabelCommand.d.mts +2 -1
- package/dist/esm/api/resources/minis/client/requests/SearchMinisFullTextQuery.d.mts +1 -1
- package/dist/esm/api/resources/records/client/Client.d.mts +26 -1
- package/dist/esm/api/resources/records/client/Client.mjs +106 -23
- package/dist/esm/api/resources/records/client/requests/ExportRecordsForMinisQuery.d.mts +14 -0
- package/dist/esm/api/resources/records/client/requests/ExportRecordsForMinisQuery.mjs +2 -0
- package/dist/esm/api/resources/records/client/requests/ExportRecordsRequest.d.mts +1 -2
- package/dist/esm/api/resources/records/client/requests/GetRecordsRequest.d.mts +1 -2
- package/dist/esm/api/resources/records/client/requests/SearchRecordsFullTextQuery.d.mts +1 -1
- package/dist/esm/api/resources/records/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/CursorPaginatedListOfMiniVersionDto.d.mts +1 -1
- package/dist/esm/api/types/CursorPaginatedListOfRecordDto.d.mts +1 -1
- package/dist/esm/api/types/CursorPaginatedListOfRecordVersionDto.d.mts +1 -1
- package/dist/esm/api/types/HttpValidationProblemDetails.d.mts +1 -1
- package/dist/esm/api/types/IdentityKind.d.mts +1 -0
- package/dist/esm/api/types/IdentityKind.mjs +1 -0
- package/dist/esm/api/types/LabelDto.d.mts +1 -0
- package/dist/esm/api/types/LabelRenameStateDto.d.mts +3 -0
- package/dist/esm/api/types/LabelRenameStateDto.mjs +2 -0
- package/dist/esm/api/types/RecordAttachmentDto.d.mts +0 -1
- package/dist/esm/api/types/RecordDto.d.mts +1 -1
- package/dist/esm/api/types/RecordState.d.mts +0 -1
- package/dist/esm/api/types/RecordState.mjs +0 -1
- package/dist/esm/api/types/SkillAssetDto.d.mts +1 -0
- package/dist/esm/api/types/SkillDto.d.mts +2 -0
- package/dist/esm/api/types/SkillSummaryDto.d.mts +1 -0
- package/dist/esm/api/types/UpsertRecordDto.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +68 -3
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.17.1",
|
|
47
|
+
"User-Agent": "minikai/1.17.1",
|
|
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);
|
|
@@ -40,7 +40,7 @@ export declare class LabelsClient {
|
|
|
40
40
|
createLabel(request: Minikai.CreateLabelCommand, requestOptions?: LabelsClient.RequestOptions): core.HttpResponsePromise<Minikai.LabelDto>;
|
|
41
41
|
private __createLabel;
|
|
42
42
|
/**
|
|
43
|
-
* Update a label.
|
|
43
|
+
* Update a label. Records and Minis reference labels by name, so changing the name moves them onto the new one in the background: the response carries a rename state that clears once they have all moved, and further edits are refused until then.
|
|
44
44
|
*
|
|
45
45
|
* @param {string} id
|
|
46
46
|
* @param {Minikai.UpdateLabelCommand} request
|
|
@@ -57,7 +57,7 @@ export declare class LabelsClient {
|
|
|
57
57
|
updateLabel(id: string, request: Minikai.UpdateLabelCommand, requestOptions?: LabelsClient.RequestOptions): core.HttpResponsePromise<Minikai.LabelDto>;
|
|
58
58
|
private __updateLabel;
|
|
59
59
|
/**
|
|
60
|
-
* Delete a label.
|
|
60
|
+
* Delete a label. Refused with a 409 while any record or Mini still carries it, naming how many. Remove it from them first.
|
|
61
61
|
*
|
|
62
62
|
* @param {string} id
|
|
63
63
|
* @param {LabelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -166,7 +166,7 @@ class LabelsClient {
|
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
|
-
* Update a label.
|
|
169
|
+
* Update a label. Records and Minis reference labels by name, so changing the name moves them onto the new one in the background: the response carries a rename state that clears once they have all moved, and further edits are refused until then.
|
|
170
170
|
*
|
|
171
171
|
* @param {string} id
|
|
172
172
|
* @param {Minikai.UpdateLabelCommand} request
|
|
@@ -223,7 +223,7 @@ class LabelsClient {
|
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
/**
|
|
226
|
-
* Delete a label.
|
|
226
|
+
* Delete a label. Refused with a 409 while any record or Mini still carries it, naming how many. Remove it from them first.
|
|
227
227
|
*
|
|
228
228
|
* @param {string} id
|
|
229
229
|
* @param {LabelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Minikai from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -10,6 +11,6 @@ export interface UpdateLabelCommand {
|
|
|
10
11
|
description?: string | null;
|
|
11
12
|
colour?: string | null;
|
|
12
13
|
icon?: string | null;
|
|
13
|
-
resourceType?:
|
|
14
|
+
resourceType?: Minikai.LabelResourceType | null;
|
|
14
15
|
labelGroupId?: string | null;
|
|
15
16
|
}
|
|
@@ -6,7 +6,7 @@ import type * as Minikai from "../../../../index.js";
|
|
|
6
6
|
export interface SearchMinisFullTextQuery {
|
|
7
7
|
text?: string;
|
|
8
8
|
labels?: string[] | null;
|
|
9
|
-
agentType?:
|
|
9
|
+
agentType?: Minikai.AgentType | null;
|
|
10
10
|
cursor?: string | null;
|
|
11
11
|
limit?: unknown;
|
|
12
12
|
sort?: Minikai.SearchSort;
|
|
@@ -37,7 +37,9 @@ export declare class RecordsClient {
|
|
|
37
37
|
createRecord(request?: Minikai.CreateRecordCommand, requestOptions?: RecordsClient.RequestOptions): core.HttpResponsePromise<string>;
|
|
38
38
|
private __createRecord;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* @deprecated
|
|
41
|
+
*
|
|
42
|
+
* Deprecated. Export a single Mini's Records as a CSV file. Use POST /api/v1/Records/export, which exports one or more Minis in a single file.
|
|
41
43
|
*
|
|
42
44
|
* @param {Minikai.ExportRecordsRequest} request
|
|
43
45
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -49,6 +51,21 @@ export declare class RecordsClient {
|
|
|
49
51
|
*/
|
|
50
52
|
exportRecords(request: Minikai.ExportRecordsRequest, requestOptions?: RecordsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
51
53
|
private __exportRecords;
|
|
54
|
+
/**
|
|
55
|
+
* Export Records across one or more Minis as a single CSV file, with a Mini Name column identifying the person on each row. Pass one Mini id to export a single Mini. Mini ids outside your organisation or access are omitted.
|
|
56
|
+
*
|
|
57
|
+
* @param {Minikai.ExportRecordsForMinisQuery} request
|
|
58
|
+
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link Minikai.BadRequestError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.records.exportRecordsForMinis({
|
|
64
|
+
* miniIds: ["miniIds"]
|
|
65
|
+
* })
|
|
66
|
+
*/
|
|
67
|
+
exportRecordsForMinis(request: Minikai.ExportRecordsForMinisQuery, requestOptions?: RecordsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
68
|
+
private __exportRecordsForMinis;
|
|
52
69
|
/**
|
|
53
70
|
* Full-text search across a Mini's Records.
|
|
54
71
|
*
|
|
@@ -421,6 +438,8 @@ export declare class RecordsClient {
|
|
|
421
438
|
* @param {Minikai.GetLabelsRequest} request
|
|
422
439
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
423
440
|
*
|
|
441
|
+
* @throws {@link Minikai.BadRequestError}
|
|
442
|
+
*
|
|
424
443
|
* @example
|
|
425
444
|
* await client.records.getLabels({
|
|
426
445
|
* miniId: "miniId"
|
|
@@ -434,6 +453,8 @@ export declare class RecordsClient {
|
|
|
434
453
|
* @param {Minikai.GetCreatedByRequest} request
|
|
435
454
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
436
455
|
*
|
|
456
|
+
* @throws {@link Minikai.BadRequestError}
|
|
457
|
+
*
|
|
437
458
|
* @example
|
|
438
459
|
* await client.records.getCreatedBy({
|
|
439
460
|
* miniId: "miniId"
|
|
@@ -447,6 +468,8 @@ export declare class RecordsClient {
|
|
|
447
468
|
* @param {Minikai.GetUpdatedByRequest} request
|
|
448
469
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
449
470
|
*
|
|
471
|
+
* @throws {@link Minikai.BadRequestError}
|
|
472
|
+
*
|
|
450
473
|
* @example
|
|
451
474
|
* await client.records.getUpdatedBy({
|
|
452
475
|
* miniId: "miniId"
|
|
@@ -460,6 +483,8 @@ export declare class RecordsClient {
|
|
|
460
483
|
* @param {Minikai.GetStatesRequest} request
|
|
461
484
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
462
485
|
*
|
|
486
|
+
* @throws {@link Minikai.BadRequestError}
|
|
487
|
+
*
|
|
463
488
|
* @example
|
|
464
489
|
* await client.records.getStates({
|
|
465
490
|
* miniId: "miniId"
|
|
@@ -83,7 +83,7 @@ class RecordsClient {
|
|
|
83
83
|
limitBefore,
|
|
84
84
|
limitAfter,
|
|
85
85
|
labels,
|
|
86
|
-
states
|
|
86
|
+
states,
|
|
87
87
|
startDate: startDate != null ? startDate : undefined,
|
|
88
88
|
endDate: endDate != null ? endDate : undefined,
|
|
89
89
|
createdBy,
|
|
@@ -177,7 +177,9 @@ class RecordsClient {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
*
|
|
180
|
+
* @deprecated
|
|
181
|
+
*
|
|
182
|
+
* Deprecated. Export a single Mini's Records as a CSV file. Use POST /api/v1/Records/export, which exports one or more Minis in a single file.
|
|
181
183
|
*
|
|
182
184
|
* @param {Minikai.ExportRecordsRequest} request
|
|
183
185
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -197,7 +199,7 @@ class RecordsClient {
|
|
|
197
199
|
const _queryParams = {
|
|
198
200
|
miniId,
|
|
199
201
|
labels,
|
|
200
|
-
states
|
|
202
|
+
states,
|
|
201
203
|
startDate: startDate != null ? startDate : undefined,
|
|
202
204
|
endDate: endDate != null ? endDate : undefined,
|
|
203
205
|
createdBy,
|
|
@@ -234,6 +236,59 @@ class RecordsClient {
|
|
|
234
236
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/Records/export");
|
|
235
237
|
});
|
|
236
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Export Records across one or more Minis as a single CSV file, with a Mini Name column identifying the person on each row. Pass one Mini id to export a single Mini. Mini ids outside your organisation or access are omitted.
|
|
241
|
+
*
|
|
242
|
+
* @param {Minikai.ExportRecordsForMinisQuery} request
|
|
243
|
+
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
244
|
+
*
|
|
245
|
+
* @throws {@link Minikai.BadRequestError}
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* await client.records.exportRecordsForMinis({
|
|
249
|
+
* miniIds: ["miniIds"]
|
|
250
|
+
* })
|
|
251
|
+
*/
|
|
252
|
+
exportRecordsForMinis(request, requestOptions) {
|
|
253
|
+
return core.HttpResponsePromise.fromPromise(this.__exportRecordsForMinis(request, requestOptions));
|
|
254
|
+
}
|
|
255
|
+
__exportRecordsForMinis(request, requestOptions) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
258
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
259
|
+
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);
|
|
260
|
+
const _response = yield core.fetcher({
|
|
261
|
+
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/Records/export"),
|
|
262
|
+
method: "POST",
|
|
263
|
+
headers: _headers,
|
|
264
|
+
contentType: "application/json",
|
|
265
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
266
|
+
requestType: "json",
|
|
267
|
+
body: request,
|
|
268
|
+
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,
|
|
269
|
+
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,
|
|
270
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
271
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
272
|
+
logging: this._options.logging,
|
|
273
|
+
});
|
|
274
|
+
if (_response.ok) {
|
|
275
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
276
|
+
}
|
|
277
|
+
if (_response.error.reason === "status-code") {
|
|
278
|
+
switch (_response.error.statusCode) {
|
|
279
|
+
case 400:
|
|
280
|
+
throw new Minikai.BadRequestError(_response.error.body, _response.rawResponse);
|
|
281
|
+
default:
|
|
282
|
+
throw new errors.MinikaiError({
|
|
283
|
+
statusCode: _response.error.statusCode,
|
|
284
|
+
body: _response.error.body,
|
|
285
|
+
rawResponse: _response.rawResponse,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/v1/Records/export");
|
|
290
|
+
});
|
|
291
|
+
}
|
|
237
292
|
/**
|
|
238
293
|
* Full-text search across a Mini's Records.
|
|
239
294
|
*
|
|
@@ -1543,6 +1598,8 @@ class RecordsClient {
|
|
|
1543
1598
|
* @param {Minikai.GetLabelsRequest} request
|
|
1544
1599
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1545
1600
|
*
|
|
1601
|
+
* @throws {@link Minikai.BadRequestError}
|
|
1602
|
+
*
|
|
1546
1603
|
* @example
|
|
1547
1604
|
* await client.records.getLabels({
|
|
1548
1605
|
* miniId: "miniId"
|
|
@@ -1579,11 +1636,16 @@ class RecordsClient {
|
|
|
1579
1636
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1580
1637
|
}
|
|
1581
1638
|
if (_response.error.reason === "status-code") {
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1639
|
+
switch (_response.error.statusCode) {
|
|
1640
|
+
case 400:
|
|
1641
|
+
throw new Minikai.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1642
|
+
default:
|
|
1643
|
+
throw new errors.MinikaiError({
|
|
1644
|
+
statusCode: _response.error.statusCode,
|
|
1645
|
+
body: _response.error.body,
|
|
1646
|
+
rawResponse: _response.rawResponse,
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1587
1649
|
}
|
|
1588
1650
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/Records/filters/labels");
|
|
1589
1651
|
});
|
|
@@ -1594,6 +1656,8 @@ class RecordsClient {
|
|
|
1594
1656
|
* @param {Minikai.GetCreatedByRequest} request
|
|
1595
1657
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1596
1658
|
*
|
|
1659
|
+
* @throws {@link Minikai.BadRequestError}
|
|
1660
|
+
*
|
|
1597
1661
|
* @example
|
|
1598
1662
|
* await client.records.getCreatedBy({
|
|
1599
1663
|
* miniId: "miniId"
|
|
@@ -1630,11 +1694,16 @@ class RecordsClient {
|
|
|
1630
1694
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1631
1695
|
}
|
|
1632
1696
|
if (_response.error.reason === "status-code") {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1697
|
+
switch (_response.error.statusCode) {
|
|
1698
|
+
case 400:
|
|
1699
|
+
throw new Minikai.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1700
|
+
default:
|
|
1701
|
+
throw new errors.MinikaiError({
|
|
1702
|
+
statusCode: _response.error.statusCode,
|
|
1703
|
+
body: _response.error.body,
|
|
1704
|
+
rawResponse: _response.rawResponse,
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1638
1707
|
}
|
|
1639
1708
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/Records/filters/created-by");
|
|
1640
1709
|
});
|
|
@@ -1645,6 +1714,8 @@ class RecordsClient {
|
|
|
1645
1714
|
* @param {Minikai.GetUpdatedByRequest} request
|
|
1646
1715
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1647
1716
|
*
|
|
1717
|
+
* @throws {@link Minikai.BadRequestError}
|
|
1718
|
+
*
|
|
1648
1719
|
* @example
|
|
1649
1720
|
* await client.records.getUpdatedBy({
|
|
1650
1721
|
* miniId: "miniId"
|
|
@@ -1681,11 +1752,16 @@ class RecordsClient {
|
|
|
1681
1752
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1682
1753
|
}
|
|
1683
1754
|
if (_response.error.reason === "status-code") {
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1755
|
+
switch (_response.error.statusCode) {
|
|
1756
|
+
case 400:
|
|
1757
|
+
throw new Minikai.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1758
|
+
default:
|
|
1759
|
+
throw new errors.MinikaiError({
|
|
1760
|
+
statusCode: _response.error.statusCode,
|
|
1761
|
+
body: _response.error.body,
|
|
1762
|
+
rawResponse: _response.rawResponse,
|
|
1763
|
+
});
|
|
1764
|
+
}
|
|
1689
1765
|
}
|
|
1690
1766
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/Records/filters/updated-by");
|
|
1691
1767
|
});
|
|
@@ -1696,6 +1772,8 @@ class RecordsClient {
|
|
|
1696
1772
|
* @param {Minikai.GetStatesRequest} request
|
|
1697
1773
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1698
1774
|
*
|
|
1775
|
+
* @throws {@link Minikai.BadRequestError}
|
|
1776
|
+
*
|
|
1699
1777
|
* @example
|
|
1700
1778
|
* await client.records.getStates({
|
|
1701
1779
|
* miniId: "miniId"
|
|
@@ -1732,11 +1810,16 @@ class RecordsClient {
|
|
|
1732
1810
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1733
1811
|
}
|
|
1734
1812
|
if (_response.error.reason === "status-code") {
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1813
|
+
switch (_response.error.statusCode) {
|
|
1814
|
+
case 400:
|
|
1815
|
+
throw new Minikai.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1816
|
+
default:
|
|
1817
|
+
throw new errors.MinikaiError({
|
|
1818
|
+
statusCode: _response.error.statusCode,
|
|
1819
|
+
body: _response.error.body,
|
|
1820
|
+
rawResponse: _response.rawResponse,
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1740
1823
|
}
|
|
1741
1824
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/Records/filters/states");
|
|
1742
1825
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* miniIds: ["miniIds"]
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface ExportRecordsForMinisQuery {
|
|
8
|
+
miniIds: string[];
|
|
9
|
+
labels?: string[] | null;
|
|
10
|
+
states?: unknown[] | null;
|
|
11
|
+
startDate?: string | null;
|
|
12
|
+
endDate?: string | null;
|
|
13
|
+
sortDescending?: boolean;
|
|
14
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type * as Minikai from "../../../../index.js";
|
|
2
1
|
/**
|
|
3
2
|
* @example
|
|
4
3
|
* {
|
|
@@ -8,7 +7,7 @@ import type * as Minikai from "../../../../index.js";
|
|
|
8
7
|
export interface ExportRecordsRequest {
|
|
9
8
|
miniId: string;
|
|
10
9
|
labels?: string | string[];
|
|
11
|
-
states?:
|
|
10
|
+
states?: string | string[];
|
|
12
11
|
startDate?: string;
|
|
13
12
|
endDate?: string;
|
|
14
13
|
createdBy?: string | string[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type * as Minikai from "../../../../index.js";
|
|
2
1
|
/**
|
|
3
2
|
* @example
|
|
4
3
|
* {
|
|
@@ -15,7 +14,7 @@ export interface GetRecordsRequest {
|
|
|
15
14
|
limitBefore?: string;
|
|
16
15
|
limitAfter?: string;
|
|
17
16
|
labels?: string | string[];
|
|
18
|
-
states?:
|
|
17
|
+
states?: string | string[];
|
|
19
18
|
startDate?: string;
|
|
20
19
|
endDate?: string;
|
|
21
20
|
createdBy?: string | string[];
|
|
@@ -9,7 +9,7 @@ export interface SearchRecordsFullTextQuery {
|
|
|
9
9
|
text?: string;
|
|
10
10
|
miniId: string;
|
|
11
11
|
labels?: string[] | null;
|
|
12
|
-
states?:
|
|
12
|
+
states?: unknown[] | null;
|
|
13
13
|
startDate?: string | null;
|
|
14
14
|
endDate?: string | null;
|
|
15
15
|
createdBy?: string[] | null;
|
|
@@ -6,6 +6,7 @@ export type { CreateDraftRecordCommand } from "./CreateDraftRecordCommand.js";
|
|
|
6
6
|
export type { CreateRecordCommand } from "./CreateRecordCommand.js";
|
|
7
7
|
export type { DeleteRecordRequest } from "./DeleteRecordRequest.js";
|
|
8
8
|
export type { DisposeDraftRecordRequest } from "./DisposeDraftRecordRequest.js";
|
|
9
|
+
export type { ExportRecordsForMinisQuery } from "./ExportRecordsForMinisQuery.js";
|
|
9
10
|
export type { ExportRecordsRequest } from "./ExportRecordsRequest.js";
|
|
10
11
|
export type { GetCreatedByRequest } from "./GetCreatedByRequest.js";
|
|
11
12
|
export type { GetLabelsRequest } from "./GetLabelsRequest.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface HttpValidationProblemDetails {
|
|
2
2
|
type?: (string | null) | undefined;
|
|
3
3
|
title?: (string | null) | undefined;
|
|
4
|
-
status?:
|
|
4
|
+
status?: unknown | undefined;
|
|
5
5
|
detail?: (string | null) | undefined;
|
|
6
6
|
instance?: (string | null) | undefined;
|
|
7
7
|
errors?: Record<string, string[]> | undefined;
|
|
@@ -6,6 +6,7 @@ export declare const IdentityKind: {
|
|
|
6
6
|
readonly Dva: "dva";
|
|
7
7
|
readonly PrivateHealthInsurance: "private_health_insurance";
|
|
8
8
|
readonly CmsId: "cms_id";
|
|
9
|
+
readonly Nhs: "nhs";
|
|
9
10
|
readonly Unknown: "unknown";
|
|
10
11
|
};
|
|
11
12
|
export type IdentityKind = (typeof IdentityKind)[keyof typeof IdentityKind];
|
|
@@ -7,6 +7,7 @@ export interface LabelDto {
|
|
|
7
7
|
colour?: (string | null) | undefined;
|
|
8
8
|
icon?: (string | null) | undefined;
|
|
9
9
|
resourceType: Minikai.LabelResourceType;
|
|
10
|
+
rename?: (Minikai.LabelRenameStateDto | null) | undefined;
|
|
10
11
|
createdAt?: string | undefined;
|
|
11
12
|
updatedAt?: string | undefined;
|
|
12
13
|
}
|
|
@@ -4,7 +4,6 @@ export interface RecordAttachmentDto {
|
|
|
4
4
|
contentType?: string | undefined;
|
|
5
5
|
size?: unknown | undefined;
|
|
6
6
|
checksum?: (string | null) | undefined;
|
|
7
|
-
uri: string;
|
|
8
7
|
createdAt?: (string | null) | undefined;
|
|
9
8
|
updatedAt?: (string | null) | undefined;
|
|
10
9
|
createdBy?: (string | null) | undefined;
|
|
@@ -9,7 +9,7 @@ export interface RecordDto {
|
|
|
9
9
|
createdBy?: string | undefined;
|
|
10
10
|
updatedBy?: (string | null) | undefined;
|
|
11
11
|
state?: Minikai.RecordState | undefined;
|
|
12
|
-
ttl?:
|
|
12
|
+
ttl?: unknown | undefined;
|
|
13
13
|
schema?: unknown | undefined;
|
|
14
14
|
content?: unknown | undefined;
|
|
15
15
|
attachments?: Minikai.RecordAttachmentDto[] | undefined;
|
|
@@ -9,5 +9,7 @@ export interface SkillDto {
|
|
|
9
9
|
state?: Minikai.SkillState | undefined;
|
|
10
10
|
createdAt?: string | undefined;
|
|
11
11
|
updatedAt?: string | undefined;
|
|
12
|
+
createdBy?: (string | null) | undefined;
|
|
13
|
+
updatedBy?: (string | null) | undefined;
|
|
12
14
|
eTag?: (string | null) | undefined;
|
|
13
15
|
}
|
|
@@ -12,5 +12,5 @@ export interface UpsertRecordDto {
|
|
|
12
12
|
labels?: string[] | undefined;
|
|
13
13
|
tags?: Record<string, unknown> | undefined;
|
|
14
14
|
authorization?: (Minikai.RecordAuthorizationDto | null) | undefined;
|
|
15
|
-
state?: (
|
|
15
|
+
state?: (Minikai.RecordState | null) | undefined;
|
|
16
16
|
}
|
|
@@ -17,6 +17,7 @@ export * from "./Identity.js";
|
|
|
17
17
|
export * from "./IdentityKind.js";
|
|
18
18
|
export * from "./LabelDto.js";
|
|
19
19
|
export * from "./LabelGroupDto.js";
|
|
20
|
+
export * from "./LabelRenameStateDto.js";
|
|
20
21
|
export * from "./LabelResourceType.js";
|
|
21
22
|
export * from "./LabelsResponseDto.js";
|
|
22
23
|
export * from "./MiniDto.js";
|
|
@@ -33,6 +33,7 @@ __exportStar(require("./Identity.js"), exports);
|
|
|
33
33
|
__exportStar(require("./IdentityKind.js"), exports);
|
|
34
34
|
__exportStar(require("./LabelDto.js"), exports);
|
|
35
35
|
__exportStar(require("./LabelGroupDto.js"), exports);
|
|
36
|
+
__exportStar(require("./LabelRenameStateDto.js"), exports);
|
|
36
37
|
__exportStar(require("./LabelResourceType.js"), exports);
|
|
37
38
|
__exportStar(require("./LabelsResponseDto.js"), exports);
|
|
38
39
|
__exportStar(require("./MiniDto.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.17.1";
|
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.17.1",
|
|
10
|
+
"User-Agent": "minikai/1.17.1",
|
|
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);
|
|
@@ -40,7 +40,7 @@ export declare class LabelsClient {
|
|
|
40
40
|
createLabel(request: Minikai.CreateLabelCommand, requestOptions?: LabelsClient.RequestOptions): core.HttpResponsePromise<Minikai.LabelDto>;
|
|
41
41
|
private __createLabel;
|
|
42
42
|
/**
|
|
43
|
-
* Update a label.
|
|
43
|
+
* Update a label. Records and Minis reference labels by name, so changing the name moves them onto the new one in the background: the response carries a rename state that clears once they have all moved, and further edits are refused until then.
|
|
44
44
|
*
|
|
45
45
|
* @param {string} id
|
|
46
46
|
* @param {Minikai.UpdateLabelCommand} request
|
|
@@ -57,7 +57,7 @@ export declare class LabelsClient {
|
|
|
57
57
|
updateLabel(id: string, request: Minikai.UpdateLabelCommand, requestOptions?: LabelsClient.RequestOptions): core.HttpResponsePromise<Minikai.LabelDto>;
|
|
58
58
|
private __updateLabel;
|
|
59
59
|
/**
|
|
60
|
-
* Delete a label.
|
|
60
|
+
* Delete a label. Refused with a 409 while any record or Mini still carries it, naming how many. Remove it from them first.
|
|
61
61
|
*
|
|
62
62
|
* @param {string} id
|
|
63
63
|
* @param {LabelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -130,7 +130,7 @@ export class LabelsClient {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
|
-
* Update a label.
|
|
133
|
+
* Update a label. Records and Minis reference labels by name, so changing the name moves them onto the new one in the background: the response carries a rename state that clears once they have all moved, and further edits are refused until then.
|
|
134
134
|
*
|
|
135
135
|
* @param {string} id
|
|
136
136
|
* @param {Minikai.UpdateLabelCommand} request
|
|
@@ -187,7 +187,7 @@ export class LabelsClient {
|
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
|
-
* Delete a label.
|
|
190
|
+
* Delete a label. Refused with a 409 while any record or Mini still carries it, naming how many. Remove it from them first.
|
|
191
191
|
*
|
|
192
192
|
* @param {string} id
|
|
193
193
|
* @param {LabelsClient.RequestOptions} requestOptions - Request-specific configuration.
|