phenoml 0.0.6 → 0.0.7

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 (146) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/index.d.ts +0 -1
  3. package/dist/cjs/api/index.js +0 -1
  4. package/dist/cjs/api/resources/workflows/client/Client.d.ts +117 -15
  5. package/dist/cjs/api/resources/workflows/client/Client.js +392 -45
  6. package/dist/cjs/api/resources/workflows/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/workflows/client/index.js +15 -0
  8. package/dist/cjs/api/resources/workflows/index.d.ts +0 -1
  9. package/dist/cjs/api/resources/workflows/index.js +0 -1
  10. package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsGetResponse.d.ts +1 -1
  11. package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsUpdateResponse.d.ts +1 -1
  12. package/dist/cjs/api/resources/workflows/types/index.d.ts +3 -0
  13. package/dist/cjs/api/resources/workflows/types/index.js +3 -0
  14. package/dist/cjs/version.d.ts +1 -1
  15. package/dist/cjs/version.js +1 -1
  16. package/dist/esm/Client.mjs +2 -2
  17. package/dist/esm/api/index.d.mts +0 -1
  18. package/dist/esm/api/index.mjs +0 -1
  19. package/dist/esm/api/resources/workflows/client/Client.d.mts +117 -15
  20. package/dist/esm/api/resources/workflows/client/Client.mjs +392 -45
  21. package/dist/esm/api/resources/workflows/client/index.d.mts +1 -0
  22. package/dist/esm/api/resources/workflows/client/index.mjs +1 -0
  23. package/dist/esm/api/resources/workflows/index.d.mts +0 -1
  24. package/dist/esm/api/resources/workflows/index.mjs +0 -1
  25. package/dist/esm/api/resources/workflows/{resources/workflows/types → types}/WorkflowsGetResponse.d.mts +1 -1
  26. package/dist/esm/api/resources/workflows/types/WorkflowsGetResponse.mjs +2 -0
  27. package/dist/esm/api/resources/workflows/{resources/workflows/types → types}/WorkflowsUpdateResponse.d.mts +1 -1
  28. package/dist/esm/api/resources/workflows/types/WorkflowsUpdateResponse.mjs +2 -0
  29. package/dist/esm/api/resources/workflows/types/index.d.mts +3 -0
  30. package/dist/esm/api/resources/workflows/types/index.mjs +3 -0
  31. package/dist/esm/version.d.mts +1 -1
  32. package/dist/esm/version.mjs +1 -1
  33. package/package.json +1 -1
  34. package/reference.md +12 -506
  35. package/dist/cjs/api/resources/workflows/resources/index.d.ts +0 -4
  36. package/dist/cjs/api/resources/workflows/resources/index.js +0 -43
  37. package/dist/cjs/api/resources/workflows/resources/mcpServer/client/Client.d.ts +0 -50
  38. package/dist/cjs/api/resources/workflows/resources/mcpServer/client/Client.js +0 -268
  39. package/dist/cjs/api/resources/workflows/resources/mcpServer/client/index.d.ts +0 -1
  40. package/dist/cjs/api/resources/workflows/resources/mcpServer/index.d.ts +0 -2
  41. package/dist/cjs/api/resources/workflows/resources/mcpServer/index.js +0 -18
  42. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/index.d.ts +0 -1
  43. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/index.js +0 -37
  44. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/client/Client.d.ts +0 -49
  45. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/client/Client.js +0 -265
  46. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/client/index.d.ts +0 -1
  47. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/client/index.js +0 -2
  48. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/index.d.ts +0 -1
  49. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/index.js +0 -17
  50. package/dist/cjs/api/resources/workflows/resources/workflows/client/Client.d.ts +0 -145
  51. package/dist/cjs/api/resources/workflows/resources/workflows/client/Client.js +0 -569
  52. package/dist/cjs/api/resources/workflows/resources/workflows/client/index.d.ts +0 -2
  53. package/dist/cjs/api/resources/workflows/resources/workflows/client/index.js +0 -17
  54. package/dist/cjs/api/resources/workflows/resources/workflows/client/requests/index.js +0 -2
  55. package/dist/cjs/api/resources/workflows/resources/workflows/index.d.ts +0 -2
  56. package/dist/cjs/api/resources/workflows/resources/workflows/index.js +0 -18
  57. package/dist/cjs/api/resources/workflows/resources/workflows/types/index.d.ts +0 -3
  58. package/dist/cjs/api/resources/workflows/resources/workflows/types/index.js +0 -19
  59. package/dist/cjs/api/types/CohortResponse.d.ts +0 -1
  60. package/dist/cjs/api/types/CohortResponse.js +0 -3
  61. package/dist/cjs/api/types/Lang2FhirAndCreateResponse.d.ts +0 -1
  62. package/dist/cjs/api/types/Lang2FhirAndCreateResponse.js +0 -3
  63. package/dist/cjs/api/types/Lang2FhirAndSearchResponse.d.ts +0 -1
  64. package/dist/cjs/api/types/Lang2FhirAndSearchResponse.js +0 -3
  65. package/dist/cjs/api/types/McpServerResponse.d.ts +0 -1
  66. package/dist/cjs/api/types/McpServerResponse.js +0 -3
  67. package/dist/cjs/api/types/McpServerToolCallResponse.d.ts +0 -1
  68. package/dist/cjs/api/types/McpServerToolCallResponse.js +0 -3
  69. package/dist/cjs/api/types/McpServerToolResponse.d.ts +0 -1
  70. package/dist/cjs/api/types/McpServerToolResponse.js +0 -3
  71. package/dist/cjs/api/types/SearchConcept.d.ts +0 -1
  72. package/dist/cjs/api/types/SearchConcept.js +0 -3
  73. package/dist/cjs/api/types/index.d.ts +0 -7
  74. package/dist/cjs/api/types/index.js +0 -23
  75. package/dist/esm/api/resources/workflows/resources/index.d.mts +0 -4
  76. package/dist/esm/api/resources/workflows/resources/index.mjs +0 -4
  77. package/dist/esm/api/resources/workflows/resources/mcpServer/client/Client.d.mts +0 -50
  78. package/dist/esm/api/resources/workflows/resources/mcpServer/client/Client.mjs +0 -231
  79. package/dist/esm/api/resources/workflows/resources/mcpServer/client/index.d.mts +0 -1
  80. package/dist/esm/api/resources/workflows/resources/mcpServer/client/index.mjs +0 -1
  81. package/dist/esm/api/resources/workflows/resources/mcpServer/index.d.mts +0 -2
  82. package/dist/esm/api/resources/workflows/resources/mcpServer/index.mjs +0 -2
  83. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/index.d.mts +0 -1
  84. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/index.mjs +0 -1
  85. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/client/Client.d.mts +0 -49
  86. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/client/Client.mjs +0 -228
  87. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/client/index.d.mts +0 -1
  88. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/client/index.mjs +0 -1
  89. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/index.d.mts +0 -1
  90. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/index.mjs +0 -1
  91. package/dist/esm/api/resources/workflows/resources/workflows/client/Client.d.mts +0 -145
  92. package/dist/esm/api/resources/workflows/resources/workflows/client/Client.mjs +0 -532
  93. package/dist/esm/api/resources/workflows/resources/workflows/client/index.d.mts +0 -2
  94. package/dist/esm/api/resources/workflows/resources/workflows/client/index.mjs +0 -2
  95. package/dist/esm/api/resources/workflows/resources/workflows/index.d.mts +0 -2
  96. package/dist/esm/api/resources/workflows/resources/workflows/index.mjs +0 -2
  97. package/dist/esm/api/resources/workflows/resources/workflows/types/WorkflowsGetResponse.mjs +0 -2
  98. package/dist/esm/api/resources/workflows/resources/workflows/types/WorkflowsUpdateResponse.mjs +0 -2
  99. package/dist/esm/api/resources/workflows/resources/workflows/types/index.d.mts +0 -3
  100. package/dist/esm/api/resources/workflows/resources/workflows/types/index.mjs +0 -3
  101. package/dist/esm/api/types/CohortResponse.d.mts +0 -1
  102. package/dist/esm/api/types/CohortResponse.mjs +0 -2
  103. package/dist/esm/api/types/Lang2FhirAndCreateResponse.d.mts +0 -1
  104. package/dist/esm/api/types/Lang2FhirAndCreateResponse.mjs +0 -2
  105. package/dist/esm/api/types/Lang2FhirAndSearchResponse.d.mts +0 -1
  106. package/dist/esm/api/types/Lang2FhirAndSearchResponse.mjs +0 -2
  107. package/dist/esm/api/types/McpServerResponse.d.mts +0 -1
  108. package/dist/esm/api/types/McpServerResponse.mjs +0 -2
  109. package/dist/esm/api/types/McpServerToolCallResponse.d.mts +0 -1
  110. package/dist/esm/api/types/McpServerToolCallResponse.mjs +0 -2
  111. package/dist/esm/api/types/McpServerToolResponse.d.mts +0 -1
  112. package/dist/esm/api/types/McpServerToolResponse.mjs +0 -2
  113. package/dist/esm/api/types/SearchConcept.d.mts +0 -1
  114. package/dist/esm/api/types/SearchConcept.mjs +0 -2
  115. package/dist/esm/api/types/index.d.mts +0 -7
  116. package/dist/esm/api/types/index.mjs +0 -7
  117. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/CreateWorkflowRequest.d.ts +0 -0
  118. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/CreateWorkflowRequest.js +0 -0
  119. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/ExecuteWorkflowRequest.d.ts +0 -0
  120. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/ExecuteWorkflowRequest.js +0 -0
  121. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/UpdateWorkflowRequest.d.ts +0 -0
  122. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/UpdateWorkflowRequest.js +0 -0
  123. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsGetRequest.d.ts +0 -0
  124. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsGetRequest.js +0 -0
  125. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsListRequest.d.ts +0 -0
  126. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsListRequest.js +0 -0
  127. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/index.d.ts +0 -0
  128. /package/dist/cjs/api/resources/workflows/{resources/mcpServer/client → client/requests}/index.js +0 -0
  129. /package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsDeleteResponse.d.ts +0 -0
  130. /package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsDeleteResponse.js +0 -0
  131. /package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsGetResponse.js +0 -0
  132. /package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsUpdateResponse.js +0 -0
  133. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/CreateWorkflowRequest.d.mts +0 -0
  134. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/CreateWorkflowRequest.mjs +0 -0
  135. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/ExecuteWorkflowRequest.d.mts +0 -0
  136. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/ExecuteWorkflowRequest.mjs +0 -0
  137. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/UpdateWorkflowRequest.d.mts +0 -0
  138. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/UpdateWorkflowRequest.mjs +0 -0
  139. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsGetRequest.d.mts +0 -0
  140. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsGetRequest.mjs +0 -0
  141. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsListRequest.d.mts +0 -0
  142. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsListRequest.mjs +0 -0
  143. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/index.d.mts +0 -0
  144. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/index.mjs +0 -0
  145. /package/dist/esm/api/resources/workflows/{resources/workflows/types → types}/WorkflowsDeleteResponse.d.mts +0 -0
  146. /package/dist/esm/api/resources/workflows/{resources/workflows/types → types}/WorkflowsDeleteResponse.mjs +0 -0
