minikai 1.5.3 → 1.6.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.
Files changed (84) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +7 -2
  4. package/dist/cjs/api/errors/ConflictError.d.ts +1 -1
  5. package/dist/cjs/api/resources/index.d.ts +2 -0
  6. package/dist/cjs/api/resources/index.js +3 -1
  7. package/dist/cjs/api/resources/records/client/Client.d.ts +1 -1
  8. package/dist/cjs/api/resources/records/client/Client.js +3 -2
  9. package/dist/cjs/api/resources/records/client/requests/GetRecordsRequest.d.ts +1 -0
  10. package/dist/cjs/api/resources/skills/client/Client.d.ts +159 -0
  11. package/dist/cjs/api/resources/skills/client/Client.js +584 -0
  12. package/dist/cjs/api/resources/skills/client/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/skills/client/index.js +17 -0
  14. package/dist/cjs/api/resources/skills/client/requests/CreateSkillCommand.d.ts +14 -0
  15. package/dist/cjs/api/resources/skills/client/requests/CreateSkillCommand.js +3 -0
  16. package/dist/cjs/api/resources/skills/client/requests/GetSkillsRequest.d.ts +7 -0
  17. package/dist/cjs/api/resources/skills/client/requests/GetSkillsRequest.js +3 -0
  18. package/dist/cjs/api/resources/skills/client/requests/UpdateSkillCommand.d.ts +16 -0
  19. package/dist/cjs/api/resources/skills/client/requests/UpdateSkillCommand.js +3 -0
  20. package/dist/cjs/api/resources/skills/client/requests/UploadSkillAssetsRequest.d.ts +10 -0
  21. package/dist/cjs/api/resources/skills/client/requests/UploadSkillAssetsRequest.js +3 -0
  22. package/dist/cjs/api/resources/skills/client/requests/index.d.ts +4 -0
  23. package/dist/cjs/api/resources/skills/client/requests/index.js +2 -0
  24. package/dist/cjs/api/resources/skills/exports.d.ts +2 -0
  25. package/dist/cjs/api/resources/skills/exports.js +21 -0
  26. package/dist/cjs/api/resources/skills/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/skills/index.js +17 -0
  28. package/dist/cjs/api/types/SkillAssetDto.d.ts +7 -0
  29. package/dist/cjs/api/types/SkillAssetDto.js +3 -0
  30. package/dist/cjs/api/types/SkillAssetType.d.ts +12 -0
  31. package/dist/cjs/api/types/SkillAssetType.js +15 -0
  32. package/dist/cjs/api/types/SkillDto.d.ts +13 -0
  33. package/dist/cjs/api/types/SkillDto.js +3 -0
  34. package/dist/cjs/api/types/SkillState.d.ts +7 -0
  35. package/dist/cjs/api/types/SkillState.js +10 -0
  36. package/dist/cjs/api/types/SkillSummaryDto.d.ts +10 -0
  37. package/dist/cjs/api/types/SkillSummaryDto.js +3 -0
  38. package/dist/cjs/api/types/index.d.ts +5 -0
  39. package/dist/cjs/api/types/index.js +5 -0
  40. package/dist/cjs/version.d.ts +1 -1
  41. package/dist/cjs/version.js +1 -1
  42. package/dist/esm/BaseClient.mjs +2 -2
  43. package/dist/esm/Client.d.mts +3 -0
  44. package/dist/esm/Client.mjs +5 -0
  45. package/dist/esm/api/errors/ConflictError.d.mts +1 -1
  46. package/dist/esm/api/resources/index.d.mts +2 -0
  47. package/dist/esm/api/resources/index.mjs +2 -0
  48. package/dist/esm/api/resources/records/client/Client.d.mts +1 -1
  49. package/dist/esm/api/resources/records/client/Client.mjs +3 -2
  50. package/dist/esm/api/resources/records/client/requests/GetRecordsRequest.d.mts +1 -0
  51. package/dist/esm/api/resources/skills/client/Client.d.mts +159 -0
  52. package/dist/esm/api/resources/skills/client/Client.mjs +547 -0
  53. package/dist/esm/api/resources/skills/client/index.d.mts +1 -0
  54. package/dist/esm/api/resources/skills/client/index.mjs +1 -0
  55. package/dist/esm/api/resources/skills/client/requests/CreateSkillCommand.d.mts +14 -0
  56. package/dist/esm/api/resources/skills/client/requests/CreateSkillCommand.mjs +2 -0
  57. package/dist/esm/api/resources/skills/client/requests/GetSkillsRequest.d.mts +7 -0
  58. package/dist/esm/api/resources/skills/client/requests/GetSkillsRequest.mjs +2 -0
  59. package/dist/esm/api/resources/skills/client/requests/UpdateSkillCommand.d.mts +16 -0
  60. package/dist/esm/api/resources/skills/client/requests/UpdateSkillCommand.mjs +2 -0
  61. package/dist/esm/api/resources/skills/client/requests/UploadSkillAssetsRequest.d.mts +10 -0
  62. package/dist/esm/api/resources/skills/client/requests/UploadSkillAssetsRequest.mjs +2 -0
  63. package/dist/esm/api/resources/skills/client/requests/index.d.mts +4 -0
  64. package/dist/esm/api/resources/skills/client/requests/index.mjs +1 -0
  65. package/dist/esm/api/resources/skills/exports.d.mts +2 -0
  66. package/dist/esm/api/resources/skills/exports.mjs +3 -0
  67. package/dist/esm/api/resources/skills/index.d.mts +1 -0
  68. package/dist/esm/api/resources/skills/index.mjs +1 -0
  69. package/dist/esm/api/types/SkillAssetDto.d.mts +7 -0
  70. package/dist/esm/api/types/SkillAssetDto.mjs +2 -0
  71. package/dist/esm/api/types/SkillAssetType.d.mts +12 -0
  72. package/dist/esm/api/types/SkillAssetType.mjs +12 -0
  73. package/dist/esm/api/types/SkillDto.d.mts +13 -0
  74. package/dist/esm/api/types/SkillDto.mjs +2 -0
  75. package/dist/esm/api/types/SkillState.d.mts +7 -0
  76. package/dist/esm/api/types/SkillState.mjs +7 -0
  77. package/dist/esm/api/types/SkillSummaryDto.d.mts +10 -0
  78. package/dist/esm/api/types/SkillSummaryDto.mjs +2 -0
  79. package/dist/esm/api/types/index.d.mts +5 -0
  80. package/dist/esm/api/types/index.mjs +5 -0
  81. package/dist/esm/version.d.mts +1 -1
  82. package/dist/esm/version.mjs +1 -1
  83. package/package.json +12 -1
  84. package/reference.md +664 -1
