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.
Files changed (70) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/labels/client/Client.d.ts +2 -2
  3. package/dist/cjs/api/resources/labels/client/Client.js +2 -2
  4. package/dist/cjs/api/resources/labels/client/requests/UpdateLabelCommand.d.ts +2 -1
  5. package/dist/cjs/api/resources/minis/client/requests/SearchMinisFullTextQuery.d.ts +1 -1
  6. package/dist/cjs/api/resources/records/client/Client.d.ts +26 -1
  7. package/dist/cjs/api/resources/records/client/Client.js +106 -23
  8. package/dist/cjs/api/resources/records/client/requests/ExportRecordsForMinisQuery.d.ts +14 -0
  9. package/dist/cjs/api/resources/records/client/requests/ExportRecordsForMinisQuery.js +3 -0
  10. package/dist/cjs/api/resources/records/client/requests/ExportRecordsRequest.d.ts +1 -2
  11. package/dist/cjs/api/resources/records/client/requests/GetRecordsRequest.d.ts +1 -2
  12. package/dist/cjs/api/resources/records/client/requests/SearchRecordsFullTextQuery.d.ts +1 -1
  13. package/dist/cjs/api/resources/records/client/requests/index.d.ts +1 -0
  14. package/dist/cjs/api/types/CursorPaginatedListOfMiniVersionDto.d.ts +1 -1
  15. package/dist/cjs/api/types/CursorPaginatedListOfRecordDto.d.ts +1 -1
  16. package/dist/cjs/api/types/CursorPaginatedListOfRecordVersionDto.d.ts +1 -1
  17. package/dist/cjs/api/types/HttpValidationProblemDetails.d.ts +1 -1
  18. package/dist/cjs/api/types/IdentityKind.d.ts +1 -0
  19. package/dist/cjs/api/types/IdentityKind.js +1 -0
  20. package/dist/cjs/api/types/LabelDto.d.ts +1 -0
  21. package/dist/cjs/api/types/LabelRenameStateDto.d.ts +3 -0
  22. package/dist/cjs/api/types/LabelRenameStateDto.js +3 -0
  23. package/dist/cjs/api/types/RecordAttachmentDto.d.ts +0 -1
  24. package/dist/cjs/api/types/RecordDto.d.ts +1 -1
  25. package/dist/cjs/api/types/RecordState.d.ts +0 -1
  26. package/dist/cjs/api/types/RecordState.js +0 -1
  27. package/dist/cjs/api/types/SkillAssetDto.d.ts +1 -0
  28. package/dist/cjs/api/types/SkillDto.d.ts +2 -0
  29. package/dist/cjs/api/types/SkillSummaryDto.d.ts +1 -0
  30. package/dist/cjs/api/types/UpsertRecordDto.d.ts +1 -1
  31. package/dist/cjs/api/types/index.d.ts +1 -0
  32. package/dist/cjs/api/types/index.js +1 -0
  33. package/dist/cjs/version.d.ts +1 -1
  34. package/dist/cjs/version.js +1 -1
  35. package/dist/esm/BaseClient.mjs +2 -2
  36. package/dist/esm/api/resources/labels/client/Client.d.mts +2 -2
  37. package/dist/esm/api/resources/labels/client/Client.mjs +2 -2
  38. package/dist/esm/api/resources/labels/client/requests/UpdateLabelCommand.d.mts +2 -1
  39. package/dist/esm/api/resources/minis/client/requests/SearchMinisFullTextQuery.d.mts +1 -1
  40. package/dist/esm/api/resources/records/client/Client.d.mts +26 -1
  41. package/dist/esm/api/resources/records/client/Client.mjs +106 -23
  42. package/dist/esm/api/resources/records/client/requests/ExportRecordsForMinisQuery.d.mts +14 -0
  43. package/dist/esm/api/resources/records/client/requests/ExportRecordsForMinisQuery.mjs +2 -0
  44. package/dist/esm/api/resources/records/client/requests/ExportRecordsRequest.d.mts +1 -2
  45. package/dist/esm/api/resources/records/client/requests/GetRecordsRequest.d.mts +1 -2
  46. package/dist/esm/api/resources/records/client/requests/SearchRecordsFullTextQuery.d.mts +1 -1
  47. package/dist/esm/api/resources/records/client/requests/index.d.mts +1 -0
  48. package/dist/esm/api/types/CursorPaginatedListOfMiniVersionDto.d.mts +1 -1
  49. package/dist/esm/api/types/CursorPaginatedListOfRecordDto.d.mts +1 -1
  50. package/dist/esm/api/types/CursorPaginatedListOfRecordVersionDto.d.mts +1 -1
  51. package/dist/esm/api/types/HttpValidationProblemDetails.d.mts +1 -1
  52. package/dist/esm/api/types/IdentityKind.d.mts +1 -0
  53. package/dist/esm/api/types/IdentityKind.mjs +1 -0
  54. package/dist/esm/api/types/LabelDto.d.mts +1 -0
  55. package/dist/esm/api/types/LabelRenameStateDto.d.mts +3 -0
  56. package/dist/esm/api/types/LabelRenameStateDto.mjs +2 -0
  57. package/dist/esm/api/types/RecordAttachmentDto.d.mts +0 -1
  58. package/dist/esm/api/types/RecordDto.d.mts +1 -1
  59. package/dist/esm/api/types/RecordState.d.mts +0 -1
  60. package/dist/esm/api/types/RecordState.mjs +0 -1
  61. package/dist/esm/api/types/SkillAssetDto.d.mts +1 -0
  62. package/dist/esm/api/types/SkillDto.d.mts +2 -0
  63. package/dist/esm/api/types/SkillSummaryDto.d.mts +1 -0
  64. package/dist/esm/api/types/UpsertRecordDto.d.mts +1 -1
  65. package/dist/esm/api/types/index.d.mts +1 -0
  66. package/dist/esm/api/types/index.mjs +1 -0
  67. package/dist/esm/version.d.mts +1 -1
  68. package/dist/esm/version.mjs +1 -1
  69. package/package.json +1 -1
  70. package/reference.md +68 -3
