phenoml 6.3.0 → 6.4.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 (68) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/agent/client/Client.d.ts +8 -1
  3. package/dist/cjs/api/resources/agent/client/Client.js +82 -1
  4. package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +2 -0
  5. package/dist/cjs/api/resources/agent/client/requests/AgentStreamChatRequest.d.ts +31 -0
  6. package/dist/cjs/api/resources/agent/client/requests/AgentStreamChatRequest.js +3 -0
  7. package/dist/cjs/api/resources/agent/client/requests/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/agent/types/AgentChatStreamEvent.d.ts +36 -0
  9. package/dist/cjs/api/resources/agent/types/AgentChatStreamEvent.js +16 -0
  10. package/dist/cjs/api/resources/agent/types/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/agent/types/index.js +1 -0
  12. package/dist/cjs/api/resources/construe/client/Client.d.ts +2 -2
  13. package/dist/cjs/api/resources/construe/client/Client.js +6 -6
  14. package/dist/cjs/api/resources/fhir/client/Client.d.ts +49 -49
  15. package/dist/cjs/api/resources/fhir/client/Client.js +69 -69
  16. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +10 -10
  17. package/dist/cjs/api/resources/fhirProvider/client/Client.js +25 -25
  18. package/dist/cjs/api/resources/fhirProvider/types/Provider.d.ts +1 -0
  19. package/dist/cjs/api/resources/fhirProvider/types/Provider.js +1 -0
  20. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.d.ts +4 -4
  21. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +10 -10
  22. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +8 -8
  23. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +20 -20
  24. package/dist/cjs/core/fetcher/Fetcher.js +12 -6
  25. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
  26. package/dist/cjs/core/index.d.ts +1 -0
  27. package/dist/cjs/core/index.js +1 -0
  28. package/dist/cjs/core/stream/Stream.d.ts +47 -0
  29. package/dist/cjs/core/stream/Stream.js +175 -0
  30. package/dist/cjs/core/stream/index.d.ts +1 -0
  31. package/dist/cjs/core/stream/index.js +5 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/Client.mjs +2 -2
  35. package/dist/esm/api/resources/agent/client/Client.d.mts +8 -1
  36. package/dist/esm/api/resources/agent/client/Client.mjs +82 -1
  37. package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +2 -0
  38. package/dist/esm/api/resources/agent/client/requests/AgentStreamChatRequest.d.mts +31 -0
  39. package/dist/esm/api/resources/agent/client/requests/AgentStreamChatRequest.mjs +2 -0
  40. package/dist/esm/api/resources/agent/client/requests/index.d.mts +1 -0
  41. package/dist/esm/api/resources/agent/types/AgentChatStreamEvent.d.mts +36 -0
  42. package/dist/esm/api/resources/agent/types/AgentChatStreamEvent.mjs +13 -0
  43. package/dist/esm/api/resources/agent/types/index.d.mts +1 -0
  44. package/dist/esm/api/resources/agent/types/index.mjs +1 -0
  45. package/dist/esm/api/resources/construe/client/Client.d.mts +2 -2
  46. package/dist/esm/api/resources/construe/client/Client.mjs +6 -6
  47. package/dist/esm/api/resources/fhir/client/Client.d.mts +49 -49
  48. package/dist/esm/api/resources/fhir/client/Client.mjs +69 -69
  49. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +10 -10
  50. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +25 -25
  51. package/dist/esm/api/resources/fhirProvider/types/Provider.d.mts +1 -0
  52. package/dist/esm/api/resources/fhirProvider/types/Provider.mjs +1 -0
  53. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.d.mts +4 -4
  54. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +10 -10
  55. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +8 -8
  56. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +20 -20
  57. package/dist/esm/core/fetcher/Fetcher.mjs +12 -6
  58. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
  59. package/dist/esm/core/index.d.mts +1 -0
  60. package/dist/esm/core/index.mjs +1 -0
  61. package/dist/esm/core/stream/Stream.d.mts +47 -0
  62. package/dist/esm/core/stream/Stream.mjs +170 -0
  63. package/dist/esm/core/stream/index.d.mts +1 -0
  64. package/dist/esm/core/stream/index.mjs +1 -0
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +115 -42
@@ -55,7 +55,7 @@ export declare class FhirProvider {
55
55
  * Sandbox providers return FhirProviderSandboxInfo.
56
56
  * On shared instances, only sandbox providers can be accessed.
57
57
  *
58
- * @param {string} fhirProviderId - ID of the FHIR provider to retrieve
58
+ * @param {string} fhir_provider_id - ID of the FHIR provider to retrieve
59
59
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
60
60
  *
61
61
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
@@ -65,14 +65,14 @@ export declare class FhirProvider {
65
65
  * @example
66
66
  * await client.fhirProvider.get("fhir_provider_id")
67
67
  */
68
- get(fhirProviderId: string, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
68
+ get(fhir_provider_id: string, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
69
69
  private __get;
70
70
  /**
71
71
  * Soft deletes a FHIR provider by setting is_active to false.
72
72
  *
73
73
  * Note: Sandbox providers cannot be deleted.
74
74
  *
75
- * @param {string} fhirProviderId - ID of the FHIR provider to delete
75
+ * @param {string} fhir_provider_id - ID of the FHIR provider to delete
76
76
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
77
77
  *
78
78
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
@@ -83,7 +83,7 @@ export declare class FhirProvider {
83
83
  * @example
84
84
  * await client.fhirProvider.delete("fhir_provider_id")
85
85
  */
86
- delete(fhirProviderId: string, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderDeleteResponse>;
86
+ delete(fhir_provider_id: string, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderDeleteResponse>;
87
87
  private __delete;
88
88
  /**
89
89
  * Adds a new authentication configuration to an existing FHIR provider.
@@ -91,7 +91,7 @@ export declare class FhirProvider {
91
91
  *
92
92
  * Note: Sandbox providers cannot be modified.
93
93
  *
94
- * @param {string} fhirProviderId - ID of the FHIR provider to add auth config to
94
+ * @param {string} fhir_provider_id - ID of the FHIR provider to add auth config to
95
95
  * @param {phenoml.fhirProvider.FhirProviderAddAuthConfigRequest} request
96
96
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
97
97
  *
@@ -106,7 +106,7 @@ export declare class FhirProvider {
106
106
  * auth_method: "client_secret"
107
107
  * })
108
108
  */
109
- addAuthConfig(fhirProviderId: string, request: phenoml.fhirProvider.FhirProviderAddAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
109
+ addAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderAddAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
110
110
  private __addAuthConfig;
111
111
  /**
112
112
  * Sets which authentication configuration should be active for a FHIR provider.
@@ -117,7 +117,7 @@ export declare class FhirProvider {
117
117
  *
118
118
  * Note: Sandbox providers cannot be modified.
119
119
  *
120
- * @param {string} fhirProviderId - ID of the FHIR provider
120
+ * @param {string} fhir_provider_id - ID of the FHIR provider
121
121
  * @param {phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest} request
122
122
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
123
123
  *
@@ -132,7 +132,7 @@ export declare class FhirProvider {
132
132
  * auth_config_id: "auth-config-123"
133
133
  * })
134
134
  */
135
- setActiveAuthConfig(fhirProviderId: string, request: phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
135
+ setActiveAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
136
136
  private __setActiveAuthConfig;
137
137
  /**
138
138
  * Removes an authentication configuration from a FHIR provider.
@@ -140,7 +140,7 @@ export declare class FhirProvider {
140
140
  *
141
141
  * Note: Sandbox providers cannot be modified.
142
142
  *
143
- * @param {string} fhirProviderId - ID of the FHIR provider
143
+ * @param {string} fhir_provider_id - ID of the FHIR provider
144
144
  * @param {phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest} request
145
145
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
146
146
  *
@@ -155,7 +155,7 @@ export declare class FhirProvider {
155
155
  * auth_config_id: "auth-config-123"
156
156
  * })
157
157
  */
158
- removeAuthConfig(fhirProviderId: string, request: phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderRemoveAuthConfigResponse>;
158
+ removeAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest, requestOptions?: FhirProvider.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderRemoveAuthConfigResponse>;
159
159
  private __removeAuthConfig;
160
160
  protected _getAuthorizationHeader(): Promise<string>;
161
161
  }
@@ -175,7 +175,7 @@ export class FhirProvider {
175
175
  * Sandbox providers return FhirProviderSandboxInfo.
176
176
  * On shared instances, only sandbox providers can be accessed.
177
177
  *
178
- * @param {string} fhirProviderId - ID of the FHIR provider to retrieve
178
+ * @param {string} fhir_provider_id - ID of the FHIR provider to retrieve
179
179
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
180
180
  *
181
181
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
@@ -185,15 +185,15 @@ export class FhirProvider {
185
185
  * @example
186
186
  * await client.fhirProvider.get("fhir_provider_id")
187
187
  */
188
- get(fhirProviderId, requestOptions) {
189
- return core.HttpResponsePromise.fromPromise(this.__get(fhirProviderId, requestOptions));
188
+ get(fhir_provider_id, requestOptions) {
189
+ return core.HttpResponsePromise.fromPromise(this.__get(fhir_provider_id, requestOptions));
190
190
  }
191
- __get(fhirProviderId, requestOptions) {
191
+ __get(fhir_provider_id, requestOptions) {
192
192
  return __awaiter(this, void 0, void 0, function* () {
193
193
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
194
194
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
195
195
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
196
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}`),
196
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}`),
197
197
  method: "GET",
198
198
  headers: _headers,
199
199
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -247,7 +247,7 @@ export class FhirProvider {
247
247
  *
248
248
  * Note: Sandbox providers cannot be deleted.
249
249
  *
250
- * @param {string} fhirProviderId - ID of the FHIR provider to delete
250
+ * @param {string} fhir_provider_id - ID of the FHIR provider to delete
251
251
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
252
252
  *
253
253
  * @throws {@link phenoml.fhirProvider.UnauthorizedError}
@@ -258,15 +258,15 @@ export class FhirProvider {
258
258
  * @example
259
259
  * await client.fhirProvider.delete("fhir_provider_id")
260
260
  */
261
- delete(fhirProviderId, requestOptions) {
262
- return core.HttpResponsePromise.fromPromise(this.__delete(fhirProviderId, requestOptions));
261
+ delete(fhir_provider_id, requestOptions) {
262
+ return core.HttpResponsePromise.fromPromise(this.__delete(fhir_provider_id, requestOptions));
263
263
  }
264
- __delete(fhirProviderId, requestOptions) {
264
+ __delete(fhir_provider_id, requestOptions) {
265
265
  return __awaiter(this, void 0, void 0, function* () {
266
266
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
267
267
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
268
268
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
269
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}`),
269
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}`),
270
270
  method: "DELETE",
271
271
  headers: _headers,
272
272
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -323,7 +323,7 @@ export class FhirProvider {
323
323
  *
324
324
  * Note: Sandbox providers cannot be modified.
325
325
  *
326
- * @param {string} fhirProviderId - ID of the FHIR provider to add auth config to
326
+ * @param {string} fhir_provider_id - ID of the FHIR provider to add auth config to
327
327
  * @param {phenoml.fhirProvider.FhirProviderAddAuthConfigRequest} request
328
328
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
329
329
  *
@@ -338,15 +338,15 @@ export class FhirProvider {
338
338
  * auth_method: "client_secret"
339
339
  * })
340
340
  */
341
- addAuthConfig(fhirProviderId, request, requestOptions) {
342
- return core.HttpResponsePromise.fromPromise(this.__addAuthConfig(fhirProviderId, request, requestOptions));
341
+ addAuthConfig(fhir_provider_id, request, requestOptions) {
342
+ return core.HttpResponsePromise.fromPromise(this.__addAuthConfig(fhir_provider_id, request, requestOptions));
343
343
  }
344
- __addAuthConfig(fhirProviderId, request, requestOptions) {
344
+ __addAuthConfig(fhir_provider_id, request, requestOptions) {
345
345
  return __awaiter(this, void 0, void 0, function* () {
346
346
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
347
347
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
348
348
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
349
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}/add-auth-config`),
349
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/add-auth-config`),
350
350
  method: "PATCH",
351
351
  headers: _headers,
352
352
  contentType: "application/json",
@@ -411,7 +411,7 @@ export class FhirProvider {
411
411
  *
412
412
  * Note: Sandbox providers cannot be modified.
413
413
  *
414
- * @param {string} fhirProviderId - ID of the FHIR provider
414
+ * @param {string} fhir_provider_id - ID of the FHIR provider
415
415
  * @param {phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest} request
416
416
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
417
417
  *
@@ -426,15 +426,15 @@ export class FhirProvider {
426
426
  * auth_config_id: "auth-config-123"
427
427
  * })
428
428
  */
429
- setActiveAuthConfig(fhirProviderId, request, requestOptions) {
430
- return core.HttpResponsePromise.fromPromise(this.__setActiveAuthConfig(fhirProviderId, request, requestOptions));
429
+ setActiveAuthConfig(fhir_provider_id, request, requestOptions) {
430
+ return core.HttpResponsePromise.fromPromise(this.__setActiveAuthConfig(fhir_provider_id, request, requestOptions));
431
431
  }
432
- __setActiveAuthConfig(fhirProviderId, request, requestOptions) {
432
+ __setActiveAuthConfig(fhir_provider_id, request, requestOptions) {
433
433
  return __awaiter(this, void 0, void 0, function* () {
434
434
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
435
435
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
436
436
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
437
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}/set-active-auth-config`),
437
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/set-active-auth-config`),
438
438
  method: "PATCH",
439
439
  headers: _headers,
440
440
  contentType: "application/json",
@@ -496,7 +496,7 @@ export class FhirProvider {
496
496
  *
497
497
  * Note: Sandbox providers cannot be modified.
498
498
  *
499
- * @param {string} fhirProviderId - ID of the FHIR provider
499
+ * @param {string} fhir_provider_id - ID of the FHIR provider
500
500
  * @param {phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest} request
501
501
  * @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
502
502
  *
@@ -511,15 +511,15 @@ export class FhirProvider {
511
511
  * auth_config_id: "auth-config-123"
512
512
  * })
513
513
  */
514
- removeAuthConfig(fhirProviderId, request, requestOptions) {
515
- return core.HttpResponsePromise.fromPromise(this.__removeAuthConfig(fhirProviderId, request, requestOptions));
514
+ removeAuthConfig(fhir_provider_id, request, requestOptions) {
515
+ return core.HttpResponsePromise.fromPromise(this.__removeAuthConfig(fhir_provider_id, request, requestOptions));
516
516
  }
517
- __removeAuthConfig(fhirProviderId, request, requestOptions) {
517
+ __removeAuthConfig(fhir_provider_id, request, requestOptions) {
518
518
  return __awaiter(this, void 0, void 0, function* () {
519
519
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
520
520
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
521
521
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
522
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhirProviderId)}/remove-auth-config`),
522
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/remove-auth-config`),
523
523
  method: "PATCH",
524
524
  headers: _headers,
525
525
  contentType: "application/json",
@@ -13,6 +13,7 @@ export declare const Provider: {
13
13
  readonly GoogleHealthcare: "google_healthcare";
14
14
  readonly Hapi: "hapi";
15
15
  readonly Medplum: "medplum";
16
+ readonly Phenostore: "phenostore";
16
17
  readonly Sandbox: "sandbox";
17
18
  };
18
19
  export type Provider = (typeof Provider)[keyof typeof Provider];
@@ -14,5 +14,6 @@ export const Provider = {
14
14
  GoogleHealthcare: "google_healthcare",
15
15
  Hapi: "hapi",
16
16
  Medplum: "medplum",
17
+ Phenostore: "phenostore",
17
18
  Sandbox: "sandbox",
18
19
  };
@@ -49,7 +49,7 @@ export declare class McpServer {
49
49
  /**
50
50
  * Gets a MCP server by ID
51
51
  *
52
- * @param {string} mcpServerId - ID of the MCP server to retrieve
52
+ * @param {string} mcp_server_id - ID of the MCP server to retrieve
53
53
  * @param {McpServer.RequestOptions} requestOptions - Request-specific configuration.
54
54
  *
55
55
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -59,12 +59,12 @@ export declare class McpServer {
59
59
  * @example
60
60
  * await client.tools.mcpServer.get("mcp_server_id")
61
61
  */
62
- get(mcpServerId: string, requestOptions?: McpServer.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
62
+ get(mcp_server_id: string, requestOptions?: McpServer.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
63
63
  private __get;
64
64
  /**
65
65
  * Deletes a MCP server by ID
66
66
  *
67
- * @param {string} mcpServerId - ID of the MCP server to delete
67
+ * @param {string} mcp_server_id - ID of the MCP server to delete
68
68
  * @param {McpServer.RequestOptions} requestOptions - Request-specific configuration.
69
69
  *
70
70
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -74,7 +74,7 @@ export declare class McpServer {
74
74
  * @example
75
75
  * await client.tools.mcpServer.delete("mcp_server_id")
76
76
  */
77
- delete(mcpServerId: string, requestOptions?: McpServer.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
77
+ delete(mcp_server_id: string, requestOptions?: McpServer.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
78
78
  private __delete;
79
79
  protected _getAuthorizationHeader(): Promise<string>;
80
80
  }
@@ -167,7 +167,7 @@ export class McpServer {
167
167
  /**
168
168
  * Gets a MCP server by ID
169
169
  *
170
- * @param {string} mcpServerId - ID of the MCP server to retrieve
170
+ * @param {string} mcp_server_id - ID of the MCP server to retrieve
171
171
  * @param {McpServer.RequestOptions} requestOptions - Request-specific configuration.
172
172
  *
173
173
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -177,15 +177,15 @@ export class McpServer {
177
177
  * @example
178
178
  * await client.tools.mcpServer.get("mcp_server_id")
179
179
  */
180
- get(mcpServerId, requestOptions) {
181
- return core.HttpResponsePromise.fromPromise(this.__get(mcpServerId, requestOptions));
180
+ get(mcp_server_id, requestOptions) {
181
+ return core.HttpResponsePromise.fromPromise(this.__get(mcp_server_id, requestOptions));
182
182
  }
183
- __get(mcpServerId, requestOptions) {
183
+ __get(mcp_server_id, requestOptions) {
184
184
  return __awaiter(this, void 0, void 0, function* () {
185
185
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
186
186
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
187
187
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
188
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcpServerId)}`),
188
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}`),
189
189
  method: "GET",
190
190
  headers: _headers,
191
191
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -234,7 +234,7 @@ export class McpServer {
234
234
  /**
235
235
  * Deletes a MCP server by ID
236
236
  *
237
- * @param {string} mcpServerId - ID of the MCP server to delete
237
+ * @param {string} mcp_server_id - ID of the MCP server to delete
238
238
  * @param {McpServer.RequestOptions} requestOptions - Request-specific configuration.
239
239
  *
240
240
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -244,15 +244,15 @@ export class McpServer {
244
244
  * @example
245
245
  * await client.tools.mcpServer.delete("mcp_server_id")
246
246
  */
247
- delete(mcpServerId, requestOptions) {
248
- return core.HttpResponsePromise.fromPromise(this.__delete(mcpServerId, requestOptions));
247
+ delete(mcp_server_id, requestOptions) {
248
+ return core.HttpResponsePromise.fromPromise(this.__delete(mcp_server_id, requestOptions));
249
249
  }
250
- __delete(mcpServerId, requestOptions) {
250
+ __delete(mcp_server_id, requestOptions) {
251
251
  return __awaiter(this, void 0, void 0, function* () {
252
252
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
253
253
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
254
254
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
255
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcpServerId)}`),
255
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}`),
256
256
  method: "DELETE",
257
257
  headers: _headers,
258
258
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -13,7 +13,7 @@ export declare class Tools {
13
13
  /**
14
14
  * Lists all MCP server tools for a specific MCP server
15
15
  *
16
- * @param {string} mcpServerId - ID of the MCP server to list tools for
16
+ * @param {string} mcp_server_id - ID of the MCP server to list tools for
17
17
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
19
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -23,12 +23,12 @@ export declare class Tools {
23
23
  * @example
24
24
  * await client.tools.mcpServer.tools.list("mcp_server_id")
25
25
  */
26
- list(mcpServerId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
26
+ list(mcp_server_id: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
27
27
  private __list;
28
28
  /**
29
29
  * Gets a MCP server tool by ID
30
30
  *
31
- * @param {string} mcpServerToolId - ID of the MCP server tool to retrieve
31
+ * @param {string} mcp_server_tool_id - ID of the MCP server tool to retrieve
32
32
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
33
33
  *
34
34
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -38,12 +38,12 @@ export declare class Tools {
38
38
  * @example
39
39
  * await client.tools.mcpServer.tools.get("mcp_server_tool_id")
40
40
  */
41
- get(mcpServerToolId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
41
+ get(mcp_server_tool_id: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
42
42
  private __get;
43
43
  /**
44
44
  * Deletes a MCP server tool by ID
45
45
  *
46
- * @param {string} mcpServerToolId - ID of the MCP server tool to delete
46
+ * @param {string} mcp_server_tool_id - ID of the MCP server tool to delete
47
47
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
48
48
  *
49
49
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -53,12 +53,12 @@ export declare class Tools {
53
53
  * @example
54
54
  * await client.tools.mcpServer.tools.delete("mcp_server_tool_id")
55
55
  */
56
- delete(mcpServerToolId: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
56
+ delete(mcp_server_tool_id: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
57
57
  private __delete;
58
58
  /**
59
59
  * Calls a MCP server tool
60
60
  *
61
- * @param {string} mcpServerToolId - ID of the MCP server tool to call
61
+ * @param {string} mcp_server_tool_id - ID of the MCP server tool to call
62
62
  * @param {phenoml.tools.mcpServer.McpServerToolCallRequest} request
63
63
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
64
64
  *
@@ -74,7 +74,7 @@ export declare class Tools {
74
74
  * }
75
75
  * })
76
76
  */
77
- call(mcpServerToolId: string, request: phenoml.tools.mcpServer.McpServerToolCallRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolCallResponse>;
77
+ call(mcp_server_tool_id: string, request: phenoml.tools.mcpServer.McpServerToolCallRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolCallResponse>;
78
78
  private __call;
79
79
  protected _getAuthorizationHeader(): Promise<string>;
80
80
  }
@@ -20,7 +20,7 @@ export class Tools {
20
20
  /**
21
21
  * Lists all MCP server tools for a specific MCP server
22
22
  *
23
- * @param {string} mcpServerId - ID of the MCP server to list tools for
23
+ * @param {string} mcp_server_id - ID of the MCP server to list tools for
24
24
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
25
25
  *
26
26
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -30,15 +30,15 @@ export class Tools {
30
30
  * @example
31
31
  * await client.tools.mcpServer.tools.list("mcp_server_id")
32
32
  */
33
- list(mcpServerId, requestOptions) {
34
- return core.HttpResponsePromise.fromPromise(this.__list(mcpServerId, requestOptions));
33
+ list(mcp_server_id, requestOptions) {
34
+ return core.HttpResponsePromise.fromPromise(this.__list(mcp_server_id, requestOptions));
35
35
  }
36
- __list(mcpServerId, requestOptions) {
36
+ __list(mcp_server_id, requestOptions) {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
39
39
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
40
40
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
41
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcpServerId)}/list`),
41
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}/list`),
42
42
  method: "GET",
43
43
  headers: _headers,
44
44
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -87,7 +87,7 @@ export class Tools {
87
87
  /**
88
88
  * Gets a MCP server tool by ID
89
89
  *
90
- * @param {string} mcpServerToolId - ID of the MCP server tool to retrieve
90
+ * @param {string} mcp_server_tool_id - ID of the MCP server tool to retrieve
91
91
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
92
92
  *
93
93
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -97,15 +97,15 @@ export class Tools {
97
97
  * @example
98
98
  * await client.tools.mcpServer.tools.get("mcp_server_tool_id")
99
99
  */
100
- get(mcpServerToolId, requestOptions) {
101
- return core.HttpResponsePromise.fromPromise(this.__get(mcpServerToolId, requestOptions));
100
+ get(mcp_server_tool_id, requestOptions) {
101
+ return core.HttpResponsePromise.fromPromise(this.__get(mcp_server_tool_id, requestOptions));
102
102
  }
103
- __get(mcpServerToolId, requestOptions) {
103
+ __get(mcp_server_tool_id, requestOptions) {
104
104
  return __awaiter(this, void 0, void 0, function* () {
105
105
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
106
106
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
107
107
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
108
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcpServerToolId)}`),
108
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}`),
109
109
  method: "GET",
110
110
  headers: _headers,
111
111
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -154,7 +154,7 @@ export class Tools {
154
154
  /**
155
155
  * Deletes a MCP server tool by ID
156
156
  *
157
- * @param {string} mcpServerToolId - ID of the MCP server tool to delete
157
+ * @param {string} mcp_server_tool_id - ID of the MCP server tool to delete
158
158
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
159
159
  *
160
160
  * @throws {@link phenoml.tools.UnauthorizedError}
@@ -164,15 +164,15 @@ export class Tools {
164
164
  * @example
165
165
  * await client.tools.mcpServer.tools.delete("mcp_server_tool_id")
166
166
  */
167
- delete(mcpServerToolId, requestOptions) {
168
- return core.HttpResponsePromise.fromPromise(this.__delete(mcpServerToolId, requestOptions));
167
+ delete(mcp_server_tool_id, requestOptions) {
168
+ return core.HttpResponsePromise.fromPromise(this.__delete(mcp_server_tool_id, requestOptions));
169
169
  }
170
- __delete(mcpServerToolId, requestOptions) {
170
+ __delete(mcp_server_tool_id, requestOptions) {
171
171
  return __awaiter(this, void 0, void 0, function* () {
172
172
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
173
173
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
174
174
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
175
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcpServerToolId)}`),
175
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}`),
176
176
  method: "DELETE",
177
177
  headers: _headers,
178
178
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -221,7 +221,7 @@ export class Tools {
221
221
  /**
222
222
  * Calls a MCP server tool
223
223
  *
224
- * @param {string} mcpServerToolId - ID of the MCP server tool to call
224
+ * @param {string} mcp_server_tool_id - ID of the MCP server tool to call
225
225
  * @param {phenoml.tools.mcpServer.McpServerToolCallRequest} request
226
226
  * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
227
227
  *
@@ -237,15 +237,15 @@ export class Tools {
237
237
  * }
238
238
  * })
239
239
  */
240
- call(mcpServerToolId, request, requestOptions) {
241
- return core.HttpResponsePromise.fromPromise(this.__call(mcpServerToolId, request, requestOptions));
240
+ call(mcp_server_tool_id, request, requestOptions) {
241
+ return core.HttpResponsePromise.fromPromise(this.__call(mcp_server_tool_id, request, requestOptions));
242
242
  }
243
- __call(mcpServerToolId, request, requestOptions) {
243
+ __call(mcp_server_tool_id, request, requestOptions) {
244
244
  return __awaiter(this, void 0, void 0, function* () {
245
245
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
246
246
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
247
247
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
248
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcpServerToolId)}/call`),
248
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}/call`),
249
249
  method: "POST",
250
250
  headers: _headers,
251
251
  contentType: "application/json",
@@ -15,6 +15,7 @@ import { getErrorResponseBody } from "./getErrorResponseBody.mjs";
15
15
  import { getFetchFn } from "./getFetchFn.mjs";
16
16
  import { getRequestBody } from "./getRequestBody.mjs";
17
17
  import { getResponseBody } from "./getResponseBody.mjs";
18
+ import { Headers } from "./Headers.mjs";
18
19
  import { makeRequest } from "./makeRequest.mjs";
19
20
  import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
20
21
  import { requestWithRetries } from "./requestWithRetries.mjs";
@@ -38,7 +39,7 @@ const SENSITIVE_HEADERS = new Set([
38
39
  ]);
39
40
  function redactHeaders(headers) {
40
41
  const filtered = {};
41
- for (const [key, value] of Object.entries(headers)) {
42
+ for (const [key, value] of headers instanceof Headers ? headers.entries() : Object.entries(headers)) {
42
43
  if (SENSITIVE_HEADERS.has(key.toLowerCase())) {
43
44
  filtered[key] = "[REDACTED]";
44
45
  }
@@ -150,9 +151,14 @@ function redactUrl(url) {
150
151
  function getHeaders(args) {
151
152
  return __awaiter(this, void 0, void 0, function* () {
152
153
  var _a;
153
- const newHeaders = {};
154
+ const newHeaders = new Headers();
155
+ newHeaders.set("Accept", args.responseType === "json" || args.responseType == null
156
+ ? "application/json"
157
+ : args.responseType === "text"
158
+ ? "text/plain"
159
+ : "*/*");
154
160
  if (args.body !== undefined && args.contentType != null) {
155
- newHeaders["Content-Type"] = args.contentType;
161
+ newHeaders.set("Content-Type", args.contentType);
156
162
  }
157
163
  if (args.headers == null) {
158
164
  return newHeaders;
@@ -160,13 +166,13 @@ function getHeaders(args) {
160
166
  for (const [key, value] of Object.entries(args.headers)) {
161
167
  const result = yield EndpointSupplier.get(value, { endpointMetadata: (_a = args.endpointMetadata) !== null && _a !== void 0 ? _a : {} });
162
168
  if (typeof result === "string") {
163
- newHeaders[key] = result;
169
+ newHeaders.set(key, result);
164
170
  continue;
165
171
  }
166
172
  if (result == null) {
167
173
  continue;
168
174
  }
169
- newHeaders[key] = `${result}`;
175
+ newHeaders.set(key, `${result}`);
170
176
  }
171
177
  return newHeaders;
172
178
  });
@@ -202,7 +208,7 @@ export function fetcherImpl(args) {
202
208
  method: args.method,
203
209
  url: redactUrl(url),
204
210
  statusCode: response.status,
205
- responseHeaders: redactHeaders(Object.fromEntries(response.headers.entries())),
211
+ responseHeaders: redactHeaders(response.headers),
206
212
  };
207
213
  logger.debug("HTTP request succeeded", metadata);
208
214
  }
@@ -1 +1 @@
1
- export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half") => Promise<Response>;
1
+ export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Headers | Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half") => Promise<Response>;
@@ -3,4 +3,5 @@ export * from "./base64.mjs";
3
3
  export * from "./fetcher/index.mjs";
4
4
  export * as logging from "./logging/index.mjs";
5
5
  export * from "./runtime/index.mjs";
6
+ export * from "./stream/index.mjs";
6
7
  export * as url from "./url/index.mjs";
@@ -3,4 +3,5 @@ export * from "./base64.mjs";
3
3
  export * from "./fetcher/index.mjs";
4
4
  export * as logging from "./logging/index.mjs";
5
5
  export * from "./runtime/index.mjs";
6
+ export * from "./stream/index.mjs";
6
7
  export * as url from "./url/index.mjs";