@epam/ai-dial-chat-hooks 1.4.0-dev.12 → 1.4.0-dev.126

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 (190) hide show
  1. package/api-error/map-api-error.d.ts +10 -0
  2. package/api-error/map-api-error.d.ts.map +1 -0
  3. package/api-error/map-api-error.js +11 -0
  4. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +1 -1
  5. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -1
  6. package/attachment/useAttachmentAction/useAttachmentAction.js +35 -44
  7. package/catalog/create-publish-api.d.ts +28 -1
  8. package/catalog/create-publish-api.d.ts.map +1 -1
  9. package/catalog/create-publish-api.js +21 -1
  10. package/catalog/entity-details.d.ts +5 -2
  11. package/catalog/entity-details.d.ts.map +1 -1
  12. package/catalog/map-entity-details-to-catalog.d.ts +4 -0
  13. package/catalog/map-entity-details-to-catalog.d.ts.map +1 -1
  14. package/catalog/map-entity-details-to-catalog.js +15 -13
  15. package/catalog/publish-dependency-icons.d.ts +22 -0
  16. package/catalog/publish-dependency-icons.d.ts.map +1 -0
  17. package/catalog/publish-dependency-icons.js +11 -0
  18. package/catalog/publish-target-taken.d.ts +31 -0
  19. package/catalog/publish-target-taken.d.ts.map +1 -0
  20. package/catalog/publish-target-taken.js +14 -0
  21. package/catalog/publish.d.ts +15 -2
  22. package/catalog/publish.d.ts.map +1 -1
  23. package/catalog/publish.js +15 -4
  24. package/catalog/resource-name-conflict.d.ts.map +1 -1
  25. package/catalog/resource-name-conflict.js +19 -22
  26. package/catalog/resource-save-adapter.d.ts +7 -2
  27. package/catalog/resource-save-adapter.d.ts.map +1 -1
  28. package/catalog/resource-save-adapters.d.ts +32 -7
  29. package/catalog/resource-save-adapters.d.ts.map +1 -1
  30. package/catalog/resource-save-adapters.js +47 -41
  31. package/catalog/resource-save.d.ts +17 -9
  32. package/catalog/resource-save.d.ts.map +1 -1
  33. package/catalog/resource-save.js +34 -25
  34. package/catalog/save-destination-root.d.ts +12 -0
  35. package/catalog/save-destination-root.d.ts.map +1 -0
  36. package/catalog/save-destination-root.js +6 -0
  37. package/catalog/use-publish-dependencies.d.ts +19 -0
  38. package/catalog/use-publish-dependencies.d.ts.map +1 -0
  39. package/catalog/use-publish-dependencies.js +25 -0
  40. package/catalog/use-publish-target-guard.d.ts +45 -0
  41. package/catalog/use-publish-target-guard.d.ts.map +1 -0
  42. package/catalog/use-publish-target-guard.js +18 -0
  43. package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -2
  44. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
  45. package/catalog/usePublishFolders/usePublishFolders.js +29 -29
  46. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +27 -6
  47. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -1
  48. package/catalog/useResourceSavePanel/useResourceSavePanel.js +184 -118
  49. package/catalog/useVersionHistory/useVersionHistory.d.ts +38 -0
  50. package/catalog/useVersionHistory/useVersionHistory.d.ts.map +1 -0
  51. package/catalog/useVersionHistory/useVersionHistory.js +49 -0
  52. package/catalog/useVersionHistory/useVersionHistorySection.d.ts +30 -0
  53. package/catalog/useVersionHistory/useVersionHistorySection.d.ts.map +1 -0
  54. package/catalog/useVersionHistory/useVersionHistorySection.js +31 -0
  55. package/catalog/version-history.d.ts +42 -0
  56. package/catalog/version-history.d.ts.map +1 -0
  57. package/catalog/version-history.js +27 -0
  58. package/catalog.js +39 -31
  59. package/conversation/announcement-message.d.ts +12 -0
  60. package/conversation/announcement-message.d.ts.map +1 -1
  61. package/conversation/announcement-message.js +16 -10
  62. package/conversation/conversation-list.d.ts +7 -1
  63. package/conversation/conversation-list.d.ts.map +1 -1
  64. package/conversation/conversation-list.js +11 -2
  65. package/conversation/conversation-transfer/zip-export.d.ts +1 -1
  66. package/conversation/conversation-transfer/zip-export.d.ts.map +1 -1
  67. package/conversation/conversation-transfer/zip-export.js +7 -8
  68. package/conversation/conversation-transfer/zip-import.d.ts.map +1 -1
  69. package/conversation/conversation-transfer/zip-import.js +8 -9
  70. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
  71. package/conversation/useConversationExport/useConversationExport.js +3 -1
  72. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
  73. package/conversation/useConversationStream/generation-resume.js +119 -96
  74. package/conversation.js +44 -44
  75. package/entry-points/catalog.d.ts +7 -0
  76. package/entry-points/catalog.d.ts.map +1 -1
  77. package/entry-points/file-manager.d.ts +1 -0
  78. package/entry-points/file-manager.d.ts.map +1 -1
  79. package/entry-points/project.d.ts +5 -0
  80. package/entry-points/project.d.ts.map +1 -1
  81. package/entry-points/scheduled-tasks.d.ts +2 -0
  82. package/entry-points/scheduled-tasks.d.ts.map +1 -1
  83. package/entry-points/usage-limits.d.ts +1 -0
  84. package/entry-points/usage-limits.d.ts.map +1 -1
  85. package/entry-points/utils.d.ts +7 -0
  86. package/entry-points/utils.d.ts.map +1 -1
  87. package/file-manager.js +33 -32
  88. package/files/annotation.d.ts +3 -3
  89. package/files/annotation.d.ts.map +1 -1
  90. package/files/annotation.js +12 -11
  91. package/files/attachment-canvas.d.ts +1 -1
  92. package/files/attachment-canvas.d.ts.map +1 -1
  93. package/files/attachment-canvas.js +135 -135
  94. package/files/attachment-type-labels.d.ts +3 -0
  95. package/files/attachment-type-labels.d.ts.map +1 -0
  96. package/files/attachment-type-labels.js +12 -0
  97. package/files/attachment-types.d.ts +0 -2
  98. package/files/attachment-types.d.ts.map +1 -1
  99. package/files/attachment-types.js +7 -14
  100. package/files/dial-file.d.ts +24 -0
  101. package/files/dial-file.d.ts.map +1 -1
  102. package/files/dial-file.js +35 -5
  103. package/index.d.ts +23 -0
  104. package/index.d.ts.map +1 -1
  105. package/index.js +266 -244
  106. package/org-units/models.d.ts +11 -0
  107. package/org-units/models.d.ts.map +1 -0
  108. package/org-units/org-unit-guards.d.ts +98 -0
  109. package/org-units/org-unit-guards.d.ts.map +1 -0
  110. package/org-units/org-unit-guards.js +41 -0
  111. package/org-units/types.d.ts +14 -0
  112. package/org-units/types.d.ts.map +1 -0
  113. package/org-units/types.js +6 -0
  114. package/org-units/useFolderGuards/useFolderGuards.d.ts +31 -0
  115. package/org-units/useFolderGuards/useFolderGuards.d.ts.map +1 -0
  116. package/org-units/useFolderGuards/useFolderGuards.js +50 -0
  117. package/org-units/useOrgUnits/useOrgUnits.d.ts +34 -0
  118. package/org-units/useOrgUnits/useOrgUnits.d.ts.map +1 -0
  119. package/org-units/useOrgUnits/useOrgUnits.js +54 -0
  120. package/package.json +19 -19
  121. package/project/project-conversation-data-source.js +4 -4
  122. package/project/project-sharing-client.d.ts +8 -0
  123. package/project/project-sharing-client.d.ts.map +1 -0
  124. package/project/project-sharing-client.js +11 -0
  125. package/project/project-sharing.d.ts +28 -0
  126. package/project/project-sharing.d.ts.map +1 -0
  127. package/project/project-sharing.js +22 -0
  128. package/project/use-pinned-project-chats.d.ts +4 -2
  129. package/project/use-pinned-project-chats.d.ts.map +1 -1
  130. package/project/use-pinned-project-chats.js +152 -96
  131. package/project/use-project-conversations.d.ts.map +1 -1
  132. package/project/use-project-conversations.js +2 -2
  133. package/project/use-project-remove-from-list.d.ts +30 -0
  134. package/project/use-project-remove-from-list.d.ts.map +1 -0
  135. package/project/use-project-remove-from-list.js +39 -0
  136. package/project/use-project-revoke-access.d.ts +15 -0
  137. package/project/use-project-revoke-access.d.ts.map +1 -0
  138. package/project/use-project-revoke-access.js +32 -0
  139. package/project/use-project-share-recipients.d.ts +7 -0
  140. package/project/use-project-share-recipients.d.ts.map +1 -0
  141. package/project/use-project-share-recipients.js +36 -0
  142. package/project/use-projects.d.ts +1 -0
  143. package/project/use-projects.d.ts.map +1 -1
  144. package/project/use-projects.js +2 -1
  145. package/project.js +7 -2
  146. package/scheduled-task/scheduled-task-description.d.ts +19 -13
  147. package/scheduled-task/scheduled-task-description.d.ts.map +1 -1
  148. package/scheduled-task/scheduled-task-description.js +39 -55
  149. package/scheduled-task/scheduled-task-display.d.ts +67 -6
  150. package/scheduled-task/scheduled-task-display.d.ts.map +1 -1
  151. package/scheduled-task/scheduled-task-display.js +55 -43
  152. package/scheduled-task/scheduled-task-next-occurrence.d.ts +9 -5
  153. package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -1
  154. package/scheduled-task/scheduled-task-next-occurrence.js +16 -16
  155. package/scheduled-task/scheduled-task-time-format.d.ts +36 -0
  156. package/scheduled-task/scheduled-task-time-format.d.ts.map +1 -0
  157. package/scheduled-task/scheduled-task-time-format.js +34 -0
  158. package/scheduled-task/scheduled-task-trigger.d.ts +6 -4
  159. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -1
  160. package/scheduled-task/scheduled-task-trigger.js +92 -115
  161. package/scheduled-tasks.js +15 -13
  162. package/shared/timezones.d.ts +30 -0
  163. package/shared/timezones.d.ts.map +1 -0
  164. package/shared/timezones.js +102 -0
  165. package/skill/skill-archive.d.ts.map +1 -1
  166. package/skill/skill-archive.js +6 -7
  167. package/skill/skill.d.ts +2 -2
  168. package/skill/skill.d.ts.map +1 -1
  169. package/skill/skill.js +33 -34
  170. package/skill/useSkillEditorLoad.js +1 -1
  171. package/skill/useSkillEditorSubmit.d.ts +4 -1
  172. package/skill/useSkillEditorSubmit.d.ts.map +1 -1
  173. package/skill/useSkillEditorSubmit.js +125 -121
  174. package/usage/map-usage-data-to-dashboard.d.ts +22 -1
  175. package/usage/map-usage-data-to-dashboard.d.ts.map +1 -1
  176. package/usage/map-usage-data-to-dashboard.js +33 -2
  177. package/usage/spending-limits-mode.d.ts +37 -0
  178. package/usage/spending-limits-mode.d.ts.map +1 -0
  179. package/usage/spending-limits-mode.js +15 -0
  180. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +6 -2
  181. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -1
  182. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +4 -1
  183. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -1
  184. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +55 -47
  185. package/usage-limits.js +6 -5
  186. package/usage.js +3 -3
  187. package/utils.js +28 -22
  188. package/shared/cron-day-of-month.d.ts +0 -21
  189. package/shared/cron-day-of-month.d.ts.map +0 -1
  190. package/shared/cron-day-of-month.js +0 -13