@@ -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.7.0",
47
- "User-Agent": "minikai/1.7.0",
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?: string | null;
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?: string | null;
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
- * Export a Mini's Records as a CSV file.
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: Array.isArray(states) ? states.map((item) => item) : states != null ? states : undefined,
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
- * Export a Mini's Records as a CSV file.
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: Array.isArray(states) ? states.map((item) => item) : states != null ? states : undefined,
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
- throw new errors.MinikaiError({
1583
- statusCode: _response.error.statusCode,
1584
- body: _response.error.body,
1585
- rawResponse: _response.rawResponse,
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
- throw new errors.MinikaiError({
1634
- statusCode: _response.error.statusCode,
1635
- body: _response.error.body,
1636
- rawResponse: _response.rawResponse,
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
- throw new errors.MinikaiError({
1685
- statusCode: _response.error.statusCode,
1686
- body: _response.error.body,
1687
- rawResponse: _response.rawResponse,
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
- throw new errors.MinikaiError({
1736
- statusCode: _response.error.statusCode,
1737
- body: _response.error.body,
1738
- rawResponse: _response.rawResponse,
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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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?: Minikai.RecordState | Minikai.RecordState[];
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?: Minikai.RecordState | Minikai.RecordState[];
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?: Minikai.RecordState[] | null;
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";
@@ -3,5 +3,5 @@ export interface CursorPaginatedListOfMiniVersionDto {
3
3
  items: Minikai.MiniVersionDto[];
4
4
  beforeCursor: string | null;
5
5
  afterCursor: string | null;
6
- totalCount?: (unknown | null) | undefined;
6
+ totalCount?: unknown | undefined;
7
7
  }
@@ -3,5 +3,5 @@ export interface CursorPaginatedListOfRecordDto {
3
3
  items: Minikai.RecordDto[];
4
4
  beforeCursor: string | null;
5
5
  afterCursor: string | null;
6
- totalCount?: (unknown | null) | undefined;
6
+ totalCount?: unknown | undefined;
7
7
  }
@@ -3,5 +3,5 @@ export interface CursorPaginatedListOfRecordVersionDto {
3
3
  items: Minikai.RecordVersionDto[];
4
4
  beforeCursor: string | null;
5
5
  afterCursor: string | null;
6
- totalCount?: (unknown | null) | undefined;
6
+ totalCount?: unknown | undefined;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  export interface HttpValidationProblemDetails {
2
2
  type?: (string | null) | undefined;
3
3
  title?: (string | null) | undefined;
4
- status?: (unknown | null) | undefined;
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];
@@ -10,5 +10,6 @@ exports.IdentityKind = {
10
10
  Dva: "dva",
11
11
  PrivateHealthInsurance: "private_health_insurance",
12
12
  CmsId: "cms_id",
13
+ Nhs: "nhs",
13
14
  Unknown: "unknown",
14
15
  };
@@ -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
  }
@@ -0,0 +1,3 @@
1
+ export interface LabelRenameStateDto {
2
+ previousName: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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?: (unknown | null) | undefined;
12
+ ttl?: unknown | undefined;
13
13
  schema?: unknown | undefined;
14
14
  content?: unknown | undefined;
15
15
  attachments?: Minikai.RecordAttachmentDto[] | undefined;
@@ -1,7 +1,6 @@
1
1
  export declare const RecordState: {
2
2
  readonly Active: "active";
3
3
  readonly Draft: "draft";
4
- readonly Processing: "processing";
5
4
  readonly Archived: "archived";
6
5
  readonly Deleted: "deleted";
7
6
  };
@@ -5,7 +5,6 @@ exports.RecordState = void 0;
5
5
  exports.RecordState = {
6
6
  Active: "active",
7
7
  Draft: "draft",
8
- Processing: "processing",
9
8
  Archived: "archived",
10
9
  Deleted: "deleted",
11
10
  };
@@ -3,5 +3,6 @@ export interface SkillAssetDto {
3
3
  id?: string | undefined;
4
4
  name?: string | undefined;
5
5
  type?: Minikai.SkillAssetType | undefined;
6
+ size?: unknown | undefined;
6
7
  url?: string | undefined;
7
8
  }
@@ -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
  }
@@ -7,4 +7,5 @@ export interface SkillSummaryDto {
7
7
  state?: Minikai.SkillState | undefined;
8
8
  createdAt?: string | undefined;
9
9
  updatedAt?: string | undefined;
10
+ createdBy?: (string | null) | undefined;
10
11
  }
@@ -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?: (string | null) | undefined;
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);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.7.0";
1
+ export declare const SDK_VERSION = "1.17.1";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.7.0";
4
+ exports.SDK_VERSION = "1.17.1";
@@ -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.7.0",
10
- "User-Agent": "minikai/1.7.0",
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.