@@ -1,228 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- import * as environments from "../../../../../../../../environments.mjs";
12
- import * as core from "../../../../../../../../core/index.mjs";
13
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers.mjs";
14
- import * as errors from "../../../../../../../../errors/index.mjs";
15
- export class Tools {
16
- constructor(_options = {}) {
17
- this._options = _options;
18
- }
19
- /**
20
- * @param {string} mcpServerId
21
- * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
22
- *
23
- * @example
24
- * await client.workflows.mcpServer.tools.list("mcp_server_id")
25
- */
26
- list(mcpServerId, requestOptions) {
27
- return core.HttpResponsePromise.fromPromise(this.__list(mcpServerId, requestOptions));
28
- }
29
- __list(mcpServerId, requestOptions) {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
32
- let _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);
33
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
34
- 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/${encodeURIComponent(mcpServerId)}/list`),
35
- method: "GET",
36
- headers: _headers,
37
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
38
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
39
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
40
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
41
- });
42
- if (_response.ok) {
43
- return { data: undefined, rawResponse: _response.rawResponse };
44
- }
45
- if (_response.error.reason === "status-code") {
46
- throw new errors.phenomlError({
47
- statusCode: _response.error.statusCode,
48
- body: _response.error.body,
49
- rawResponse: _response.rawResponse,
50
- });
51
- }
52
- switch (_response.error.reason) {
53
- case "non-json":
54
- throw new errors.phenomlError({
55
- statusCode: _response.error.statusCode,
56
- body: _response.error.rawBody,
57
- rawResponse: _response.rawResponse,
58
- });
59
- case "timeout":
60
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /tools/mcp-server/{mcp_server_id}/list.");
61
- case "unknown":
62
- throw new errors.phenomlError({
63
- message: _response.error.errorMessage,
64
- rawResponse: _response.rawResponse,
65
- });
66
- }
67
- });
68
- }
69
- /**
70
- * @param {string} mcpServerToolId
71
- * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
72
- *
73
- * @example
74
- * await client.workflows.mcpServer.tools.get("mcp_server_tool_id")
75
- */
76
- get(mcpServerToolId, requestOptions) {
77
- return core.HttpResponsePromise.fromPromise(this.__get(mcpServerToolId, requestOptions));
78
- }
79
- __get(mcpServerToolId, requestOptions) {
80
- return __awaiter(this, void 0, void 0, function* () {
81
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
82
- let _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);
83
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
84
- 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/${encodeURIComponent(mcpServerToolId)}`),
85
- method: "GET",
86
- headers: _headers,
87
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
88
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
89
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
90
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
91
- });
92
- if (_response.ok) {
93
- return { data: undefined, rawResponse: _response.rawResponse };
94
- }
95
- if (_response.error.reason === "status-code") {
96
- throw new errors.phenomlError({
97
- statusCode: _response.error.statusCode,
98
- body: _response.error.body,
99
- rawResponse: _response.rawResponse,
100
- });
101
- }
102
- switch (_response.error.reason) {
103
- case "non-json":
104
- throw new errors.phenomlError({
105
- statusCode: _response.error.statusCode,
106
- body: _response.error.rawBody,
107
- rawResponse: _response.rawResponse,
108
- });
109
- case "timeout":
110
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /tools/mcp-server/tool/{mcp_server_tool_id}.");
111
- case "unknown":
112
- throw new errors.phenomlError({
113
- message: _response.error.errorMessage,
114
- rawResponse: _response.rawResponse,
115
- });
116
- }
117
- });
118
- }
119
- /**
120
- * @param {string} mcpServerToolId
121
- * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
122
- *
123
- * @example
124
- * await client.workflows.mcpServer.tools.delete("mcp_server_tool_id")
125
- */
126
- delete(mcpServerToolId, requestOptions) {
127
- return core.HttpResponsePromise.fromPromise(this.__delete(mcpServerToolId, requestOptions));
128
- }
129
- __delete(mcpServerToolId, requestOptions) {
130
- return __awaiter(this, void 0, void 0, function* () {
131
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
132
- let _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);
133
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
134
- 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/${encodeURIComponent(mcpServerToolId)}`),
135
- method: "DELETE",
136
- headers: _headers,
137
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
138
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
139
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
140
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
141
- });
142
- if (_response.ok) {
143
- return { data: undefined, rawResponse: _response.rawResponse };
144
- }
145
- if (_response.error.reason === "status-code") {
146
- throw new errors.phenomlError({
147
- statusCode: _response.error.statusCode,
148
- body: _response.error.body,
149
- rawResponse: _response.rawResponse,
150
- });
151
- }
152
- switch (_response.error.reason) {
153
- case "non-json":
154
- throw new errors.phenomlError({
155
- statusCode: _response.error.statusCode,
156
- body: _response.error.rawBody,
157
- rawResponse: _response.rawResponse,
158
- });
159
- case "timeout":
160
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /tools/mcp-server/tool/{mcp_server_tool_id}.");
161
- case "unknown":
162
- throw new errors.phenomlError({
163
- message: _response.error.errorMessage,
164
- rawResponse: _response.rawResponse,
165
- });
166
- }
167
- });
168
- }
169
- /**
170
- * @param {string} mcpServerToolId
171
- * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
172
- *
173
- * @example
174
- * await client.workflows.mcpServer.tools.call("mcp_server_tool_id")
175
- */
176
- call(mcpServerToolId, requestOptions) {
177
- return core.HttpResponsePromise.fromPromise(this.__call(mcpServerToolId, requestOptions));
178
- }
179
- __call(mcpServerToolId, requestOptions) {
180
- return __awaiter(this, void 0, void 0, function* () {
181
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
182
- let _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);
183
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
184
- 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/${encodeURIComponent(mcpServerToolId)}/call`),
185
- method: "POST",
186
- headers: _headers,
187
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
188
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
189
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
190
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
191
- });
192
- if (_response.ok) {
193
- return { data: undefined, rawResponse: _response.rawResponse };
194
- }
195
- if (_response.error.reason === "status-code") {
196
- throw new errors.phenomlError({
197
- statusCode: _response.error.statusCode,
198
- body: _response.error.body,
199
- rawResponse: _response.rawResponse,
200
- });
201
- }
202
- switch (_response.error.reason) {
203
- case "non-json":
204
- throw new errors.phenomlError({
205
- statusCode: _response.error.statusCode,
206
- body: _response.error.rawBody,
207
- rawResponse: _response.rawResponse,
208
- });
209
- case "timeout":
210
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /tools/mcp-server/tool/{mcp_server_tool_id}/call.");
211
- case "unknown":
212
- throw new errors.phenomlError({
213
- message: _response.error.errorMessage,
214
- rawResponse: _response.rawResponse,
215
- });
216
- }
217
- });
218
- }
219
- _getAuthorizationHeader() {
220
- return __awaiter(this, void 0, void 0, function* () {
221
- const bearer = yield core.Supplier.get(this._options.token);
222
- if (bearer != null) {
223
- return `Bearer ${bearer}`;
224
- }
225
- return undefined;
226
- });
227
- }
228
- }
@@ -1 +0,0 @@
1
- export * from "./client/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./client/index.mjs";
@@ -1,145 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
2
- import * as core from "../../../../../../core/index.mjs";
3
- import * as phenoml from "../../../../../index.mjs";
4
- export declare namespace Workflows {
5
- interface Options extends BaseClientOptions {
6
- }
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- export declare class Workflows {
11
- protected readonly _options: Workflows.Options;
12
- constructor(_options?: Workflows.Options);
13
- /**
14
- * Retrieves all workflow definitions for the authenticated user
15
- *
16
- * @param {phenoml.workflows.WorkflowsListRequest} request
17
- * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
18
- *
19
- * @throws {@link phenoml.workflows.UnauthorizedError}
20
- * @throws {@link phenoml.workflows.ForbiddenError}
21
- * @throws {@link phenoml.workflows.InternalServerError}
22
- *
23
- * @example
24
- * await client.workflows.workflows.list({
25
- * verbose: true
26
- * })
27
- */
28
- list(request?: phenoml.workflows.WorkflowsListRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<phenoml.workflows.ListWorkflowsResponse>;
29
- private __list;
30
- /**
31
- * Creates a new workflow definition with graph generation from workflow instructions
32
- *
33
- * @param {phenoml.workflows.CreateWorkflowRequest} request
34
- * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
35
- *
36
- * @throws {@link phenoml.workflows.BadRequestError}
37
- * @throws {@link phenoml.workflows.UnauthorizedError}
38
- * @throws {@link phenoml.workflows.ForbiddenError}
39
- * @throws {@link phenoml.workflows.InternalServerError}
40
- *
41
- * @example
42
- * await client.workflows.workflows.create({
43
- * verbose: true,
44
- * name: "Patient Data Mapping Workflow",
45
- * workflow_instructions: "Given diagnosis data, find the patient and create condition record",
46
- * sample_data: {
47
- * "patient_last_name": "Rippin",
48
- * "patient_first_name": "Clay",
49
- * "diagnosis_code": "I10"
50
- * },
51
- * fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
52
- * })
53
- */
54
- create(request: phenoml.workflows.CreateWorkflowRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<phenoml.workflows.CreateWorkflowResponse>;
55
- private __create;
56
- /**
57
- * Retrieves a workflow definition by its ID
58
- *
59
- * @param {string} id - ID of the workflow to retrieve
60
- * @param {phenoml.workflows.WorkflowsGetRequest} request
61
- * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
62
- *
63
- * @throws {@link phenoml.workflows.UnauthorizedError}
64
- * @throws {@link phenoml.workflows.ForbiddenError}
65
- * @throws {@link phenoml.workflows.NotFoundError}
66
- * @throws {@link phenoml.workflows.InternalServerError}
67
- *
68
- * @example
69
- * await client.workflows.workflows.get("id", {
70
- * verbose: true
71
- * })
72
- */
73
- get(id: string, request?: phenoml.workflows.WorkflowsGetRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<phenoml.workflows.WorkflowsGetResponse>;
74
- private __get;
75
- /**
76
- * Updates an existing workflow definition
77
- *
78
- * @param {string} id - ID of the workflow to update
79
- * @param {phenoml.workflows.UpdateWorkflowRequest} request
80
- * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
81
- *
82
- * @throws {@link phenoml.workflows.BadRequestError}
83
- * @throws {@link phenoml.workflows.UnauthorizedError}
84
- * @throws {@link phenoml.workflows.ForbiddenError}
85
- * @throws {@link phenoml.workflows.NotFoundError}
86
- * @throws {@link phenoml.workflows.InternalServerError}
87
- *
88
- * @example
89
- * await client.workflows.workflows.update("id", {
90
- * verbose: true,
91
- * name: "Updated Patient Data Mapping Workflow",
92
- * workflow_instructions: "Given diagnosis data, find the patient and create condition record",
93
- * sample_data: {
94
- * "patient_last_name": "Smith",
95
- * "patient_first_name": "John",
96
- * "diagnosis_code": "E11"
97
- * },
98
- * fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
99
- * })
100
- */
101
- update(id: string, request: phenoml.workflows.UpdateWorkflowRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<phenoml.workflows.WorkflowsUpdateResponse>;
102
- private __update;
103
- /**
104
- * Deletes a workflow definition by its ID
105
- *
106
- * @param {string} id - ID of the workflow to delete
107
- * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
108
- *
109
- * @throws {@link phenoml.workflows.UnauthorizedError}
110
- * @throws {@link phenoml.workflows.ForbiddenError}
111
- * @throws {@link phenoml.workflows.NotFoundError}
112
- * @throws {@link phenoml.workflows.InternalServerError}
113
- *
114
- * @example
115
- * await client.workflows.workflows.delete("id")
116
- */
117
- delete(id: string, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<phenoml.workflows.WorkflowsDeleteResponse>;
118
- private __delete;
119
- /**
120
- * Executes a workflow with provided input data and returns results
121
- *
122
- * @param {string} id - ID of the workflow to execute
123
- * @param {phenoml.workflows.ExecuteWorkflowRequest} request
124
- * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
125
- *
126
- * @throws {@link phenoml.workflows.BadRequestError}
127
- * @throws {@link phenoml.workflows.UnauthorizedError}
128
- * @throws {@link phenoml.workflows.ForbiddenError}
129
- * @throws {@link phenoml.workflows.NotFoundError}
130
- * @throws {@link phenoml.workflows.InternalServerError}
131
- *
132
- * @example
133
- * await client.workflows.workflows.execute("id", {
134
- * input_data: {
135
- * "patient_last_name": "Johnson",
136
- * "patient_first_name": "Mary",
137
- * "diagnosis_code": "M79.3",
138
- * "encounter_date": "2024-01-15"
139
- * }
140
- * })
141
- */
142
- execute(id: string, request: phenoml.workflows.ExecuteWorkflowRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<phenoml.workflows.ExecuteWorkflowResponse>;
143
- private __execute;
144
- protected _getAuthorizationHeader(): Promise<string | undefined>;
145
- }