@@ -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.5.3",
47
- "User-Agent": "minikai/1.5.3",
46
+ "X-Fern-SDK-Version": "1.6.0",
47
+ "User-Agent": "minikai/1.6.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);
@@ -1,6 +1,7 @@
1
1
  import { LabelsClient } from "./api/resources/labels/client/Client.js";
2
2
  import { MinisClient } from "./api/resources/minis/client/Client.js";
3
3
  import { RecordsClient } from "./api/resources/records/client/Client.js";
4
+ import { SkillsClient } from "./api/resources/skills/client/Client.js";
4
5
  import { UsersClient } from "./api/resources/users/client/Client.js";
5
6
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
6
7
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
@@ -15,11 +16,13 @@ export declare class MinikaiClient {
15
16
  protected _labels: LabelsClient | undefined;
16
17
  protected _minis: MinisClient | undefined;
17
18
  protected _records: RecordsClient | undefined;
19
+ protected _skills: SkillsClient | undefined;
18
20
  protected _users: UsersClient | undefined;
19
21
  constructor(options: MinikaiClient.Options);
20
22
  get labels(): LabelsClient;
21
23
  get minis(): MinisClient;
22
24
  get records(): RecordsClient;
25
+ get skills(): SkillsClient;
23
26
  get users(): UsersClient;
24
27
  /**
25
28
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -47,7 +47,8 @@ exports.MinikaiClient = void 0;
47
47
  const Client_js_1 = require("./api/resources/labels/client/Client.js");
48
48
  const Client_js_2 = require("./api/resources/minis/client/Client.js");
49
49
  const Client_js_3 = require("./api/resources/records/client/Client.js");
50
- const Client_js_4 = require("./api/resources/users/client/Client.js");
50
+ const Client_js_4 = require("./api/resources/skills/client/Client.js");
51
+ const Client_js_5 = require("./api/resources/users/client/Client.js");
51
52
  const BaseClient_js_1 = require("./BaseClient.js");
52
53
  const core = __importStar(require("./core/index.js"));
53
54
  class MinikaiClient {
@@ -66,9 +67,13 @@ class MinikaiClient {
66
67
  var _a;
67
68
  return ((_a = this._records) !== null && _a !== void 0 ? _a : (this._records = new Client_js_3.RecordsClient(this._options)));
68
69
  }
70
+ get skills() {
71
+ var _a;
72
+ return ((_a = this._skills) !== null && _a !== void 0 ? _a : (this._skills = new Client_js_4.SkillsClient(this._options)));
73
+ }
69
74
  get users() {
70
75
  var _a;
71
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_4.UsersClient(this._options)));
76
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_5.UsersClient(this._options)));
72
77
  }
73
78
  /**
74
79
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -1,5 +1,5 @@
1
1
  import type * as core from "../../core/index.js";
2
2
  import * as errors from "../../errors/index.js";
3
3
  export declare class ConflictError extends errors.MinikaiError {
4
- constructor(body: string, rawResponse?: core.RawResponse);
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
5
  }
@@ -4,4 +4,6 @@ export * from "./minis/client/requests/index.js";
4
4
  export * as minis from "./minis/index.js";
5
5
  export * from "./records/client/requests/index.js";
6
6
  export * as records from "./records/index.js";
7
+ export * from "./skills/client/requests/index.js";
8
+ export * as skills from "./skills/index.js";
7
9
  export * as users from "./users/index.js";
@@ -36,11 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.users = exports.records = exports.minis = exports.labels = void 0;
39
+ exports.users = exports.skills = exports.records = exports.minis = exports.labels = void 0;
40
40
  __exportStar(require("./labels/client/requests/index.js"), exports);
41
41
  exports.labels = __importStar(require("./labels/index.js"));
42
42
  __exportStar(require("./minis/client/requests/index.js"), exports);
43
43
  exports.minis = __importStar(require("./minis/index.js"));
44
44
  __exportStar(require("./records/client/requests/index.js"), exports);
45
45
  exports.records = __importStar(require("./records/index.js"));
46
+ __exportStar(require("./skills/client/requests/index.js"), exports);
47
+ exports.skills = __importStar(require("./skills/index.js"));
46
48
  exports.users = __importStar(require("./users/index.js"));
@@ -11,7 +11,7 @@ export declare class RecordsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<RecordsClient.Options>;
12
12
  constructor(options: RecordsClient.Options);
13
13
  /**
14
- * List a Mini's Records.
14
+ * List a Mini's Records, optionally filtered by labels, states, dates, or content keys.
15
15
  *
16
16
  * @param {Minikai.GetRecordsRequest} request
17
17
  * @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -56,7 +56,7 @@ class RecordsClient {
56
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
57
  }
58
58
  /**
59
- * List a Mini's Records.
59
+ * List a Mini's Records, optionally filtered by labels, states, dates, or content keys.
60
60
  *
61
61
  * @param {Minikai.GetRecordsRequest} request
62
62
  * @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -72,7 +72,7 @@ class RecordsClient {
72
72
  __getRecords(request, requestOptions) {
73
73
  return __awaiter(this, void 0, void 0, function* () {
74
74
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
75
- const { miniId, recordIds, externalUris, recordId, beforeCursor, afterCursor, limitBefore, limitAfter, labels, states, startDate, endDate, createdBy, updatedBy, sortDescending, includeTotalCount, } = request;
75
+ const { miniId, recordIds, externalUris, recordId, beforeCursor, afterCursor, limitBefore, limitAfter, labels, states, startDate, endDate, createdBy, updatedBy, sortDescending, includeTotalCount, contentFilters, } = request;
76
76
  const _queryParams = {
77
77
  miniId,
78
78
  recordIds,
@@ -90,6 +90,7 @@ class RecordsClient {
90
90
  updatedBy,
91
91
  sortDescending,
92
92
  includeTotalCount,
93
+ contentFilters,
93
94
  };
94
95
  const _authRequest = yield this._options.authProvider.getAuthRequest();
95
96
  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);
@@ -22,4 +22,5 @@ export interface GetRecordsRequest {
22
22
  updatedBy?: string | string[];
23
23
  sortDescending?: boolean;
24
24
  includeTotalCount?: boolean;
25
+ contentFilters?: string | string[];
25
26
  }
@@ -0,0 +1,159 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Minikai from "../../../index.js";
5
+ export declare namespace SkillsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class SkillsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<SkillsClient.Options>;
12
+ constructor(options: SkillsClient.Options);
13
+ /**
14
+ * Return summaries of the workspace's skills. Fetch a skill by id for its content and assets.
15
+ *
16
+ * @param {Minikai.GetSkillsRequest} request
17
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @example
20
+ * await client.skills.getSkills()
21
+ */
22
+ getSkills(request?: Minikai.GetSkillsRequest, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillSummaryDto[]>;
23
+ private __getSkills;
24
+ /**
25
+ * Create a skill as a draft.
26
+ *
27
+ * @param {Minikai.CreateSkillCommand} request
28
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @throws {@link Minikai.BadRequestError}
31
+ *
32
+ * @example
33
+ * await client.skills.createSkill({
34
+ * title: "title",
35
+ * agentType: "person"
36
+ * })
37
+ */
38
+ createSkill(request: Minikai.CreateSkillCommand, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
39
+ private __createSkill;
40
+ /**
41
+ * Return a skill by id.
42
+ *
43
+ * @param {string} id
44
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link Minikai.NotFoundError}
47
+ *
48
+ * @example
49
+ * await client.skills.getSkill("id")
50
+ */
51
+ getSkill(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
52
+ private __getSkill;
53
+ /**
54
+ * Update a skill, using the ETag from the last read for concurrency.
55
+ *
56
+ * @param {string} id
57
+ * @param {Minikai.UpdateSkillCommand} request
58
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link Minikai.BadRequestError}
61
+ * @throws {@link Minikai.NotFoundError}
62
+ * @throws {@link Minikai.ConflictError}
63
+ *
64
+ * @example
65
+ * await client.skills.updateSkill("id", {
66
+ * title: "title",
67
+ * agentType: "person"
68
+ * })
69
+ */
70
+ updateSkill(id: string, request: Minikai.UpdateSkillCommand, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
71
+ private __updateSkill;
72
+ /**
73
+ * Archive an active skill, or delete an archived skill and its assets.
74
+ *
75
+ * @param {string} id
76
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
77
+ *
78
+ * @throws {@link Minikai.BadRequestError}
79
+ * @throws {@link Minikai.NotFoundError}
80
+ *
81
+ * @example
82
+ * await client.skills.deleteSkill("id")
83
+ */
84
+ deleteSkill(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<void>;
85
+ private __deleteSkill;
86
+ /**
87
+ * Activate a draft skill, making it available to the workspace.
88
+ *
89
+ * @param {string} id
90
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
91
+ *
92
+ * @throws {@link Minikai.BadRequestError}
93
+ * @throws {@link Minikai.NotFoundError}
94
+ *
95
+ * @example
96
+ * await client.skills.submitDraftSkill("id")
97
+ */
98
+ submitDraftSkill(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
99
+ private __submitDraftSkill;
100
+ /**
101
+ * Permanently remove a draft skill and its assets.
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.disposeDraftSkill("id")
111
+ */
112
+ disposeDraftSkill(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<void>;
113
+ private __disposeDraftSkill;
114
+ /**
115
+ * Upload assets to a skill. Re-uploading a file name replaces that asset.
116
+ *
117
+ * @param {string} id
118
+ * @param {Minikai.UploadSkillAssetsRequest} request
119
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
120
+ *
121
+ * @throws {@link Minikai.BadRequestError}
122
+ * @throws {@link Minikai.NotFoundError}
123
+ *
124
+ * @example
125
+ * import { createReadStream } from "fs";
126
+ * await client.skills.uploadSkillAssets("id", {
127
+ * files: [fs.createReadStream("/path/to/your/file")]
128
+ * })
129
+ */
130
+ uploadSkillAssets(id: string, request: Minikai.UploadSkillAssetsRequest, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
131
+ private __uploadSkillAssets;
132
+ /**
133
+ * Delete all of a skill's assets.
134
+ *
135
+ * @param {string} id
136
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
137
+ *
138
+ * @throws {@link Minikai.NotFoundError}
139
+ *
140
+ * @example
141
+ * await client.skills.deleteSkillAssets("id")
142
+ */
143
+ deleteSkillAssets(id: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
144
+ private __deleteSkillAssets;
145
+ /**
146
+ * Delete a single skill asset by name.
147
+ *
148
+ * @param {string} id
149
+ * @param {string} assetName
150
+ * @param {SkillsClient.RequestOptions} requestOptions - Request-specific configuration.
151
+ *
152
+ * @throws {@link Minikai.NotFoundError}
153
+ *
154
+ * @example
155
+ * await client.skills.deleteSkillAsset("id", "assetName")
156
+ */
157
+ deleteSkillAsset(id: string, assetName: string, requestOptions?: SkillsClient.RequestOptions): core.HttpResponsePromise<Minikai.SkillDto>;
158
+ private __deleteSkillAsset;
159
+ }