@intlayer/api 5.5.10 → 5.6.0

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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs +5 -1
  3. package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs.map +1 -1
  4. package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs +5 -1
  5. package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs.map +1 -1
  6. package/dist/cjs/getIntlayerAPI/ai.cjs +10 -0
  7. package/dist/cjs/getIntlayerAPI/ai.cjs.map +1 -1
  8. package/dist/cjs/index.cjs +3 -1
  9. package/dist/cjs/index.cjs.map +1 -1
  10. package/dist/cjs/types.cjs.map +1 -1
  11. package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs +5 -1
  12. package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs.map +1 -1
  13. package/dist/esm/distantDictionary/fetchDistantDictionary.mjs +5 -1
  14. package/dist/esm/distantDictionary/fetchDistantDictionary.mjs.map +1 -1
  15. package/dist/esm/getIntlayerAPI/ai.mjs +10 -0
  16. package/dist/esm/getIntlayerAPI/ai.mjs.map +1 -1
  17. package/dist/esm/index.mjs +1 -0
  18. package/dist/esm/index.mjs.map +1 -1
  19. package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts.map +1 -1
  20. package/dist/types/distantDictionary/fetchDistantDictionary.d.ts.map +1 -1
  21. package/dist/types/getIntlayerAPI/ai.d.ts +2 -1
  22. package/dist/types/getIntlayerAPI/ai.d.ts.map +1 -1
  23. package/dist/types/getIntlayerAPI/auth.d.ts +1 -1
  24. package/dist/types/getIntlayerAPI/auth.d.ts.map +1 -1
  25. package/dist/types/getIntlayerAPI/dictionary.d.ts +1 -1
  26. package/dist/types/getIntlayerAPI/dictionary.d.ts.map +1 -1
  27. package/dist/types/getIntlayerAPI/index.d.ts +66 -65
  28. package/dist/types/getIntlayerAPI/index.d.ts.map +1 -1
  29. package/dist/types/getIntlayerAPI/newsletter.d.ts +1 -1
  30. package/dist/types/getIntlayerAPI/newsletter.d.ts.map +1 -1
  31. package/dist/types/getIntlayerAPI/organization.d.ts +1 -1
  32. package/dist/types/getIntlayerAPI/organization.d.ts.map +1 -1
  33. package/dist/types/getIntlayerAPI/project.d.ts +1 -1
  34. package/dist/types/getIntlayerAPI/project.d.ts.map +1 -1
  35. package/dist/types/getIntlayerAPI/search.d.ts +1 -1
  36. package/dist/types/getIntlayerAPI/search.d.ts.map +1 -1
  37. package/dist/types/getIntlayerAPI/stripe.d.ts +1 -1
  38. package/dist/types/getIntlayerAPI/stripe.d.ts.map +1 -1
  39. package/dist/types/getIntlayerAPI/tag.d.ts +1 -1
  40. package/dist/types/getIntlayerAPI/tag.d.ts.map +1 -1
  41. package/dist/types/getIntlayerAPI/user.d.ts +1 -1
  42. package/dist/types/getIntlayerAPI/user.d.ts.map +1 -1
  43. package/dist/types/index.d.ts +1 -1
  44. package/dist/types/index.d.ts.map +1 -1
  45. package/dist/types/types.d.ts +1 -1
  46. package/dist/types/types.d.ts.map +1 -1
  47. package/package.json +10 -8
package/README.md CHANGED
@@ -33,7 +33,7 @@
33
33
  <a href="https://www.facebook.com/intlayer" target="blank"><img align="center"
34
34
  src="https://img.shields.io/badge/facebook-4267B2.svg?style=for-the-badge&logo=facebook&logoColor=white"
35
35
  alt="Intlayer Facebook" height="30"/></a>
36
- <a href="https://www.instagram.com/intlayer_org/" target="blank"><img align="center"
36
+ <a href="https://www.instagram.com/intlayer/" target="blank"><img align="center"
37
37
  src="https://img.shields.io/badge/instagram-%23E4405F.svg?style=for-the-badge&logo=Instagram&logoColor=white"
38
38
  alt="Intlayer Instagram" height="30"/></a>
39
39
  <a href="https://x.com/Intlayer183096" target="blank"><img align="center"
@@ -47,7 +47,11 @@ const fetchDistantDictionaries = async (intlayerConfig = import_built.default) =
47
47
  const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();
48
48
  const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;
49
49
  const getDictionaryResult = await dictionaryAPI.getDictionaries(void 0, {
50
- headers: { Authorization: `Bearer ${oAuth2AccessToken}` }
50
+ ...oAuth2AccessToken && {
51
+ headers: {
52
+ Authorization: `Bearer ${oAuth2AccessToken}`
53
+ }
54
+ }
51
55
  });
52
56
  const distantDictionaries = getDictionaryResult.data;
