minikai 1.0.1 → 1.0.2

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 (59) hide show
  1. package/README.md +45 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/minis/client/Client.d.ts +18 -1
  4. package/dist/cjs/api/resources/minis/client/Client.js +59 -2
  5. package/dist/cjs/api/resources/minis/client/requests/UpdateMiniLabelsCommand.d.ts +10 -0
  6. package/dist/cjs/api/resources/minis/client/requests/UploadMiniProfilePictureRequest.d.ts +3 -3
  7. package/dist/cjs/api/resources/minis/client/requests/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/records/client/Client.d.ts +6 -6
  9. package/dist/cjs/api/resources/records/client/Client.js +22 -15
  10. package/dist/cjs/api/resources/records/client/requests/AddAttachmentsRequest.d.ts +3 -3
  11. package/dist/cjs/api/resources/records/client/requests/BatchAddAttachmentsRequest.d.ts +3 -3
  12. package/dist/cjs/api/resources/records/client/requests/BatchUploadRecordsRequest.d.ts +4 -3
  13. package/dist/cjs/api/resources/records/client/requests/UpdateAttachmentsRequest.d.ts +3 -3
  14. package/dist/cjs/api/types/BatchUploadResult.d.ts +1 -0
  15. package/dist/cjs/api/types/BatchUpsertResult.d.ts +1 -0
  16. package/dist/cjs/api/types/DuplicateUpsertItemOfBatchUploadRecordItemDto.d.ts +10 -0
  17. package/dist/cjs/api/types/DuplicateUpsertItemOfUpsertRecordDto.d.ts +10 -0
  18. package/dist/cjs/api/types/DuplicateUpsertItemOfUpsertRecordDto.js +3 -0
  19. package/dist/cjs/api/types/ExistingDuplicateRecordMatch.d.ts +5 -0
  20. package/dist/cjs/api/types/ExistingDuplicateRecordMatch.js +3 -0
  21. package/dist/cjs/api/types/UpsertRecordsByExternalUriCommand.d.ts +1 -0
  22. package/dist/cjs/api/types/index.d.ts +3 -2
  23. package/dist/cjs/api/types/index.js +3 -2
  24. package/dist/cjs/version.d.ts +1 -1
  25. package/dist/cjs/version.js +1 -1
  26. package/dist/esm/BaseClient.mjs +2 -2
  27. package/dist/esm/api/resources/minis/client/Client.d.mts +18 -1
  28. package/dist/esm/api/resources/minis/client/Client.mjs +59 -2
  29. package/dist/esm/api/resources/minis/client/requests/UpdateMiniLabelsCommand.d.mts +10 -0
  30. package/dist/esm/api/resources/minis/client/requests/UploadMiniProfilePictureRequest.d.mts +3 -3
  31. package/dist/esm/api/resources/minis/client/requests/index.d.mts +1 -0
  32. package/dist/esm/api/resources/records/client/Client.d.mts +6 -6
  33. package/dist/esm/api/resources/records/client/Client.mjs +22 -15
  34. package/dist/esm/api/resources/records/client/requests/AddAttachmentsRequest.d.mts +3 -3
  35. package/dist/esm/api/resources/records/client/requests/BatchAddAttachmentsRequest.d.mts +3 -3
  36. package/dist/esm/api/resources/records/client/requests/BatchUploadRecordsRequest.d.mts +4 -3
  37. package/dist/esm/api/resources/records/client/requests/UpdateAttachmentsRequest.d.mts +3 -3
  38. package/dist/esm/api/types/BatchUploadResult.d.mts +1 -0
  39. package/dist/esm/api/types/BatchUpsertResult.d.mts +1 -0
  40. package/dist/esm/api/types/DuplicateUpsertItemOfBatchUploadRecordItemDto.d.mts +10 -0
  41. package/dist/esm/api/types/DuplicateUpsertItemOfUpsertRecordDto.d.mts +10 -0
  42. package/dist/esm/api/types/DuplicateUpsertItemOfUpsertRecordDto.mjs +2 -0
  43. package/dist/esm/api/types/ExistingDuplicateRecordMatch.d.mts +5 -0
  44. package/dist/esm/api/types/ExistingDuplicateRecordMatch.mjs +2 -0
  45. package/dist/esm/api/types/UpsertRecordsByExternalUriCommand.d.mts +1 -0
  46. package/dist/esm/api/types/index.d.mts +3 -2
  47. package/dist/esm/api/types/index.mjs +3 -2
  48. package/dist/esm/version.d.mts +1 -1
  49. package/dist/esm/version.mjs +1 -1
  50. package/package.json +1 -1
  51. package/reference.md +80 -7
  52. package/dist/cjs/api/types/IFormFile.d.ts +0 -1
  53. package/dist/cjs/api/types/IFormFileCollection.d.ts +0 -2
  54. package/dist/esm/api/types/IFormFile.d.mts +0 -1
  55. package/dist/esm/api/types/IFormFileCollection.d.mts +0 -2
  56. /package/dist/cjs/api/{types/IFormFile.js → resources/minis/client/requests/UpdateMiniLabelsCommand.js} +0 -0
  57. /package/dist/cjs/api/types/{IFormFileCollection.js → DuplicateUpsertItemOfBatchUploadRecordItemDto.js} +0 -0
  58. /package/dist/esm/api/{types/IFormFile.mjs → resources/minis/client/requests/UpdateMiniLabelsCommand.mjs} +0 -0
  59. /package/dist/esm/api/types/{IFormFileCollection.mjs → DuplicateUpsertItemOfBatchUploadRecordItemDto.mjs} +0 -0
