@epam/statgpt-shared-toolkit 0.4.0-rc.4 → 0.4.0-rc.41

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 CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("date-fns"),R={CHAT:"/api/chat"},f="CUSTOM_PERIOD",l={decimal:"0.0",decimalSymbol:",",digitGroupingSymbol:" "},A="application/json",T="Content-Type",a="Api-Key",N="X-CONVERSATION-ID",u="Ocp-Apim-Subscription-Key",S={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},v="onboarding",y="share";class D 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 U(t){return typeof t=="object"&&t!==null&&t.isHttpError===!0&&typeof t.status=="number"&&typeof t.message=="string"&&(t.code===void 0||typeof t.code=="string")}var g=(t=>(t.MONTH="month",t.DAY="day",t))(g||{}),C=(t=>(t.UK="uk",t.EN="en",t))(C||{}),_=(t=>(t.IN="in",t.BETWEEN="between",t))(_||{});function b(t,e){const n=t.split("/")[0],r=e.split("/").pop();return`${n}/${r}`}const O=t=>t.messages.flatMap(e=>{const n=e.custom_content?.attachments??[],r=e.custom_content?.stages?.flatMap(({attachments:s})=>s??[])??[];return[...n,...r]}),P=t=>t.endsWith("/"),H=t=>{const e=t.toLowerCase();return e.startsWith("http://")||e.startsWith("https://")},h=t=>!!t&&!H(t)&&!P(t),M=t=>[...new Set(O(t).map(e=>e.url).filter(e=>!!e).filter(e=>h(e)))],p=(t,e)=>t?.map(n=>({...n,url:n.url?e[n.url]??n.url:n.url})),F=(t,e)=>({...t,messages:t.messages.map(n=>({...n,custom_content:n.custom_content?{...n.custom_content,attachments:p(n.custom_content.attachments,e),stages:n.custom_content.stages?.map(r=>({...r,attachments:p(r.attachments,e)}))}:n.custom_content}))}),E=t=>t?.split(/-\d+$/)[0]??"",B=t=>t?.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").replace(/-/g," ")||"";function L(t,e){return`${t?.[0]}/${e}/${t?.[1]}`}const x=(t,e)=>(Math.round(t*10**e)/10**e).toString(),$=(t,e)=>{const n=e?.decimal||l.decimal,r=e?.decimalSymbol||l.decimalSymbol,s=e?.digitGroupingSymbol??l.digitGroupingSymbol,o=Number(t);if(o==null||Number.isNaN(o)||t===null||t==="")return"";const i=n.replace("0.",""),m=`${n==="0"?Math.trunc(o):x(o,i.length)} `.split(".");return m[0]=m[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${s}`),`${m.join(r)}`},w=t=>{if(!t.includes("T")){for(const n of G){const r=c.parse(t,n,new Date);if(c.isValid(r))return r}return null}const e=c.parseISO(t);return c.isValid(e)?e:null},G=["yyyy-MM-dd","MM-dd-yyyy"],V=(t,e,n)=>{const r={};return e?.contentType!==null&&(r[T]=e?.contentType||A),e?.jwt?r.Authorization=`Bearer ${e.jwt}`:t&&(r[a]=t),e?.chatReference&&(r[N]=e.chatReference),{...r,...n}},Y=t=>{const e={...t};return e[a]&&(e[a]=e[a].substring(0,8)+"...[REDACTED]"),e.Authorization&&(e.Authorization="Bearer [REDACTED]"),e[u]&&(e[u]=e[u].substring(0,8)+"...[REDACTED]"),e},W=t=>({"Content-Type":`multipart/form-data; boundary=${t}`}),j=t=>t?.toLowerCase()==="true",z=async(t,e,n)=>await fetch(t,{method:n.method||"GET",headers:e,body:n.body?JSON.stringify(n.body):void 0}),K=(t,e)=>t?.split("/")?.filter(n=>n!==e)?.join("/"),k=t=>t.replace(/^conversations\//,""),X=t=>t.split("/").slice(0,-1).join("/"),q=t=>E(decodeURIComponent(t.split("/").at(-1)??"")),J=t=>t.map(e=>({...e,name:E(e.name)})),Q=new Set([")","]","}",">",",",".","!","?",":",";"]);function I(t){let e=t.length;for(;e>0&&Q.has(t[e-1]);)e--;return e===t.length?{cleanUrl:t,trailing:""}:{cleanUrl:t.slice(0,e),trailing:t.slice(e)}}function Z(t){if(!t)return[{type:"text",value:""}];const e=[];let n=0;for(const r of t.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)){const s=r[0],o=r.index??0;o>n&&e.push({type:"text",value:t.slice(n,o)});const{cleanUrl:i,trailing:d}=I(s);i?e.push({type:"link",value:i}):e.push({type:"text",value:s}),d&&e.push({type:"text",value:d}),n=o+s.length}return n<t.length&&e.push({type:"text",value:t.slice(n)}),e.length?e:[{type:"text",value:t}]}exports.API_KEY_HEADER=a;exports.API_ROUTES=R;exports.APPLICATION_JSON=A;exports.CONTENT_TYPE_HEADER=T;exports.CUSTOM_PERIOD=f;exports.CalendarResolution=g;exports.HTTP_ERROR_CODES=S;exports.HttpError=D;exports.Locale=C;exports.OCP_APIM_SUBSCRIPTION_KEY_HEADER=u;exports.ONBOARDING_MODEL_POSTFIX=v;exports.QueryFilterType=_;exports.SHARE_CONVERSATION_ROUTE=y;exports.X_CONVERSATION_ID_HEADER=N;exports.cleanConversationNames=J;exports.defaultFormatNumbers=l;exports.deleteConversationNamePostfix=E;exports.formatNumberBySign=$;exports.getClearedConversationName=B;exports.getConversationAttachmentUrls=M;exports.getConversationAttachments=O;exports.getConversationFolderIdFromConversationId=X;exports.getConversationId=L;exports.getConversationIdFromResourceUrl=k;exports.getConversationNameFromConversationId=q;exports.getConversationNavPath=b;exports.getConversationUrlWithoutLocale=K;exports.getHeaders=V;exports.getMultipartHeaders=W;exports.getTimePeriod=w;exports.isDialFileAttachmentUrl=h;exports.isHttpError=U;exports.linkifyText=Z;exports.parseBoolean=j;exports.replaceConversationAttachmentUrls=F;exports.sanitizeHeaders=Y;exports.sendRequest=z;exports.splitTrailingPunctuation=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("date-fns"),f={CHAT:"/api/chat"},R="CUSTOM_PERIOD",l={decimal:"0.0",decimalSymbol:",",digitGroupingSymbol:" "},A="application/json",T="Content-Type",a="Api-Key",N="X-CONVERSATION-ID",u="Ocp-Apim-Subscription-Key",S={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},y="onboarding",v="share";class D 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 U(t){const e=t;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")}var C=(t=>(t.MONTH="month",t.DAY="day",t))(C||{}),O=(t=>(t.UK="uk",t.EN="en",t))(O||{}),_=(t=>(t.IN="in",t.BETWEEN="between",t))(_||{});function b(t,e){const n=t.split("/")[0],r=e.split("/").pop();return`${n}/${r}`}const g=t=>t.messages.flatMap(e=>{const n=e.custom_content?.attachments??[],r=e.custom_content?.stages?.flatMap(({attachments:o})=>o??[])??[];return[...n,...r]}),P=t=>t.endsWith("/"),H=t=>{const e=t.toLowerCase();return e.startsWith("http://")||e.startsWith("https://")},h=t=>!!t&&!H(t)&&!P(t),M=t=>[...new Set(g(t).map(e=>e.url).filter(e=>!!e).filter(e=>h(e)))],p=(t,e)=>t?.map(n=>({...n,url:n.url?e[n.url]??n.url:n.url})),F=(t,e)=>({...t,messages:t.messages.map(n=>({...n,custom_content:n.custom_content?{...n.custom_content,attachments:p(n.custom_content.attachments,e),stages:n.custom_content.stages?.map(r=>({...r,attachments:p(r.attachments,e)}))}:n.custom_content}))}),m=t=>t?.split(/-\d+$/)[0]??"",B=t=>new RegExp("\\p{L}","u").test(t)||new RegExp("\\p{N}","u").test(t),L=t=>{if(!t)return"";const e=t.toLowerCase(),n=[];let r="";for(const o of e)B(o)?r+=o:r&&(n.push(r),r="");return r&&n.push(r),n.join(" ")};function w(t,e){return`${t?.[0]}/${e}/${t?.[1]}`}const x=(t,e)=>(Math.round(t*10**e)/10**e).toString(),$=(t,e)=>{const n=e?.decimal||l.decimal,r=e?.decimalSymbol||l.decimalSymbol,o=e?.digitGroupingSymbol??l.digitGroupingSymbol,s=Number(t);if(s==null||Number.isNaN(s)||t===null||t==="")return"";const i=n.replace("0.",""),E=`${n==="0"?Math.trunc(s):x(s,i.length)} `.split(".");return E[0]=E[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${o}`),`${E.join(r)}`},G=t=>{if(!t.includes("T")){for(const n of V){const r=c.parse(t,n,new Date);if(c.isValid(r))return r}return null}const e=c.parseISO(t);return c.isValid(e)?e:null},V=["yyyy-MM-dd","MM-dd-yyyy"],Y=(t,e,n)=>{const r={};return e?.contentType!==null&&(r[T]=e?.contentType||A),e?.jwt?r.Authorization=`Bearer ${e.jwt}`:t&&(r[a]=t),e?.chatReference&&(r[N]=e.chatReference),{...r,...n}},j=t=>{const e={...t};return e[a]&&(e[a]=e[a].substring(0,8)+"...[REDACTED]"),e.Authorization&&(e.Authorization="Bearer [REDACTED]"),e[u]&&(e[u]=e[u].substring(0,8)+"...[REDACTED]"),e},W=t=>({"Content-Type":`multipart/form-data; boundary=${t}`}),z=t=>t?.toLowerCase()==="true",K=async(t,e,n)=>await fetch(t,{method:n.method||"GET",headers:e,body:n.body?JSON.stringify(n.body):void 0}),k=(t,e)=>t?.split("/")?.filter(n=>n!==e)?.join("/"),X=t=>t.replace(/^conversations\//,""),q=t=>t.split("/").slice(0,-1).join("/"),J=t=>m(decodeURIComponent(t.split("/").at(-1)??"")),Q=t=>t.map(e=>({...e,name:m(e.name)})),Z=new Set([")","]","}",">",",",".","!","?",":",";"]);function I(t){let e=t.length;for(;e>0&&Z.has(t[e-1]);)e--;return e===t.length?{cleanUrl:t,trailing:""}:{cleanUrl:t.slice(0,e),trailing:t.slice(e)}}function tt(t){if(!t)return[{type:"text",value:""}];const e=[];let n=0;for(const r of t.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)){const o=r[0],s=r.index??0;s>n&&e.push({type:"text",value:t.slice(n,s)});const{cleanUrl:i,trailing:d}=I(o);i?e.push({type:"link",value:i}):e.push({type:"text",value:o}),d&&e.push({type:"text",value:d}),n=s+o.length}return n<t.length&&e.push({type:"text",value:t.slice(n)}),e.length?e:[{type:"text",value:t}]}exports.API_KEY_HEADER=a;exports.API_ROUTES=f;exports.APPLICATION_JSON=A;exports.CONTENT_TYPE_HEADER=T;exports.CUSTOM_PERIOD=R;exports.CalendarResolution=C;exports.HTTP_ERROR_CODES=S;exports.HttpError=D;exports.Locale=O;exports.OCP_APIM_SUBSCRIPTION_KEY_HEADER=u;exports.ONBOARDING_MODEL_POSTFIX=y;exports.QueryFilterType=_;exports.SHARE_CONVERSATION_ROUTE=v;exports.X_CONVERSATION_ID_HEADER=N;exports.cleanConversationNames=Q;exports.defaultFormatNumbers=l;exports.deleteConversationNamePostfix=m;exports.formatNumberBySign=$;exports.getClearedConversationName=L;exports.getConversationAttachmentUrls=M;exports.getConversationAttachments=g;exports.getConversationFolderIdFromConversationId=q;exports.getConversationId=w;exports.getConversationIdFromResourceUrl=X;exports.getConversationNameFromConversationId=J;exports.getConversationNavPath=b;exports.getConversationUrlWithoutLocale=k;exports.getHeaders=Y;exports.getMultipartHeaders=W;exports.getTimePeriod=G;exports.isDialFileAttachmentUrl=h;exports.isHttpError=U;exports.linkifyText=tt;exports.parseBoolean=z;exports.replaceConversationAttachmentUrls=F;exports.sanitizeHeaders=j;exports.sendRequest=K;exports.splitTrailingPunctuation=I;
package/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { parse as h, isValid as d, parseISO as A } from "date-fns";
2
- const M = {
1
+ import { parse as h, isValid as m, parseISO as f } from "date-fns";
2
+ const H = {
3
3
  CHAT: "/api/chat"
4
- }, H = "CUSTOM_PERIOD", u = {
4
+ }, w = "CUSTOM_PERIOD", u = {
5
5
  decimal: "0.0",
6
6
  decimalSymbol: ",",
7
7
  digitGroupingSymbol: " "
8
- }, T = "application/json", f = "Content-Type", c = "Api-Key", g = "X-CONVERSATION-ID", m = "Ocp-Apim-Subscription-Key", x = {
8
+ }, A = "application/json", T = "Content-Type", i = "Api-Key", N = "X-CONVERSATION-ID", d = "Ocp-Apim-Subscription-Key", x = {
9
9
  BAD_REQUEST: 400,
10
10
  UNAUTHORIZED: 401,
11
11
  FORBIDDEN: 403,
@@ -17,17 +17,18 @@ const M = {
17
17
  BAD_GATEWAY: 502,
18
18
  SERVICE_UNAVAILABLE: 503,
19
19
  GATEWAY_TIMEOUT: 504
20
- }, B = "onboarding", P = "share";
21
- class L extends Error {
20
+ }, B = "onboarding", L = "share";
21
+ class P extends Error {
22
22
  constructor(e) {
23
23
  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;
24
24
  }
25
25
  }
26
26
  function $(t) {
27
- return typeof t == "object" && t !== null && t.isHttpError === !0 && typeof t.status == "number" && typeof t.message == "string" && (t.code === void 0 || typeof t.code == "string");
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");
28
29
  }
29
- var N = /* @__PURE__ */ ((t) => (t.MONTH = "month", t.DAY = "day", t))(N || {}), _ = /* @__PURE__ */ ((t) => (t.UK = "uk", t.EN = "en", t))(_ || {}), O = /* @__PURE__ */ ((t) => (t.IN = "in", t.BETWEEN = "between", t))(O || {});
30
- function w(t, e) {
30
+ var g = /* @__PURE__ */ ((t) => (t.MONTH = "month", t.DAY = "day", t))(g || {}), O = /* @__PURE__ */ ((t) => (t.UK = "uk", t.EN = "en", t))(O || {}), _ = /* @__PURE__ */ ((t) => (t.IN = "in", t.BETWEEN = "between", t))(_ || {});
31
+ function F(t, e) {
31
32
  const n = t.split("/")[0], r = e.split("/").pop();
32
33
  return `${n}/${r}`;
33
34
  }
@@ -39,14 +40,14 @@ const I = (t) => t.messages.flatMap((e) => {
39
40
  }), C = (t) => t.endsWith("/"), y = (t) => {
40
41
  const e = t.toLowerCase();
41
42
  return e.startsWith("http://") || e.startsWith("https://");
42
- }, R = (t) => !!t && !y(t) && !C(t), F = (t) => [
43
+ }, R = (t) => !!t && !y(t) && !C(t), G = (t) => [
43
44
  ...new Set(
44
45
  I(t).map((e) => e.url).filter((e) => !!e).filter((e) => R(e))
45
46
  )
46
47
  ], p = (t, e) => t?.map((n) => ({
47
48
  ...n,
48
49
  url: n.url ? e[n.url] ?? n.url : n.url
49
- })), G = (t, e) => ({
50
+ })), j = (t, e) => ({
50
51
  ...t,
51
52
  messages: t.messages.map((n) => ({
52
53
  ...n,
@@ -65,48 +66,55 @@ const I = (t) => t.messages.flatMap((e) => {
65
66
  }))
66
67
  } : n.custom_content
67
68
  }))
68
- }), E = (t) => t?.split(/-\d+$/)[0] ?? "", W = (t) => t?.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "").replace(/-/g, " ") || "";
69
- function j(t, e) {
69
+ }), E = (t) => t?.split(/-\d+$/)[0] ?? "", S = (t) => new RegExp("\\p{L}", "u").test(t) || new RegExp("\\p{N}", "u").test(t), W = (t) => {
70
+ if (!t) return "";
71
+ const e = t.toLowerCase(), n = [];
72
+ let r = "";
73
+ for (const s of e)
74
+ S(s) ? r += s : r && (n.push(r), r = "");
75
+ return r && n.push(r), n.join(" ");
76
+ };
77
+ function V(t, e) {
70
78
  return `${t?.[0]}/${e}/${t?.[1]}`;
71
79
  }
72
- const S = (t, e) => (Math.round(t * 10 ** e) / 10 ** e).toString(), V = (t, e) => {
80
+ const D = (t, e) => (Math.round(t * 10 ** e) / 10 ** e).toString(), Y = (t, e) => {
73
81
  const n = e?.decimal || u.decimal, r = e?.decimalSymbol || u.decimalSymbol, s = e?.digitGroupingSymbol ?? u.digitGroupingSymbol, o = Number(t);
74
82
  if (o == null || Number.isNaN(o) || t === null || t === "")
75
83
  return "";
76
- const a = n.replace("0.", ""), l = `${n === "0" ? Math.trunc(o) : S(o, a.length)} `.split(".");
84
+ const c = n.replace("0.", ""), l = `${n === "0" ? Math.trunc(o) : D(o, c.length)} `.split(".");
77
85
  return l[0] = l[0].replace(
78
86
  /(\d)(?=(\d\d\d)+(?!\d))/g,
79
87
  `$1${s}`
80
88
  ), `${l.join(r)}`;
81
- }, Y = (t) => {
89
+ }, z = (t) => {
82
90
  if (!t.includes("T")) {
83
- for (const n of D) {
91
+ for (const n of b) {
84
92
  const r = h(t, n, /* @__PURE__ */ new Date());
85
- if (d(r))
93
+ if (m(r))
86
94
  return r;
87
95
  }
88
96
  return null;
89
97
  }
90
- const e = A(t);
91
- return d(e) ? e : null;
92
- }, D = ["yyyy-MM-dd", "MM-dd-yyyy"], z = (t, e, n) => {
98
+ const e = f(t);
99
+ return m(e) ? e : null;
100
+ }, b = ["yyyy-MM-dd", "MM-dd-yyyy"], k = (t, e, n) => {
93
101
  const r = {};
94
- return e?.contentType !== null && (r[f] = e?.contentType || T), e?.jwt ? r.Authorization = `Bearer ${e.jwt}` : t && (r[c] = t), e?.chatReference && (r[g] = e.chatReference), { ...r, ...n };
95
- }, k = (t) => {
102
+ return e?.contentType !== null && (r[T] = e?.contentType || A), e?.jwt ? r.Authorization = `Bearer ${e.jwt}` : t && (r[i] = t), e?.chatReference && (r[N] = e.chatReference), { ...r, ...n };
103
+ }, K = (t) => {
96
104
  const e = { ...t };
97
- return e[c] && (e[c] = e[c].substring(0, 8) + "...[REDACTED]"), e.Authorization && (e.Authorization = "Bearer [REDACTED]"), e[m] && (e[m] = e[m].substring(0, 8) + "...[REDACTED]"), e;
98
- }, K = (t) => ({
105
+ return e[i] && (e[i] = e[i].substring(0, 8) + "...[REDACTED]"), e.Authorization && (e.Authorization = "Bearer [REDACTED]"), e[d] && (e[d] = e[d].substring(0, 8) + "...[REDACTED]"), e;
106
+ }, X = (t) => ({
99
107
  "Content-Type": `multipart/form-data; boundary=${t}`
100
- }), X = (t) => t?.toLowerCase() === "true", J = async (t, e, n) => await fetch(t, {
108
+ }), J = (t) => t?.toLowerCase() === "true", q = async (t, e, n) => await fetch(t, {
101
109
  method: n.method || "GET",
102
110
  headers: e,
103
111
  body: n.body ? JSON.stringify(n.body) : void 0
104
- }), q = (t, e) => t?.split("/")?.filter((n) => n !== e)?.join("/"), Q = (t) => t.replace(/^conversations\//, ""), Z = (t) => t.split("/").slice(0, -1).join("/"), tt = (t) => E(
112
+ }), Q = (t, e) => t?.split("/")?.filter((n) => n !== e)?.join("/"), Z = (t) => t.replace(/^conversations\//, ""), tt = (t) => t.split("/").slice(0, -1).join("/"), et = (t) => E(
105
113
  decodeURIComponent(t.split("/").at(-1) ?? "")
106
- ), et = (t) => t.map((e) => ({
114
+ ), nt = (t) => t.map((e) => ({
107
115
  ...e,
108
116
  name: E(e.name)
109
- })), b = /* @__PURE__ */ new Set([
117
+ })), U = /* @__PURE__ */ new Set([
110
118
  ")",
111
119
  "]",
112
120
  "}",
@@ -120,62 +128,62 @@ const S = (t, e) => (Math.round(t * 10 ** e) / 10 ** e).toString(), V = (t, e) =
120
128
  ]);
121
129
  function v(t) {
122
130
  let e = t.length;
123
- for (; e > 0 && b.has(t[e - 1]); )
131
+ for (; e > 0 && U.has(t[e - 1]); )
124
132
  e--;
125
133
  return e === t.length ? { cleanUrl: t, trailing: "" } : {
126
134
  cleanUrl: t.slice(0, e),
127
135
  trailing: t.slice(e)
128
136
  };
129
137
  }
130
- function nt(t) {
138
+ function rt(t) {
131
139
  if (!t) return [{ type: "text", value: "" }];
132
140
  const e = [];
133
141
  let n = 0;
134
142
  for (const r of t.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)) {
135
143
  const s = r[0], o = r.index ?? 0;
136
144
  o > n && e.push({ type: "text", value: t.slice(n, o) });
137
- const { cleanUrl: a, trailing: i } = v(s);
138
- a ? e.push({ type: "link", value: a }) : e.push({ type: "text", value: s }), i && e.push({ type: "text", value: i }), n = o + s.length;
145
+ const { cleanUrl: c, trailing: a } = v(s);
146
+ c ? e.push({ type: "link", value: c }) : e.push({ type: "text", value: s }), a && e.push({ type: "text", value: a }), n = o + s.length;
139
147
  }
140
148
  return n < t.length && e.push({ type: "text", value: t.slice(n) }), e.length ? e : [{ type: "text", value: t }];
141
149
  }
142
150
  export {
143
- c as API_KEY_HEADER,
144
- M as API_ROUTES,
145
- T as APPLICATION_JSON,
146
- f as CONTENT_TYPE_HEADER,
147
- H as CUSTOM_PERIOD,
148
- N as CalendarResolution,
151
+ i as API_KEY_HEADER,
152
+ H as API_ROUTES,
153
+ A as APPLICATION_JSON,
154
+ T as CONTENT_TYPE_HEADER,
155
+ w as CUSTOM_PERIOD,
156
+ g as CalendarResolution,
149
157
  x as HTTP_ERROR_CODES,
150
- L as HttpError,
151
- _ as Locale,
152
- m as OCP_APIM_SUBSCRIPTION_KEY_HEADER,
158
+ P as HttpError,
159
+ O as Locale,
160
+ d as OCP_APIM_SUBSCRIPTION_KEY_HEADER,
153
161
  B as ONBOARDING_MODEL_POSTFIX,
154
- O as QueryFilterType,
155
- P as SHARE_CONVERSATION_ROUTE,
156
- g as X_CONVERSATION_ID_HEADER,
157
- et as cleanConversationNames,
162
+ _ as QueryFilterType,
163
+ L as SHARE_CONVERSATION_ROUTE,
164
+ N as X_CONVERSATION_ID_HEADER,
165
+ nt as cleanConversationNames,
158
166
  u as defaultFormatNumbers,
159
167
  E as deleteConversationNamePostfix,
160
- V as formatNumberBySign,
168
+ Y as formatNumberBySign,
161
169
  W as getClearedConversationName,
162
- F as getConversationAttachmentUrls,
170
+ G as getConversationAttachmentUrls,
163
171
  I as getConversationAttachments,
164
- Z as getConversationFolderIdFromConversationId,
165
- j as getConversationId,
166
- Q as getConversationIdFromResourceUrl,
167
- tt as getConversationNameFromConversationId,
168
- w as getConversationNavPath,
169
- q as getConversationUrlWithoutLocale,
170
- z as getHeaders,
171
- K as getMultipartHeaders,
172
- Y as getTimePeriod,
172
+ tt as getConversationFolderIdFromConversationId,
173
+ V as getConversationId,
174
+ Z as getConversationIdFromResourceUrl,
175
+ et as getConversationNameFromConversationId,
176
+ F as getConversationNavPath,
177
+ Q as getConversationUrlWithoutLocale,
178
+ k as getHeaders,
179
+ X as getMultipartHeaders,
180
+ z as getTimePeriod,
173
181
  R as isDialFileAttachmentUrl,
174
182
  $ as isHttpError,
175
- nt as linkifyText,
176
- X as parseBoolean,
177
- G as replaceConversationAttachmentUrls,
178
- k as sanitizeHeaders,
179
- J as sendRequest,
183
+ rt as linkifyText,
184
+ J as parseBoolean,
185
+ j as replaceConversationAttachmentUrls,
186
+ K as sanitizeHeaders,
187
+ q as sendRequest,
180
188
  v as splitTrailingPunctuation
181
189
  };
package/models/index.d.ts CHANGED
@@ -6,5 +6,4 @@ export * from './log-data';
6
6
  export * from './request-options';
7
7
  export * from './time-range';
8
8
  export * from './onboarding-schema';
9
- export * from './format-numbers-type';
10
9
  export * from './errors/http-error';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/statgpt-shared-toolkit",
3
- "version": "0.4.0-rc.4",
3
+ "version": "0.4.0-rc.41",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
package/utils/index.d.ts CHANGED
@@ -9,5 +9,4 @@ export * from './parse-boolean';
9
9
  export * from './send-request';
10
10
  export * from './conversation-url';
11
11
  export * from './conversation-mapping';
12
- export * from './format-numbers';
13
12
  export * from './linkify/linkify';