@epam/ai-dial-chat-hooks 1.2.0-dev.99 → 1.3.0-dev.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/api-error/api-error.js +7 -4
  2. package/catalog/catalog-derivations.js +1 -1
  3. package/catalog/deployment-id.js +8 -2
  4. package/catalog/map-deployment-limits-to-catalog.js +16 -24
  5. package/catalog/map-deployment-limits-to-input.js +81 -9
  6. package/catalog/map-deployment-to-catalog-item.js +34 -34
  7. package/catalog/map-entity-details-to-catalog.js +237 -192
  8. package/catalog/map-skill-to-catalog-item.js +61 -54
  9. package/catalog/publish.js +4 -4
  10. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
  11. package/catalog/useCatalogItemDetails.js +9 -8
  12. package/catalog/usePublishFolders/usePublishFolders.js +1 -1
  13. package/catalog.d.ts +171 -34
  14. package/catalog.js +23 -23
  15. package/conversation/conversation-transfer/export-conversation.js +24 -16
  16. package/conversation/conversation-transfer/import-conversation.js +80 -31
  17. package/conversation/create-chat-stream-api.js +89 -49
  18. package/conversation/get-model-id-from-conversation-id.js +15 -9
  19. package/conversation/message-utils.js +44 -2
  20. package/conversation/stage.js +6 -2
  21. package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
  22. package/conversation/useConversationExport/useConversationExport.js +9 -9
  23. package/conversation/useConversationHandlers/message-utils.js +8 -5
  24. package/conversation/useConversationHandlers/useConversationHandlers.js +181 -167
  25. package/conversation/useConversationImport/useConversationImport.js +123 -121
  26. package/conversation/useConversationPanelItems/useConversationPanelItems.js +49 -31
  27. package/conversation/useConversationStream/frame-scheduler.js +39 -0
  28. package/conversation/useConversationStream/generation-resume.js +122 -64
  29. package/conversation/useConversationStream/useConversationStream.js +298 -118
  30. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
  31. package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
  32. package/conversation-sources.d.ts +1 -1
  33. package/conversation-transfer.d.ts +2 -1
  34. package/conversation.d.ts +218 -22
  35. package/conversation.js +32 -31
  36. package/file-manager-canvas.d.ts +27 -7
  37. package/file-manager.d.ts +87 -32
  38. package/file-manager.js +25 -24
  39. package/files/attachment-canvas.js +67 -44
  40. package/files/dial-file-manager-copy-move.util.js +9 -8
  41. package/files/dial-file-manager-mapping.util.js +2 -1
  42. package/files/dial-file-manager-path.util.js +24 -2
  43. package/files/dial-file-manager.model.js +23 -19
  44. package/files/dial-file-manager.types.js +3 -3
  45. package/files/file-manager-variant.js +1 -1
  46. package/files/resolve-dial-file-api-path.js +11 -12
  47. package/files/useDialFileListing/useDialFileListing.js +140 -127
  48. package/files/useDialFileManager/useDialFileManager.js +139 -135
  49. package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
  50. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -15
  51. package/files/useDialFileMutations/useDialFileMutations.js +65 -60
  52. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
  53. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +28 -23
  54. package/index.d.ts +643 -128
  55. package/index.js +136 -134
  56. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
  57. package/oauth/authorize-url.js +3 -3
  58. package/oauth/toolset-id.js +5 -3
  59. package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
  60. package/oauth.d.ts +34 -2
  61. package/oauth.js +9 -9
  62. package/package.json +19 -23
  63. package/scheduled-task/scheduled-task-description.js +43 -39
  64. package/scheduled-task/scheduled-task-trigger.js +74 -71
  65. package/scheduled-task/use-scheduled-task-runs.js +162 -50
  66. package/scheduled-task/use-scheduled-tasks.js +52 -48
  67. package/scheduled-tasks.d.ts +27 -6
  68. package/scheduled-tasks.js +2 -2
  69. package/shared/application-schema.js +5 -2
  70. package/shared/cron-day-of-month.js +13 -0
  71. package/skill/skill-archive.js +19 -0
  72. package/skill/skill-types.js +8 -7
  73. package/skill/skill.js +52 -29
  74. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +38 -34
  75. package/skill/useSkillEditorLoad.js +65 -59
  76. package/skill/useSkillEditorSubmit.js +105 -93
  77. package/skill/useSkillFileActions.js +70 -58
  78. package/skill-editor.d.ts +62 -13
  79. package/skill-editor.js +9 -9
  80. package/usage/map-user-usage-to-model-limits.js +137 -95
  81. package/usage.d.ts +8 -3
  82. package/usePageFileDrag/usePageFileDrag.js +3 -3
  83. package/utils.d.ts +26 -6
  84. package/utils.js +10 -10