@@ -498,6 +498,63 @@ export class MinisClient {
498
498
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/api/v1/Minis/{id}");
499
499
  });
500
500
  }
501
+ /**
502
+ * Replace a Mini's labels.
503
+ *
504
+ * @param {string} id - Either the Minikai-assigned Guid for this resource (e.g. `abc12345-1234-1234-1234-123456789abc`) or the resource's `externalUri`, URL-encoded (e.g. `https%3A%2F%2Fpartner.example.com%2Fpatients%2F48291`). Responses always return the canonical Guid in the `id` field.
505
+ * @param {Minikai.UpdateMiniLabelsCommand} request
506
+ * @param {MinisClient.RequestOptions} requestOptions - Request-specific configuration.
507
+ *
508
+ * @throws {@link Minikai.BadRequestError}
509
+ * @throws {@link Minikai.NotFoundError}
510
+ *
511
+ * @example
512
+ * await client.minis.updateMiniLabels("id", {
513
+ * labels: ["labels"]
514
+ * })
515
+ */
516
+ updateMiniLabels(id, request, requestOptions) {
517
+ return core.HttpResponsePromise.fromPromise(this.__updateMiniLabels(id, request, requestOptions));
518
+ }
519
+ __updateMiniLabels(id, request, requestOptions) {
520
+ return __awaiter(this, void 0, void 0, function* () {
521
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
522
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
523
+ 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);
524
+ const _response = yield core.fetcher({
525
+ 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/Minis/${core.url.encodePathParam(id)}/labels`),
526
+ method: "PUT",
527
+ headers: _headers,
528
+ contentType: "application/json",
529
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
530
+ requestType: "json",
531
+ body: request,
532
+ 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,
533
+ 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,
534
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
535
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
536
+ logging: this._options.logging,
537
+ });
538
+ if (_response.ok) {
539
+ return { data: undefined, rawResponse: _response.rawResponse };
540
+ }
541
+ if (_response.error.reason === "status-code") {
542
+ switch (_response.error.statusCode) {
543
+ case 400:
544
+ throw new Minikai.BadRequestError(_response.error.body, _response.rawResponse);
545
+ case 404:
546
+ throw new Minikai.NotFoundError(_response.error.body, _response.rawResponse);
547
+ default:
548
+ throw new errors.MinikaiError({
549
+ statusCode: _response.error.statusCode,
550
+ body: _response.error.body,
551
+ rawResponse: _response.rawResponse,
552
+ });
553
+ }
554
+ }
555
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/api/v1/Minis/{id}/labels");
556
+ });
557
+ }
501
558
  /**
502
559
  * List a Mini's version history.
503
560
  *
@@ -621,7 +678,7 @@ export class MinisClient {
621
678
  * @example
622
679
  * import { createReadStream } from "fs";
623
680
  * await client.minis.uploadMiniProfilePicture("id", {
624
- * file: "file"
681
+ * file: fs.createReadStream("/path/to/your/file")
625
682
  * })
626
683
  */
627
684
  uploadMiniProfilePicture(id, request, requestOptions) {
@@ -631,7 +688,7 @@ export class MinisClient {
631
688
  return __awaiter(this, void 0, void 0, function* () {
632
689
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
633
690
  const _body = yield core.newFormData();
634
- _body.append("file", request.file);
691
+ yield _body.appendFile("file", request.file);
635
692
  const _maybeEncodedRequest = yield _body.getRequest();
636
693
  const _authRequest = yield this._options.authProvider.getAuthRequest();
637
694
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * labels: ["labels"]
5
+ * }
6
+ */
7
+ export interface UpdateMiniLabelsCommand {
8
+ id?: string;
9
+ labels: string[];
10
+ }
@@ -1,10 +1,10 @@
1
- import type * as Minikai from "../../../../index.mjs";
1
+ import type * as core from "../../../../../core/index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * file: "file"
5
+ * file: fs.createReadStream("/path/to/your/file")
6
6
  * }
7
7
  */
8
8
  export interface UploadMiniProfilePictureRequest {
9
- file: Minikai.IFormFile;
9
+ file: core.file.Uploadable;
10
10
  }
@@ -5,5 +5,6 @@ export type { GetMiniVersionsRequest } from "./GetMiniVersionsRequest.mjs";
5
5
  export type { PatchMiniCommand } from "./PatchMiniCommand.mjs";
6
6
  export type { SearchMinisFullTextQuery } from "./SearchMinisFullTextQuery.mjs";
7
7
  export type { UpdateMiniCommand } from "./UpdateMiniCommand.mjs";
8
+ export type { UpdateMiniLabelsCommand } from "./UpdateMiniLabelsCommand.mjs";
8
9
  export type { UploadMiniProfilePictureRequest } from "./UploadMiniProfilePictureRequest.mjs";
9
10
  export type { UpsertExternalMiniCommand } from "./UpsertExternalMiniCommand.mjs";
@@ -190,7 +190,7 @@ export declare class RecordsClient {
190
190
  submitDraftRecord(recordId: string, request: Minikai.SubmitDraftRecordRequest, requestOptions?: RecordsClient.RequestOptions): core.HttpResponsePromise<string>;
191
191
  private __submitDraftRecord;
192
192
  /**
193
- * Create or update many Records in one request.
193
+ * Create or update many Records in one request. By default, create-only items with the same normalized title and exact eventDate as an existing accessible Record in the same Mini, or an earlier create-only item in the same request, are skipped and returned in Duplicates. Set allowDuplicates to true to skip duplicate detection.
194
194
  *
195
195
  * @param {Minikai.UpsertRecordsByExternalUriCommand} request
196
196
  * @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -220,7 +220,7 @@ export declare class RecordsClient {
220
220
  * @example
221
221
  * import { createReadStream } from "fs";
222
222
  * await client.records.batchAddAttachments({
223
- * files: ["files"],
223
+ * files: [fs.createReadStream("/path/to/your/file")],
224
224
  * items: "items"
225
225
  * })
226
226
  */
@@ -229,7 +229,7 @@ export declare class RecordsClient {
229
229
  /**
230
230
  * @deprecated
231
231
  *
232
- * Deprecated. Create Records with attachments in one request. Use POST /Records/batch followed by POST /Records/batch/attachments instead.
232
+ * Deprecated. Create Records with attachments in one request. By default, create-only items with the same normalized title and exact eventDate as an existing accessible Record in the same Mini, or an earlier create-only item in the same request, are skipped and returned in Duplicates. Set allowDuplicates to true to skip duplicate detection. Use POST /Records/batch followed by POST /Records/batch/attachments instead.
233
233
  *
234
234
  * @param {Minikai.BatchUploadRecordsRequest} request
235
235
  * @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -240,7 +240,7 @@ export declare class RecordsClient {
240
240
  * @example
241
241
  * import { createReadStream } from "fs";
242
242
  * await client.records.batchUploadRecords({
243
- * files: ["files"],
243
+ * files: [fs.createReadStream("/path/to/your/file")],
244
244
  * items: "items"
245
245
  * })
246
246
  */
@@ -296,7 +296,7 @@ export declare class RecordsClient {
296
296
  * @example
297
297
  * import { createReadStream } from "fs";
298
298
  * await client.records.addAttachments("recordId", {
299
- * files: ["files"]
299
+ * files: [fs.createReadStream("/path/to/your/file")]
300
300
  * })
301
301
  */
302
302
  addAttachments(recordId: string, request: Minikai.AddAttachmentsRequest, requestOptions?: RecordsClient.RequestOptions): core.HttpResponsePromise<string[]>;
@@ -314,7 +314,7 @@ export declare class RecordsClient {
314
314
  * @example
315
315
  * import { createReadStream } from "fs";
316
316
  * await client.records.updateAttachments("recordId", {
317
- * files: ["files"]
317
+ * files: [fs.createReadStream("/path/to/your/file")]
318
318
  * })
319
319
  */
320
320
  updateAttachments(recordId: string, request: Minikai.UpdateAttachmentsRequest, requestOptions?: RecordsClient.RequestOptions): core.HttpResponsePromise<string[]>;
@@ -717,7 +717,7 @@ export class RecordsClient {
717
717
  });
718
718
  }
719
719
  /**
720
- * Create or update many Records in one request.
720
+ * Create or update many Records in one request. By default, create-only items with the same normalized title and exact eventDate as an existing accessible Record in the same Mini, or an earlier create-only item in the same request, are skipped and returned in Duplicates. Set allowDuplicates to true to skip duplicate detection.
721
721
  *
722
722
  * @param {Minikai.UpsertRecordsByExternalUriCommand} request
723
723
  * @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -787,7 +787,7 @@ export class RecordsClient {
787
787
  * @example
788
788
  * import { createReadStream } from "fs";
789
789
  * await client.records.batchAddAttachments({
790
- * files: ["files"],
790
+ * files: [fs.createReadStream("/path/to/your/file")],
791
791
  * items: "items"
792
792
  * })
793
793
  */
@@ -798,8 +798,8 @@ export class RecordsClient {
798
798
  return __awaiter(this, void 0, void 0, function* () {
799
799
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
800
800
  const _body = yield core.newFormData();
801
- for (const _item of request.files) {
802
- _body.append("files", _item);
801
+ for (const _file of request.files) {
802
+ yield _body.appendFile("files", _file);
803
803
  }
804
804
  _body.append("items", request.items);
805
805
  const _maybeEncodedRequest = yield _body.getRequest();
@@ -842,7 +842,7 @@ export class RecordsClient {
842
842
  /**
843
843
  * @deprecated
844
844
  *
845
- * Deprecated. Create Records with attachments in one request. Use POST /Records/batch followed by POST /Records/batch/attachments instead.
845
+ * Deprecated. Create Records with attachments in one request. By default, create-only items with the same normalized title and exact eventDate as an existing accessible Record in the same Mini, or an earlier create-only item in the same request, are skipped and returned in Duplicates. Set allowDuplicates to true to skip duplicate detection. Use POST /Records/batch followed by POST /Records/batch/attachments instead.
846
846
  *
847
847
  * @param {Minikai.BatchUploadRecordsRequest} request
848
848
  * @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -853,7 +853,7 @@ export class RecordsClient {
853
853
  * @example
854
854
  * import { createReadStream } from "fs";
855
855
  * await client.records.batchUploadRecords({
856
- * files: ["files"],
856
+ * files: [fs.createReadStream("/path/to/your/file")],
857
857
  * items: "items"
858
858
  * })
859
859
  */
@@ -863,9 +863,12 @@ export class RecordsClient {
863
863
  __batchUploadRecords(request, requestOptions) {
864
864
  return __awaiter(this, void 0, void 0, function* () {
865
865
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
866
+ const _queryParams = {
867
+ allowDuplicates: request.allowDuplicates,
868
+ };
866
869
  const _body = yield core.newFormData();
867
- for (const _item of request.files) {
868
- _body.append("files", _item);
870
+ for (const _file of request.files) {
871
+ yield _body.appendFile("files", _file);
869
872
  }
870
873
  _body.append("items", request.items);
871
874
  const _maybeEncodedRequest = yield _body.getRequest();
@@ -875,7 +878,11 @@ export class RecordsClient {
875
878
  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/batch/upload"),
876
879
  method: "POST",
877
880
  headers: _headers,
878
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
881
+ queryString: core.url
882
+ .queryBuilder()
883
+ .addMany(_queryParams)
884
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
885
+ .build(),
879
886
  requestType: "file",
880
887
  duplex: _maybeEncodedRequest.duplex,
881
888
  body: _maybeEncodedRequest.body,
@@ -1038,7 +1045,7 @@ export class RecordsClient {
1038
1045
  * @example
1039
1046
  * import { createReadStream } from "fs";
1040
1047
  * await client.records.addAttachments("recordId", {
1041
- * files: ["files"]
1048
+ * files: [fs.createReadStream("/path/to/your/file")]
1042
1049
  * })
1043
1050
  */
1044
1051
  addAttachments(recordId, request, requestOptions) {
@@ -1048,8 +1055,8 @@ export class RecordsClient {
1048
1055
  return __awaiter(this, void 0, void 0, function* () {
1049
1056
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1050
1057
  const _body = yield core.newFormData();
1051
- for (const _item of request.files) {
1052
- _body.append("files", _item);
1058
+ for (const _file of request.files) {
1059
+ yield _body.appendFile("files", _file);
1053
1060
  }
1054
1061
  const _maybeEncodedRequest = yield _body.getRequest();
1055
1062
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -1101,7 +1108,7 @@ export class RecordsClient {
1101
1108
  * @example
1102
1109
  * import { createReadStream } from "fs";
1103
1110
  * await client.records.updateAttachments("recordId", {
1104
- * files: ["files"]
1111
+ * files: [fs.createReadStream("/path/to/your/file")]
1105
1112
  * })
1106
1113
  */
1107
1114
  updateAttachments(recordId, request, requestOptions) {
@@ -1111,8 +1118,8 @@ export class RecordsClient {
1111
1118
  return __awaiter(this, void 0, void 0, function* () {
1112
1119
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1113
1120
  const _body = yield core.newFormData();
1114
- for (const _item of request.files) {
1115
- _body.append("files", _item);
1121
+ for (const _file of request.files) {
1122
+ yield _body.appendFile("files", _file);
1116
1123
  }
1117
1124
  const _maybeEncodedRequest = yield _body.getRequest();
1118
1125
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -1,10 +1,10 @@
1
- import type * as Minikai from "../../../../index.mjs";
1
+ import type * as core from "../../../../../core/index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * files: ["files"]
5
+ * files: [fs.createReadStream("/path/to/your/file")]
6
6
  * }
7
7
  */
8
8
  export interface AddAttachmentsRequest {
9
- files: Minikai.IFormFileCollection;
9
+ files: core.file.Uploadable[];
10
10
  }
@@ -1,12 +1,12 @@
1
- import type * as Minikai from "../../../../index.mjs";
1
+ import type * as core from "../../../../../core/index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * files: ["files"],
5
+ * files: [fs.createReadStream("/path/to/your/file")],
6
6
  * items: "items"
7
7
  * }
8
8
  */
9
9
  export interface BatchAddAttachmentsRequest {
10
- files: Minikai.IFormFileCollection;
10
+ files: core.file.Uploadable[];
11
11
  items: string;
12
12
  }
@@ -1,12 +1,13 @@
1
- import type * as Minikai from "../../../../index.mjs";
1
+ import type * as core from "../../../../../core/index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * files: ["files"],
5
+ * files: [fs.createReadStream("/path/to/your/file")],
6
6
  * items: "items"
7
7
  * }
8
8
  */
9
9
  export interface BatchUploadRecordsRequest {
10
- files: Minikai.IFormFileCollection;
10
+ allowDuplicates?: boolean;
11
+ files: core.file.Uploadable[];
11
12
  items: string;
12
13
  }
@@ -1,10 +1,10 @@
1
- import type * as Minikai from "../../../../index.mjs";
1
+ import type * as core from "../../../../../core/index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * files: ["files"]
5
+ * files: [fs.createReadStream("/path/to/your/file")]
6
6
  * }
7
7
  */
8
8
  export interface UpdateAttachmentsRequest {
9
- files: Minikai.IFormFileCollection;
9
+ files: core.file.Uploadable[];
10
10
  }
@@ -2,6 +2,7 @@ import type * as Minikai from "../index.mjs";
2
2
  export interface BatchUploadResult {
3
3
  successfulIds?: Record<string, string> | undefined;
4
4
  failed?: Minikai.FailedUploadItem[] | undefined;
5
+ duplicates?: Minikai.DuplicateUpsertItemOfBatchUploadRecordItemDto[] | undefined;
5
6
  successCount?: unknown | undefined;
6
7
  failureCount?: unknown | undefined;
7
8
  }
@@ -2,6 +2,7 @@ import type * as Minikai from "../index.mjs";
2
2
  export interface BatchUpsertResult {
3
3
  successfulIds?: Record<string, string> | undefined;
4
4
  failed?: Minikai.FailedUpsertItem[] | undefined;
5
+ duplicates?: Minikai.DuplicateUpsertItemOfUpsertRecordDto[] | undefined;
5
6
  successCount?: unknown | undefined;
6
7
  failureCount?: unknown | undefined;
7
8
  }
@@ -0,0 +1,10 @@
1
+ import type * as Minikai from "../index.mjs";
2
+ export interface DuplicateUpsertItemOfBatchUploadRecordItemDto {
3
+ index?: unknown | undefined;
4
+ item: DuplicateUpsertItemOfBatchUploadRecordItemDto.Item;
5
+ existingMatches?: Minikai.ExistingDuplicateRecordMatch[] | undefined;
6
+ intraBatchDuplicateOf?: unknown[] | undefined;
7
+ }
8
+ export declare namespace DuplicateUpsertItemOfBatchUploadRecordItemDto {
9
+ type Item = unknown | null | Minikai.BatchUploadRecordItemDto;
10
+ }
@@ -0,0 +1,10 @@
1
+ import type * as Minikai from "../index.mjs";
2
+ export interface DuplicateUpsertItemOfUpsertRecordDto {
3
+ index?: unknown | undefined;
4
+ item: DuplicateUpsertItemOfUpsertRecordDto.Item;
5
+ existingMatches?: Minikai.ExistingDuplicateRecordMatch[] | undefined;
6
+ intraBatchDuplicateOf?: unknown[] | undefined;
7
+ }
8
+ export declare namespace DuplicateUpsertItemOfUpsertRecordDto {
9
+ type Item = unknown | null | Minikai.UpsertRecordDto;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface ExistingDuplicateRecordMatch {
2
+ recordId: string;
3
+ title?: (string | null) | undefined;
4
+ eventDate?: (string | null) | undefined;
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type * as Minikai from "../index.mjs";
2
2
  export interface UpsertRecordsByExternalUriCommand {
3
3
  items: Minikai.UpsertRecordDto[];
4
+ allowDuplicates?: boolean | undefined;
4
5
  }
@@ -6,14 +6,15 @@ export * from "./BatchUpsertResult.mjs";
6
6
  export * from "./CursorPaginatedListOfMiniVersionDto.mjs";
7
7
  export * from "./CursorPaginatedListOfRecordDto.mjs";
8
8
  export * from "./CursorPaginatedListOfRecordVersionDto.mjs";
9
+ export * from "./DuplicateUpsertItemOfBatchUploadRecordItemDto.mjs";
10
+ export * from "./DuplicateUpsertItemOfUpsertRecordDto.mjs";
11
+ export * from "./ExistingDuplicateRecordMatch.mjs";
9
12
  export * from "./FailedAttachmentItem.mjs";
10
13
  export * from "./FailedUploadItem.mjs";
11
14
  export * from "./FailedUpsertItem.mjs";
12
15
  export * from "./HttpValidationProblemDetails.mjs";
13
16
  export * from "./Identity.mjs";
14
17
  export * from "./IdentityKind.mjs";
15
- export * from "./IFormFile.mjs";
16
- export * from "./IFormFileCollection.mjs";
17
18
  export * from "./LabelDto.mjs";
18
19
  export * from "./LabelGroupDto.mjs";
19
20
  export * from "./LabelResourceType.mjs";
@@ -6,14 +6,15 @@ export * from "./BatchUpsertResult.mjs";
6
6
  export * from "./CursorPaginatedListOfMiniVersionDto.mjs";
7
7
  export * from "./CursorPaginatedListOfRecordDto.mjs";
8
8
  export * from "./CursorPaginatedListOfRecordVersionDto.mjs";
9
+ export * from "./DuplicateUpsertItemOfBatchUploadRecordItemDto.mjs";
10
+ export * from "./DuplicateUpsertItemOfUpsertRecordDto.mjs";
11
+ export * from "./ExistingDuplicateRecordMatch.mjs";
9
12
  export * from "./FailedAttachmentItem.mjs";
10
13
  export * from "./FailedUploadItem.mjs";
11
14
  export * from "./FailedUpsertItem.mjs";
12
15
  export * from "./HttpValidationProblemDetails.mjs";
13
16
  export * from "./Identity.mjs";
14
17
  export * from "./IdentityKind.mjs";
15
- export * from "./IFormFile.mjs";
16
- export * from "./IFormFileCollection.mjs";
17
18
  export * from "./LabelDto.mjs";
18
19
  export * from "./LabelGroupDto.mjs";
19
20
  export * from "./LabelResourceType.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.1";
1
+ export declare const SDK_VERSION = "1.0.2";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.1";
1
+ export const SDK_VERSION = "1.0.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minikai",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -860,6 +860,79 @@ await client.minis.patchMini("id");
860
860
  </dl>
861
861
 
862
862
 
863
+ </dd>
864
+ </dl>
865
+ </details>
866
+
867
+ <details><summary><code>client.minis.<a href="/src/api/resources/minis/client/Client.ts">updateMiniLabels</a>(id, { ...params }) -> void</code></summary>
868
+ <dl>
869
+ <dd>
870
+
871
+ #### 📝 Description
872
+
873
+ <dl>
874
+ <dd>
875
+
876
+ <dl>
877
+ <dd>
878
+
879
+ Replace a Mini's labels.
880
+ </dd>
881
+ </dl>
882
+ </dd>
883
+ </dl>
884
+
885
+ #### 🔌 Usage
886
+
887
+ <dl>
888
+ <dd>
889
+
890
+ <dl>
891
+ <dd>
892
+
893
+ ```typescript
894
+ await client.minis.updateMiniLabels("id", {
895
+ labels: ["labels"]
896
+ });
897
+
898
+ ```
899
+ </dd>
900
+ </dl>
901
+ </dd>
902
+ </dl>
903
+
904
+ #### ⚙️ Parameters
905
+
906
+ <dl>
907
+ <dd>
908
+
909
+ <dl>
910
+ <dd>
911
+
912
+ **id:** `string` — Either the Minikai-assigned Guid for this resource (e.g. `abc12345-1234-1234-1234-123456789abc`) or the resource's `externalUri`, URL-encoded (e.g. `https%3A%2F%2Fpartner.example.com%2Fpatients%2F48291`). Responses always return the canonical Guid in the `id` field.
913
+
914
+ </dd>
915
+ </dl>
916
+
917
+ <dl>
918
+ <dd>
919
+
920
+ **request:** `Minikai.UpdateMiniLabelsCommand`
921
+
922
+ </dd>
923
+ </dl>
924
+
925
+ <dl>
926
+ <dd>
927
+
928
+ **requestOptions:** `MinisClient.RequestOptions`
929
+
930
+ </dd>
931
+ </dl>
932
+ </dd>
933
+ </dl>
934
+
935
+
863
936
  </dd>
864
937
  </dl>
865
938
  </details>
@@ -1034,7 +1107,7 @@ Upload a profile picture for a Mini.
1034
1107
 
1035
1108
  ```typescript
1036
1109
  await client.minis.uploadMiniProfilePicture("id", {
1037
- file: "file"
1110
+ file: fs.createReadStream("/path/to/your/file")
1038
1111
  });
1039
1112
 
1040
1113
  ```
@@ -1983,7 +2056,7 @@ await client.records.submitDraftRecord("recordId", {
1983
2056
  <dl>
1984
2057
  <dd>
1985
2058
 
1986
- Create or update many Records in one request.
2059
+ Create or update many Records in one request. By default, create-only items with the same normalized title and exact eventDate as an existing accessible Record in the same Mini, or an earlier create-only item in the same request, are skipped and returned in Duplicates. Set allowDuplicates to true to skip duplicate detection.
1987
2060
  </dd>
1988
2061
  </dl>
1989
2062
  </dd>
@@ -2067,7 +2140,7 @@ Add attachments to many Records in one request.
2067
2140
 
2068
2141
  ```typescript
2069
2142
  await client.records.batchAddAttachments({
2070
- files: ["files"],
2143
+ files: [fs.createReadStream("/path/to/your/file")],
2071
2144
  items: "items"
2072
2145
  });
2073
2146
 
@@ -2117,7 +2190,7 @@ await client.records.batchAddAttachments({
2117
2190
  <dl>
2118
2191
  <dd>
2119
2192
 
2120
- Deprecated. Create Records with attachments in one request. Use POST /Records/batch followed by POST /Records/batch/attachments instead.
2193
+ Deprecated. Create Records with attachments in one request. By default, create-only items with the same normalized title and exact eventDate as an existing accessible Record in the same Mini, or an earlier create-only item in the same request, are skipped and returned in Duplicates. Set allowDuplicates to true to skip duplicate detection. Use POST /Records/batch followed by POST /Records/batch/attachments instead.
2121
2194
  </dd>
2122
2195
  </dl>
2123
2196
  </dd>
@@ -2133,7 +2206,7 @@ Deprecated. Create Records with attachments in one request. Use POST /Records/ba
2133
2206
 
2134
2207
  ```typescript
2135
2208
  await client.records.batchUploadRecords({
2136
- files: ["files"],
2209
+ files: [fs.createReadStream("/path/to/your/file")],
2137
2210
  items: "items"
2138
2211
  });
2139
2212
 
@@ -2333,7 +2406,7 @@ Add attachments to a Record.
2333
2406
 
2334
2407
  ```typescript
2335
2408
  await client.records.addAttachments("recordId", {
2336
- files: ["files"]
2409
+ files: [fs.createReadStream("/path/to/your/file")]
2337
2410
  });
2338
2411
 
2339
2412
  ```
@@ -2406,7 +2479,7 @@ Replace a Record's attachments.
2406
2479
 
2407
2480
  ```typescript
2408
2481
  await client.records.updateAttachments("recordId", {
2409
- files: ["files"]
2482
+ files: [fs.createReadStream("/path/to/your/file")]
2410
2483
  });
2411
2484
 
2412
2485
  ```
@@ -1 +0,0 @@
1
- export type IFormFile = string;
@@ -1,2 +0,0 @@
1
- import type * as Minikai from "../index.js";
2
- export type IFormFileCollection = Minikai.IFormFile[];
@@ -1 +0,0 @@
1
- export type IFormFile = string;
@@ -1,2 +0,0 @@
1
- import type * as Minikai from "../index.mjs";
2
- export type IFormFileCollection = Minikai.IFormFile[];