@@ -1,13 +1,14 @@
1
1
  import { UsagePeriod as e } from "../usage-period.js";
2
2
  import { selectUsageBannerSource as t } from "../usage-banner-source.js";
3
3
  import { formatUsageResetShort as n } from "../usage-reset-time.js";
4
- import { useDeploymentUsageLimits as r } from "../useDeploymentUsageLimits/useDeploymentUsageLimits.js";
5
- import { useRefreshUsageAfterGeneration as i } from "../useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js";
6
- import { useUsageLimitBannerDismissal as a } from "../useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js";
7
- import { useCallback as o, useMemo as s } from "react";
8
- import { UsageLimitBannerSeverity as c } from "@epam/ai-dial-conversation-input";
4
+ import { SpendingLimitsMode as r, withholdAccountCostInEnforce as i } from "../spending-limits-mode.js";
5
+ import { useDeploymentUsageLimits as a } from "../useDeploymentUsageLimits/useDeploymentUsageLimits.js";
6
+ import { useRefreshUsageAfterGeneration as o } from "../useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js";
7
+ import { useUsageLimitBannerDismissal as s } from "../useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js";
8
+ import { useCallback as c, useMemo as l } from "react";
9
+ import { UsageLimitBannerSeverity as u } from "@epam/ai-dial-conversation-input";
9
10
  //#region src/usage/useUsageLimitBanner/useUsageLimitBanner.ts
