@epam/statgpt-shared-toolkit 0.7.0-dev.3 → 0.7.0-dev.30
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.
- package/index.js +1 -1
- package/index.mjs +159 -183
- package/package.json +2 -2
- package/LICENSE +0 -21
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("date-fns");var t={CHAT:`/api/chat`},n=`CUSTOM_PERIOD`,r={decimal:`0.0`,decimalSymbol:`,`,digitGroupingSymbol:` `},i=`application/json`,a=`Content-Type`,o=`Api-Key`,s=`X-CONVERSATION-ID`,c=`Ocp-Apim-Subscription-Key`,l=`X-Source-Artefact-Urn`,u={BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,CONFLICT:409,TOO_MANY_REQUESTS:429,INTERNAL_SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},d=`onboarding`,f=`share`,p=class extends Error{constructor(e){super(e.message),this.isHttpError=!0,this.name=`HttpError`,this.code=e.code,this.status=e.status,this.details=e.details,this.displayMessage=e.displayMessage}};function m(e){let t=e;return typeof e==`object`&&!!e&&t.isHttpError===!0&&typeof t.status==`number`&&typeof t.message==`string`&&(t.code===void 0||typeof t.code==`string`)}var h=function(e){return e.MONTH=`month`,e.DAY=`day`,e}({}),g=function(e){return e.UK=`uk`,e.EN=`en`,e}({}),_=function(e){return e.IN=`in`,e.BETWEEN=`between`,e.EXCLUDED=`excluded`,e}({});function v(e,t){return`${e.split(`/`)[0]}/${t.split(`/`).pop()}`}var y=e=>e.messages.flatMap(e=>{let t=e.custom_content?.attachments??[],n=e.custom_content?.stages?.flatMap(({attachments:e})=>e??[])??[];return[...t,...n]}),b=e=>e.endsWith(`/`),x=e=>{let t=e.toLowerCase();return t.startsWith(`http://`)||t.startsWith(`https://`)},S=e=>!!e&&!x(e)&&!b(e),C=e=>[...new Set(y(e).map(e=>e.url).filter(e=>!!e).filter(e=>S(e)))],w=(e,t)=>e?.map(e=>({...e,url:e.url?t[e.url]??e.url:e.url})),T=(e,t)=>({...e,messages:e.messages.map(e=>({...e,custom_content:e.custom_content?{...e.custom_content,attachments:w(e.custom_content.attachments,t),stages:e.custom_content.stages?.map(e=>({...e,attachments:w(e.attachments,t)}))}:e.custom_content}))}),E=e=>e?.split(/-\d+$/)[0]??``,D=e=>/\p{L}/u.test(e)||/\p{N}/u.test(e),O=e=>{if(!e)return``;let t=e.toLowerCase(),n=[],r=``;for(let e of t)D(e)?r+=e:r&&=(n.push(r),``);return r&&n.push(r),n.join(` `)};function k(e,t){return`${e?.[0]}/${t}/${e?.[1]}`}var A=(e,t)=>(Math.round(e*10**t)/10**t).toString(),j=(e,t)=>{let n=t?.decimal||r.decimal,i=t?.decimalSymbol||r.decimalSymbol,a=t?.digitGroupingSymbol??r.digitGroupingSymbol,o=Number(e);if(o==null||Number.isNaN(o)||e===null||e===``)return``;let s=n.replace(`0.`,``),c=`${n===`0`?Math.trunc(o):A(o,s.length)} `.split(`.`);return c[0]=c[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${a}`),`${c.join(i)}`},M=t=>{if(!t.includes(`T`)){for(let n of N){let r=(0,e.parse)(t,n,new Date);if((0,e.isValid)(r))return r}return null}let n=(0,e.parseISO)(t);return(0,e.isValid)(n)?n:null},N=[`yyyy-MM-dd`,`MM-dd-yyyy`],P=(e,t,n)=>{let r={};return t?.contentType!==null&&(r[a]=t?.contentType||`application/json`),t?.jwt?r.Authorization=`Bearer ${t.jwt}`:e&&(r[o]=e),t?.chatReference&&(r[s]=t.chatReference),{...r,...n}},F=e=>{let t={...e};return t[`Api-Key`]&&(t[o]=t[o].substring(0,8)+`...[REDACTED]`),t.Authorization&&=`Bearer [REDACTED]`,t[`Ocp-Apim-Subscription-Key`]&&(t[c]=t[c].substring(0,8)+`...[REDACTED]`),t},I=e=>({"Content-Type":`multipart/form-data; boundary=${e}`}),L=e=>e?.toLowerCase()===`true`,R=async(e,t,n)=>await fetch(e,{method:n.method||`GET`,headers:t,body:n.body?JSON.stringify(n.body):void 0}),z=(e,t)=>e?.split(`/`)?.filter(e=>e!==t)?.join(`/`),B=e=>e.replace(/^conversations\//,``),V=e=>e.split(`/`).slice(0,-1).join(`/`),H=e=>E(decodeURIComponent(e.split(`/`).at(-1)??``)),U=e=>e.map(e=>({...e,name:E(e.name)})),W=new Set([`)`,`]`,`}`,`>`,`,`,`.`,`!`,`?`,`:`,`;`]);function G(e){let t=e.length;for(;t>0&&W.has(e[t-1]);)t--;return t===e.length?{cleanUrl:e,trailing:``}:{cleanUrl:e.slice(0,t),trailing:e.slice(t)}}function K(e){if(!e)return[{type:`text`,value:``}];let t=[],n=0;for(let r of e.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)){let i=r[0],a=r.index??0;a>n&&t.push({type:`text`,value:e.slice(n,a)});let{cleanUrl:o,trailing:s}=G(i);o?t.push({type:`link`,value:o}):t.push({type:`text`,value:i}),s&&t.push({type:`text`,value:s}),n=a+i.length}return n<e.length&&t.push({type:`text`,value:e.slice(n)}),t.length?t:[{type:`text`,value:e}]}exports.API_KEY_HEADER=o,exports.API_ROUTES=t,exports.APPLICATION_JSON=i,exports.CONTENT_TYPE_HEADER=a,exports.CUSTOM_PERIOD=n,exports.CalendarResolution=h,exports.HTTP_ERROR_CODES=u,exports.HttpError=p,exports.Locale=g,exports.OCP_APIM_SUBSCRIPTION_KEY_HEADER=c,exports.ONBOARDING_MODEL_POSTFIX=d,exports.QueryFilterType=_,exports.SHARE_CONVERSATION_ROUTE=f,exports.X_CONVERSATION_ID_HEADER=s,exports.X_SOURCE_ARTEFACT_URN_HEADER=l,exports.cleanConversationNames=U,exports.defaultFormatNumbers=r,exports.deleteConversationNamePostfix=E,exports.formatNumberBySign=j,exports.getClearedConversationName=O,exports.getConversationAttachmentUrls=C,exports.getConversationAttachments=y,exports.getConversationFolderIdFromConversationId=V,exports.getConversationId=k,exports.getConversationIdFromResourceUrl=B,exports.getConversationNameFromConversationId=H,exports.getConversationNavPath=v,exports.getConversationUrlWithoutLocale=z,exports.getHeaders=P,exports.getMultipartHeaders=I,exports.getTimePeriod=M,exports.isDialFileAttachmentUrl=S,exports.isHttpError=m,exports.linkifyText=K,exports.parseBoolean=L,exports.replaceConversationAttachmentUrls=T,exports.sanitizeHeaders=F,exports.sendRequest=R,exports.splitTrailingPunctuation=G;
|
package/index.mjs
CHANGED
|
@@ -1,190 +1,166 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const e = t;
|
|
28
|
-
return typeof t == "object" && t !== null && e.isHttpError === !0 && typeof e.status == "number" && typeof e.message == "string" && (e.code === void 0 || typeof e.code == "string");
|
|
1
|
+
import { isValid as e, parse as t, parseISO as n } from "date-fns";
|
|
2
|
+
//#region libs/shared-toolkit/src/constants/api-urls.ts
|
|
3
|
+
var r = { CHAT: "/api/chat" }, i = "CUSTOM_PERIOD", a = {
|
|
4
|
+
decimal: "0.0",
|
|
5
|
+
decimalSymbol: ",",
|
|
6
|
+
digitGroupingSymbol: " "
|
|
7
|
+
}, o = "application/json", s = "Content-Type", c = "Api-Key", l = "X-CONVERSATION-ID", u = "Ocp-Apim-Subscription-Key", d = "X-Source-Artefact-Urn", f = {
|
|
8
|
+
BAD_REQUEST: 400,
|
|
9
|
+
UNAUTHORIZED: 401,
|
|
10
|
+
FORBIDDEN: 403,
|
|
11
|
+
NOT_FOUND: 404,
|
|
12
|
+
METHOD_NOT_ALLOWED: 405,
|
|
13
|
+
CONFLICT: 409,
|
|
14
|
+
TOO_MANY_REQUESTS: 429,
|
|
15
|
+
INTERNAL_SERVER_ERROR: 500,
|
|
16
|
+
BAD_GATEWAY: 502,
|
|
17
|
+
SERVICE_UNAVAILABLE: 503,
|
|
18
|
+
GATEWAY_TIMEOUT: 504
|
|
19
|
+
}, p = "onboarding", m = "share", h = class extends Error {
|
|
20
|
+
constructor(e) {
|
|
21
|
+
super(e.message), this.isHttpError = !0, this.name = "HttpError", this.code = e.code, this.status = e.status, this.details = e.details, this.displayMessage = e.displayMessage;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function g(e) {
|
|
25
|
+
let t = e;
|
|
26
|
+
return typeof e == "object" && !!e && t.isHttpError === !0 && typeof t.status == "number" && typeof t.message == "string" && (t.code === void 0 || typeof t.code == "string");
|
|
29
27
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region libs/shared-toolkit/src/types/calendar.ts
|
|
30
|
+
var _ = /* @__PURE__ */ function(e) {
|
|
31
|
+
return e.MONTH = "month", e.DAY = "day", e;
|
|
32
|
+
}({}), v = /* @__PURE__ */ function(e) {
|
|
33
|
+
return e.UK = "uk", e.EN = "en", e;
|
|
34
|
+
}({}), y = /* @__PURE__ */ function(e) {
|
|
35
|
+
return e.IN = "in", e.BETWEEN = "between", e.EXCLUDED = "excluded", e;
|
|
36
|
+
}({});
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region libs/shared-toolkit/src/utils/conversation-id-to-navigation.ts
|
|
39
|
+
function b(e, t) {
|
|
40
|
+
return `${e.split("/")[0]}/${t.split("/").pop()}`;
|
|
34
41
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
e
|
|
65
|
-
)
|
|
66
|
-
}))
|
|
67
|
-
} : n.custom_content
|
|
68
|
-
}))
|
|
69
|
-
}), p = (t) => t?.split(/-\d+$/)[0] ?? "", y = (t) => new RegExp("\\p{L}", "u").test(t) || new RegExp("\\p{N}", "u").test(t), V = (t) => {
|
|
70
|
-
if (!t) return "";
|
|
71
|
-
const e = t.toLowerCase(), n = [];
|
|
72
|
-
let r = "";
|
|
73
|
-
for (const o of e)
|
|
74
|
-
y(o) ? r += o : r && (n.push(r), r = "");
|
|
75
|
-
return r && n.push(r), n.join(" ");
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region libs/shared-toolkit/src/utils/conversation-attachments.ts
|
|
44
|
+
var x = (e) => e.messages.flatMap((e) => {
|
|
45
|
+
let t = e.custom_content?.attachments ?? [], n = e.custom_content?.stages?.flatMap(({ attachments: e }) => e ?? []) ?? [];
|
|
46
|
+
return [...t, ...n];
|
|
47
|
+
}), S = (e) => e.endsWith("/"), C = (e) => {
|
|
48
|
+
let t = e.toLowerCase();
|
|
49
|
+
return t.startsWith("http://") || t.startsWith("https://");
|
|
50
|
+
}, w = (e) => !!e && !C(e) && !S(e), T = (e) => [...new Set(x(e).map((e) => e.url).filter((e) => !!e).filter((e) => w(e)))], E = (e, t) => e?.map((e) => ({
|
|
51
|
+
...e,
|
|
52
|
+
url: e.url ? t[e.url] ?? e.url : e.url
|
|
53
|
+
})), D = (e, t) => ({
|
|
54
|
+
...e,
|
|
55
|
+
messages: e.messages.map((e) => ({
|
|
56
|
+
...e,
|
|
57
|
+
custom_content: e.custom_content ? {
|
|
58
|
+
...e.custom_content,
|
|
59
|
+
attachments: E(e.custom_content.attachments, t),
|
|
60
|
+
stages: e.custom_content.stages?.map((e) => ({
|
|
61
|
+
...e,
|
|
62
|
+
attachments: E(e.attachments, t)
|
|
63
|
+
}))
|
|
64
|
+
} : e.custom_content
|
|
65
|
+
}))
|
|
66
|
+
}), O = (e) => e?.split(/-\d+$/)[0] ?? "", k = (e) => /\p{L}/u.test(e) || /\p{N}/u.test(e), A = (e) => {
|
|
67
|
+
if (!e) return "";
|
|
68
|
+
let t = e.toLowerCase(), n = [], r = "";
|
|
69
|
+
for (let e of t) k(e) ? r += e : r &&= (n.push(r), "");
|
|
70
|
+
return r && n.push(r), n.join(" ");
|
|
76
71
|
};
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region libs/shared-toolkit/src/utils/conversation-navigation-to-id.ts
|
|
74
|
+
function j(e, t) {
|
|
75
|
+
return `${e?.[0]}/${t}/${e?.[1]}`;
|
|
79
76
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"!",
|
|
125
|
-
"?",
|
|
126
|
-
":",
|
|
127
|
-
";"
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region libs/shared-toolkit/src/utils/format-numbers.ts
|
|
79
|
+
var M = (e, t) => (Math.round(e * 10 ** t) / 10 ** t).toString(), N = (e, t) => {
|
|
80
|
+
let n = t?.decimal || a.decimal, r = t?.decimalSymbol || a.decimalSymbol, i = t?.digitGroupingSymbol ?? a.digitGroupingSymbol, o = Number(e);
|
|
81
|
+
if (o == null || Number.isNaN(o) || e === null || e === "") return "";
|
|
82
|
+
let s = n.replace("0.", ""), c = `${n === "0" ? Math.trunc(o) : M(o, s.length)} `.split(".");
|
|
83
|
+
return c[0] = c[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, `$1${i}`), `${c.join(r)}`;
|
|
84
|
+
}, P = (r) => {
|
|
85
|
+
if (!r.includes("T")) {
|
|
86
|
+
for (let n of F) {
|
|
87
|
+
let i = t(r, n, /* @__PURE__ */ new Date());
|
|
88
|
+
if (e(i)) return i;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
let i = n(r);
|
|
93
|
+
return e(i) ? i : null;
|
|
94
|
+
}, F = ["yyyy-MM-dd", "MM-dd-yyyy"], I = (e, t, n) => {
|
|
95
|
+
let r = {};
|
|
96
|
+
return t?.contentType !== null && (r[s] = t?.contentType || "application/json"), t?.jwt ? r.Authorization = `Bearer ${t.jwt}` : e && (r[c] = e), t?.chatReference && (r[l] = t.chatReference), {
|
|
97
|
+
...r,
|
|
98
|
+
...n
|
|
99
|
+
};
|
|
100
|
+
}, L = (e) => {
|
|
101
|
+
let t = { ...e };
|
|
102
|
+
return t["Api-Key"] && (t[c] = t[c].substring(0, 8) + "...[REDACTED]"), t.Authorization &&= "Bearer [REDACTED]", t["Ocp-Apim-Subscription-Key"] && (t[u] = t[u].substring(0, 8) + "...[REDACTED]"), t;
|
|
103
|
+
}, R = (e) => ({ "Content-Type": `multipart/form-data; boundary=${e}` }), z = (e) => e?.toLowerCase() === "true", B = async (e, t, n) => await fetch(e, {
|
|
104
|
+
method: n.method || "GET",
|
|
105
|
+
headers: t,
|
|
106
|
+
body: n.body ? JSON.stringify(n.body) : void 0
|
|
107
|
+
}), V = (e, t) => e?.split("/")?.filter((e) => e !== t)?.join("/"), H = (e) => e.replace(/^conversations\//, ""), U = (e) => e.split("/").slice(0, -1).join("/"), W = (e) => O(decodeURIComponent(e.split("/").at(-1) ?? "")), G = (e) => e.map((e) => ({
|
|
108
|
+
...e,
|
|
109
|
+
name: O(e.name)
|
|
110
|
+
})), K = new Set([
|
|
111
|
+
")",
|
|
112
|
+
"]",
|
|
113
|
+
"}",
|
|
114
|
+
">",
|
|
115
|
+
",",
|
|
116
|
+
".",
|
|
117
|
+
"!",
|
|
118
|
+
"?",
|
|
119
|
+
":",
|
|
120
|
+
";"
|
|
128
121
|
]);
|
|
129
|
-
function
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
122
|
+
function q(e) {
|
|
123
|
+
let t = e.length;
|
|
124
|
+
for (; t > 0 && K.has(e[t - 1]);) t--;
|
|
125
|
+
return t === e.length ? {
|
|
126
|
+
cleanUrl: e,
|
|
127
|
+
trailing: ""
|
|
128
|
+
} : {
|
|
129
|
+
cleanUrl: e.slice(0, t),
|
|
130
|
+
trailing: e.slice(t)
|
|
131
|
+
};
|
|
137
132
|
}
|
|
138
|
-
function
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
133
|
+
function J(e) {
|
|
134
|
+
if (!e) return [{
|
|
135
|
+
type: "text",
|
|
136
|
+
value: ""
|
|
137
|
+
}];
|
|
138
|
+
let t = [], n = 0;
|
|
139
|
+
for (let r of e.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)) {
|
|
140
|
+
let i = r[0], a = r.index ?? 0;
|
|
141
|
+
a > n && t.push({
|
|
142
|
+
type: "text",
|
|
143
|
+
value: e.slice(n, a)
|
|
144
|
+
});
|
|
145
|
+
let { cleanUrl: o, trailing: s } = q(i);
|
|
146
|
+
o ? t.push({
|
|
147
|
+
type: "link",
|
|
148
|
+
value: o
|
|
149
|
+
}) : t.push({
|
|
150
|
+
type: "text",
|
|
151
|
+
value: i
|
|
152
|
+
}), s && t.push({
|
|
153
|
+
type: "text",
|
|
154
|
+
value: s
|
|
155
|
+
}), n = a + i.length;
|
|
156
|
+
}
|
|
157
|
+
return n < e.length && t.push({
|
|
158
|
+
type: "text",
|
|
159
|
+
value: e.slice(n)
|
|
160
|
+
}), t.length ? t : [{
|
|
161
|
+
type: "text",
|
|
162
|
+
value: e
|
|
163
|
+
}];
|
|
149
164
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
M as API_ROUTES,
|
|
153
|
-
A as APPLICATION_JSON,
|
|
154
|
-
T as CONTENT_TYPE_HEADER,
|
|
155
|
-
w as CUSTOM_PERIOD,
|
|
156
|
-
_ as CalendarResolution,
|
|
157
|
-
L as HTTP_ERROR_CODES,
|
|
158
|
-
$ as HttpError,
|
|
159
|
-
g as Locale,
|
|
160
|
-
d as OCP_APIM_SUBSCRIPTION_KEY_HEADER,
|
|
161
|
-
B as ONBOARDING_MODEL_POSTFIX,
|
|
162
|
-
O as QueryFilterType,
|
|
163
|
-
P as SHARE_CONVERSATION_ROUTE,
|
|
164
|
-
N as X_CONVERSATION_ID_HEADER,
|
|
165
|
-
x as X_SOURCE_ARTEFACT_URN_HEADER,
|
|
166
|
-
rt as cleanConversationNames,
|
|
167
|
-
u as defaultFormatNumbers,
|
|
168
|
-
p as deleteConversationNamePostfix,
|
|
169
|
-
z as formatNumberBySign,
|
|
170
|
-
V as getClearedConversationName,
|
|
171
|
-
j as getConversationAttachmentUrls,
|
|
172
|
-
C as getConversationAttachments,
|
|
173
|
-
et as getConversationFolderIdFromConversationId,
|
|
174
|
-
Y as getConversationId,
|
|
175
|
-
tt as getConversationIdFromResourceUrl,
|
|
176
|
-
nt as getConversationNameFromConversationId,
|
|
177
|
-
G as getConversationNavPath,
|
|
178
|
-
Q as getConversationUrlWithoutLocale,
|
|
179
|
-
k as getHeaders,
|
|
180
|
-
J as getMultipartHeaders,
|
|
181
|
-
X as getTimePeriod,
|
|
182
|
-
S as isDialFileAttachmentUrl,
|
|
183
|
-
F as isHttpError,
|
|
184
|
-
ot as linkifyText,
|
|
185
|
-
q as parseBoolean,
|
|
186
|
-
W as replaceConversationAttachmentUrls,
|
|
187
|
-
K as sanitizeHeaders,
|
|
188
|
-
Z as sendRequest,
|
|
189
|
-
v as splitTrailingPunctuation
|
|
190
|
-
};
|
|
165
|
+
//#endregion
|
|
166
|
+
export { c as API_KEY_HEADER, r as API_ROUTES, o as APPLICATION_JSON, s as CONTENT_TYPE_HEADER, i as CUSTOM_PERIOD, _ as CalendarResolution, f as HTTP_ERROR_CODES, h as HttpError, v as Locale, u as OCP_APIM_SUBSCRIPTION_KEY_HEADER, p as ONBOARDING_MODEL_POSTFIX, y as QueryFilterType, m as SHARE_CONVERSATION_ROUTE, l as X_CONVERSATION_ID_HEADER, d as X_SOURCE_ARTEFACT_URN_HEADER, G as cleanConversationNames, a as defaultFormatNumbers, O as deleteConversationNamePostfix, N as formatNumberBySign, A as getClearedConversationName, T as getConversationAttachmentUrls, x as getConversationAttachments, U as getConversationFolderIdFromConversationId, j as getConversationId, H as getConversationIdFromResourceUrl, W as getConversationNameFromConversationId, b as getConversationNavPath, V as getConversationUrlWithoutLocale, I as getHeaders, R as getMultipartHeaders, P as getTimePeriod, w as isDialFileAttachmentUrl, g as isHttpError, J as linkifyText, z as parseBoolean, D as replaceConversationAttachmentUrls, L as sanitizeHeaders, B as sendRequest, q as splitTrailingPunctuation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/statgpt-shared-toolkit",
|
|
3
|
-
"version": "0.7.0-dev.
|
|
3
|
+
"version": "0.7.0-dev.30",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"browser": "./index.mjs",
|
|
14
14
|
"module": "./index.mjs",
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
|
-
"
|
|
16
|
+
"peerDependencies": {
|
|
17
17
|
"@epam/ai-dial-shared": "^0.43.3",
|
|
18
18
|
"date-fns": "^4.1.0"
|
|
19
19
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 EPAM Systems
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|