@@ -3,242 +3,283 @@ import { isPublicToolsetId as t } from "../oauth/toolset-id.js";
3
3
  import { formatCalendarDate as n } from "../shared/formatting.js";
4
4
  import { formatUnitPrice as r } from "@epam/ai-dial-chat-shared";
5
5
  import { mimeTypesToExtensionLabels as i } from "@epam/ai-dial-attachment-input";
6
- import { CredentialStatus as a, ToolsetAuthenticationType as o } from "@epam/ai-dial-catalog";
6
+ import { CatalogPricingUnit as a, CredentialStatus as o, ToolsetAuthenticationType as s } from "@epam/ai-dial-catalog";
7
7
  //#region src/catalog/map-entity-details-to-catalog.ts
8
- var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens` : `${e} tokens`, c = (e) => {
8
+ var c = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens` : `${e} tokens`, l = (e) => {
9
9
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
10
10
  if (t == null) return e;
11
11
  let [, r, i, a] = t, o = Number(r), s = Number(i) - 1, c = Number(a), l = new Date(o, s, c);
12
12
  return l.getFullYear() !== o || l.getMonth() !== s || l.getDate() !== c ? e : n(l.getTime());
13
- }, l = "unit", u = (e) => {
14
- let t = [];
13
+ }, u = "unit", d = {
14
+ capabilitiesTitle: "Capabilities",
15
+ specificationTitle: "Specification",
16
+ configurationTitle: "Configuration",
17
+ tools: "Tools",
18
+ parallelToolCalls: "Parallel tool calls",
19
+ reasoningEfforts: "Reasoning efforts",
20
+ skills: "Skills",
21
+ provider: "Provider",
22
+ vendor: "Vendor",
23
+ license: "License",
24
+ knowledgeCutoffDate: "Knowledge cutoff date",
25
+ parameters: "Parameters",
26
+ hostedBy: "Hosted by",
27
+ releaseDate: "Release date",
28
+ contextWindow: "Context window",
29
+ maxOutputTokens: "Max output tokens",
30
+ inputModalities: "Input modalities",
31
+ inputAttachments: "Input attachments",
32
+ routes: "Routes",
33
+ configurationSchema: "Configuration schema",
34
+ authentication: "Authentication",
35
+ authorizationEndpoint: "Authorization endpoint",
36
+ tokenEndpoint: "Token endpoint",
37
+ oauthScopes: "OAuth scopes"
38
+ }, f = (e, t) => {
39
+ let r = [];
15
40
  if (e.capabilities != null) {
16
- let { capabilities: n } = e, r = [];
17
- n.hasTools != null && r.push({
18
- label: "Tools",
41
+ let { capabilities: n } = e, i = [];
42
+ n.hasTools != null && i.push({
43
+ label: t.tools,
19
44
  value: n.hasTools
20
- }), n.hasParallelToolCalls != null && r.push({
21
- label: "Parallel tool calls",
45
+ }), n.hasParallelToolCalls != null && i.push({
46
+ label: t.parallelToolCalls,
22
47
  value: n.hasParallelToolCalls
23
- }), n.reasoningEfforts?.length && r.push({
24
- label: "Reasoning efforts",
48
+ }), n.reasoningEfforts?.length && i.push({
49
+ label: t.reasoningEfforts,
25
50
  value: n.reasoningEfforts.join(" · ")
26
- }), r.length > 0 && t.push({
27
- title: "Capabilities",
28
- specs: r
51
+ }), n.hasSkills != null && i.push({
52
+ label: t.skills,
53
+ value: n.hasSkills
54
+ }), i.length > 0 && r.push({
55
+ title: t.capabilitiesTitle,
56
+ specs: i
29
57
  });
30
58
  }
31
59
  if (e.specification != null) {
32
- let { specification: r } = e, a = [];
33
- r.provider != null && a.push({
34
- label: "Provider",
35
- value: r.provider
36
- }), r.vendor != null && a.push({
37
- label: "Vendor",
38
- value: r.vendor
39
- }), r.license != null && a.push({
40
- label: "License",
41
- value: r.license
42
- }), r.knowledgeCutoffDate != null && a.push({
43
- label: "Knowledge cutoff date",
44
- value: c(r.knowledgeCutoffDate)
45
- }), r.parameters != null && a.push({
46
- label: "Parameters",
47
- value: r.parameters
48
- }), r.hostedBy != null && a.push({
49
- label: "Hosted by",
50
- value: r.hostedBy
51
- }), r.createdAt != null && a.push({
52
- label: "Release date",
53
- value: n(r.createdAt)
54
- }), r.contextWindowTokens != null && a.push({
55
- label: "Context window",
56
- value: s(r.contextWindowTokens)
57
- }), r.maxOutputTokens != null && a.push({
58
- label: "Max output tokens",
59
- value: s(r.maxOutputTokens)
60
- }), r.inputTypes?.length && a.push({
61
- label: "Input modalities",
62
- value: i(r.inputTypes)
63
- }), a.length > 0 && t.push({
64
- title: "Specification",
65
- specs: a
60
+ let { specification: a } = e, o = [];
61
+ a.provider != null && o.push({
62
+ label: t.provider,
63
+ value: a.provider
64
+ }), a.vendor != null && o.push({
65
+ label: t.vendor,
66
+ value: a.vendor
67
+ }), a.license != null && o.push({
68
+ label: t.license,
69
+ value: a.license
70
+ }), a.knowledgeCutoffDate != null && o.push({
71
+ label: t.knowledgeCutoffDate,
72
+ value: l(a.knowledgeCutoffDate)
73
+ }), a.parameters != null && o.push({
74
+ label: t.parameters,
75
+ value: a.parameters
76
+ }), a.hostedBy != null && o.push({
77
+ label: t.hostedBy,
78
+ value: a.hostedBy
79
+ }), a.createdAt != null && o.push({
80
+ label: t.releaseDate,
81
+ value: n(a.createdAt)
82
+ }), a.contextWindowTokens != null && o.push({
83
+ label: t.contextWindow,
84
+ value: c(a.contextWindowTokens)
85
+ }), a.maxOutputTokens != null && o.push({
86
+ label: t.maxOutputTokens,
87
+ value: c(a.maxOutputTokens)
88
+ }), a.inputTypes?.length && o.push({
89
+ label: t.inputModalities,
90
+ value: i(a.inputTypes)
91
+ }), o.length > 0 && r.push({
92
+ title: t.specificationTitle,
93
+ specs: o
66
94
  });
67
95
  }
68
- let r = h(e.pricing), a = g(e);
96
+ let a = y(e.pricing), o = b(e);
69
97
  return {
70
- overview: t.length > 0 ? { sections: t } : void 0,
71
- pricing: r,
72
- api: a
98
+ overview: r.length > 0 ? { sections: r } : void 0,
99
+ pricing: a,
100
+ api: o
73
101
  };
74
- }, d = {
102
+ }, p = {
75
103
  prompt: "Input tokens",
76
104
  completion: "Output tokens",
77
105
  cache_read: "Cached input",
78
106
  cacheRead: "Cached input",
79
107
  cache_write: "Cached write",
80
108
  cacheWrite: "Cached write"
81
- }, f = [
109
+ }, m = {
110
+ prompt: "Input characters",
111
+ completion: "Output characters"
112
+ }, h = "char_without_whitespace", g = [
82
113
  "prompt",
83
114
  "completion",
84
115
  "cache_read",
85
116
  "cacheRead",
86
117
  "cache_write",
87
118
  "cacheWrite"
88
- ], p = (e) => {
89
- let t = f.indexOf(e);
90
- return t === -1 ? f.length : t;
91
- }, m = (e) => {
92
- let t = d[e];
93
- if (t != null) return t;
94
- let n = e.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
95
- return n === "" ? e : ` ${n.charAt(0).toUpperCase()}${n.slice(1)}`;
96
- }, h = (e) => {
119
+ ], _ = (e) => {
120
+ let t = g.indexOf(e);
121
+ return t === -1 ? g.length : t;
122
+ }, v = (e, t) => {
123
+ let n = (t === a.Character ? m[e] : void 0) ?? p[e];
124
+ if (n != null) return n;
125
+ let r = e.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
126
+ return r === "" ? e : ` ${r.charAt(0).toUpperCase()}${r.slice(1)}`;
127
+ }, y = (e) => {
97
128
  if (e == null) return;
98
- let t = [...e.prices ?? []].sort((e, t) => p(e.key) - p(t.key)).map(({ key: e, price: t }) => ({
99
- label: m(e),
100
- price: t
129
+ let t = e.unit?.toLowerCase() === h ? a.Character : a.Token, n = [...e.prices ?? []].sort((e, t) => _(e.key) - _(t.key)).map(({ key: e, price: n }) => ({
130
+ label: v(e, t),
131
+ price: n
101
132
  }));
102
- if (t.length !== 0) return { prices: t };
103
- }, g = (e) => {
133
+ if (n.length !== 0) return t === a.Character ? {
134
+ prices: n,
135
+ unit: t
136
+ } : { prices: n };
137
+ }, b = (e) => {
104
138
  let { api: t } = e;
105
139
  if (t?.modelId != null) return { resource: { modelId: t.modelId } };
106
- }, _ = (e) => {
107
- let t = [];
140
+ }, x = (e, t) => {
141
+ let r = [];
108
142
  if (e.specification != null) {
109
- let { specification: r } = e, i = [];
110
- r.provider != null && i.push({
111
- label: "Provider",
112
- value: r.provider
113
- }), r.vendor != null && i.push({
114
- label: "Vendor",
115
- value: r.vendor
116
- }), r.license != null && i.push({
117
- label: "License",
118
- value: r.license
119
- }), r.knowledgeCutoffDate != null && i.push({
120
- label: "Knowledge cutoff date",
121
- value: c(r.knowledgeCutoffDate)
122
- }), r.parameters != null && i.push({
123
- label: "Parameters",
124
- value: r.parameters
125
- }), r.hostedBy != null && i.push({
126
- label: "Hosted by",
127
- value: r.hostedBy
128
- }), r.createdAt != null && i.push({
129
- label: "Release date",
130
- value: n(r.createdAt)
131
- }), r.routes?.length && i.push({
132
- label: "Routes",
133
- value: r.routes.join(" · ")
134
- }), i.length > 0 && t.push({
135
- title: "Specification",
136
- specs: i
143
+ let { specification: i } = e, a = [];
144
+ i.provider != null && a.push({
145
+ label: t.provider,
146
+ value: i.provider
147
+ }), i.vendor != null && a.push({
148
+ label: t.vendor,
149
+ value: i.vendor
150
+ }), i.license != null && a.push({
151
+ label: t.license,
152
+ value: i.license
153
+ }), i.knowledgeCutoffDate != null && a.push({
154
+ label: t.knowledgeCutoffDate,
155
+ value: l(i.knowledgeCutoffDate)
156
+ }), i.parameters != null && a.push({
157
+ label: t.parameters,
158
+ value: i.parameters
159
+ }), i.hostedBy != null && a.push({
160
+ label: t.hostedBy,
161
+ value: i.hostedBy
162
+ }), i.createdAt != null && a.push({
163
+ label: t.releaseDate,
164
+ value: n(i.createdAt)
165
+ }), i.routes?.length && a.push({
166
+ label: t.routes,
167
+ value: i.routes.join(" · ")
168
+ }), a.length > 0 && r.push({
169
+ title: t.specificationTitle,
170
+ specs: a
137
171
  });
138
172
  }
139
173
  if (e.capabilities != null) {
140
- let { capabilities: n } = e, r = [];
141
- n.hasTools != null && r.push({
142
- label: "Tools",
174
+ let { capabilities: n } = e, i = [];
175
+ n.hasTools != null && i.push({
176
+ label: t.tools,
143
177
  value: n.hasTools
144
- }), n.hasParallelToolCalls != null && r.push({
145
- label: "Parallel tool calls",
178
+ }), n.hasParallelToolCalls != null && i.push({
179
+ label: t.parallelToolCalls,
146
180
  value: n.hasParallelToolCalls
147
- }), n.hasConfiguration != null && r.push({
148
- label: "Configuration schema",
181
+ }), n.hasConfiguration != null && i.push({
182
+ label: t.configurationSchema,
149
183
  value: n.hasConfiguration
150
- }), r.length > 0 && t.push({
151
- title: "Capabilities",
152
- specs: r
184
+ }), n.hasSkills != null && i.push({
185
+ label: t.skills,
186
+ value: n.hasSkills
187
+ }), i.length > 0 && r.push({
188
+ title: t.capabilitiesTitle,
189
+ specs: i
153
190
  });
154
191
  }
155
192
  if (e.configuration != null) {
156
- let { configuration: n } = e, r = [];
157
- n.inputAttachmentTypes?.length && r.push({
158
- label: "Input attachments",
193
+ let { configuration: n } = e, a = [];
194
+ n.inputAttachmentTypes?.length && a.push({
195
+ label: t.inputAttachments,
159
196
  value: i(n.inputAttachmentTypes)
160
- }), r.length > 0 && t.push({
161
- title: "Configuration",
162
- specs: r
197
+ }), a.length > 0 && r.push({
198
+ title: t.configurationTitle,
199
+ specs: a
163
200
  });
164
201
  }
165
- return { overview: t.length > 0 ? { sections: t } : void 0 };
166
- }, v = {
167
- [e.None]: o.None,
168
- [e.ApiKey]: o.ApiKey,
169
- [e.OAuth]: o.OAuth
170
- }, y = {
171
- SIGNED_IN: a.SignedIn,
172
- SIGNED_OUT: a.SignedOut,
173
- FAILED: a.Failed
174
- }, b = (n, r, i) => {
175
- let a = v[r.specification?.authentication ?? e.None];
202
+ return { overview: r.length > 0 ? { sections: r } : void 0 };
203
+ }, S = {
204
+ [e.None]: s.None,
205
+ [e.ApiKey]: s.ApiKey,
206
+ [e.OAuth]: s.OAuth
207
+ }, C = {
208
+ SIGNED_IN: o.SignedIn,
209
+ SIGNED_OUT: o.SignedOut,
210
+ FAILED: o.Failed
211
+ }, w = (n, r, i) => {
212
+ let a = S[r.specification?.authentication ?? e.None];
176
213
  if (a == null) return;
177
214
  let { userLevel: o, global: s } = r.specification?.authStatus ?? {}, c = t(n);
178
215
  return {
179
216
  authenticationType: a,
180
- userStatus: o ? y[o] : void 0,
181
- globalStatus: s ? y[s] : void 0,
217
+ userStatus: o ? C[o] : void 0,
218
+ globalStatus: s ? C[s] : void 0,
182
219
  isPublic: c,
183
220
  isManageableByAdmin: i && c,
184
221
  apiKeyHeader: r.specification?.authStatus?.apiKeyHeader
185
222
  };
186
- }, x = (e) => {
223
+ }, T = (e) => {
187
224
  let t = e?.permissions?.length ? e.permissions : e?.allTools;
188
225
  if (t?.length) return { tools: t.map((e) => ({ name: e })) };
189
- }, S = (e) => {
190
- let t = [];
226
+ }, E = (e, t) => {
227
+ let r = [];
191
228
  if (e.specification != null) {
192
- let { specification: r } = e, i = [];
193
- r.authentication != null && i.push({
194
- label: "Authentication",
195
- value: r.authentication
196
- }), r.provider != null && i.push({
197
- label: "Provider",
198
- value: r.provider
199
- }), r.vendor != null && i.push({
200
- label: "Vendor",
201
- value: r.vendor
202
- }), r.license != null && i.push({
203
- label: "License",
204
- value: r.license
205
- }), r.knowledgeCutoffDate != null && i.push({
206
- label: "Knowledge cutoff date",
207
- value: c(r.knowledgeCutoffDate)
208
- }), r.parameters != null && i.push({
209
- label: "Parameters",
210
- value: r.parameters
211
- }), r.hostedBy != null && i.push({
212
- label: "Hosted by",
213
- value: r.hostedBy
214
- }), r.createdAt != null && i.push({
215
- label: "Release date",
216
- value: n(r.createdAt)
217
- }), r.authStatus?.scopesSupported?.length && i.push({
218
- label: "OAuth scopes",
219
- value: r.authStatus.scopesSupported.join(" · ")
220
- }), r.authStatus?.authorizationEndpoint != null && i.push({
221
- label: "Authorization endpoint",
222
- value: r.authStatus.authorizationEndpoint
223
- }), r.authStatus?.tokenEndpoint != null && i.push({
224
- label: "Token endpoint",
225
- value: r.authStatus.tokenEndpoint
226
- }), i.length > 0 && t.push({
227
- title: "Specification",
228
- specs: i
229
+ let { specification: i } = e, a = [];
230
+ i.authentication != null && a.push({
231
+ label: t.authentication,
232
+ value: i.authentication
233
+ }), i.provider != null && a.push({
234
+ label: t.provider,
235
+ value: i.provider
236
+ }), i.vendor != null && a.push({
237
+ label: t.vendor,
238
+ value: i.vendor
239
+ }), i.license != null && a.push({
240
+ label: t.license,
241
+ value: i.license
242
+ }), i.knowledgeCutoffDate != null && a.push({
243
+ label: t.knowledgeCutoffDate,
244
+ value: l(i.knowledgeCutoffDate)
245
+ }), i.parameters != null && a.push({
246
+ label: t.parameters,
247
+ value: i.parameters
248
+ }), i.hostedBy != null && a.push({
249
+ label: t.hostedBy,
250
+ value: i.hostedBy
251
+ }), i.createdAt != null && a.push({
252
+ label: t.releaseDate,
253
+ value: n(i.createdAt)
254
+ }), i.authStatus?.scopesSupported?.length && a.push({
255
+ label: t.oauthScopes,
256
+ value: i.authStatus.scopesSupported.join(" · ")
257
+ }), i.authStatus?.authorizationEndpoint != null && a.push({
258
+ label: t.authorizationEndpoint,
259
+ value: i.authStatus.authorizationEndpoint
260
+ }), i.authStatus?.tokenEndpoint != null && a.push({
261
+ label: t.tokenEndpoint,
262
+ value: i.authStatus.tokenEndpoint
263
+ }), a.length > 0 && r.push({
264
+ title: t.specificationTitle,
265
+ specs: a
229
266
  });
230
267
  }
231
268
  return {
232
- overview: t.length > 0 ? { sections: t } : void 0,
233
- tools: x(e.specification)
269
+ overview: r.length > 0 ? { sections: r } : void 0,
270
+ tools: T(e.specification)
271
+ };
272
+ }, D = (e, t) => {
273
+ let n = {
274
+ ...d,
275
+ ...t
234
276
  };
235
- }, C = (e) => {
236
277
  switch (e.type) {
237
- case "MODEL": return u(e.data);
238
- case "AGENT": return _(e.data);
239
- case "TOOLSET": return S(e.data);
278
+ case "MODEL": return f(e.data, n);
279
+ case "AGENT": return x(e.data, n);
280
+ case "TOOLSET": return E(e.data, n);
240
281
  }
241
- }, w = (e) => {
282
+ }, O = (e) => {
242
283
  if (e != null) return {
243
284
  hasTools: e.tools,
244
285
  hasMcp: e.mcp,
@@ -252,25 +293,29 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
252
293
  hasConfiguration: e.hasConfigurationSchema,
253
294
  hasChatCompletion: e.chatCompletion,
254
295
  hasResponsesApi: e.responsesApi,
296
+ hasSkills: e.skillsSupported,
255
297
  reasoningEfforts: e.reasoningEfforts
256
298
  };
257
- }, T = (e) => {
299
+ }, k = (e) => {
258
300
  if (e == null) return;
259
301
  let t = typeof e.unit == "string" ? e.unit : void 0, n = Object.entries(e).flatMap(([e, n]) => {
260
- if (e === l || typeof n != "string" || n.trim() === "") return [];
302
+ if (e === u || typeof n != "string" || n.trim() === "") return [];
261
303
  let i = r(n, t);
262
304
  return i == null ? [] : [{
263
305
  key: e,
264
306
  price: i
265
307
  }];
266
308
  });
267
- return n.length > 0 ? { prices: n } : void 0;
268
- }, E = (e) => {
309
+ return n.length > 0 ? {
310
+ prices: n,
311
+ unit: t
312
+ } : void 0;
313
+ }, A = (e) => {
269
314
  let { limits: t, pricing: n, features: r, catalogProperties: i, owner: a, inputAttachmentTypes: o, defaultMaxTokens: s, createdAt: c } = e.modelDetails ?? {}, l = t != null || i != null || a != null || c != null || (o?.length ?? 0) > 0;
270
315
  return {
271
316
  type: "MODEL",
272
317
  data: {
273
- capabilities: w(r),
318
+ capabilities: O(r),
274
319
  specification: l ? {
275
320
  provider: i?.provider,
276
321
  vendor: i?.vendor,
@@ -283,16 +328,16 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
283
328
  hostedBy: a,
284
329
  createdAt: c
285
330
  } : void 0,
286
- pricing: T(n),
331
+ pricing: k(n),
287
332
  api: { modelId: e.id }
288
333
  }
289
334
  };
290
- }, D = (e) => {
335
+ }, j = (e) => {
291
336
  let { routes: t, owner: n, inputAttachmentTypes: r, features: i, catalogProperties: a, createdAt: o } = e.applicationDetails ?? {}, s = a != null || n != null || o != null || (t?.length ?? 0) > 0;
292
337
  return {
293
338
  type: "AGENT",
294
339
  data: {
295
- capabilities: w(i),
340
+ capabilities: O(i),
296
341
  specification: s ? {
297
342
  provider: a?.provider,
298
343
  vendor: a?.vendor,
@@ -306,7 +351,7 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
306
351
  configuration: r?.length ? { inputAttachmentTypes: r } : void 0
307
352
  }
308
353
  };
309
- }, O = (t) => t === e.None || t === e.ApiKey || t === e.OAuth, k = (e) => {
354
+ }, M = (t) => t === e.None || t === e.ApiKey || t === e.OAuth, N = (e) => {
310
355
  if (e == null) return;
311
356
  let { globalAuthStatus: t, appLevelAuthStatus: n, userLevelAuthStatus: r, scopesSupported: i, authorizationEndpoint: a, tokenEndpoint: o, apiKeyHeader: s } = e;
312
357
  if (!(t == null && n == null && r == null && a == null && o == null && s == null && !i?.length)) return {
@@ -318,14 +363,14 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
318
363
  tokenEndpoint: o,
319
364
  apiKeyHeader: s
320
365
  };
321
- }, A = (e) => {
366
+ }, P = (e) => {
322
367
  let t = e.toolsetDetails, n = t?.authSettings?.authenticationType;
323
368
  return {
324
369
  type: "TOOLSET",
325
370
  data: {
326
- capabilities: w(t?.features),
371
+ capabilities: O(t?.features),
327
372
  specification: t == null ? void 0 : {
328
- authentication: O(n) ? n : void 0,
373
+ authentication: M(n) ? n : void 0,
329
374
  provider: t.catalogProperties?.provider,
330
375
  vendor: t.catalogProperties?.vendor,
331
376
  license: t.catalogProperties?.license,
@@ -335,16 +380,16 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
335
380
  allTools: t.allToolNames,
336
381
  hostedBy: t.owner,
337
382
  createdAt: t.createdAt,
338
- authStatus: k(t.authSettings)
383
+ authStatus: N(t.authSettings)
339
384
  }
340
385
  }
341
386
  };
342
- }, j = (e) => {
387
+ }, F = (e) => {
343
388
  switch (e.type) {
344
- case "model": return E(e);
345
- case "application": return D(e);
346
- case "toolset": return A(e);
389
+ case "model": return A(e);
390
+ case "application": return j(e);
391
+ case "toolset": return P(e);
347
392
  }
348
393
  };
349
394
  //#endregion
350
- export { j as mapDeploymentDetailsDtoToEntityDetails, C as mapEntityDetailsToCatalogDetails, b as mapToolsetCredentials };
395
+ export { d as DEFAULT_ENTITY_DETAILS_LABELS, F as mapDeploymentDetailsDtoToEntityDetails, D as mapEntityDetailsToCatalogDetails, w as mapToolsetCredentials };