10
- var l = {
11
+ var d = {
11
12
  warningDay: "conversationInput.usageBanner.warningDay",
12
13
  warningWeek: "conversationInput.usageBanner.warningWeek",
13
14
  warningMonth: "conversationInput.usageBanner.warningMonth",
@@ -15,56 +16,63 @@ var l = {
15
16
  reachedWeek: "conversationInput.usageBanner.reachedWeek",
16
17
  reachedMonth: "conversationInput.usageBanner.reachedMonth",
17
18
  closeLabel: "conversationInput.usageBanner.closeLabel"
18
- }, u = {
19
- [c.Warning]: {
20
- [e.Day]: l.warningDay,
21
- [e.Week]: l.warningWeek,
22
- [e.Month]: l.warningMonth
19
+ }, f = {
20
+ [u.Warning]: {
21
+ [e.Day]: d.warningDay,
22
+ [e.Week]: d.warningWeek,
23
+ [e.Month]: d.warningMonth
23
24
  },
24
- [c.Reached]: {
25
- [e.Day]: l.reachedDay,
26
- [e.Week]: l.reachedWeek,
27
- [e.Month]: l.reachedMonth
25
+ [u.Reached]: {
26
+ [e.Day]: d.reachedDay,
27
+ [e.Week]: d.reachedWeek,
28
+ [e.Month]: d.reachedMonth
28
29
  }
29
- }, d = ({ deploymentId: e, isGenerationInProgress: c = !1, getDeploymentUsage: d, getAccountUsage: f, warningThresholdPercent: p, activeLocale: m, t: h }) => {
30
- let g = s(() => ({
31
- getDeploymentUsage: d,
32
- getAccountUsage: f
33
- }), [d, f]), { sources: _, isLoading: v, refresh: y } = r(e, g), { isDismissed: b, dismiss: x } = a();
34
- i({
35
- isGenerationInProgress: c,
36
- isLoading: v,
37
- refresh: y
30
+ }, p = ({ deploymentId: e, isGenerationInProgress: u = !1, getDeploymentUsage: p, getAccountUsage: m, warningThresholdPercent: h, activeLocale: g, t: _, spendingLimitsMode: v = r.Off }) => {
31
+ let y = l(() => ({
32
+ getDeploymentUsage: p,
33
+ getAccountUsage: m
34
+ }), [p, m]), { sources: b, isLoading: x, refresh: S } = a(e, y), { isDismissed: C, dismiss: w } = s();
35
+ o({
36
+ isGenerationInProgress: u,
37
+ isLoading: x,
38
+ refresh: S
38
39
  });
39
- let S = s(() => t(_, p), [_, p]), C = s(() => {
40
- if (S != null && e) return {
41
- dismissalKey: `${e}:${S.period}:${S.severity}`,
42
- limitText: h(u[S.severity][S.period], { percent: S.usedPercent }),
43
- reset: n(S.resetsAt, S.period, m, h)
40
+ let T = l(() => t({
41
+ ...b,
42
+ account: i(b.account, v)
43
+ }, h), [
44
+ b,
45
+ h,
46
+ v
47
+ ]), E = l(() => {
48
+ if (T != null && e) return {
49
+ dismissalKey: `${e}:${T.period}:${T.severity}`,
50
+ limitText: _(f[T.severity][T.period], { percent: T.usedPercent }),
51
+ reset: n(T.resetsAt, T.period, g, _)
44
52
  };
45
53
  }, [
46
- S,
54
+ T,
47
55
  e,
48
- m,
49
- h
50
- ]), w = C?.dismissalKey, T = o(() => {
51
- w != null && x(w);
52
- }, [x, w]), E = h(l.closeLabel);
53
- return { banner: s(() => {
54
- if (!(S == null || C == null || b(C.dismissalKey))) return {
55
- severity: S.severity,
56
- limitText: C.limitText,
57
- reset: C.reset,
58
- onClose: T,
59
- closeAriaLabel: E
56
+ g,
57
+ _
58
+ ]), D = E?.dismissalKey, O = c(() => {
59
+ D != null && w(D);
60
+ }, [w, D]), k = _(d.closeLabel);
61
+ return { banner: l(() => {
62
+ if (!(T == null || E == null || C(E.dismissalKey))) return {
63
+ severity: T.severity,
64
+ limitText: E.limitText,
65
+ reset: E.reset,
66
+ onClose: O,
67
+ closeAriaLabel: k
60
68
  };
61
69
  }, [
62
- S,
63
- C,
64
- b,
65
70
  T,
66
- E
71
+ E,
72
+ C,
73
+ O,
74
+ k
67
75
  ]) };
68
76
  };
69
77
  //#endregion
70
- export { l as USAGE_BANNER_I18N_KEYS, d as useUsageLimitBanner };
78
+ export { d as USAGE_BANNER_I18N_KEYS, p as useUsageLimitBanner };
package/usage-limits.js CHANGED
@@ -3,8 +3,9 @@ import { UsagePeriod as t } from "./usage/usage-period.js";
3
3
  import { selectUsageBannerSource as n } from "./usage/usage-banner-source.js";
4
4
  import { USAGE_RESET_I18N_KEYS as r, UsageResetOffsetPolicy as i, formatUsageResetShort as a, formatUsageResetTime as o } from "./usage/usage-reset-time.js";
5
5
  import { getGaugeNeedleAngle as s } from "./usage/usage-gauge.js";
6
- import { useDeploymentUsageLimits as c } from "./usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js";
7
- import { useRefreshUsageAfterGeneration as l } from "./usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js";
8
- import { resetUsageLimitBannerDismissals as u, useUsageLimitBannerDismissal as d } from "./usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js";
9
- import { USAGE_BANNER_I18N_KEYS as f, useUsageLimitBanner as p } from "./usage/useUsageLimitBanner/useUsageLimitBanner.js";
10
- export { f as USAGE_BANNER_I18N_KEYS, r as USAGE_RESET_I18N_KEYS, t as UsagePeriod, i as UsageResetOffsetPolicy, a as formatUsageResetShort, o as formatUsageResetTime, s as getGaugeNeedleAngle, e as isCappedStat, u as resetUsageLimitBannerDismissals, n as selectUsageBannerSource, c as useDeploymentUsageLimits, l as useRefreshUsageAfterGeneration, p as useUsageLimitBanner, d as useUsageLimitBannerDismissal };
6
+ import { SpendingLimitsMode as c, omitAccountCostStats as l, parseSpendingLimitsMode as u, resolveSpendingLimitsMode as d, withholdAccountCostInEnforce as f } from "./usage/spending-limits-mode.js";
7
+ import { useDeploymentUsageLimits as p } from "./usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js";
8
+ import { useRefreshUsageAfterGeneration as m } from "./usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js";
9
+ import { resetUsageLimitBannerDismissals as h, useUsageLimitBannerDismissal as g } from "./usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js";
10
+ import { USAGE_BANNER_I18N_KEYS as _, useUsageLimitBanner as v } from "./usage/useUsageLimitBanner/useUsageLimitBanner.js";
11
+ export { c as SpendingLimitsMode, _ as USAGE_BANNER_I18N_KEYS, r as USAGE_RESET_I18N_KEYS, t as UsagePeriod, i as UsageResetOffsetPolicy, a as formatUsageResetShort, o as formatUsageResetTime, s as getGaugeNeedleAngle, e as isCappedStat, l as omitAccountCostStats, u as parseSpendingLimitsMode, h as resetUsageLimitBannerDismissals, d as resolveSpendingLimitsMode, n as selectUsageBannerSource, p as useDeploymentUsageLimits, m as useRefreshUsageAfterGeneration, v as useUsageLimitBanner, g as useUsageLimitBannerDismissal, f as withholdAccountCostInEnforce };
package/usage.js CHANGED
@@ -1,3 +1,3 @@
1
- import { USAGE_DATA_I18N_KEYS as e, mapUsageDataToDashboard as t } from "./usage/map-usage-data-to-dashboard.js";
2
- import { USAGE_MODEL_LIMITS_I18N_KEYS as n, mapOverallCostLimitsToPeriodStatuses as r, mapUserUsageToModelLimits as i } from "./usage/map-user-usage-to-model-limits.js";
3
- export { e as USAGE_DATA_I18N_KEYS, n as USAGE_MODEL_LIMITS_I18N_KEYS, r as mapOverallCostLimitsToPeriodStatuses, t as mapUsageDataToDashboard, i as mapUserUsageToModelLimits };
1
+ import { BUDGET_DATA_I18N_KEYS as e, USAGE_DATA_I18N_KEYS as t, mapBudgetsToDashboard as n, mapUsageDataToDashboard as r } from "./usage/map-usage-data-to-dashboard.js";
2
+ import { USAGE_MODEL_LIMITS_I18N_KEYS as i, mapOverallCostLimitsToPeriodStatuses as a, mapUserUsageToModelLimits as o } from "./usage/map-user-usage-to-model-limits.js";
3
+ export { e as BUDGET_DATA_I18N_KEYS, t as USAGE_DATA_I18N_KEYS, i as USAGE_MODEL_LIMITS_I18N_KEYS, n as mapBudgetsToDashboard, a as mapOverallCostLimitsToPeriodStatuses, r as mapUsageDataToDashboard, o as mapUserUsageToModelLimits };
package/utils.js CHANGED
@@ -1,23 +1,29 @@
1
1
  import { getAcceptInvitationErrorItemName as e, getApiErrorDetails as t, getApiErrorMessage as n, getApiErrorStatus as r, isConversationNotFoundError as i } from "./api-error/api-error.js";
2
- import { createCsrfMiddleware as a } from "./api-transport/create-csrf-middleware.js";
3
- import { createUnauthorizedMiddleware as o } from "./api-transport/create-unauthorized-middleware.js";
4
- import { includesIgnoreCase as s, safeDecodeURI as c, safeDecodeURIComponent as l, stripSurroundingSlashes as u, stripTrailingSlashes as d } from "./shared/string-utils.js";
5
- import { appendLocaleCode as f, buildAdditionalLocaleOptions as p, composeLocalePayload as m, decomposeLocalizedFields as h, resolveLocalizedText as g, toBaseLocale as _ } from "./shared/locale.js";
6
- import { formatCalendarDate as v, padTwoDigits as y } from "./shared/formatting.js";
7
- import { PromptSource as b, parsePromptResourceUrl as x } from "./prompt/prompt-resource.js";
8
- import { getRunnerSchemas as S, isCustomAppSchema as C, isQuickAppSchema as w } from "./shared/application-schema.js";
9
- import { buildExternalServiceScopeId as T, getExternalServiceFallbackName as E, parseExternalServiceUrl as D } from "./shared/external-services.js";
10
- import { buildPromptExportEnvelope as O, buildPromptExportFileName as k, serializePromptExport as A } from "./prompt/export-prompt.js";
11
- import { PROMPT_CONTENT_MAX_LENGTH as j, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as M, PROMPT_DESCRIPTION_MAX_LENGTH as N, PROMPT_FIELD_VALIDATORS as P, PROMPT_NAME_MAX_LENGTH as F, PromptFieldError as I, buildPromptPath as L, getRemainingCharacters as R, validatePromptContent as z, validatePromptDescription as B, validatePromptName as V } from "./prompt/prompt.js";
12
- import { usePromptsState as H } from "./prompt/usePromptsState/usePromptsState.js";
13
- import { apSchedulerDayToJsDay as U, jsDayToApSchedulerDay as W } from "./shared/cron-weekday.js";
14
- import { getBrowserTimezone as G } from "./shared/browser-timezone.js";
15
- import { isValidAbsoluteUrl as K, isValidFeaturesData as q, parseFeaturesData as J } from "./shared/custom-apps.js";
16
- import { EXTERNAL_SERVICE_SIGNIN_METHOD as Y, PendingSigninEventKind as X, TOOLSET_SIGNIN_METHOD as Z } from "./shared/client-channel.js";
17
- import { ColorScheme as Q, applyThemeColors as $, getOsPreferredTheme as ee } from "./shared/theme-colors.js";
18
- import { useUsageData as te } from "./usage/useUsageData/useUsageData.js";
19
- import { triggerBrowserDownload as ne } from "./files/browser-download.js";
20
- import { usePersistedState as re } from "./shared/usePersistedState/usePersistedState.js";
21
- import { useAppVersionCheck as ie } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
22
- import { getCleanedLocationTarget as ae } from "./shared/url-cleanup.js";
23
- export { Q as ColorScheme, Y as EXTERNAL_SERVICE_SIGNIN_METHOD, j as PROMPT_CONTENT_MAX_LENGTH, M as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, N as PROMPT_DESCRIPTION_MAX_LENGTH, P as PROMPT_FIELD_VALIDATORS, F as PROMPT_NAME_MAX_LENGTH, X as PendingSigninEventKind, I as PromptFieldError, b as PromptSource, Z as TOOLSET_SIGNIN_METHOD, U as apSchedulerDayToJsDay, f as appendLocaleCode, $ as applyThemeColors, p as buildAdditionalLocaleOptions, T as buildExternalServiceScopeId, O as buildPromptExportEnvelope, k as buildPromptExportFileName, L as buildPromptPath, m as composeLocalePayload, a as createCsrfMiddleware, o as createUnauthorizedMiddleware, h as decomposeLocalizedFields, v as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, G as getBrowserTimezone, ae as getCleanedLocationTarget, E as getExternalServiceFallbackName, ee as getOsPreferredTheme, R as getRemainingCharacters, S as getRunnerSchemas, s as includesIgnoreCase, i as isConversationNotFoundError, C as isCustomAppSchema, w as isQuickAppSchema, K as isValidAbsoluteUrl, q as isValidFeaturesData, W as jsDayToApSchedulerDay, y as padTwoDigits, D as parseExternalServiceUrl, J as parseFeaturesData, x as parsePromptResourceUrl, g as resolveLocalizedText, c as safeDecodeURI, l as safeDecodeURIComponent, A as serializePromptExport, u as stripSurroundingSlashes, d as stripTrailingSlashes, _ as toBaseLocale, ne as triggerBrowserDownload, ie as useAppVersionCheck, re as usePersistedState, H as usePromptsState, te as useUsageData, z as validatePromptContent, B as validatePromptDescription, V as validatePromptName };
2
+ import { withApiErrorMapping as a } from "./api-error/map-api-error.js";
3
+ import { createCsrfMiddleware as o } from "./api-transport/create-csrf-middleware.js";
4
+ import { createUnauthorizedMiddleware as s } from "./api-transport/create-unauthorized-middleware.js";
5
+ import { includesIgnoreCase as c, safeDecodeURI as l, safeDecodeURIComponent as u, stripSurroundingSlashes as d, stripTrailingSlashes as f } from "./shared/string-utils.js";
6
+ import { appendLocaleCode as p, buildAdditionalLocaleOptions as m, composeLocalePayload as h, decomposeLocalizedFields as g, resolveLocalizedText as _, toBaseLocale as v } from "./shared/locale.js";
7
+ import { formatCalendarDate as y, padTwoDigits as b } from "./shared/formatting.js";
8
+ import { PromptSource as x, parsePromptResourceUrl as S } from "./prompt/prompt-resource.js";
9
+ import { getRunnerSchemas as C, isCustomAppSchema as w, isQuickAppSchema as T } from "./shared/application-schema.js";
10
+ import { buildExternalServiceScopeId as E, getExternalServiceFallbackName as D, parseExternalServiceUrl as O } from "./shared/external-services.js";
11
+ import { SaveDestinationRoot as k } from "./catalog/save-destination-root.js";
12
+ import { OrgUnitsStatus as A } from "./org-units/types.js";
13
+ import { OrgUnitFolderGuardPurpose as j, buildFolderGuards as M, getDependencyOrgUnitNamespaces as N, getDependencyTypeOfNamespace as P, getMissingDirectWriteNamespaces as F, getOrgUnitNamespace as I, toPublishDisabledReason as L } from "./org-units/org-unit-guards.js";
14
+ import { buildPromptExportEnvelope as R, buildPromptExportFileName as z, serializePromptExport as B } from "./prompt/export-prompt.js";
15
+ import { PROMPT_CONTENT_MAX_LENGTH as V, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as H, PROMPT_DESCRIPTION_MAX_LENGTH as U, PROMPT_FIELD_VALIDATORS as W, PROMPT_NAME_MAX_LENGTH as G, PromptFieldError as K, buildPromptPath as q, getRemainingCharacters as J, validatePromptContent as Y, validatePromptDescription as X, validatePromptName as Z } from "./prompt/prompt.js";
16
+ import { usePromptsState as Q } from "./prompt/usePromptsState/usePromptsState.js";
17
+ import { getBrowserTimezone as $ } from "./shared/browser-timezone.js";
18
+ import { apSchedulerDayToJsDay as ee, jsDayToApSchedulerDay as te } from "./shared/cron-weekday.js";
19
+ import { isValidAbsoluteUrl as ne, isValidFeaturesData as re, parseFeaturesData as ie } from "./shared/custom-apps.js";
20
+ import { EXTERNAL_SERVICE_SIGNIN_METHOD as ae, PendingSigninEventKind as oe, TOOLSET_SIGNIN_METHOD as se } from "./shared/client-channel.js";
21
+ import { ColorScheme as ce, applyThemeColors as le, getOsPreferredTheme as ue } from "./shared/theme-colors.js";
22
+ import { useUsageData as de } from "./usage/useUsageData/useUsageData.js";
23
+ import { triggerBrowserDownload as fe } from "./files/browser-download.js";
24
+ import { usePersistedState as pe } from "./shared/usePersistedState/usePersistedState.js";
25
+ import { useAppVersionCheck as me } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
26
+ import { getCleanedLocationTarget as he } from "./shared/url-cleanup.js";
27
+ import { useOrgUnits as ge } from "./org-units/useOrgUnits/useOrgUnits.js";
28
+ import { useFolderGuards as _e } from "./org-units/useFolderGuards/useFolderGuards.js";
29
+ export { ce as ColorScheme, ae as EXTERNAL_SERVICE_SIGNIN_METHOD, j as OrgUnitFolderGuardPurpose, A as OrgUnitsStatus, V as PROMPT_CONTENT_MAX_LENGTH, H as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, U as PROMPT_DESCRIPTION_MAX_LENGTH, W as PROMPT_FIELD_VALIDATORS, G as PROMPT_NAME_MAX_LENGTH, oe as PendingSigninEventKind, K as PromptFieldError, x as PromptSource, k as SaveDestinationRoot, se as TOOLSET_SIGNIN_METHOD, ee as apSchedulerDayToJsDay, p as appendLocaleCode, le as applyThemeColors, m as buildAdditionalLocaleOptions, E as buildExternalServiceScopeId, M as buildFolderGuards, R as buildPromptExportEnvelope, z as buildPromptExportFileName, q as buildPromptPath, h as composeLocalePayload, o as createCsrfMiddleware, s as createUnauthorizedMiddleware, g as decomposeLocalizedFields, y as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, $ as getBrowserTimezone, he as getCleanedLocationTarget, N as getDependencyOrgUnitNamespaces, P as getDependencyTypeOfNamespace, D as getExternalServiceFallbackName, F as getMissingDirectWriteNamespaces, I as getOrgUnitNamespace, ue as getOsPreferredTheme, J as getRemainingCharacters, C as getRunnerSchemas, c as includesIgnoreCase, i as isConversationNotFoundError, w as isCustomAppSchema, T as isQuickAppSchema, ne as isValidAbsoluteUrl, re as isValidFeaturesData, te as jsDayToApSchedulerDay, b as padTwoDigits, O as parseExternalServiceUrl, ie as parseFeaturesData, S as parsePromptResourceUrl, _ as resolveLocalizedText, l as safeDecodeURI, u as safeDecodeURIComponent, B as serializePromptExport, d as stripSurroundingSlashes, f as stripTrailingSlashes, v as toBaseLocale, L as toPublishDisabledReason, fe as triggerBrowserDownload, me as useAppVersionCheck, _e as useFolderGuards, ge as useOrgUnits, pe as usePersistedState, Q as usePromptsState, de as useUsageData, Y as validatePromptContent, X as validatePromptDescription, Z as validatePromptName, a as withApiErrorMapping };
@@ -1,21 +0,0 @@
1
- /** APScheduler `day` expression for the last day of the month. */
2
- export declare const CRON_LAST_DAY_OF_MONTH = "last";
3
- /**
4
- * Calendar days between `date`'s UTC date and its local date: `-1` when UTC is
5
- * still on the previous day (east of UTC), `1` when it has reached the next.
6
- */
7
- export declare const getUtcDayShift: (date: Date) => number;
8
- /**
9
- * Converts a local day-of-month to the UTC `day` cron value. The local 1st
10
- * shifted back is always the previous month's last day, hence `'last'`. The
11
- * local 31st shifted forward stays `'1'`: a single cron field cannot express
12
- * "the 1st after a 31-day month only".
13
- */
14
- export declare const toUtcCronDayOfMonth: (localDay: number, utcDayShift: number) => string;
15
- /**
16
- * Inverts {@link toUtcCronDayOfMonth}; returns `undefined` for a value the
17
- * form cannot represent. A UTC 31st shifted forward maps to the 1st, so tasks
18
- * saved before `'last'` was emitted still open in the editor.
19
- */
20
- export declare const toLocalDayOfMonth: (utcDay: string, utcDayShift: number) => string | undefined;
21
- //# sourceMappingURL=cron-day-of-month.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cron-day-of-month.d.ts","sourceRoot":"","sources":["../../src/shared/cron-day-of-month.ts"],"names":[],"mappings":"AAQA,kEAAkE;AAClE,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAK7C;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,IAAI,KAAG,MAKzC,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,EAChB,aAAa,MAAM,KAClB,MAKF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,MAAM,EACd,aAAa,MAAM,KAClB,MAAM,GAAG,SAcX,CAAC"}
@@ -1,13 +0,0 @@
1
- //#region src/shared/cron-day-of-month.ts
2
- var e = "last", t = (e) => Math.round((Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()) - Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())) / 864e5), n = (t, n) => {
3
- let r = t + n;
4
- return r < 1 ? e : r > 31 ? "1" : String(r);
5
- }, r = (e, t) => {
6
- if (e === "last") return t === -1 ? "1" : void 0;
7
- let n = Number(e);
8
- if (!/^\d+$/.test(e) || n < 1 || n > 31) return;
9
- let r = n - t;
10
- return r < 1 ? "31" : r > 31 ? "1" : String(r);
11
- };
12
- //#endregion
13
- export { e as CRON_LAST_DAY_OF_MONTH, t as getUtcDayShift, r as toLocalDayOfMonth, n as toUtcCronDayOfMonth };