53
57
  return distantDictionaries;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport { type DictionaryAPI } from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport { getAuthAPI } from '../getIntlayerAPI/auth';\nimport { getDictionaryAPI } from '../getIntlayerAPI/dictionary';\n\n/**\n * Fetch distant dictionary\n */\nexport const fetchDistantDictionaries = async (\n intlayerConfig: IntlayerConfig = configuration\n): Promise<DictionaryAPI[] | null | undefined> => {\n try {\n const { clientId, clientSecret } = intlayerConfig?.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const dictionaryAPI = getDictionaryAPI(undefined, intlayerConfig);\n const authAPI = getAuthAPI(undefined, intlayerConfig);\n\n const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Fetch the dictionary\n const getDictionaryResult = await dictionaryAPI.getDictionaries(undefined, {\n headers: { Authorization: `Bearer ${oAuth2AccessToken}` },\n });\n\n const distantDictionaries = getDictionaryResult.data;\n\n return distantDictionaries;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA0B;AAE1B,kBAA2B;AAC3B,wBAAiC;AAK1B,MAAM,2BAA2B,OACtC,iBAAiC,aAAAA,YACe;AAChD,MAAI;AACF,UAAM,EAAE,UAAU,aAAa,IAAI,gBAAgB;AAEnD,QAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,oBAAgB,oCAAiB,QAAW,cAAc;AAChE,UAAM,cAAU,wBAAW,QAAW,cAAc;AAEpD,UAAM,oBAAoB,MAAM,QAAQ,qBAAqB;AAE7D,UAAM,oBAAoB,kBAAkB,MAAM;AAGlD,UAAM,sBAAsB,MAAM,cAAc,gBAAgB,QAAW;AAAA,MACzE,SAAS,EAAE,eAAe,UAAU,iBAAiB,GAAG;AAAA,IAC1D,CAAC;AAED,UAAM,sBAAsB,oBAAoB;AAEhD,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO;AAAA,EACT;AACF;","names":["configuration"]}
1
+ {"version":3,"sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport { type DictionaryAPI } from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport { getAuthAPI } from '../getIntlayerAPI/auth';\nimport { getDictionaryAPI } from '../getIntlayerAPI/dictionary';\n\n/**\n * Fetch distant dictionary\n */\nexport const fetchDistantDictionaries = async (\n intlayerConfig: IntlayerConfig = configuration\n): Promise<DictionaryAPI[] | null | undefined> => {\n try {\n const { clientId, clientSecret } = intlayerConfig?.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const dictionaryAPI = getDictionaryAPI(undefined, intlayerConfig);\n const authAPI = getAuthAPI(undefined, intlayerConfig);\n\n const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Fetch the dictionary\n const getDictionaryResult = await dictionaryAPI.getDictionaries(undefined, {\n ...(oAuth2AccessToken && {\n headers: {\n Authorization: `Bearer ${oAuth2AccessToken}`,\n },\n }),\n });\n\n const distantDictionaries = getDictionaryResult.data;\n\n return distantDictionaries;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA0B;AAE1B,kBAA2B;AAC3B,wBAAiC;AAK1B,MAAM,2BAA2B,OACtC,iBAAiC,aAAAA,YACe;AAChD,MAAI;AACF,UAAM,EAAE,UAAU,aAAa,IAAI,gBAAgB;AAEnD,QAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,oBAAgB,oCAAiB,QAAW,cAAc;AAChE,UAAM,cAAU,wBAAW,QAAW,cAAc;AAEpD,UAAM,oBAAoB,MAAM,QAAQ,qBAAqB;AAE7D,UAAM,oBAAoB,kBAAkB,MAAM;AAGlD,UAAM,sBAAsB,MAAM,cAAc,gBAAgB,QAAW;AAAA,MACzE,GAAI,qBAAqB;AAAA,QACvB,SAAS;AAAA,UACP,eAAe,UAAU,iBAAiB;AAAA,QAC5C;AAAA,MACF;AAAA,IACF,CAAC;AAED,UAAM,sBAAsB,oBAAoB;AAEhD,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO;AAAA,EACT;AACF;","names":["configuration"]}
@@ -50,7 +50,11 @@ const fetchDistantDictionary = async (dictionaryKey, intlayerConfig = import_bui
50
50
  dictionaryKey,
51
51
  void 0,
52
52
  {
53
- headers: { Authorization: `Bearer ${oAuth2AccessToken}` }
53
+ ...oAuth2AccessToken && {
54
+ headers: {
55
+ Authorization: `Bearer ${oAuth2AccessToken}`
56
+ }
57
+ }
54
58
  }
55
59
  );
56
60
  const distantDictionary = getDictionaryResult.data;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { getAuthAPI } from '../getIntlayerAPI/auth';\nimport { getDictionaryAPI } from '../getIntlayerAPI/dictionary';\n\n/**\n * Fetch distant dictionary\n */\nexport const fetchDistantDictionary = async (\n dictionaryKey: string,\n intlayerConfig: IntlayerConfig = configuration\n): Promise<DictionaryAPI | undefined> => {\n try {\n const { clientId, clientSecret } = intlayerConfig?.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const dictionaryAPI = getDictionaryAPI(undefined, intlayerConfig);\n const authAPI = getAuthAPI(undefined, intlayerConfig);\n\n const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Fetch the dictionary\n const getDictionaryResult = await dictionaryAPI.getDictionary(\n dictionaryKey,\n undefined,\n {\n headers: { Authorization: `Bearer ${oAuth2AccessToken}` },\n }\n );\n\n const distantDictionary = getDictionaryResult.data;\n\n if (!distantDictionary) {\n throw new Error(`Dictionary ${dictionaryKey} not found on remote`);\n }\n\n return distantDictionary;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA0B;AAE1B,kBAA2B;AAC3B,wBAAiC;AAK1B,MAAM,yBAAyB,OACpC,eACA,iBAAiC,aAAAA,YACM;AACvC,MAAI;AACF,UAAM,EAAE,UAAU,aAAa,IAAI,gBAAgB;AAEnD,QAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,oBAAgB,oCAAiB,QAAW,cAAc;AAChE,UAAM,cAAU,wBAAW,QAAW,cAAc;AAEpD,UAAM,oBAAoB,MAAM,QAAQ,qBAAqB;AAE7D,UAAM,oBAAoB,kBAAkB,MAAM;AAGlD,UAAM,sBAAsB,MAAM,cAAc;AAAA,MAC9C;AAAA,MACA;AAAA,MACA;AAAA,QACE,SAAS,EAAE,eAAe,UAAU,iBAAiB,GAAG;AAAA,MAC1D;AAAA,IACF;AAEA,UAAM,oBAAoB,oBAAoB;AAE9C,QAAI,CAAC,mBAAmB;AACtB,YAAM,IAAI,MAAM,cAAc,aAAa,sBAAsB;AAAA,IACnE;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO;AAAA,EACT;AACF;","names":["configuration"]}
1
+ {"version":3,"sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { getAuthAPI } from '../getIntlayerAPI/auth';\nimport { getDictionaryAPI } from '../getIntlayerAPI/dictionary';\n\n/**\n * Fetch distant dictionary\n */\nexport const fetchDistantDictionary = async (\n dictionaryKey: string,\n intlayerConfig: IntlayerConfig = configuration\n): Promise<DictionaryAPI | undefined> => {\n try {\n const { clientId, clientSecret } = intlayerConfig?.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const dictionaryAPI = getDictionaryAPI(undefined, intlayerConfig);\n const authAPI = getAuthAPI(undefined, intlayerConfig);\n\n const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Fetch the dictionary\n const getDictionaryResult = await dictionaryAPI.getDictionary(\n dictionaryKey,\n undefined,\n {\n ...(oAuth2AccessToken && {\n headers: {\n Authorization: `Bearer ${oAuth2AccessToken}`,\n },\n }),\n }\n );\n\n const distantDictionary = getDictionaryResult.data;\n\n if (!distantDictionary) {\n throw new Error(`Dictionary ${dictionaryKey} not found on remote`);\n }\n\n return distantDictionary;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA0B;AAE1B,kBAA2B;AAC3B,wBAAiC;AAK1B,MAAM,yBAAyB,OACpC,eACA,iBAAiC,aAAAA,YACM;AACvC,MAAI;AACF,UAAM,EAAE,UAAU,aAAa,IAAI,gBAAgB;AAEnD,QAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,oBAAgB,oCAAiB,QAAW,cAAc;AAChE,UAAM,cAAU,wBAAW,QAAW,cAAc;AAEpD,UAAM,oBAAoB,MAAM,QAAQ,qBAAqB;AAE7D,UAAM,oBAAoB,kBAAkB,MAAM;AAGlD,UAAM,sBAAsB,MAAM,cAAc;AAAA,MAC9C;AAAA,MACA;AAAA,MACA;AAAA,QACE,GAAI,qBAAqB;AAAA,UACvB,SAAS;AAAA,YACP,eAAe,UAAU,iBAAiB;AAAA,UAC5C;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,oBAAoB,oBAAoB;AAE9C,QAAI,CAAC,mBAAmB;AACtB,YAAM,IAAI,MAAM,cAAc,aAAa,sBAAsB;AAAA,IACnE;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO;AAAA,EACT;AACF;","names":["configuration"]}
@@ -41,6 +41,15 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
41
41
  );
42
42
  }
43
43
  const AI_API_ROUTE = `${backendURL}/api/ai`;
44
+ const customQuery = async (body, otherOptions = {}) => await (0, import_fetcher.fetcher)(
45
+ AI_API_ROUTE,
46
+ authAPIOptions,
47
+ otherOptions,
48
+ {
49
+ method: "POST",
50
+ body
51
+ }
52
+ );
44
53
  const translateJSON = async (body, otherOptions = {}) => await (0, import_fetcher.fetcher)(
45
54
  `${AI_API_ROUTE}/translate/json`,
46
55
  authAPIOptions,
@@ -148,6 +157,7 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
148
157
  }
149
158
  );
150
159
  return {
160
+ customQuery,
151
161
  translateJSON,
152
162
  auditContentDeclaration,
153
163
  auditContentDeclarationField,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/getIntlayerAPI/ai.ts"],"sourcesContent":["import type {\n AskDocQuestionResult,\n AuditContentDeclarationBody,\n AuditContentDeclarationFieldBody,\n AuditContentDeclarationFieldResult,\n AuditContentDeclarationMetadataBody,\n AuditContentDeclarationMetadataResult,\n AuditContentDeclarationResult,\n AuditTagBody,\n AuditTagResult,\n AutocompleteBody,\n AutocompleteResponse,\n ChatCompletionRequestMessage,\n TranslateJSONBody,\n TranslateJSONResult,\n} from '../types';\n\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport type AskDocQuestionBody = {\n messages: ChatCompletionRequestMessage[];\n discutionId: string;\n onMessage?: (chunk: string) => void;\n onDone?: (response: AskDocQuestionResult) => void;\n};\n\nexport type { AskDocQuestionResult };\n\nexport const getAiAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const AI_API_ROUTE = `${backendURL}/api/ai`;\n\n /**\n * Translate a JSON\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const translateJSON = async (\n body?: TranslateJSONBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<TranslateJSONResult>(\n `${AI_API_ROUTE}/translate/json`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclaration = async (\n body?: AuditContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationResult>(\n `${AI_API_ROUTE}/audit/dictionary`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration field\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationField = async (\n body?: AuditContentDeclarationFieldBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationFieldResult>(\n `${AI_API_ROUTE}/audit/dictionary/field`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file to retrieve title, description and tags\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationMetadata = async (\n body?: AuditContentDeclarationMetadataBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationMetadataResult>(\n `${AI_API_ROUTE}/audit/dictionary/metadata`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a tag\n * @param body - Audit tag parameters.\n * @returns Audited tag content.\n */\n const auditTag = async (\n body?: AuditTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditTagResult>(\n `${AI_API_ROUTE}/audit/tag`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Asks a question to the AI related to the documentation **and streams the\n * answer as Server‑Sent Events (SSE)**.\n *\n * The function **returns immediately** with a handle exposing:\n * - `promise` → resolves when the stream completes (or rejects on error)\n * - `abort()` → allows canceling the request on demand\n *\n * Usage example:\n * ```ts\n * const { promise, abort } = ai.askDocQuestion({\n * ...body,\n * onMessage: console.log,\n * onDone: (full) => console.log(\"✔\", full),\n * });\n * // later → abort();\n * await promise; // waits for completion if desired\n * ```\n */\n const askDocQuestion = async (\n body?: AskDocQuestionBody,\n otherOptions: FetcherOptions = {}\n ) => {\n if (!body) return;\n\n const { onMessage, onDone, ...rest } = body;\n const abortController = new AbortController();\n\n try {\n const response = await fetch(`${AI_API_ROUTE}/ask`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...authAPIOptions.headers,\n ...otherOptions.headers,\n },\n body: JSON.stringify(rest),\n signal: abortController.signal,\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n\n throw new Error(errorData.message || 'Failed to fetch response');\n }\n\n const reader = response.body?.getReader();\n if (!reader) {\n throw new Error('No reader available');\n }\n\n const decoder = new TextDecoder();\n let buffer = '';\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n');\n buffer = lines.pop() ?? '';\n\n for (const line of lines) {\n if (line.startsWith('data: ')) {\n try {\n const data = JSON.parse(line.slice(6));\n if (data.chunk) {\n onMessage?.(data.chunk);\n }\n if (data.done && data.response) {\n onDone?.(data.response);\n }\n } catch (e) {\n console.error('Failed to parse SSE data:', e);\n }\n }\n }\n }\n } catch (error) {\n console.error('Error in askDocQuestion:', error);\n throw error;\n }\n };\n\n const autocomplete = async (\n body?: AutocompleteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AutocompleteResponse>(\n `${AI_API_ROUTE}/autocomplete`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n return {\n translateJSON,\n auditContentDeclaration,\n auditContentDeclarationField,\n auditContentDeclarationMetadata,\n auditTag,\n askDocQuestion,\n autocomplete,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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4BAA4B,KAAK;AAC/C,YAAM;AAAA,IACR;AAAA,EACF;AAEA,QAAM,eAAe,OACnB,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["configuration"]}
1
+ {"version":3,"sources":["../../../src/getIntlayerAPI/ai.ts"],"sourcesContent":["import type {\n AskDocQuestionResult,\n AuditContentDeclarationBody,\n AuditContentDeclarationFieldBody,\n AuditContentDeclarationFieldResult,\n AuditContentDeclarationMetadataBody,\n AuditContentDeclarationMetadataResult,\n AuditContentDeclarationResult,\n AuditTagBody,\n AuditTagResult,\n AutocompleteBody,\n AutocompleteResponse,\n ChatCompletionRequestMessage,\n CustomQueryBody,\n CustomQueryResult,\n TranslateJSONBody,\n TranslateJSONResult,\n} from '../types';\n\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport type AskDocQuestionBody = {\n messages: ChatCompletionRequestMessage[];\n discutionId: string;\n onMessage?: (chunk: string) => void;\n onDone?: (response: AskDocQuestionResult) => void;\n};\n\nexport type { AskDocQuestionResult };\n\nexport const getAiAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const AI_API_ROUTE = `${backendURL}/api/ai`;\n\n /**\n * Custom query\n * @param body - Custom query parameters.\n * @returns Custom query result.\n */\n const customQuery = async (\n body?: CustomQueryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CustomQueryResult>(\n AI_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Translate a JSON\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const translateJSON = async (\n body?: TranslateJSONBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<TranslateJSONResult>(\n `${AI_API_ROUTE}/translate/json`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclaration = async (\n body?: AuditContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationResult>(\n `${AI_API_ROUTE}/audit/dictionary`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration field\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationField = async (\n body?: AuditContentDeclarationFieldBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationFieldResult>(\n `${AI_API_ROUTE}/audit/dictionary/field`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file to retrieve title, description and tags\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationMetadata = async (\n body?: AuditContentDeclarationMetadataBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationMetadataResult>(\n `${AI_API_ROUTE}/audit/dictionary/metadata`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a tag\n * @param body - Audit tag parameters.\n * @returns Audited tag content.\n */\n const auditTag = async (\n body?: AuditTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditTagResult>(\n `${AI_API_ROUTE}/audit/tag`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Asks a question to the AI related to the documentation **and streams the\n * answer as Server‑Sent Events (SSE)**.\n *\n * The function **returns immediately** with a handle exposing:\n * - `promise` → resolves when the stream completes (or rejects on error)\n * - `abort()` → allows canceling the request on demand\n *\n * Usage example:\n * ```ts\n * const { promise, abort } = ai.askDocQuestion({\n * ...body,\n * onMessage: console.log,\n * onDone: (full) => console.log(\"✔\", full),\n * });\n * // later → abort();\n * await promise; // waits for completion if desired\n * ```\n */\n const askDocQuestion = async (\n body?: AskDocQuestionBody,\n otherOptions: FetcherOptions = {}\n ) => {\n if (!body) return;\n\n const { onMessage, onDone, ...rest } = body;\n const abortController = new AbortController();\n\n try {\n const response = await fetch(`${AI_API_ROUTE}/ask`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...authAPIOptions.headers,\n ...otherOptions.headers,\n },\n body: JSON.stringify(rest),\n signal: abortController.signal,\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n\n throw new Error(errorData.message || 'Failed to fetch response');\n }\n\n const reader = response.body?.getReader();\n if (!reader) {\n throw new Error('No reader available');\n }\n\n const decoder = new TextDecoder();\n let buffer = '';\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n');\n buffer = lines.pop() ?? '';\n\n for (const line of lines) {\n if (line.startsWith('data: ')) {\n try {\n const data = JSON.parse(line.slice(6));\n if (data.chunk) {\n onMessage?.(data.chunk);\n }\n if (data.done && data.response) {\n onDone?.(data.response);\n }\n } catch (e) {\n console.error('Failed to parse SSE data:', e);\n }\n }\n }\n }\n } catch (error) {\n console.error('Error in askDocQuestion:', error);\n throw error;\n }\n };\n\n const autocomplete = async (\n body?: AutocompleteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AutocompleteResponse>(\n `${AI_API_ROUTE}/autocomplete`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n return {\n customQuery,\n translateJSON,\n auditContentDeclaration,\n auditContentDeclarationField,\n auditContentDeclarationMetadata,\n auditTag,\n askDocQuestion,\n autocomplete,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBA,mBAA0B;AAG1B,qBAA6C;AAWtC,MAAM,WAAW,CACtB,iBAAiC,CAAC,GAClC,mBACG;AACH,QAAM,aACJ,gBAAgB,QAAQ,cAAc,aAAAA,QAAc,QAAQ;AAE9D,MAAI,CAAC,YAAY;AACf,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,eAAe,GAAG,UAAU;AAOlC,QAAM,cAAc,OAClB,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,gBAAgB,OACpB,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,0BAA0B,OAC9B,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,+BAA+B,OACnC,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,kCAAkC,OACtC,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,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MAAM,CAAC,CAAC;AACrC,kBAAI,KAAK,OAAO;AACd,4BAAY,KAAK,KAAK;AAAA,cACxB;AACA,kBAAI,KAAK,QAAQ,KAAK,UAAU;AAC9B,yBAAS,KAAK,QAAQ;AAAA,cACxB;AAAA,YACF,SAAS,GAAG;AACV,sBAAQ,MAAM,6BAA6B,CAAC;AAAA,YAC9C;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,cAAQ,MAAM,4BAA4B,KAAK;AAC/C,YAAM;AAAA,IACR;AAAA,EACF;AAEA,QAAM,eAAe,OACnB,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["configuration"]}
@@ -28,6 +28,7 @@ __reExport(index_exports, require('./getIntlayerAPI/stripe.cjs'), module.exports
28
28
  __reExport(index_exports, require('./getIntlayerAPI/tag.cjs'), module.exports);
29
29
  __reExport(index_exports, require('./getIntlayerAPI/user.cjs'), module.exports);
30
30
  __reExport(index_exports, require('./IntlayerEventListener.cjs'), module.exports);
31
+ __reExport(index_exports, require('./types.cjs'), module.exports);
31
32
  // Annotate the CommonJS export names for ESM import in node:
32
33
  0 && (module.exports = {
33
34
  ...require('./distantDictionary/index.cjs'),
@@ -42,6 +43,7 @@ __reExport(index_exports, require('./IntlayerEventListener.cjs'), module.exports
42
43
  ...require('./getIntlayerAPI/stripe.cjs'),
43
44
  ...require('./getIntlayerAPI/tag.cjs'),
44
45
  ...require('./getIntlayerAPI/user.cjs'),
45
- ...require('./IntlayerEventListener.cjs')
46
+ ...require('./IntlayerEventListener.cjs'),
47
+ ...require('./types.cjs')
46
48
  });
47
49
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './distantDictionary/index';\nexport * from './fetcher';\nexport * from './getIntlayerAPI';\nexport * from './getIntlayerAPI/ai';\nexport * from './getIntlayerAPI/auth';\nexport * from './getIntlayerAPI/dictionary';\nexport * from './getIntlayerAPI/editor';\nexport * from './getIntlayerAPI/organization';\nexport * from './getIntlayerAPI/project';\nexport * from './getIntlayerAPI/stripe';\nexport * from './getIntlayerAPI/tag';\nexport * from './getIntlayerAPI/user';\nexport * from './IntlayerEventListener';\n\n// @ts-ignore @intlayer/backend is not build yet\nexport type { AIOptions } from '@intlayer/backend';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,sCAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,6BAFd;AAGA,0BAAc,gCAHd;AAIA,0BAAc,kCAJd;AAKA,0BAAc,wCALd;AAMA,0BAAc,oCANd;AAOA,0BAAc,0CAPd;AAQA,0BAAc,qCARd;AASA,0BAAc,oCATd;AAUA,0BAAc,iCAVd;AAWA,0BAAc,kCAXd;AAYA,0BAAc,oCAZd;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './distantDictionary/index';\nexport * from './fetcher';\nexport * from './getIntlayerAPI';\nexport * from './getIntlayerAPI/ai';\nexport * from './getIntlayerAPI/auth';\nexport * from './getIntlayerAPI/dictionary';\nexport * from './getIntlayerAPI/editor';\nexport * from './getIntlayerAPI/organization';\nexport * from './getIntlayerAPI/project';\nexport * from './getIntlayerAPI/stripe';\nexport * from './getIntlayerAPI/tag';\nexport * from './getIntlayerAPI/user';\nexport * from './IntlayerEventListener';\nexport * from './types';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,sCAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,6BAFd;AAGA,0BAAc,gCAHd;AAIA,0BAAc,kCAJd;AAKA,0BAAc,wCALd;AAMA,0BAAc,oCANd;AAOA,0BAAc,0CAPd;AAQA,0BAAc,qCARd;AASA,0BAAc,oCATd;AAUA,0BAAc,iCAVd;AAWA,0BAAc,kCAXd;AAYA,0BAAc,oCAZd;AAaA,0BAAc,oBAbd;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * This file re-exports all types to allow non-blocking build because\n * the backend and intlayer-editor are not built yet.\n */\nexport type {\n AddDictionaryBody,\n AddDictionaryResult,\n AddNewAccessKeyBody,\n AddNewAccessKeyResponse,\n AddOrganizationBody,\n AddOrganizationMemberBody,\n AddOrganizationMemberResult,\n AddOrganizationResult,\n AddProjectBody,\n AddProjectResult,\n AddTagBody,\n AddTagResult,\n AskDocQuestionResult,\n AskResetPasswordBody,\n AskResetPasswordResult,\n AuditContentDeclarationBody,\n AuditContentDeclarationFieldBody,\n AuditContentDeclarationFieldResult,\n AuditContentDeclarationMetadataBody,\n AuditContentDeclarationMetadataResult,\n AuditContentDeclarationResult,\n AuditTagBody,\n AuditTagResult,\n AutocompleteBody,\n AutocompleteResponse,\n ChatCompletionRequestMessage,\n CheckIfUserHasPasswordResult,\n CreateSessionBody,\n CreateSessionResult,\n CreateUserBody,\n CreateUserResult,\n DefinePasswordBody,\n DefinePasswordResult,\n DeleteAccessKeyBody,\n DeleteAccessKeyResponse,\n DeleteDictionaryParam,\n DeleteDictionaryResult,\n DeleteOrganizationResult,\n DeleteProjectResult,\n DeleteTagParams,\n DeleteTagResult,\n GetCheckoutSessionBody,\n GetCheckoutSessionResult,\n GetDictionariesKeysResult,\n GetDictionariesParams,\n GetDictionariesResult,\n GetDictionaryParams,\n GetDictionaryQuery,\n GetDictionaryResult,\n GetOAuth2TokenBody,\n GetOAuth2TokenResult,\n GetOrganizationParam,\n GetOrganizationResult,\n GetOrganizationsParams,\n GetOrganizationsResult,\n GetPricingBody,\n GetPricingResult,\n GetProjectsParams,\n GetProjectsResult,\n GetSessionInformationQuery,\n GetSessionInformationResult,\n GetTagsParams,\n GetTagsResult,\n GetUserByAccountParams,\n GetUserByAccountResult,\n GetUserByEmailParams,\n GetUserByEmailResult,\n GetUserByIdParams,\n GetUserByIdResult,\n GetUsersParams,\n GetUsersResult,\n GithubLoginQueryParams,\n GoogleLoginQueryParams,\n LoginBody,\n LoginResult,\n NewsletterSubscriptionBody,\n NewsletterSubscriptionResult,\n NewsletterUnsubscriptionBody,\n PushDictionariesBody,\n PushDictionariesResult,\n PushProjectConfigurationBody,\n PushProjectConfigurationResult,\n RefreshAccessKeyBody,\n RefreshAccessKeyResponse,\n RegisterBody,\n RegisterQuery,\n RegisterResult,\n SearchDocUtilParams,\n SearchDocUtilResult,\n SelectOrganizationParam,\n SelectOrganizationResult,\n SelectProjectParam,\n SelectProjectResult,\n SetCSRFTokenResult,\n TranslateJSONBody,\n TranslateJSONResult,\n UnselectOrganizationResult,\n UnselectProjectResult,\n UpdateDictionaryBody,\n UpdateDictionaryParam,\n UpdateDictionaryResult,\n UpdateOrganizationBody,\n UpdateOrganizationMembersBody,\n UpdateOrganizationMembersResult,\n UpdateOrganizationResult,\n UpdatePasswordBody,\n UpdatePasswordResult,\n UpdateProjectBody,\n UpdateProjectMembersBody,\n UpdateProjectMembersResult,\n UpdateProjectResult,\n UpdateTagBody,\n UpdateTagParams,\n UpdateTagResult,\n UpdateUserBody,\n UpdateUserResult,\n UserAPI,\n ValidEmailParams,\n ValidEmailResult,\n} from '@intlayer/backend';\nexport type {\n GetConfigurationResult,\n WriteContentDeclarationBody,\n WriteContentDeclarationResult,\n} from 'intlayer-editor';\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/types.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * This file re-exports all types to allow non-blocking build because\n * the backend and intlayer-editor are not built yet.\n */\nexport type {\n AIOptions,\n AIProvider,\n AddDictionaryBody,\n AddDictionaryResult,\n AddNewAccessKeyBody,\n AddNewAccessKeyResponse,\n AddOrganizationBody,\n AddOrganizationMemberBody,\n AddOrganizationMemberResult,\n AddOrganizationResult,\n AddProjectBody,\n AddProjectResult,\n AddTagBody,\n AddTagResult,\n AskDocQuestionResult,\n AskResetPasswordBody,\n AskResetPasswordResult,\n AuditContentDeclarationBody,\n AuditContentDeclarationFieldBody,\n AuditContentDeclarationFieldResult,\n AuditContentDeclarationMetadataBody,\n AuditContentDeclarationMetadataResult,\n AuditContentDeclarationResult,\n AuditTagBody,\n AuditTagResult,\n AutocompleteBody,\n AutocompleteResponse,\n ChatCompletionRequestMessage,\n CheckIfUserHasPasswordResult,\n CreateSessionBody,\n CreateSessionResult,\n CreateUserBody,\n CreateUserResult,\n CustomQueryBody,\n CustomQueryResult,\n DefinePasswordBody,\n DefinePasswordResult,\n DeleteAccessKeyBody,\n DeleteAccessKeyResponse,\n DeleteDictionaryParam,\n DeleteDictionaryResult,\n DeleteOrganizationResult,\n DeleteProjectResult,\n DeleteTagParams,\n DeleteTagResult,\n GetCheckoutSessionBody,\n GetCheckoutSessionResult,\n GetDictionariesKeysResult,\n GetDictionariesParams,\n GetDictionariesResult,\n GetDictionaryParams,\n GetDictionaryQuery,\n GetDictionaryResult,\n GetOAuth2TokenBody,\n GetOAuth2TokenResult,\n GetOrganizationParam,\n GetOrganizationResult,\n GetOrganizationsParams,\n GetOrganizationsResult,\n GetPricingBody,\n GetPricingResult,\n GetProjectsParams,\n GetProjectsResult,\n GetSessionInformationQuery,\n GetSessionInformationResult,\n GetTagsParams,\n GetTagsResult,\n GetUserByAccountParams,\n GetUserByAccountResult,\n GetUserByEmailParams,\n GetUserByEmailResult,\n GetUserByIdParams,\n GetUserByIdResult,\n GetUsersParams,\n GetUsersResult,\n GithubLoginQueryParams,\n GoogleLoginQueryParams,\n LoginBody,\n LoginResult,\n Messages,\n NewsletterSubscriptionBody,\n NewsletterSubscriptionResult,\n NewsletterUnsubscriptionBody,\n PushDictionariesBody,\n PushDictionariesResult,\n PushProjectConfigurationBody,\n PushProjectConfigurationResult,\n RefreshAccessKeyBody,\n RefreshAccessKeyResponse,\n RegisterBody,\n RegisterQuery,\n RegisterResult,\n SearchDocUtilParams,\n SearchDocUtilResult,\n SelectOrganizationParam,\n SelectOrganizationResult,\n SelectProjectParam,\n SelectProjectResult,\n SetCSRFTokenResult,\n TranslateJSONBody,\n TranslateJSONResult,\n UnselectOrganizationResult,\n UnselectProjectResult,\n UpdateDictionaryBody,\n UpdateDictionaryParam,\n UpdateDictionaryResult,\n UpdateOrganizationBody,\n UpdateOrganizationMembersBody,\n UpdateOrganizationMembersResult,\n UpdateOrganizationResult,\n UpdatePasswordBody,\n UpdatePasswordResult,\n UpdateProjectBody,\n UpdateProjectMembersBody,\n UpdateProjectMembersResult,\n UpdateProjectResult,\n UpdateTagBody,\n UpdateTagParams,\n UpdateTagResult,\n UpdateUserBody,\n UpdateUserResult,\n UserAPI,\n ValidEmailParams,\n ValidEmailResult,\n} from '@intlayer/backend';\nexport type {\n GetConfigurationResult,\n WriteContentDeclarationBody,\n WriteContentDeclarationResult,\n} from 'intlayer-editor';\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -14,7 +14,11 @@ const fetchDistantDictionaries = async (intlayerConfig = configuration) => {
14
14
  const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();
15
15
  const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;
16
16
  const getDictionaryResult = await dictionaryAPI.getDictionaries(void 0, {
17
- headers: { Authorization: `Bearer ${oAuth2AccessToken}` }
17
+ ...oAuth2AccessToken && {
18
+ headers: {
19
+ Authorization: `Bearer ${oAuth2AccessToken}`
20
+ }
21
+ }
18
22
  });
19
23
  const distantDictionaries = getDictionaryResult.data;
20
24
  return distantDictionaries;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport { type DictionaryAPI } from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport { getAuthAPI } from '../getIntlayerAPI/auth';\nimport { getDictionaryAPI } from '../getIntlayerAPI/dictionary';\n\n/**\n * Fetch distant dictionary\n */\nexport const fetchDistantDictionaries = async (\n intlayerConfig: IntlayerConfig = configuration\n): Promise<DictionaryAPI[] | null | undefined> => {\n try {\n const { clientId, clientSecret } = intlayerConfig?.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const dictionaryAPI = getDictionaryAPI(undefined, intlayerConfig);\n const authAPI = getAuthAPI(undefined, intlayerConfig);\n\n const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Fetch the dictionary\n const getDictionaryResult = await dictionaryAPI.getDictionaries(undefined, {\n headers: { Authorization: `Bearer ${oAuth2AccessToken}` },\n });\n\n const distantDictionaries = getDictionaryResult.data;\n\n return distantDictionaries;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\n"],"mappings":"AAEA,OAAO,mBAAmB;AAE1B,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AAK1B,MAAM,2BAA2B,OACtC,iBAAiC,kBACe;AAChD,MAAI;AACF,UAAM,EAAE,UAAU,aAAa,IAAI,gBAAgB;AAEnD,QAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,gBAAgB,iBAAiB,QAAW,cAAc;AAChE,UAAM,UAAU,WAAW,QAAW,cAAc;AAEpD,UAAM,oBAAoB,MAAM,QAAQ,qBAAqB;AAE7D,UAAM,oBAAoB,kBAAkB,MAAM;AAGlD,UAAM,sBAAsB,MAAM,cAAc,gBAAgB,QAAW;AAAA,MACzE,SAAS,EAAE,eAAe,UAAU,iBAAiB,GAAG;AAAA,IAC1D,CAAC;AAED,UAAM,sBAAsB,oBAAoB;AAEhD,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport { type DictionaryAPI } from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport { getAuthAPI } from '../getIntlayerAPI/auth';\nimport { getDictionaryAPI } from '../getIntlayerAPI/dictionary';\n\n/**\n * Fetch distant dictionary\n */\nexport const fetchDistantDictionaries = async (\n intlayerConfig: IntlayerConfig = configuration\n): Promise<DictionaryAPI[] | null | undefined> => {\n try {\n const { clientId, clientSecret } = intlayerConfig?.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const dictionaryAPI = getDictionaryAPI(undefined, intlayerConfig);\n const authAPI = getAuthAPI(undefined, intlayerConfig);\n\n const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Fetch the dictionary\n const getDictionaryResult = await dictionaryAPI.getDictionaries(undefined, {\n ...(oAuth2AccessToken && {\n headers: {\n Authorization: `Bearer ${oAuth2AccessToken}`,\n },\n }),\n });\n\n const distantDictionaries = getDictionaryResult.data;\n\n return distantDictionaries;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\n"],"mappings":"AAEA,OAAO,mBAAmB;AAE1B,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AAK1B,MAAM,2BAA2B,OACtC,iBAAiC,kBACe;AAChD,MAAI;AACF,UAAM,EAAE,UAAU,aAAa,IAAI,gBAAgB;AAEnD,QAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,gBAAgB,iBAAiB,QAAW,cAAc;AAChE,UAAM,UAAU,WAAW,QAAW,cAAc;AAEpD,UAAM,oBAAoB,MAAM,QAAQ,qBAAqB;AAE7D,UAAM,oBAAoB,kBAAkB,MAAM;AAGlD,UAAM,sBAAsB,MAAM,cAAc,gBAAgB,QAAW;AAAA,MACzE,GAAI,qBAAqB;AAAA,QACvB,SAAS;AAAA,UACP,eAAe,UAAU,iBAAiB;AAAA,QAC5C;AAAA,MACF;AAAA,IACF,CAAC;AAED,UAAM,sBAAsB,oBAAoB;AAEhD,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO;AAAA,EACT;AACF;","names":[]}
@@ -17,7 +17,11 @@ const fetchDistantDictionary = async (dictionaryKey, intlayerConfig = configurat
17
17
  dictionaryKey,
18
18
  void 0,
19
19
  {
20
- headers: { Authorization: `Bearer ${oAuth2AccessToken}` }
20
+ ...oAuth2AccessToken && {
21
+ headers: {
22
+ Authorization: `Bearer ${oAuth2AccessToken}`
23
+ }
24
+ }
21
25
  }
22
26
  );
23
27
  const distantDictionary = getDictionaryResult.data;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { getAuthAPI } from '../getIntlayerAPI/auth';\nimport { getDictionaryAPI } from '../getIntlayerAPI/dictionary';\n\n/**\n * Fetch distant dictionary\n */\nexport const fetchDistantDictionary = async (\n dictionaryKey: string,\n intlayerConfig: IntlayerConfig = configuration\n): Promise<DictionaryAPI | undefined> => {\n try {\n const { clientId, clientSecret } = intlayerConfig?.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const dictionaryAPI = getDictionaryAPI(undefined, intlayerConfig);\n const authAPI = getAuthAPI(undefined, intlayerConfig);\n\n const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Fetch the dictionary\n const getDictionaryResult = await dictionaryAPI.getDictionary(\n dictionaryKey,\n undefined,\n {\n headers: { Authorization: `Bearer ${oAuth2AccessToken}` },\n }\n );\n\n const distantDictionary = getDictionaryResult.data;\n\n if (!distantDictionary) {\n throw new Error(`Dictionary ${dictionaryKey} not found on remote`);\n }\n\n return distantDictionary;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\n"],"mappings":"AAEA,OAAO,mBAAmB;AAE1B,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AAK1B,MAAM,yBAAyB,OACpC,eACA,iBAAiC,kBACM;AACvC,MAAI;AACF,UAAM,EAAE,UAAU,aAAa,IAAI,gBAAgB;AAEnD,QAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,gBAAgB,iBAAiB,QAAW,cAAc;AAChE,UAAM,UAAU,WAAW,QAAW,cAAc;AAEpD,UAAM,oBAAoB,MAAM,QAAQ,qBAAqB;AAE7D,UAAM,oBAAoB,kBAAkB,MAAM;AAGlD,UAAM,sBAAsB,MAAM,cAAc;AAAA,MAC9C;AAAA,MACA;AAAA,MACA;AAAA,QACE,SAAS,EAAE,eAAe,UAAU,iBAAiB,GAAG;AAAA,MAC1D;AAAA,IACF;AAEA,UAAM,oBAAoB,oBAAoB;AAE9C,QAAI,CAAC,mBAAmB;AACtB,YAAM,IAAI,MAAM,cAAc,aAAa,sBAAsB;AAAA,IACnE;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { getAuthAPI } from '../getIntlayerAPI/auth';\nimport { getDictionaryAPI } from '../getIntlayerAPI/dictionary';\n\n/**\n * Fetch distant dictionary\n */\nexport const fetchDistantDictionary = async (\n dictionaryKey: string,\n intlayerConfig: IntlayerConfig = configuration\n): Promise<DictionaryAPI | undefined> => {\n try {\n const { clientId, clientSecret } = intlayerConfig?.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const dictionaryAPI = getDictionaryAPI(undefined, intlayerConfig);\n const authAPI = getAuthAPI(undefined, intlayerConfig);\n\n const oAuth2TokenResult = await authAPI.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Fetch the dictionary\n const getDictionaryResult = await dictionaryAPI.getDictionary(\n dictionaryKey,\n undefined,\n {\n ...(oAuth2AccessToken && {\n headers: {\n Authorization: `Bearer ${oAuth2AccessToken}`,\n },\n }),\n }\n );\n\n const distantDictionary = getDictionaryResult.data;\n\n if (!distantDictionary) {\n throw new Error(`Dictionary ${dictionaryKey} not found on remote`);\n }\n\n return distantDictionary;\n } catch (error) {\n console.error(error);\n return undefined;\n }\n};\n"],"mappings":"AAEA,OAAO,mBAAmB;AAE1B,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AAK1B,MAAM,yBAAyB,OACpC,eACA,iBAAiC,kBACM;AACvC,MAAI;AACF,UAAM,EAAE,UAAU,aAAa,IAAI,gBAAgB;AAEnD,QAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,gBAAgB,iBAAiB,QAAW,cAAc;AAChE,UAAM,UAAU,WAAW,QAAW,cAAc;AAEpD,UAAM,oBAAoB,MAAM,QAAQ,qBAAqB;AAE7D,UAAM,oBAAoB,kBAAkB,MAAM;AAGlD,UAAM,sBAAsB,MAAM,cAAc;AAAA,MAC9C;AAAA,MACA;AAAA,MACA;AAAA,QACE,GAAI,qBAAqB;AAAA,UACvB,SAAS;AAAA,YACP,eAAe,UAAU,iBAAiB;AAAA,UAC5C;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,oBAAoB,oBAAoB;AAE9C,QAAI,CAAC,mBAAmB;AACtB,YAAM,IAAI,MAAM,cAAc,aAAa,sBAAsB;AAAA,IACnE;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO;AAAA,EACT;AACF;","names":[]}
@@ -8,6 +8,15 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
8
8
  );
9
9
  }
10
10
  const AI_API_ROUTE = `${backendURL}/api/ai`;
11
+ const customQuery = async (body, otherOptions = {}) => await fetcher(
12
+ AI_API_ROUTE,
13
+ authAPIOptions,
14
+ otherOptions,
15
+ {
16
+ method: "POST",
17
+ body
18
+ }
19
+ );
11
20
  const translateJSON = async (body, otherOptions = {}) => await fetcher(
12
21
  `${AI_API_ROUTE}/translate/json`,
13
22
  authAPIOptions,
@@ -115,6 +124,7 @@ const getAiAPI = (authAPIOptions = {}, intlayerConfig) => {
115
124
  }
116
125
  );
117
126
  return {
127
+ customQuery,
118
128
  translateJSON,
119
129
  auditContentDeclaration,
120
130
  auditContentDeclarationField,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/getIntlayerAPI/ai.ts"],"sourcesContent":["import type {\n AskDocQuestionResult,\n AuditContentDeclarationBody,\n AuditContentDeclarationFieldBody,\n AuditContentDeclarationFieldResult,\n AuditContentDeclarationMetadataBody,\n AuditContentDeclarationMetadataResult,\n AuditContentDeclarationResult,\n AuditTagBody,\n AuditTagResult,\n AutocompleteBody,\n AutocompleteResponse,\n ChatCompletionRequestMessage,\n TranslateJSONBody,\n TranslateJSONResult,\n} from '../types';\n\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport type AskDocQuestionBody = {\n messages: ChatCompletionRequestMessage[];\n discutionId: string;\n onMessage?: (chunk: string) => void;\n onDone?: (response: AskDocQuestionResult) => void;\n};\n\nexport type { AskDocQuestionResult };\n\nexport const getAiAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const AI_API_ROUTE = `${backendURL}/api/ai`;\n\n /**\n * Translate a JSON\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const translateJSON = async (\n body?: TranslateJSONBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<TranslateJSONResult>(\n `${AI_API_ROUTE}/translate/json`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclaration = async (\n body?: AuditContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationResult>(\n `${AI_API_ROUTE}/audit/dictionary`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration field\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationField = async (\n body?: AuditContentDeclarationFieldBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationFieldResult>(\n `${AI_API_ROUTE}/audit/dictionary/field`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file to retrieve title, description and tags\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationMetadata = async (\n body?: AuditContentDeclarationMetadataBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationMetadataResult>(\n `${AI_API_ROUTE}/audit/dictionary/metadata`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a tag\n * @param body - Audit tag parameters.\n * @returns Audited tag content.\n */\n const auditTag = async (\n body?: AuditTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditTagResult>(\n `${AI_API_ROUTE}/audit/tag`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Asks a question to the AI related to the documentation **and streams the\n * answer as Server‑Sent Events (SSE)**.\n *\n * The function **returns immediately** with a handle exposing:\n * - `promise` → resolves when the stream completes (or rejects on error)\n * - `abort()` → allows canceling the request on demand\n *\n * Usage example:\n * ```ts\n * const { promise, abort } = ai.askDocQuestion({\n * ...body,\n * onMessage: console.log,\n * onDone: (full) => console.log(\"✔\", full),\n * });\n * // later → abort();\n * await promise; // waits for completion if desired\n * ```\n */\n const askDocQuestion = async (\n body?: AskDocQuestionBody,\n otherOptions: FetcherOptions = {}\n ) => {\n if (!body) return;\n\n const { onMessage, onDone, ...rest } = body;\n const abortController = new AbortController();\n\n try {\n const response = await fetch(`${AI_API_ROUTE}/ask`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...authAPIOptions.headers,\n ...otherOptions.headers,\n },\n body: JSON.stringify(rest),\n signal: abortController.signal,\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n\n throw new Error(errorData.message || 'Failed to fetch response');\n }\n\n const reader = response.body?.getReader();\n if (!reader) {\n throw new Error('No reader available');\n }\n\n const decoder = new TextDecoder();\n let buffer = '';\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n');\n buffer = lines.pop() ?? '';\n\n for (const line of lines) {\n if (line.startsWith('data: ')) {\n try {\n const data = JSON.parse(line.slice(6));\n if (data.chunk) {\n onMessage?.(data.chunk);\n }\n if (data.done && data.response) {\n onDone?.(data.response);\n }\n } catch (e) {\n console.error('Failed to parse SSE data:', e);\n }\n }\n }\n }\n } catch (error) {\n console.error('Error in askDocQuestion:', error);\n throw error;\n }\n };\n\n const autocomplete = async (\n body?: AutocompleteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AutocompleteResponse>(\n `${AI_API_ROUTE}/autocomplete`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n return {\n translateJSON,\n auditContentDeclaration,\n auditContentDeclarationField,\n auditContentDeclarationMetadata,\n auditTag,\n askDocQuestion,\n autocomplete,\n };\n};\n"],"mappings":"AAiBA,OAAO,mBAAmB;AAG1B,SAAS,eAAoC;AAWtC,MAAM,WAAW,CACtB,iBAAiC,CAAC,GAClC,mBACG;AACH,QAAM,aACJ,gBAAgB,QAAQ,cAAc,cAAc,QAAQ;AAE9D,MAAI,CAAC,YAAY;AACf,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,eAAe,GAAG,UAAU;AAOlC,QAAM,gBAAgB,OACpB,MACA,eAA+B,CAAC,MAEhC,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,0BAA0B,OAC9B,MACA,eAA+B,CAAC,MAEhC,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,+BAA+B,OACnC,MACA,eAA+B,CAAC,MAEhC,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,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AK,CAAC;AAChD,cAAM,QAAQ,OAAO,MAAM,IAAI;AAC/B,iBAAS,MAAM,IAAI,KAAK;AAExB,mBAAW,QAAQ,OAAO;AACxB,cAAI,KAAK,WAAW,QAAQ,GAAG;AAC7B,gBAAI;AACF,oBAAM,OAAO,KAAK,MAAM,KAAK,MAAM,CAAC,CAAC;AACrC,kBAAI,KAAK,OAAO;AACd,4BAAY,KAAK,KAAK;AAAA,cACxB;AACA,kBAAI,KAAK,QAAQ,KAAK,UAAU;AAC9B,yBAAS,KAAK,QAAQ;AAAA,cACxB;AAAA,YACF,SAAS,GAAG;AACV,sBAAQ,MAAM,6BAA6B,CAAC;AAAA,YAC9C;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,cAAQ,MAAM,4BAA4B,KAAK;AAC/C,YAAM;AAAA,IACR;AAAA,EACF;AAEA,QAAM,eAAe,OACnB,MACA,eAA+B,CAAC,MAEhC,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/getIntlayerAPI/ai.ts"],"sourcesContent":["import type {\n AskDocQuestionResult,\n AuditContentDeclarationBody,\n AuditContentDeclarationFieldBody,\n AuditContentDeclarationFieldResult,\n AuditContentDeclarationMetadataBody,\n AuditContentDeclarationMetadataResult,\n AuditContentDeclarationResult,\n AuditTagBody,\n AuditTagResult,\n AutocompleteBody,\n AutocompleteResponse,\n ChatCompletionRequestMessage,\n CustomQueryBody,\n CustomQueryResult,\n TranslateJSONBody,\n TranslateJSONResult,\n} from '../types';\n\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\n\nimport { fetcher, type FetcherOptions } from '../fetcher';\n\nexport type AskDocQuestionBody = {\n messages: ChatCompletionRequestMessage[];\n discutionId: string;\n onMessage?: (chunk: string) => void;\n onDone?: (response: AskDocQuestionResult) => void;\n};\n\nexport type { AskDocQuestionResult };\n\nexport const getAiAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const AI_API_ROUTE = `${backendURL}/api/ai`;\n\n /**\n * Custom query\n * @param body - Custom query parameters.\n * @returns Custom query result.\n */\n const customQuery = async (\n body?: CustomQueryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CustomQueryResult>(\n AI_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Translate a JSON\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const translateJSON = async (\n body?: TranslateJSONBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<TranslateJSONResult>(\n `${AI_API_ROUTE}/translate/json`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclaration = async (\n body?: AuditContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationResult>(\n `${AI_API_ROUTE}/audit/dictionary`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration field\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationField = async (\n body?: AuditContentDeclarationFieldBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationFieldResult>(\n `${AI_API_ROUTE}/audit/dictionary/field`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file to retrieve title, description and tags\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationMetadata = async (\n body?: AuditContentDeclarationMetadataBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationMetadataResult>(\n `${AI_API_ROUTE}/audit/dictionary/metadata`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a tag\n * @param body - Audit tag parameters.\n * @returns Audited tag content.\n */\n const auditTag = async (\n body?: AuditTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditTagResult>(\n `${AI_API_ROUTE}/audit/tag`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Asks a question to the AI related to the documentation **and streams the\n * answer as Server‑Sent Events (SSE)**.\n *\n * The function **returns immediately** with a handle exposing:\n * - `promise` → resolves when the stream completes (or rejects on error)\n * - `abort()` → allows canceling the request on demand\n *\n * Usage example:\n * ```ts\n * const { promise, abort } = ai.askDocQuestion({\n * ...body,\n * onMessage: console.log,\n * onDone: (full) => console.log(\"✔\", full),\n * });\n * // later → abort();\n * await promise; // waits for completion if desired\n * ```\n */\n const askDocQuestion = async (\n body?: AskDocQuestionBody,\n otherOptions: FetcherOptions = {}\n ) => {\n if (!body) return;\n\n const { onMessage, onDone, ...rest } = body;\n const abortController = new AbortController();\n\n try {\n const response = await fetch(`${AI_API_ROUTE}/ask`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...authAPIOptions.headers,\n ...otherOptions.headers,\n },\n body: JSON.stringify(rest),\n signal: abortController.signal,\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n\n throw new Error(errorData.message || 'Failed to fetch response');\n }\n\n const reader = response.body?.getReader();\n if (!reader) {\n throw new Error('No reader available');\n }\n\n const decoder = new TextDecoder();\n let buffer = '';\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n');\n buffer = lines.pop() ?? '';\n\n for (const line of lines) {\n if (line.startsWith('data: ')) {\n try {\n const data = JSON.parse(line.slice(6));\n if (data.chunk) {\n onMessage?.(data.chunk);\n }\n if (data.done && data.response) {\n onDone?.(data.response);\n }\n } catch (e) {\n console.error('Failed to parse SSE data:', e);\n }\n }\n }\n }\n } catch (error) {\n console.error('Error in askDocQuestion:', error);\n throw error;\n }\n };\n\n const autocomplete = async (\n body?: AutocompleteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AutocompleteResponse>(\n `${AI_API_ROUTE}/autocomplete`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n return {\n customQuery,\n translateJSON,\n auditContentDeclaration,\n auditContentDeclarationField,\n auditContentDeclarationMetadata,\n auditTag,\n askDocQuestion,\n autocomplete,\n };\n};\n"],"mappings":"AAmBA,OAAO,mBAAmB;AAG1B,SAAS,eAAoC;AAWtC,MAAM,WAAW,CACtB,iBAAiC,CAAC,GAClC,mBACG;AACH,QAAM,aACJ,gBAAgB,QAAQ,cAAc,cAAc,QAAQ;AAE9D,MAAI,CAAC,YAAY;AACf,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,eAAe,GAAG,UAAU;AAOlC,QAAM,cAAc,OAClB,MACA,eAA+B,CAAC,MAEhC,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,gBAAgB,OACpB,MACA,eAA+B,CAAC,MAEhC,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,0BAA0B,OAC9B,MACA,eAA+B,CAAC,MAEh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AAQ;AACX,cAAM,IAAI,MAAM,qBAAqB;AAAA,MACvC;AAEA,YAAM,UAAU,IAAI,YAAY;AAChC,UAAI,SAAS;AAEb,aAAO,MAAM;AACX,cAAM,EAAE,MAAM,MAAM,IAAI,MAAM,OAAO,KAAK;AAC1C,YAAI,KAAM;AAEV,kBAAU,QAAQ,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC;AAChD,cAAM,QAAQ,OAAO,MAAM,IAAI;AAC/B,iBAAS,MAAM,IAAI,KAAK;AAExB,mBAAW,QAAQ,OAAO;AACxB,cAAI,KAAK,WAAW,QAAQ,GAAG;AAC7B,gBAAI;AACF,oBAAM,OAAO,KAAK,MAAM,KAAK,MAAM,CAAC,CAAC;AACrC,kBAAI,KAAK,OAAO;AACd,4BAAY,KAAK,KAAK;AAAA,cACxB;AACA,kBAAI,KAAK,QAAQ,KAAK,UAAU;AAC9B,yBAAS,KAAK,QAAQ;AAAA,cACxB;AAAA,YACF,SAAS,GAAG;AACV,sBAAQ,MAAM,6BAA6B,CAAC;AAAA,YAC9C;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,cAAQ,MAAM,4BAA4B,KAAK;AAC/C,YAAM;AAAA,IACR;AAAA,EACF;AAEA,QAAM,eAAe,OACnB,MACA,eAA+B,CAAC,MAEhC,MAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -11,4 +11,5 @@ export * from "./getIntlayerAPI/stripe.mjs";
11
11
  export * from "./getIntlayerAPI/tag.mjs";
12
12
  export * from "./getIntlayerAPI/user.mjs";
13
13
  export * from "./IntlayerEventListener.mjs";
14
+ export * from "./types.mjs";
14
15
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './distantDictionary/index';\nexport * from './fetcher';\nexport * from './getIntlayerAPI';\nexport * from './getIntlayerAPI/ai';\nexport * from './getIntlayerAPI/auth';\nexport * from './getIntlayerAPI/dictionary';\nexport * from './getIntlayerAPI/editor';\nexport * from './getIntlayerAPI/organization';\nexport * from './getIntlayerAPI/project';\nexport * from './getIntlayerAPI/stripe';\nexport * from './getIntlayerAPI/tag';\nexport * from './getIntlayerAPI/user';\nexport * from './IntlayerEventListener';\n\n// @ts-ignore @intlayer/backend is not build yet\nexport type { AIOptions } from '@intlayer/backend';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './distantDictionary/index';\nexport * from './fetcher';\nexport * from './getIntlayerAPI';\nexport * from './getIntlayerAPI/ai';\nexport * from './getIntlayerAPI/auth';\nexport * from './getIntlayerAPI/dictionary';\nexport * from './getIntlayerAPI/editor';\nexport * from './getIntlayerAPI/organization';\nexport * from './getIntlayerAPI/project';\nexport * from './getIntlayerAPI/stripe';\nexport * from './getIntlayerAPI/tag';\nexport * from './getIntlayerAPI/user';\nexport * from './IntlayerEventListener';\nexport * from './types';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchDistantDictionaries.d.ts","sourceRoot":"","sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,iBAAgB,cAA8B,KAC7C,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,GAAG,SAAS,CA6B5C,CAAC"}
1
+ {"version":3,"file":"fetchDistantDictionaries.d.ts","sourceRoot":"","sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,iBAAgB,cAA8B,KAC7C,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,GAAG,SAAS,CAiC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchDistantDictionary.d.ts","sourceRoot":"","sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,eAAe,MAAM,EACrB,iBAAgB,cAA8B,KAC7C,OAAO,CAAC,aAAa,GAAG,SAAS,CAqCnC,CAAC"}
1
+ {"version":3,"file":"fetchDistantDictionary.d.ts","sourceRoot":"","sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,eAAe,MAAM,EACrB,iBAAgB,cAA8B,KAC7C,OAAO,CAAC,aAAa,GAAG,SAAS,CAyCnC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, AutocompleteBody, ChatCompletionRequestMessage, TranslateJSONBody } from '../types';
1
+ import type { AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult, AutocompleteBody, AutocompleteResponse, ChatCompletionRequestMessage, CustomQueryBody, CustomQueryResult, TranslateJSONBody, TranslateJSONResult } from '../types';
2
2
  import type { IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export type AskDocQuestionBody = {
@@ -9,6 +9,7 @@ export type AskDocQuestionBody = {
9
9
  };
10
10
  export type { AskDocQuestionResult };
11
11
  export declare const getAiAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
12
+ customQuery: (body?: CustomQueryBody, otherOptions?: FetcherOptions) => Promise<CustomQueryResult>;
12
13
  translateJSON: (body?: TranslateJSONBody, otherOptions?: FetcherOptions) => Promise<TranslateJSONResult>;
13
14
  auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
14
15
  auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,gCAAgC,EAEhC,mCAAmC,EAGnC,YAAY,EAEZ,gBAAgB,EAEhB,4BAA4B,EAC5B,iBAAiB,EAElB,MAAM,UAAU,CAAC;AAGlB,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C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC,eAAO,MAAM,QAAQ,GACnB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;yBAmBtB,eAAe,iBACR,cAAc;2BAkBrB,iBAAiB,iBACV,cAAc;qCAkBrB,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;4BAgCrB,kBAAkB,iBACX,cAAc;0BAgErB,gBAAgB,iBACT,cAAc;CAsB/B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IntlayerConfig } from '@intlayer/config/client';
2
- import type { AskResetPasswordBody, CreateSessionBody, DefinePasswordBody, GetSessionInformationQuery, GithubLoginQueryParams, GoogleLoginQueryParams, LoginBody, RegisterBody, RegisterQuery, UpdatePasswordBody, UserAPI, ValidEmailParams } from '../types';
2
+ import type { AskResetPasswordBody, AskResetPasswordResult, CheckIfUserHasPasswordResult, CreateSessionBody, CreateSessionResult, DefinePasswordBody, DefinePasswordResult, GetOAuth2TokenResult, GetSessionInformationQuery, GetSessionInformationResult, GithubLoginQueryParams, GoogleLoginQueryParams, LoginBody, LoginResult, RegisterBody, RegisterQuery, RegisterResult, SetCSRFTokenResult, UpdatePasswordBody, UpdatePasswordResult, UserAPI, ValidEmailParams, ValidEmailResult } from '../types';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getAuthAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  login: (user: LoginBody, otherOptions?: FetcherOptions) => Promise<LoginResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,oBAAoB,EAGpB,iBAAiB,EAEjB,kBAAkB,EAIlB,0BAA0B,EAE1B,sBAAsB,EACtB,sBAAsB,EACtB,SAAS,EAET,YAAY,EACZ,aAAa,EAGb,kBAAkB,EAElB,OAAO,EACP,gBAAgB,EAEjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,UAAU,GACrB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;kBAkBJ,SAAS,iBAAgB,cAAc;oCAgB3B,sBAAsB,KAAG,MAAM;oCAW/B,sBAAsB,KAAG,MAAM;qBAY9D,YAAY,UACX,aAAa,iBACN,cAAc;4BAiBM,cAAc;8BAmC1C,kBAAkB,iBACV,cAAc;8BApBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;4CAuDsB,cAAc;sCAgB5C,gBAAgB,iBACtB,cAAc;sCAgBW,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;2BAnDxD,kBAAkB,iBACV,cAAc;0BA2DtB,iBAAiB,iBACT,cAAc;gCAmBb,0BAA0B,CAAC,eAAe,CAAC,iBAC5C,cAAc;kCAcY,cAAc;0CAWN,cAAc;CAmCjE,CAAC"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,4BAA4B,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EAEpB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,sBAAsB,EACtB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,UAAU,GACrB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;kBAkBJ,SAAS,iBAAgB,cAAc;oCAgB3B,sBAAsB,KAAG,MAAM;oCAW/B,sBAAsB,KAAG,MAAM;qBAY9D,YAAY,UACX,aAAa,iBACN,cAAc;4BAiBM,cAAc;8BAmC1C,kBAAkB,iBACV,cAAc;8BApBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;4CAuDsB,cAAc;sCAgB5C,gBAAgB,iBACtB,cAAc;sCAgBW,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;2BAnDxD,kBAAkB,iBACV,cAAc;0BA2DtB,iBAAiB,iBACT,cAAc;gCAmBb,0BAA0B,CAAC,eAAe,CAAC,iBAC5C,cAAc;kCAcY,cAAc;0CAWN,cAAc;CAmCjE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IntlayerConfig } from '@intlayer/config/client';
2
- import type { AddDictionaryBody, DeleteDictionaryParam, GetDictionariesParams, GetDictionaryParams, GetDictionaryQuery, PushDictionariesBody, UpdateDictionaryBody, UpdateDictionaryParam } from '../types';
2
+ import type { AddDictionaryBody, AddDictionaryResult, DeleteDictionaryParam, DeleteDictionaryResult, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, PushDictionariesBody, PushDictionariesResult, UpdateDictionaryBody, UpdateDictionaryParam, UpdateDictionaryResult } from '../types';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getDictionaryAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/dictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,iBAAiB,EAEjB,qBAAqB,EAGrB,qBAAqB,EAErB,mBAAmB,EACnB,kBAAkB,EAElB,oBAAoB,EAEpB,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,gBAAgB,GAC3B,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;gCAkBnB,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;0BAftB,iBAAiB,iBACT,cAAc;qCA+Bd,qBAAqB,CAAC,cAAc,CAAC,cACvC,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAoB/B,CAAC"}
1
+ {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/dictionary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,gBAAgB,GAC3B,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;gCAkBnB,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;0BAftB,iBAAiB,iBACT,cAAc;qCA+Bd,qBAAqB,CAAC,cAAc,CAAC,cACvC,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAoB/B,CAAC"}
@@ -2,86 +2,87 @@ import type { IntlayerConfig } from '@intlayer/config/client';
2
2
  import type { FetcherOptions } from '../fetcher';
3
3
  export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
4
4
  organization: {
5
- getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
6
- getOrganization: (organizationId: GetOrganizationParam, otherOptions?: FetcherOptions) => Promise<GetOrganizationResult>;
7
- addOrganization: (organization: AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationResult>;
8
- addOrganizationMember: (body: AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationMemberResult>;
9
- updateOrganization: (organization: UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationResult>;
10
- updateOrganizationMembers: (body: UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationMembersResult>;
11
- deleteOrganization: (otherOptions?: FetcherOptions) => Promise<DeleteOrganizationResult>;
12
- selectOrganization: (organizationId: SelectOrganizationParam, otherOptions?: FetcherOptions) => Promise<SelectOrganizationResult>;
13
- unselectOrganization: (otherOptions?: FetcherOptions) => Promise<UnselectOrganizationResult>;
5
+ getOrganizations: (filters?: import("@intlayer/backend").GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationsResult>;
6
+ getOrganization: (organizationId: import("@intlayer/backend").GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationResult>;
7
+ addOrganization: (organization: import("@intlayer/backend").AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationResult>;
8
+ addOrganizationMember: (body: import("@intlayer/backend").AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationMemberResult>;
9
+ updateOrganization: (organization: import("@intlayer/backend").UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationResult>;
10
+ updateOrganizationMembers: (body: import("@intlayer/backend").UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationMembersResult>;
11
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteOrganizationResult>;
12
+ selectOrganization: (organizationId: import("@intlayer/backend").SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectOrganizationResult>;
13
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectOrganizationResult>;
14
14
  };
15
15
  project: {
16
- getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
17
- addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
18
- updateProject: (project: UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectResult>;
19
- updateProjectMembers: (body: UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectMembersResult>;
20
- pushProjectConfiguration: (projectConfiguration: PushProjectConfigurationBody, otherOptions?: FetcherOptions) => Promise<PushProjectConfigurationResult>;
21
- deleteProject: (otherOptions?: FetcherOptions) => Promise<DeleteProjectResult>;
22
- selectProject: (projectId: SelectProjectParam, otherOptions?: FetcherOptions) => Promise<SelectProjectResult>;
23
- unselectProject: (otherOptions?: FetcherOptions) => Promise<UnselectProjectResult>;
24
- addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
25
- deleteAccessKey: (clientId: DeleteAccessKeyBody, otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
26
- refreshAccessKey: (clientId: RefreshAccessKeyBody, otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
16
+ getProjects: (filters?: import("@intlayer/backend").GetProjectsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetProjectsResult>;
17
+ addProject: (project: import("@intlayer/backend").AddProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddProjectResult>;
18
+ updateProject: (project: import("@intlayer/backend").UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectResult>;
19
+ updateProjectMembers: (body: import("@intlayer/backend").UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectMembersResult>;
20
+ pushProjectConfiguration: (projectConfiguration: import("@intlayer/backend").PushProjectConfigurationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").PushProjectConfigurationResult>;
21
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteProjectResult>;
22
+ selectProject: (projectId: import("@intlayer/backend").SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectProjectResult>;
23
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectProjectResult>;
24
+ addNewAccessKey: (accessKey: import("@intlayer/backend").AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddNewAccessKeyResponse>;
25
+ deleteAccessKey: (clientId: import("@intlayer/backend").DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteAccessKeyResponse>;
26
+ refreshAccessKey: (clientId: import("@intlayer/backend").RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RefreshAccessKeyResponse>;
27
27
  };
28
28
  user: {
29
- createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
30
- getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
31
- getUserById: (userId: GetUserByIdParams, otherOptions?: FetcherOptions) => Promise<GetUserByIdResult>;
32
- getUserByAccount: (providerAccountId: GetUserByAccountParams, provider: GetUserByAccountParams, otherOptions?: FetcherOptions) => Promise<GetUserByAccountResult>;
33
- getUserByEmail: (email: GetUserByEmailParams, otherOptions?: FetcherOptions) => Promise<GetUserByEmailResult>;
34
- updateUser: (user: UpdateUserBody, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
35
- deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
29
+ createUser: (user: import("@intlayer/backend").CreateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateUserResult>;
30
+ getUsers: (filters?: import("@intlayer/backend").GetUsersParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUsersResult>;
31
+ getUserById: (userId: import("@intlayer/backend").GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByIdResult>;
32
+ getUserByAccount: (providerAccountId: import("@intlayer/backend").GetUserByAccountParams["providerAccountId"], provider: import("@intlayer/backend").GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByAccountResult>;
33
+ getUserByEmail: (email: import("@intlayer/backend").GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByEmailResult>;
34
+ updateUser: (user: import("@intlayer/backend").UpdateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
35
+ deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
36
36
  };
37
37
  auth: {
38
- login: (user: LoginBody, otherOptions?: FetcherOptions) => Promise<LoginResult>;
39
- getLoginWithGitHubURL: (params: GithubLoginQueryParams) => string;
40
- getLoginWithGoogleURL: (params: GoogleLoginQueryParams) => string;
41
- register: (user: RegisterBody, query?: RegisterQuery, otherOptions?: FetcherOptions) => Promise<RegisterResult>;
38
+ login: (user: import("@intlayer/backend").LoginBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").LoginResult>;
39
+ getLoginWithGitHubURL: (params: import("@intlayer/backend").GithubLoginQueryParams) => string;
40
+ getLoginWithGoogleURL: (params: import("@intlayer/backend").GoogleLoginQueryParams) => string;
41
+ register: (user: import("@intlayer/backend").RegisterBody, query?: import("@intlayer/backend").RegisterQuery, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RegisterResult>;
42
42
  logout: (otherOptions?: FetcherOptions) => Promise<void>;
43
- defineNewPassword: (data: DefinePasswordBody, otherOptions?: FetcherOptions) => Promise<DefinePasswordResult>;
44
- askResetPassword: (email: AskResetPasswordBody, otherOptions?: FetcherOptions) => Promise<AskResetPasswordResult>;
45
- checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<CheckIfUserHasPasswordResult>;
46
- verifyEmail: ({ userId, secret }: ValidEmailParams, otherOptions?: FetcherOptions) => Promise<ValidEmailResult>;
47
- getVerifyEmailStatusURL: (userId: string | UserAPI) => string;
48
- changePassword: (data: UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<UpdatePasswordResult>;
49
- createSession: (data: CreateSessionBody, otherOptions?: FetcherOptions) => Promise<CreateSessionResult>;
50
- getSession: (sessionToken?: GetSessionInformationQuery, otherOptions?: FetcherOptions) => Promise<GetSessionInformationResult>;
51
- getCSRFToken: (otherOptions?: FetcherOptions) => Promise<SetCSRFTokenResult>;
52
- getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<GetOAuth2TokenResult>;
43
+ defineNewPassword: (data: import("@intlayer/backend").DefinePasswordBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DefinePasswordResult>;
44
+ askResetPassword: (email: import("@intlayer/backend").AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskResetPasswordResult>;
45
+ checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CheckIfUserHasPasswordResult>;
46
+ verifyEmail: ({ userId, secret }: import("@intlayer/backend").ValidEmailParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ValidEmailResult>;
47
+ getVerifyEmailStatusURL: (userId: string | import("@intlayer/backend").UserAPI["_id"]) => string;
48
+ changePassword: (data: import("@intlayer/backend").UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdatePasswordResult>;
49
+ createSession: (data: import("@intlayer/backend").CreateSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateSessionResult>;
50
+ getSession: (sessionToken?: import("@intlayer/backend").GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetSessionInformationResult>;
51
+ getCSRFToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SetCSRFTokenResult>;
52
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOAuth2TokenResult>;
53
53
  };
54
54
  dictionary: {
55
- getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
56
- getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
57
- getDictionary: (dictionaryKey: GetDictionaryParams, version?: GetDictionaryQuery, otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
58
- pushDictionaries: (dictionaries: PushDictionariesBody, otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
59
- addDictionary: (body: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
60
- updateDictionary: (dictionaryId: UpdateDictionaryParam, dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
61
- deleteDictionary: (id: DeleteDictionaryParam, otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
55
+ getDictionaries: (filters?: import("@intlayer/backend").GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesResult>;
56
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesKeysResult>;
57
+ getDictionary: (dictionaryKey: import("@intlayer/backend").GetDictionaryParams["dictionaryKey"], version?: import("@intlayer/backend").GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionaryResult>;
58
+ pushDictionaries: (dictionaries: import("@intlayer/backend").PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").PushDictionariesResult>;
59
+ addDictionary: (body: import("@intlayer/backend").AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddDictionaryResult>;
60
+ updateDictionary: (dictionaryId: import("@intlayer/backend").UpdateDictionaryParam["dictionaryId"], dictionary: import("@intlayer/backend").UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateDictionaryResult>;
61
+ deleteDictionary: (id: import("@intlayer/backend").DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteDictionaryResult>;
62
62
  };
63
63
  stripe: {
64
- getPricing: (body?: GetPricingBody, otherOptions?: FetcherOptions) => Promise<GetPricingResult>;
65
- getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
66
- cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
64
+ getPricing: (body?: import("@intlayer/backend").GetPricingBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetPricingResult>;
65
+ getSubscription: (body?: import("@intlayer/backend").GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
66
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
67
67
  };
68
68
  ai: {
69
- translateJSON: (body?: TranslateJSONBody, otherOptions?: FetcherOptions) => Promise<TranslateJSONResult>;
70
- auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
71
- auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
72
- auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
73
- auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
69
+ customQuery: (body?: import("@intlayer/backend").CustomQueryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CustomQueryResult>;
70
+ translateJSON: (body?: import("@intlayer/backend").TranslateJSONBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").TranslateJSONResult>;
71
+ auditContentDeclaration: (body?: import("@intlayer/backend").AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationResult>;
72
+ auditContentDeclarationField: (body?: import("@intlayer/backend").AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationFieldResult>;
73
+ auditContentDeclarationMetadata: (body?: import("@intlayer/backend").AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationMetadataResult>;
74
+ auditTag: (body?: import("@intlayer/backend").AuditTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditTagResult>;
74
75
  askDocQuestion: (body?: import("./ai").AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<void>;
75
- autocomplete: (body?: AutocompleteBody, otherOptions?: FetcherOptions) => Promise<AutocompleteResponse>;
76
+ autocomplete: (body?: import("@intlayer/backend").AutocompleteBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AutocompleteResponse>;
76
77
  };
77
78
  tag: {
78
- getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
79
- addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
80
- updateTag: (tagId: UpdateTagParams, tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
81
- deleteTag: (tagId: DeleteTagParams, otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
79
+ getTags: (filters?: import("@intlayer/backend").GetTagsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetTagsResult>;
80
+ addTag: (tag: import("@intlayer/backend").AddTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddTagResult>;
81
+ updateTag: (tagId: import("@intlayer/backend").UpdateTagParams["tagId"], tag: import("@intlayer/backend").UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateTagResult>;
82
+ deleteTag: (tagId: import("@intlayer/backend").DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteTagResult>;
82
83
  };
83
84
  search: {
84
- searchDoc: (params?: SearchDocUtilParams, otherOptions?: FetcherOptions) => Promise<SearchDocUtilResult>;
85
+ searchDoc: (params?: import("@intlayer/backend").SearchDocUtilParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SearchDocUtilResult>;
85
86
  };
86
87
  editor: {
87
88
  getDictionaries: (otherOptions?: FetcherOptions) => Promise<Record<string, any>>;
@@ -89,9 +90,9 @@ export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerC
89
90
  writeDictionary: (dictionary: import("intlayer-editor").WriteContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import("intlayer-editor").WriteContentDeclarationResult>;
90
91
  };
91
92
  newsletter: {
92
- subscribeToNewsletter: (body: NewsletterSubscriptionBody, otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
93
- unsubscribeFromNewsletter: (body: NewsletterUnsubscriptionBody, otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
94
- getNewsletterStatus: (otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
93
+ subscribeToNewsletter: (body: import("@intlayer/backend").NewsletterSubscriptionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").NewsletterSubscriptionResult>;
94
+ unsubscribeFromNewsletter: (body: import("@intlayer/backend").NewsletterUnsubscriptionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").NewsletterSubscriptionResult>;
95
+ getNewsletterStatus: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").NewsletterSubscriptionResult>;
95
96
  };
96
97
  };
97
98
  export type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAajD,eAAO,MAAM,cAAc,GACzB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa/B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAajD,eAAO,MAAM,cAAc,GACzB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa/B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IntlayerConfig } from '@intlayer/config/client';
2
- import type { NewsletterSubscriptionBody, NewsletterUnsubscriptionBody } from '../types';
2
+ import type { NewsletterSubscriptionBody, NewsletterSubscriptionResult, NewsletterUnsubscriptionBody } from '../types';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getNewsletterAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  subscribeToNewsletter: (body: NewsletterSubscriptionBody, otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"newsletter.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/newsletter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,0BAA0B,EAE1B,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,gBAAgB,GAC3B,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;kCAmBvB,0BAA0B,iBAClB,cAAc;sCAkBtB,4BAA4B,iBACpB,cAAc;yCAgBmB,cAAc;CAehE,CAAC"}
1
+ {"version":3,"file":"newsletter.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/newsletter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,gBAAgB,GAC3B,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;kCAmBvB,0BAA0B,iBAClB,cAAc;sCAkBtB,4BAA4B,iBACpB,cAAc;yCAgBmB,cAAc;CAehE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IntlayerConfig } from '@intlayer/config/client';
2
- import type { AddOrganizationBody, AddOrganizationMemberBody, GetOrganizationParam, GetOrganizationsParams, SelectOrganizationParam, UpdateOrganizationBody, UpdateOrganizationMembersBody } from '../types';
2
+ import type { AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, DeleteOrganizationResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, SelectOrganizationParam, SelectOrganizationResult, UnselectOrganizationResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult } from '../types';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getOrganizationAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/organization.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAIzB,oBAAoB,EAEpB,sBAAsB,EAEtB,uBAAuB,EAGvB,sBAAsB,EACtB,6BAA6B,EAG9B,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,kBAAkB,GAC7B,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;iCAkBnB,sBAAsB,iBAClB,cAAc;sCAgBZ,oBAAoB,CAAC,gBAAgB,CAAC,iBACxC,cAAc;oCAad,mBAAmB,iBACnB,cAAc;kCAqDtB,yBAAyB,iBACjB,cAAc;uCArCd,sBAAsB,iBACtB,cAAc;sCAiBtB,6BAA6B,iBACrB,cAAc;wCAkCkB,cAAc;yCAe5C,uBAAuB,CAAC,gBAAgB,CAAC,iBAC3C,cAAc;0CAeoB,cAAc;CAqBjE,CAAC"}
1
+ {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/organization.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,6BAA6B,EAC7B,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,kBAAkB,GAC7B,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;iCAkBnB,sBAAsB,iBAClB,cAAc;sCAgBZ,oBAAoB,CAAC,gBAAgB,CAAC,iBACxC,cAAc;oCAad,mBAAmB,iBACnB,cAAc;kCAqDtB,yBAAyB,iBACjB,cAAc;uCArCd,sBAAsB,iBACtB,cAAc;sCAiBtB,6BAA6B,iBACrB,cAAc;wCAkCkB,cAAc;yCAe5C,uBAAuB,CAAC,gBAAgB,CAAC,iBAC3C,cAAc;0CAeoB,cAAc;CAqBjE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IntlayerConfig } from '@intlayer/config/client';
2
- import type { AddNewAccessKeyBody, AddProjectBody, DeleteAccessKeyBody, GetProjectsParams, PushProjectConfigurationBody, RefreshAccessKeyBody, SelectProjectParam, UpdateProjectBody, UpdateProjectMembersBody } from '../types';
2
+ import type { AddNewAccessKeyBody, AddNewAccessKeyResponse, AddProjectBody, AddProjectResult, DeleteAccessKeyBody, DeleteAccessKeyResponse, DeleteProjectResult, GetProjectsParams, GetProjectsResult, PushProjectConfigurationBody, PushProjectConfigurationResult, RefreshAccessKeyBody, RefreshAccessKeyResponse, SelectProjectParam, SelectProjectResult, UnselectProjectResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult } from '../types';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/project.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EAEnB,cAAc,EAEd,mBAAmB,EAGnB,iBAAiB,EAEjB,4BAA4B,EAE5B,oBAAoB,EAEpB,kBAAkB,EAGlB,iBAAiB,EACjB,wBAAwB,EAGzB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,M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Aee,cAAc;iCAiB9C,mBAAmB,iBAChB,cAAc;gCAmBlB,mBAAmB,CAAC,UAAU,CAAC,iBAC3B,cAAc;iCAmBlB,oBAAoB,CAAC,UAAU,CAAC,iBAC5B,cAAc;CAyB/B,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { SearchDocUtilParams } from '../types';
1
+ import type { SearchDocUtilParams, SearchDocUtilResult } from '../types';
2
2
  import type { IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getSearchAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAuB,MAAM,UAAU,CAAC;AAGzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,YAAY,GACvB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;yBAmBpB,mBAAmB,iBACd,cAAc;CAe/B,CAAC"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAGzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,YAAY,GACvB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;yBAmBpB,mBAAmB,iBACd,cAAc;CAe/B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IntlayerConfig } from '@intlayer/config/client';
2
- import type { GetCheckoutSessionBody, GetPricingBody } from '../types';
2
+ import type { GetCheckoutSessionBody, GetCheckoutSessionResult, GetPricingBody, GetPricingResult } from '../types';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getStripeAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getPricing: (body?: GetPricingBody, otherOptions?: FetcherOptions) => Promise<GetPricingResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/stripe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,sBAAsB,EAEtB,cAAc,EAEf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,YAAY,GACvB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;wBAkBtB,cAAc,iBACP,cAAc;6BAiBrB,sBAAsB,iBACf,cAAc;wCAgBkB,cAAc;CAe/D,CAAC"}
1
+ {"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/stripe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACxB,cAAc,EACd,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,YAAY,GACvB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;wBAkBtB,cAAc,iBACP,cAAc;6BAiBrB,sBAAsB,iBACf,cAAc;wCAgBkB,cAAc;CAe/D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IntlayerConfig } from '@intlayer/config/client';
2
- import type { AddTagBody, DeleteTagParams, GetTagsParams, UpdateTagBody, UpdateTagParams } from '../types';
2
+ import type { AddTagBody, AddTagResult, DeleteTagParams, DeleteTagResult, GetTagsParams, GetTagsResult, UpdateTagBody, UpdateTagParams, UpdateTagResult } from '../types';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getTagAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/tag.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,UAAU,EAEV,eAAe,EAEf,aAAa,EAEb,aAAa,EACb,eAAe,EAEhB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,SAAS,GACpB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;wBAkBnB,aAAa,iBACT,cAAc;kBAeH,UAAU,iBAAgB,cAAc;uBAgB1D,eAAe,CAAC,OAAO,CAAC,OAC1B,aAAa,iBACJ,cAAc;uBAiBrB,eAAe,CAAC,OAAO,CAAC,iBAEjB,cAAc;CAiB/B,CAAC"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/tag.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,SAAS,GACpB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;wBAkBnB,aAAa,iBACT,cAAc;kBAeH,UAAU,iBAAgB,cAAc;uBAgB1D,eAAe,CAAC,OAAO,CAAC,OAC1B,aAAa,iBACJ,cAAc;uBAiBrB,eAAe,CAAC,OAAO,CAAC,iBAEjB,cAAc;CAiB/B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type IntlayerConfig } from '@intlayer/config/client';
2
- import type { CreateUserBody, GetUserByAccountParams, GetUserByEmailParams, GetUserByIdParams, GetUsersParams, UpdateUserBody } from '../types';
2
+ import type { CreateUserBody, CreateUserResult, GetUserByAccountParams, GetUserByAccountResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, UpdateUserBody, UpdateUserResult } from '../types';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getUserAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/user.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,cAAc,EAEd,sBAAsB,EAEtB,oBAAoB,EAEpB,iBAAiB,EAEjB,cAAc,EAEd,cAAc,EAEf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,UAAU,GACrB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;uBAmFvB,cAAc,iBACN,cAAc;yBAjElB,cAAc,iBACV,cAAc;0BAiBpB,iBAAiB,CAAC,QAAQ,CAAC,iBACrB,cAAc;0CA6BT,sBAAsB,CAAC,mBAAmB,CAAC,YACpD,sBAAsB,CAAC,UAAU,CAAC,iBAC9B,cAAc;4BAjBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;uBAiDtB,cAAc,iBACN,cAAc;yBAkBpB,MAAM,iBACA,cAAc;CAoB/B,CAAC"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/user.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,UAAU,GACrB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;uBAmFvB,cAAc,iBACN,cAAc;yBAjElB,cAAc,iBACV,cAAc;0BAiBpB,iBAAiB,CAAC,QAAQ,CAAC,iBACrB,cAAc;0CA6BT,sBAAsB,CAAC,mBAAmB,CAAC,YACpD,sBAAsB,CAAC,UAAU,CAAC,iBAC9B,cAAc;4BAjBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;uBAiDtB,cAAc,iBACN,cAAc;yBAkBpB,MAAM,iBACA,cAAc;CAoB/B,CAAC"}
@@ -11,5 +11,5 @@ export * from './getIntlayerAPI/stripe';
11
11
  export * from './getIntlayerAPI/tag';
12
12
  export * from './getIntlayerAPI/user';
13
13
  export * from './IntlayerEventListener';
14
- export type { AIOptions } from '@intlayer/backend';
14
+ export * from './types';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AAGxC,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC"}
@@ -2,6 +2,6 @@
2
2
  * This file re-exports all types to allow non-blocking build because
3
3
  * the backend and intlayer-editor are not built yet.
4
4
  */
5
- export type { AddDictionaryBody, AddDictionaryResult, AddNewAccessKeyBody, AddNewAccessKeyResponse, AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, AddProjectBody, AddProjectResult, AddTagBody, AddTagResult, AskDocQuestionResult, AskResetPasswordBody, AskResetPasswordResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult, AutocompleteBody, AutocompleteResponse, ChatCompletionRequestMessage, CheckIfUserHasPasswordResult, CreateSessionBody, CreateSessionResult, CreateUserBody, CreateUserResult, DefinePasswordBody, DefinePasswordResult, DeleteAccessKeyBody, DeleteAccessKeyResponse, DeleteDictionaryParam, DeleteDictionaryResult, DeleteOrganizationResult, DeleteProjectResult, DeleteTagParams, DeleteTagResult, GetCheckoutSessionBody, GetCheckoutSessionResult, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetOAuth2TokenBody, GetOAuth2TokenResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, GetPricingBody, GetPricingResult, GetProjectsParams, GetProjectsResult, GetSessionInformationQuery, GetSessionInformationResult, GetTagsParams, GetTagsResult, GetUserByAccountParams, GetUserByAccountResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, GithubLoginQueryParams, GoogleLoginQueryParams, LoginBody, LoginResult, NewsletterSubscriptionBody, NewsletterSubscriptionResult, NewsletterUnsubscriptionBody, PushDictionariesBody, PushDictionariesResult, PushProjectConfigurationBody, PushProjectConfigurationResult, RefreshAccessKeyBody, RefreshAccessKeyResponse, RegisterBody, RegisterQuery, RegisterResult, SearchDocUtilParams, SearchDocUtilResult, SelectOrganizationParam, SelectOrganizationResult, SelectProjectParam, SelectProjectResult, SetCSRFTokenResult, TranslateJSONBody, TranslateJSONResult, UnselectOrganizationResult, UnselectProjectResult, UpdateDictionaryBody, UpdateDictionaryParam, UpdateDictionaryResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult, UpdatePasswordBody, UpdatePasswordResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult, UpdateTagBody, UpdateTagParams, UpdateTagResult, UpdateUserBody, UpdateUserResult, UserAPI, ValidEmailParams, ValidEmailResult, } from '@intlayer/backend';
5
+ export type { AIOptions, AIProvider, AddDictionaryBody, AddDictionaryResult, AddNewAccessKeyBody, AddNewAccessKeyResponse, AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, AddProjectBody, AddProjectResult, AddTagBody, AddTagResult, AskDocQuestionResult, AskResetPasswordBody, AskResetPasswordResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult, AutocompleteBody, AutocompleteResponse, ChatCompletionRequestMessage, CheckIfUserHasPasswordResult, CreateSessionBody, CreateSessionResult, CreateUserBody, CreateUserResult, CustomQueryBody, CustomQueryResult, DefinePasswordBody, DefinePasswordResult, DeleteAccessKeyBody, DeleteAccessKeyResponse, DeleteDictionaryParam, DeleteDictionaryResult, DeleteOrganizationResult, DeleteProjectResult, DeleteTagParams, DeleteTagResult, GetCheckoutSessionBody, GetCheckoutSessionResult, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetOAuth2TokenBody, GetOAuth2TokenResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, GetPricingBody, GetPricingResult, GetProjectsParams, GetProjectsResult, GetSessionInformationQuery, GetSessionInformationResult, GetTagsParams, GetTagsResult, GetUserByAccountParams, GetUserByAccountResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, GithubLoginQueryParams, GoogleLoginQueryParams, LoginBody, LoginResult, Messages, NewsletterSubscriptionBody, NewsletterSubscriptionResult, NewsletterUnsubscriptionBody, PushDictionariesBody, PushDictionariesResult, PushProjectConfigurationBody, PushProjectConfigurationResult, RefreshAccessKeyBody, RefreshAccessKeyResponse, RegisterBody, RegisterQuery, RegisterResult, SearchDocUtilParams, SearchDocUtilResult, SelectOrganizationParam, SelectOrganizationResult, SelectProjectParam, SelectProjectResult, SetCSRFTokenResult, TranslateJSONBody, TranslateJSONResult, UnselectOrganizationResult, UnselectProjectResult, UpdateDictionaryBody, UpdateDictionaryParam, UpdateDictionaryResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult, UpdatePasswordBody, UpdatePasswordResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult, UpdateTagBody, UpdateTagParams, UpdateTagResult, UpdateUserBody, UpdateUserResult, UserAPI, ValidEmailParams, ValidEmailResult, } from '@intlayer/backend';
6
6
  export type { GetConfigurationResult, WriteContentDeclarationBody, WriteContentDeclarationResult, } from 'intlayer-editor';
7
7
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,EACnC,qCAAqC,EACrC,6BAA6B,EAC7B,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,2BAA2B,EAC3B,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,SAAS,EACT,WAAW,EACX,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,+BAA+B,EAC/B,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,YAAY,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACn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B,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,+BAA+B,EAC/B,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/api",
3
- "version": "5.5.10",
3
+ "version": "5.6.0",
4
4
  "private": false,
5
5
  "description": "SDK for interacting with the Intlayer API, enabling content auditing, and managing organizations, projects, and users.",
6
6
  "keywords": [
@@ -58,7 +58,7 @@
58
58
  "./package.json"
59
59
  ],
60
60
  "dependencies": {
61
- "@intlayer/config": "5.5.10"
61
+ "@intlayer/config": "5.6.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@changesets/changelog-github": "0.5.1",
@@ -72,15 +72,16 @@
72
72
  "tsc-alias": "^1.8.16",
73
73
  "tsup": "^8.5.0",
74
74
  "typescript": "^5.8.3",
75
+ "vitest": "^3.2.2",
76
+ "@utils/eslint-config": "1.0.4",
75
77
  "@utils/ts-config-types": "1.0.4",
76
- "@utils/ts-config": "1.0.4",
77
78
  "@utils/tsup-config": "1.0.4",
78
- "@intlayer/backend": "5.5.10",
79
- "@utils/eslint-config": "1.0.4",
80
- "intlayer-editor": "5.5.10"
79
+ "@intlayer/backend": "5.6.0",
80
+ "@utils/ts-config": "1.0.4",
81
+ "intlayer-editor": "5.6.0"
81
82
  },
82
83
  "peerDependencies": {
83
- "@intlayer/config": "5.5.10"
84
+ "@intlayer/config": "5.6.0"
84
85
  },
85
86
  "engines": {
86
87
  "node": ">=14.18"
@@ -99,7 +100,8 @@
99
100
  "prettier": "prettier . --check",
100
101
  "prettier:fix": "prettier . --write",
101
102
  "reset": "pnpm clean & pnpm build",
102
- "test": "",
103
+ "test": "vitest run",
104
+ "test:watch": "vitest",
103
105
  "typecheck": "tsup --project ./tsconfig.json --noEmit"
104
106
  }
105
107
  }