@intlayer/api 5.0.6 → 5.1.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.
@@ -21,8 +21,8 @@ __export(IntlayerEventListener_exports, {
21
21
  IntlayerEventListener: () => IntlayerEventListener
22
22
  });
23
23
  module.exports = __toCommonJS(IntlayerEventListener_exports);
24
- var import_api = require("@intlayer/api");
25
24
  var import_client = require("@intlayer/config/client");
25
+ var import_getIntlayerAPI = require('./getIntlayerAPI/index.cjs');
26
26
  class IntlayerEventListener {
27
27
  constructor(intlayerConfig) {
28
28
  this.intlayerConfig = intlayerConfig;
@@ -48,7 +48,7 @@ class IntlayerEventListener {
48
48
  try {
49
49
  const config = this.intlayerConfig ?? (0, import_client.getConfiguration)();
50
50
  const { backendURL } = config.editor;
51
- const oAuth2TokenResult = await import_api.intlayerAPI.auth.getOAuth2AccessToken();
51
+ const oAuth2TokenResult = await import_getIntlayerAPI.intlayerAPI.auth.getOAuth2AccessToken();
52
52
  const accessToken = oAuth2TokenResult.data?.accessToken;
53
53
  if (!accessToken) {
54
54
  throw new Error("Failed to retrieve access token");
@@ -71,7 +71,6 @@ class IntlayerEventListener {
71
71
  if (this.eventSource) {
72
72
  this.eventSource.close();
73
73
  this.eventSource = null;
74
- console.log("IntlayerEventListener cleaned up.");
75
74
  }
76
75
  }
77
76
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/IntlayerEventListener.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { intlayerAPI } from '@intlayer/api';\n// @ts-ignore: @intlayer/backend is not built yet\nimport { DictionaryAPI } from '@intlayer/backend';\nimport { getConfiguration, IntlayerConfig } from '@intlayer/config/client';\n// @ts-ignore @intlayer/backend is not built yet\n\nexport type DictionaryMessageEvent = {\n object: 'DICTIONARY';\n dictionary: DictionaryAPI;\n status: 'ADDED' | 'UPDATED' | 'DELETED' | 'CREATED';\n};\n\nexport type IntlayerMessageEvent = MessageEvent<DictionaryMessageEvent[]>;\n\n/**\n * IntlayerEventListener class to listen for dictionary changes via SSE (Server-Sent Events).\n *\n * Usage example:\n *\n * import { buildIntlayerDictionary } from './transpiler/declaration_file_to_dictionary/intlayer_dictionary';\n * import { IntlayerEventListener } from '@intlayer/api';\n *\n * export const checkDictionaryChanges = async () => {\n * // Instantiate the listener\n * const eventListener = new IntlayerEventListener();\n *\n * // Set up your callbacks\n * eventListener.onDictionaryChange = async (dictionary) => {\n * await buildIntlayerDictionary(dictionary);\n * };\n *\n * // Initialize the listener\n * await eventListener.initialize();\n *\n * // Optionally, clean up later when you’re done\n * // eventListener.cleanup();\n * };\n */\nexport class IntlayerEventListener {\n private eventSource: EventSource | null = null;\n\n /**\n * Callback triggered when a Dictionary is ADDED.\n */\n public onDictionaryAdded?: (dictionary: DictionaryAPI) => any;\n\n /**\n * Callback triggered when a Dictionary is UPDATED.\n */\n public onDictionaryChange?: (dictionary: DictionaryAPI) => any;\n\n /**\n * Callback triggered when a Dictionary is DELETED.\n */\n public onDictionaryDeleted?: (dictionary: DictionaryAPI) => any;\n\n constructor(private intlayerConfig?: IntlayerConfig) {}\n\n /**\n * Initializes the EventSource connection using the given intlayerConfig\n * (or the default config if none was provided).\n */\n public async initialize(): Promise<void> {\n try {\n const config = this.intlayerConfig ?? getConfiguration();\n const { backendURL } = config.editor;\n\n // Retrieve the access token\n const oAuth2TokenResult = await intlayerAPI.auth.getOAuth2AccessToken();\n const accessToken = oAuth2TokenResult.data?.accessToken;\n\n if (!accessToken) {\n throw new Error('Failed to retrieve access token');\n }\n\n if (oAuth2TokenResult.data?.organization.plan?.type !== 'ENTERPRISE')\n return;\n\n const API_ROUTE = `${backendURL}/api/event-listener`;\n const url = `${API_ROUTE}/${accessToken}`;\n\n this.eventSource = new EventSource(url);\n this.eventSource.onmessage = (event) => this.handleMessage(event);\n this.eventSource.onerror = (event) => this.handleError(event);\n } catch (error) {\n console.error('Error initializing IntlayerEventListener:', error);\n }\n }\n\n /**\n * Cleans up (closes) the EventSource connection.\n */\n public cleanup(): void {\n if (this.eventSource) {\n this.eventSource.close();\n this.eventSource = null;\n console.log('IntlayerEventListener cleaned up.');\n }\n }\n\n /**\n * Handles incoming SSE messages, parses the event data,\n * and invokes the appropriate callback.\n */\n private async handleMessage(event: IntlayerMessageEvent): Promise<void> {\n try {\n const { data } = event;\n for (const dataEl of data) {\n switch (dataEl.object) {\n case 'DICTIONARY':\n switch (dataEl.status) {\n case 'ADDED':\n await this.onDictionaryAdded?.(dataEl.dictionary);\n break;\n case 'UPDATED':\n await this.onDictionaryChange?.(dataEl.dictionary);\n break;\n case 'DELETED':\n await this.onDictionaryDeleted?.(dataEl.dictionary);\n break;\n default:\n console.error('Unhandled dictionary status:', dataEl.status);\n break;\n }\n break;\n default:\n console.error('Unknown object type:', dataEl.object);\n break;\n }\n }\n } catch (error) {\n console.error('Error processing dictionary update:', error);\n }\n }\n\n /**\n * Handles any SSE errors and then performs cleanup.\n */\n private handleError(event: Event): void {\n console.error('EventSource error:', event);\n this.cleanup();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAA4B;AAG5B,oBAAiD;AAmC1C,MAAM,sBAAsB;AAAA,EAkBjC,YAAoB,gBAAiC;AAAjC;AAAA,EAAkC;AAAA,EAjB9C,cAAkC;AAAA;AAAA;AAAA;AAAA,EAKnC;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQP,MAAa,aAA4B;AACvC,QAAI;AACF,YAAM,SAAS,KAAK,sBAAkB,gCAAiB;AACvD,YAAM,EAAE,WAAW,IAAI,OAAO;AAG9B,YAAM,oBAAoB,MAAM,uBAAY,KAAK,qBAAqB;AACtE,YAAM,cAAc,kBAAkB,MAAM;AAE5C,UAAI,CAAC,aAAa;AAChB,cAAM,IAAI,MAAM,iCAAiC;AAAA,MACnD;AAEA,UAAI,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"version":3,"sources":["../../src/IntlayerEventListener.ts"],"sourcesContent":["// @ts-ignore: @intlayer/backend is not built yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport { type IntlayerConfig, getConfiguration } from '@intlayer/config/client';\nimport { intlayerAPI } from './getIntlayerAPI';\n\nexport type DictionaryMessageEvent = {\n object: 'DICTIONARY';\n dictionary: DictionaryAPI;\n status: 'ADDED' | 'UPDATED' | 'DELETED' | 'CREATED';\n};\n\nexport type IntlayerMessageEvent = MessageEvent<DictionaryMessageEvent[]>;\n\n/**\n * IntlayerEventListener class to listen for dictionary changes via SSE (Server-Sent Events).\n *\n * Usage example:\n *\n * import { buildIntlayerDictionary } from './transpiler/declaration_file_to_dictionary/intlayer_dictionary';\n * import { IntlayerEventListener } from '@intlayer/api';\n *\n * export const checkDictionaryChanges = async () => {\n * // Instantiate the listener\n * const eventListener = new IntlayerEventListener();\n *\n * // Set up your callbacks\n * eventListener.onDictionaryChange = async (dictionary) => {\n * await buildIntlayerDictionary(dictionary);\n * };\n *\n * // Initialize the listener\n * await eventListener.initialize();\n *\n * // Optionally, clean up later when you’re done\n * // eventListener.cleanup();\n * };\n */\nexport class IntlayerEventListener {\n private eventSource: EventSource | null = null;\n\n /**\n * Callback triggered when a Dictionary is ADDED.\n */\n public onDictionaryAdded?: (dictionary: DictionaryAPI) => any;\n\n /**\n * Callback triggered when a Dictionary is UPDATED.\n */\n public onDictionaryChange?: (dictionary: DictionaryAPI) => any;\n\n /**\n * Callback triggered when a Dictionary is DELETED.\n */\n public onDictionaryDeleted?: (dictionary: DictionaryAPI) => any;\n\n constructor(private intlayerConfig?: IntlayerConfig) {}\n\n /**\n * Initializes the EventSource connection using the given intlayerConfig\n * (or the default config if none was provided).\n */\n public async initialize(): Promise<void> {\n try {\n const config = this.intlayerConfig ?? getConfiguration();\n const { backendURL } = config.editor;\n\n // Retrieve the access token\n const oAuth2TokenResult = await intlayerAPI.auth.getOAuth2AccessToken();\n const accessToken = oAuth2TokenResult.data?.accessToken;\n\n if (!accessToken) {\n throw new Error('Failed to retrieve access token');\n }\n\n if (oAuth2TokenResult.data?.organization.plan?.type !== 'ENTERPRISE')\n return;\n\n const API_ROUTE = `${backendURL}/api/event-listener`;\n const url = `${API_ROUTE}/${accessToken}`;\n\n this.eventSource = new EventSource(url);\n this.eventSource.onmessage = (event) => this.handleMessage(event);\n this.eventSource.onerror = (event) => this.handleError(event);\n } catch (error) {\n console.error('Error initializing IntlayerEventListener:', error);\n }\n }\n\n /**\n * Cleans up (closes) the EventSource connection.\n */\n public cleanup(): void {\n if (this.eventSource) {\n this.eventSource.close();\n this.eventSource = null;\n }\n }\n\n /**\n * Handles incoming SSE messages, parses the event data,\n * and invokes the appropriate callback.\n */\n private async handleMessage(event: IntlayerMessageEvent): Promise<void> {\n try {\n const { data } = event;\n for (const dataEl of data) {\n switch (dataEl.object) {\n case 'DICTIONARY':\n switch (dataEl.status) {\n case 'ADDED':\n await this.onDictionaryAdded?.(dataEl.dictionary);\n break;\n case 'UPDATED':\n await this.onDictionaryChange?.(dataEl.dictionary);\n break;\n case 'DELETED':\n await this.onDictionaryDeleted?.(dataEl.dictionary);\n break;\n default:\n console.error('Unhandled dictionary status:', dataEl.status);\n break;\n }\n break;\n default:\n console.error('Unknown object type:', dataEl.object);\n break;\n }\n }\n } catch (error) {\n console.error('Error processing dictionary update:', error);\n }\n }\n\n /**\n * Handles any SSE errors and then performs cleanup.\n */\n private handleError(event: Event): void {\n console.error('EventSource error:', event);\n this.cleanup();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAAsD;AACtD,4BAA4B;AAkCrB,MAAM,sBAAsB;AAAA,EAkBjC,YAAoB,gBAAiC;AAAjC;AAAA,EAAkC;AAAA,EAjB9C,cAAkC;AAAA;AAAA;AAAA;AAAA,EAKnC;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AA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AwB,OAAO,MAAM;AACnD;AAAA,QACJ;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,cAAQ,MAAM,uCAAuC,KAAK;AAAA,IAC5D;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKQ,YAAY,OAAoB;AACtC,YAAQ,MAAM,sBAAsB,KAAK;AACzC,SAAK,QAAQ;AAAA,EACf;AACF;","names":[]}
@@ -1,5 +1,5 @@
1
- import { intlayerAPI } from "@intlayer/api";
2
1
  import { getConfiguration } from "@intlayer/config/client";
2
+ import { intlayerAPI } from "./getIntlayerAPI/index.mjs";
3
3
  class IntlayerEventListener {
4
4
  constructor(intlayerConfig) {
5
5
  this.intlayerConfig = intlayerConfig;
@@ -48,7 +48,6 @@ class IntlayerEventListener {
48
48
  if (this.eventSource) {
49
49
  this.eventSource.close();
50
50
  this.eventSource = null;
51
- console.log("IntlayerEventListener cleaned up.");
52
51
  }
53
52
  }
54
53
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/IntlayerEventListener.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { intlayerAPI } from '@intlayer/api';\n// @ts-ignore: @intlayer/backend is not built yet\nimport { DictionaryAPI } from '@intlayer/backend';\nimport { getConfiguration, IntlayerConfig } from '@intlayer/config/client';\n// @ts-ignore @intlayer/backend is not built yet\n\nexport type DictionaryMessageEvent = {\n object: 'DICTIONARY';\n dictionary: DictionaryAPI;\n status: 'ADDED' | 'UPDATED' | 'DELETED' | 'CREATED';\n};\n\nexport type IntlayerMessageEvent = MessageEvent<DictionaryMessageEvent[]>;\n\n/**\n * IntlayerEventListener class to listen for dictionary changes via SSE (Server-Sent Events).\n *\n * Usage example:\n *\n * import { buildIntlayerDictionary } from './transpiler/declaration_file_to_dictionary/intlayer_dictionary';\n * import { IntlayerEventListener } from '@intlayer/api';\n *\n * export const checkDictionaryChanges = async () => {\n * // Instantiate the listener\n * const eventListener = new IntlayerEventListener();\n *\n * // Set up your callbacks\n * eventListener.onDictionaryChange = async (dictionary) => {\n * await buildIntlayerDictionary(dictionary);\n * };\n *\n * // Initialize the listener\n * await eventListener.initialize();\n *\n * // Optionally, clean up later when you’re done\n * // eventListener.cleanup();\n * };\n */\nexport class IntlayerEventListener {\n private eventSource: EventSource | null = null;\n\n /**\n * Callback triggered when a Dictionary is ADDED.\n */\n public onDictionaryAdded?: (dictionary: DictionaryAPI) => any;\n\n /**\n * Callback triggered when a Dictionary is UPDATED.\n */\n public onDictionaryChange?: (dictionary: DictionaryAPI) => any;\n\n /**\n * Callback triggered when a Dictionary is DELETED.\n */\n public onDictionaryDeleted?: (dictionary: DictionaryAPI) => any;\n\n constructor(private intlayerConfig?: IntlayerConfig) {}\n\n /**\n * Initializes the EventSource connection using the given intlayerConfig\n * (or the default config if none was provided).\n */\n public async initialize(): Promise<void> {\n try {\n const config = this.intlayerConfig ?? getConfiguration();\n const { backendURL } = config.editor;\n\n // Retrieve the access token\n const oAuth2TokenResult = await intlayerAPI.auth.getOAuth2AccessToken();\n const accessToken = oAuth2TokenResult.data?.accessToken;\n\n if (!accessToken) {\n throw new Error('Failed to retrieve access token');\n }\n\n if (oAuth2TokenResult.data?.organization.plan?.type !== 'ENTERPRISE')\n return;\n\n const API_ROUTE = `${backendURL}/api/event-listener`;\n const url = `${API_ROUTE}/${accessToken}`;\n\n this.eventSource = new EventSource(url);\n this.eventSource.onmessage = (event) => this.handleMessage(event);\n this.eventSource.onerror = (event) => this.handleError(event);\n } catch (error) {\n console.error('Error initializing IntlayerEventListener:', error);\n }\n }\n\n /**\n * Cleans up (closes) the EventSource connection.\n */\n public cleanup(): void {\n if (this.eventSource) {\n this.eventSource.close();\n this.eventSource = null;\n console.log('IntlayerEventListener cleaned up.');\n }\n }\n\n /**\n * Handles incoming SSE messages, parses the event data,\n * and invokes the appropriate callback.\n */\n private async handleMessage(event: IntlayerMessageEvent): Promise<void> {\n try {\n const { data } = event;\n for (const dataEl of data) {\n switch (dataEl.object) {\n case 'DICTIONARY':\n switch (dataEl.status) {\n case 'ADDED':\n await this.onDictionaryAdded?.(dataEl.dictionary);\n break;\n case 'UPDATED':\n await this.onDictionaryChange?.(dataEl.dictionary);\n break;\n case 'DELETED':\n await this.onDictionaryDeleted?.(dataEl.dictionary);\n break;\n default:\n console.error('Unhandled dictionary status:', dataEl.status);\n break;\n }\n break;\n default:\n console.error('Unknown object type:', dataEl.object);\n break;\n }\n }\n } catch (error) {\n console.error('Error processing dictionary update:', error);\n }\n }\n\n /**\n * Handles any SSE errors and then performs cleanup.\n */\n private handleError(event: Event): void {\n console.error('EventSource error:', event);\n this.cleanup();\n }\n}\n"],"mappings":"AACA,SAAS,mBAAmB;AAG5B,SAAS,wBAAwC;AAmC1C,MAAM,sBAAsB;AAAA,EAkBjC,YAAoB,gBAAiC;AAAjC;AAAA,EAAkC;AAAA,EAjB9C,cAAkC;AAAA;AAAA;AAAA;AAAA,EAKnC;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQP,MAAa,aAA4B;AACvC,QAAI;AACF,YAAM,SAAS,KAAK,kBAAkB,iBAAiB;AACvD,YAAM,EAAE,WAAW,IAAI,OAAO;AAG9B,YAAM,oBAAoB,MAAM,YAAY,KAAK,qBAAqB;AACtE,YAAM,cAAc,kBAAkB,MAAM;AAE5C,UAAI,CAAC,aAAa;AAChB,cAAM,IAAI,MAAM,iCAAiC;AAAA,MACnD;AAEA,UAAI,kBAAkB,MAAM,aAAa,MAAM,SAAS;AACtD;AAEF,YAAM,YAAY,GAAG,UAAU;AAC/B,YAAM,MAAM,GAAG,SAAS,IAAI,WAAW;AAEvC,WAAK,cAAc,IAAI,YAAY,GAAG;AACtC,WAAK,YAAY,YAAY,CAAC,UAAU,KAAK,cAAc,KAAK;AAChE,WAAK,YAAY,UAAU,CAAC,UAAU,KAAK,YAAY,KAAK;AAAA,IAC9D,SAAS,OAAO;AACd,cAAQ,MAAM,6CAA6C,KAAK;AAAA,IAClE;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKO,UAAgB;AACrB,QAAI,KAAK,aAAa;AACpB,WAAK,YAAY,MAAM;AACvB,WAAK,cAAc;AACnB,cAAQ,IAAI,mCAAmC;AAAA,IACjD;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAc,cAAc,OAA4C;AACtE,QAAI;AACF,YAAM,EAAE,KAAK,IAAI;AACjB,iBAAW,UAAU,MAAM;AACzB,gBAAQ,OAAO,QAAQ;AAAA,UACrB,KAAK;AACH,oBAAQ,OAAO,QAAQ;AAAA,cACrB,KAAK;AACH,sBAAM,KAAK,oBAAoB,OAAO,UAAU;AAChD;AAAA,cACF,KAAK;AACH,sBAAM,KAAK,qBAAqB,OAAO,UAAU;AACjD;AAAA,cACF,KAAK;AACH,sBAAM,KAAK,sBAAsB,OAAO,UAAU;AAClD;AAAA,cACF;AACE,wBAAQ,MAAM,gCAAgC,OAAO,MAAM;AAC3D;AAAA,YACJ;AACA;AAAA,UACF;AACE,oBAAQ,MAAM,wBAAwB,OAAO,MAAM;AACnD;AAAA,QACJ;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,cAAQ,MAAM,uCAAuC,KAAK;AAAA,IAC5D;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKQ,YAAY,OAAoB;AACtC,YAAQ,MAAM,sBAAsB,KAAK;AACzC,SAAK,QAAQ;AAAA,EACf;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/IntlayerEventListener.ts"],"sourcesContent":["// @ts-ignore: @intlayer/backend is not built yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport { type IntlayerConfig, getConfiguration } from '@intlayer/config/client';\nimport { intlayerAPI } from './getIntlayerAPI';\n\nexport type DictionaryMessageEvent = {\n object: 'DICTIONARY';\n dictionary: DictionaryAPI;\n status: 'ADDED' | 'UPDATED' | 'DELETED' | 'CREATED';\n};\n\nexport type IntlayerMessageEvent = MessageEvent<DictionaryMessageEvent[]>;\n\n/**\n * IntlayerEventListener class to listen for dictionary changes via SSE (Server-Sent Events).\n *\n * Usage example:\n *\n * import { buildIntlayerDictionary } from './transpiler/declaration_file_to_dictionary/intlayer_dictionary';\n * import { IntlayerEventListener } from '@intlayer/api';\n *\n * export const checkDictionaryChanges = async () => {\n * // Instantiate the listener\n * const eventListener = new IntlayerEventListener();\n *\n * // Set up your callbacks\n * eventListener.onDictionaryChange = async (dictionary) => {\n * await buildIntlayerDictionary(dictionary);\n * };\n *\n * // Initialize the listener\n * await eventListener.initialize();\n *\n * // Optionally, clean up later when you’re done\n * // eventListener.cleanup();\n * };\n */\nexport class IntlayerEventListener {\n private eventSource: EventSource | null = null;\n\n /**\n * Callback triggered when a Dictionary is ADDED.\n */\n public onDictionaryAdded?: (dictionary: DictionaryAPI) => any;\n\n /**\n * Callback triggered when a Dictionary is UPDATED.\n */\n public onDictionaryChange?: (dictionary: DictionaryAPI) => any;\n\n /**\n * Callback triggered when a Dictionary is DELETED.\n */\n public onDictionaryDeleted?: (dictionary: DictionaryAPI) => any;\n\n constructor(private intlayerConfig?: IntlayerConfig) {}\n\n /**\n * Initializes the EventSource connection using the given intlayerConfig\n * (or the default config if none was provided).\n */\n public async initialize(): Promise<void> {\n try {\n const config = this.intlayerConfig ?? getConfiguration();\n const { backendURL } = config.editor;\n\n // Retrieve the access token\n const oAuth2TokenResult = await intlayerAPI.auth.getOAuth2AccessToken();\n const accessToken = oAuth2TokenResult.data?.accessToken;\n\n if (!accessToken) {\n throw new Error('Failed to retrieve access token');\n }\n\n if (oAuth2TokenResult.data?.organization.plan?.type !== 'ENTERPRISE')\n return;\n\n const API_ROUTE = `${backendURL}/api/event-listener`;\n const url = `${API_ROUTE}/${accessToken}`;\n\n this.eventSource = new EventSource(url);\n this.eventSource.onmessage = (event) => this.handleMessage(event);\n this.eventSource.onerror = (event) => this.handleError(event);\n } catch (error) {\n console.error('Error initializing IntlayerEventListener:', error);\n }\n }\n\n /**\n * Cleans up (closes) the EventSource connection.\n */\n public cleanup(): void {\n if (this.eventSource) {\n this.eventSource.close();\n this.eventSource = null;\n }\n }\n\n /**\n * Handles incoming SSE messages, parses the event data,\n * and invokes the appropriate callback.\n */\n private async handleMessage(event: IntlayerMessageEvent): Promise<void> {\n try {\n const { data } = event;\n for (const dataEl of data) {\n switch (dataEl.object) {\n case 'DICTIONARY':\n switch (dataEl.status) {\n case 'ADDED':\n await this.onDictionaryAdded?.(dataEl.dictionary);\n break;\n case 'UPDATED':\n await this.onDictionaryChange?.(dataEl.dictionary);\n break;\n case 'DELETED':\n await this.onDictionaryDeleted?.(dataEl.dictionary);\n break;\n default:\n console.error('Unhandled dictionary status:', dataEl.status);\n break;\n }\n break;\n default:\n console.error('Unknown object type:', dataEl.object);\n break;\n }\n }\n } catch (error) {\n console.error('Error processing dictionary update:', error);\n }\n }\n\n /**\n * Handles any SSE errors and then performs cleanup.\n */\n private handleError(event: Event): void {\n console.error('EventSource error:', event);\n this.cleanup();\n }\n}\n"],"mappings":"AAEA,SAA8B,wBAAwB;AACtD,SAAS,mBAAmB;AAkCrB,MAAM,sBAAsB;AAAA,EAkBjC,YAAoB,gBAAiC;AAAjC;AAAA,EAAkC;AAAA,EAjB9C,cAAkC;AAAA;AAAA;AAAA;AAAA,EAKnC;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQP,MAAa,aAA4B;AACvC,QAAI;AACF,YAAM,SAAS,KAAK,kBAAkB,iBAAiB;AACvD,YAAM,EAAE,WAAW,IAAI,OAAO;AAG9B,YAAM,oBAAoB,MAAM,YAAY,KAAK,qBAAqB;AACtE,YAAM,cAAc,kBAAkB,MAAM;AAE5C,UAAI,CAAC,aAAa;AAChB,cAAM,IAAI,MAAM,iCAAiC;AAAA,MACnD;AAEA,UAAI,kBAAkB,MAAM,aAAa,MAAM,SAAS;AACtD;AAEF,YAAM,YAAY,GAAG,UAAU;AAC/B,YAAM,MAAM,GAAG,SAAS,IAAI,WAAW;AAEvC,WAAK,cAAc,IAAI,YAAY,GAAG;AACtC,WAAK,YAAY,YAAY,CAAC,UAAU,KAAK,cAAc,KAAK;AAChE,WAAK,YAAY,UAAU,CAAC,UAAU,KAAK,YAAY,KAAK;AAAA,IAC9D,SAAS,OAAO;AACd,cAAQ,MAAM,6CAA6C,KAAK;AAAA,IAClE;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKO,UAAgB;AACrB,QAAI,KAAK,aAAa;AACpB,WAAK,YAAY,MAAM;AACvB,WAAK,cAAc;AAAA,IACrB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAc,cAAc,OAA4C;AACtE,QAAI;AACF,YAAM,EAAE,KAAK,IAAI;AACjB,iBAAW,UAAU,MAAM;AACzB,gBAAQ,OAAO,QAAQ;AAAA,UACrB,KAAK;AACH,oBAAQ,OAAO,QAAQ;AAAA,cACrB,KAAK;AACH,sBAAM,KAAK,oBAAoB,OAAO,UAAU;AAChD;AAAA,cACF,KAAK;AACH,sBAAM,KAAK,qBAAqB,OAAO,UAAU;AACjD;AAAA,cACF,KAAK;AACH,sBAAM,KAAK,sBAAsB,OAAO,UAAU;AAClD;AAAA,cACF;AACE,wBAAQ,MAAM,gCAAgC,OAAO,MAAM;AAC3D;AAAA,YACJ;AACA;AAAA,UACF;AACE,oBAAQ,MAAM,wBAAwB,OAAO,MAAM;AACnD;AAAA,QACJ;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,cAAQ,MAAM,uCAAuC,KAAK;AAAA,IAC5D;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKQ,YAAY,OAAoB;AACtC,YAAQ,MAAM,sBAAsB,KAAK;AACzC,SAAK,QAAQ;AAAA,EACf;AACF;","names":[]}
@@ -1,5 +1,5 @@
1
- import { DictionaryAPI } from '@intlayer/backend';
2
- import { IntlayerConfig } from '@intlayer/config/client';
1
+ import type { DictionaryAPI } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  export type DictionaryMessageEvent = {
4
4
  object: 'DICTIONARY';
5
5
  dictionary: DictionaryAPI;
@@ -1 +1 @@
1
- {"version":3,"file":"IntlayerEventListener.d.ts","sourceRoot":"","sources":["../../src/IntlayerEventListener.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAoB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG3E,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,aAAa,CAAC;IAC1B,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,sBAAsB,EAAE,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,qBAAqB;IAkBpB,OAAO,CAAC,cAAc,CAAC;IAjBnC,OAAO,CAAC,WAAW,CAA4B;IAE/C;;OAEG;IACI,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,GAAG,CAAC;IAE9D;;OAEG;IACI,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,GAAG,CAAC;IAE/D;;OAEG;IACI,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,GAAG,CAAC;gBAE5C,cAAc,CAAC,EAAE,cAAc;IAEnD;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BxC;;OAEG;IACI,OAAO,IAAI,IAAI;IAQtB;;;OAGG;YACW,aAAa;IA+B3B;;OAEG;IACH,OAAO,CAAC,WAAW;CAIpB"}
1
+ {"version":3,"file":"IntlayerEventListener.d.ts","sourceRoot":"","sources":["../../src/IntlayerEventListener.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,cAAc,EAAoB,MAAM,yBAAyB,CAAC;AAGhF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,aAAa,CAAC;IAC1B,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,sBAAsB,EAAE,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,qBAAqB;IAkBpB,OAAO,CAAC,cAAc,CAAC;IAjBnC,OAAO,CAAC,WAAW,CAA4B;IAE/C;;OAEG;IACI,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,GAAG,CAAC;IAE9D;;OAEG;IACI,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,GAAG,CAAC;IAE/D;;OAEG;IACI,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,GAAG,CAAC;gBAE5C,cAAc,CAAC,EAAE,cAAc;IAEnD;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BxC;;OAEG;IACI,OAAO,IAAI,IAAI;IAOtB;;;OAGG;YACW,aAAa;IA+B3B;;OAEG;IACH,OAAO,CAAC,WAAW;CAIpB"}
@@ -1,4 +1,4 @@
1
- import type { AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult, AskDocQuestionBody, AskDocQuestionResult } from '@intlayer/backend';
1
+ import type { AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, AskDocQuestionBody } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getAiAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,2BAA2B,EAE3B,gCAAgC,EAEhC,kCAAkC,EAElC,mCAAmC,EAEnC,qCAAqC,EAErC,6BAA6B,EAE7B,YAAY,EAEZ,cAAc,EAEd,kBAAkB,EAElB,oBAAoB,EAErB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,QAAQ,oBACH,cAAc,mBACb,cAAc;qCAWtB,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;4BAgBrB,kBAAkB,iBACX,cAAc;CAmB/B,CAAC;AAEF,eAAO,MAAM,OAAO;qCAhGT,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;4BAgBrB,kBAAkB,iBACX,cAAc;CAqBC,CAAC"}
1
+ {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,2BAA2B,EAE3B,gCAAgC,EAIhC,mCAAmC,EAMnC,YAAY,EAIZ,kBAAkB,EAInB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,QAAQ,oBACH,cAAc,mBACb,cAAc;qCAWtB,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;4BAgBrB,kBAAkB,iBACX,cAAc;CAmB/B,CAAC;AAEF,eAAO,MAAM,OAAO;qCAhGT,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;4BAgBrB,kBAAkB,iBACX,cAAc;CAqBC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AskResetPasswordBody, AskResetPasswordResult, CreateSessionBody, CreateSessionResult, GetSessionInformationQuery, GithubLoginQueryParams, GoogleLoginQueryParams, GetSessionInformationResult, LoginBody, LoginResult, RegisterBody, RegisterQuery, RegisterResult, ResetPasswordParams, ResetPasswordResult, UpdatePasswordBody, UpdatePasswordResult, ValidEmailParams, ValidEmailResult, SetCSRFTokenResult, GetOAuth2TokenResult, UserAPI, CheckIfUserHasPasswordResult } from '@intlayer/backend';
1
+ import type { AskResetPasswordBody, CreateSessionBody, GetSessionInformationQuery, GithubLoginQueryParams, GoogleLoginQueryParams, LoginBody, RegisterBody, RegisterQuery, ResetPasswordParams, UpdatePasswordBody, ValidEmailParams, UserAPI } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getAuthAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EAEpB,sBAAsB,EAEtB,iBAAiB,EAEjB,mBAAmB,EAEnB,0BAA0B,EAE1B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M,cAAc;4BAmCxC,mBAAmB,iBACb,cAAc;8BApBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;4CAoDsB,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;CAqC/B,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AddDictionaryBody, AddDictionaryResult, DeleteDictionaryParam, DeleteDictionaryResult, GetDictionariesParams, GetDictionariesResult, UpdateDictionaryParam, UpdateDictionaryBody, UpdateDictionaryResult, PushDictionariesBody, PushDictionariesResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetDictionariesKeysResult } from '@intlayer/backend';
1
+ import type { AddDictionaryBody, DeleteDictionaryParam, GetDictionariesParams, UpdateDictionaryParam, UpdateDictionaryBody, PushDictionariesBody, GetDictionaryParams, GetDictionaryQuery } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getDictionaryAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EAEjB,mBAAmB,EAEnB,qBAAqB,EAErB,sBAAsB,EAEtB,qBAAqB,EAErB,qBAAqB,EAErB,qBAAqB,EAErB,oBAAoB,EAEpB,sBAAsB,EAEtB,oBAAoB,EAEpB,sBAAsB,EAEtB,mBAAmB,EAEnB,kBAAkB,EAElB,mBAAmB,EAEnB,yBAAyB,EAE1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,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AAc,mBACb,cAAc;gCAUnB,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;gCAfhB,iBAAiB,iBACf,cAAc;qCA+Bd,qBAAqB,CAAC,cAAc,CAAC,cACvC,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAqB/B,CAAC;AAEF,eAAO,MAAM,aAAa;gCAzHZ,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;gCAfhB,iBAAiB,iBACf,cAAc;qCA+Bd,qBAAqB,CAAC,cAAc,CAAC,cACvC,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAuBe,CAAC"}
@@ -2,80 +2,80 @@ 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?: 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>;
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>;
14
14
  };
15
15
  project: {
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>;
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>;
27
27
  };
28
28
  user: {
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>;
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>;
36
36
  };
37
37
  auth: {
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>;
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>;
42
42
  logout: (otherOptions?: FetcherOptions) => Promise<void>;
43
- resetPassword: (params: import("@intlayer/backend").ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ResetPasswordResult>;
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>;
43
+ resetPassword: (params: ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<ResetPasswordResult>;
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>;
53
53
  };
54
54
  dictionary: {
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: (dictionary: 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>;
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: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
60
+ updateDictionary: (dictionaryId: UpdateDictionaryParam, dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
61
+ deleteDictionary: (id: DeleteDictionaryParam, otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
62
62
  };
63
63
  stripe: {
64
- getSubscription: (body?: import("@intlayer/backend").GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
65
- cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
64
+ getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
65
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
66
66
  };
67
67
  ai: {
68
- auditContentDeclaration: (body?: import("@intlayer/backend").AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationResult>;
69
- auditContentDeclarationField: (body?: import("@intlayer/backend").AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationFieldResult>;
70
- auditContentDeclarationMetadata: (body?: import("@intlayer/backend").AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationMetadataResult>;
71
- auditTag: (body?: import("@intlayer/backend").AuditTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditTagResult>;
72
- askDocQuestion: (body?: import("@intlayer/backend").AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskDocQuestionResult>;
68
+ auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
69
+ auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
70
+ auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
71
+ auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
72
+ askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<AskDocQuestionResult>;
73
73
  };
74
74
  tag: {
75
- getTags: (filters?: import("@intlayer/backend").GetTagsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetTagsResult>;
76
- addTag: (tag: import("@intlayer/backend").AddTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddTagResult>;
77
- updateTag: (tagId: import("@intlayer/backend").UpdateTagParams["tagId"], tag: import("@intlayer/backend").UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateTagResult>;
78
- deleteTag: (tagId: import("@intlayer/backend").DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteTagResult>;
75
+ getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
76
+ addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
77
+ updateTag: (tagId: UpdateTagParams, tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
78
+ deleteTag: (tagId: DeleteTagParams, otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
79
79
  };
80
80
  editor: {
81
81
  getConfiguration: (otherOptions?: FetcherOptions) => Promise<GetConfigurationResult>;
@@ -84,80 +84,80 @@ export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerC
84
84
  };
85
85
  export declare const intlayerAPI: {
86
86
  organization: {
87
- getOrganizations: (filters?: import("@intlayer/backend").GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationsResult>;
88
- getOrganization: (organizationId: import("@intlayer/backend").GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationResult>;
89
- addOrganization: (organization: import("@intlayer/backend").AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationResult>;
90
- addOrganizationMember: (body: import("@intlayer/backend").AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationMemberResult>;
91
- updateOrganization: (organization: import("@intlayer/backend").UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationResult>;
92
- updateOrganizationMembers: (body: import("@intlayer/backend").UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationMembersResult>;
93
- deleteOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteOrganizationResult>;
94
- selectOrganization: (organizationId: import("@intlayer/backend").SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectOrganizationResult>;
95
- unselectOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectOrganizationResult>;
87
+ getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
88
+ getOrganization: (organizationId: GetOrganizationParam, otherOptions?: FetcherOptions) => Promise<GetOrganizationResult>;
89
+ addOrganization: (organization: AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationResult>;
90
+ addOrganizationMember: (body: AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationMemberResult>;
91
+ updateOrganization: (organization: UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationResult>;
92
+ updateOrganizationMembers: (body: UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationMembersResult>;
93
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<DeleteOrganizationResult>;
94
+ selectOrganization: (organizationId: SelectOrganizationParam, otherOptions?: FetcherOptions) => Promise<SelectOrganizationResult>;
95
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<UnselectOrganizationResult>;
96
96
  };
97
97
  project: {
98
- getProjects: (filters?: import("@intlayer/backend").GetProjectsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetProjectsResult>;
99
- addProject: (project: import("@intlayer/backend").AddProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddProjectResult>;
100
- updateProject: (project: import("@intlayer/backend").UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectResult>;
101
- updateProjectMembers: (body: import("@intlayer/backend").UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectMembersResult>;
102
- pushProjectConfiguration: (projectConfiguration: import("@intlayer/backend").PushProjectConfigurationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").PushProjectConfigurationResult>;
103
- deleteProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteProjectResult>;
104
- selectProject: (projectId: import("@intlayer/backend").SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectProjectResult>;
105
- unselectProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectProjectResult>;
106
- addNewAccessKey: (accessKey: import("@intlayer/backend").AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddNewAccessKeyResponse>;
107
- deleteAccessKey: (clientId: import("@intlayer/backend").DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteAccessKeyResponse>;
108
- refreshAccessKey: (clientId: import("@intlayer/backend").RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RefreshAccessKeyResponse>;
98
+ getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
99
+ addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
100
+ updateProject: (project: UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectResult>;
101
+ updateProjectMembers: (body: UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectMembersResult>;
102
+ pushProjectConfiguration: (projectConfiguration: PushProjectConfigurationBody, otherOptions?: FetcherOptions) => Promise<PushProjectConfigurationResult>;
103
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<DeleteProjectResult>;
104
+ selectProject: (projectId: SelectProjectParam, otherOptions?: FetcherOptions) => Promise<SelectProjectResult>;
105
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<UnselectProjectResult>;
106
+ addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
107
+ deleteAccessKey: (clientId: DeleteAccessKeyBody, otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
108
+ refreshAccessKey: (clientId: RefreshAccessKeyBody, otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
109
109
  };
110
110
  user: {
111
- createUser: (user: import("@intlayer/backend").CreateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateUserResult>;
112
- getUsers: (filters?: import("@intlayer/backend").GetUsersParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUsersResult>;
113
- getUserById: (userId: import("@intlayer/backend").GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByIdResult>;
114
- getUserByAccount: (providerAccountId: import("@intlayer/backend").GetUserByAccountParams["providerAccountId"], provider: import("@intlayer/backend").GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByAccountResult>;
115
- getUserByEmail: (email: import("@intlayer/backend").GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByEmailResult>;
116
- updateUser: (user: import("@intlayer/backend").UpdateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
117
- deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
111
+ createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
112
+ getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
113
+ getUserById: (userId: GetUserByIdParams, otherOptions?: FetcherOptions) => Promise<GetUserByIdResult>;
114
+ getUserByAccount: (providerAccountId: GetUserByAccountParams, provider: GetUserByAccountParams, otherOptions?: FetcherOptions) => Promise<GetUserByAccountResult>;
115
+ getUserByEmail: (email: GetUserByEmailParams, otherOptions?: FetcherOptions) => Promise<GetUserByEmailResult>;
116
+ updateUser: (user: UpdateUserBody, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
117
+ deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
118
118
  };
119
119
  auth: {
120
- login: (user: import("@intlayer/backend").LoginBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").LoginResult>;
121
- getLoginWithGitHubURL: (params: import("@intlayer/backend").GithubLoginQueryParams) => string;
122
- getLoginWithGoogleURL: (params: import("@intlayer/backend").GoogleLoginQueryParams) => string;
123
- register: (user: import("@intlayer/backend").RegisterBody, query?: import("@intlayer/backend").RegisterQuery, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RegisterResult>;
120
+ login: (user: LoginBody, otherOptions?: FetcherOptions) => Promise<LoginResult>;
121
+ getLoginWithGitHubURL: (params: GithubLoginQueryParams) => string;
122
+ getLoginWithGoogleURL: (params: GoogleLoginQueryParams) => string;
123
+ register: (user: RegisterBody, query?: RegisterQuery, otherOptions?: FetcherOptions) => Promise<RegisterResult>;
124
124
  logout: (otherOptions?: FetcherOptions) => Promise<void>;
125
- resetPassword: (params: import("@intlayer/backend").ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ResetPasswordResult>;
126
- askResetPassword: (email: import("@intlayer/backend").AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskResetPasswordResult>;
127
- checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CheckIfUserHasPasswordResult>;
128
- verifyEmail: ({ userId, secret }: import("@intlayer/backend").ValidEmailParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ValidEmailResult>;
129
- getVerifyEmailStatusURL: (userId: string | import("@intlayer/backend").UserAPI["_id"]) => string;
130
- changePassword: (data: import("@intlayer/backend").UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdatePasswordResult>;
131
- createSession: (data: import("@intlayer/backend").CreateSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateSessionResult>;
132
- getSession: (sessionToken?: import("@intlayer/backend").GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetSessionInformationResult>;
133
- getCSRFToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SetCSRFTokenResult>;
134
- getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOAuth2TokenResult>;
125
+ resetPassword: (params: ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<ResetPasswordResult>;
126
+ askResetPassword: (email: AskResetPasswordBody, otherOptions?: FetcherOptions) => Promise<AskResetPasswordResult>;
127
+ checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<CheckIfUserHasPasswordResult>;
128
+ verifyEmail: ({ userId, secret }: ValidEmailParams, otherOptions?: FetcherOptions) => Promise<ValidEmailResult>;
129
+ getVerifyEmailStatusURL: (userId: string | UserAPI) => string;
130
+ changePassword: (data: UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<UpdatePasswordResult>;
131
+ createSession: (data: CreateSessionBody, otherOptions?: FetcherOptions) => Promise<CreateSessionResult>;
132
+ getSession: (sessionToken?: GetSessionInformationQuery, otherOptions?: FetcherOptions) => Promise<GetSessionInformationResult>;
133
+ getCSRFToken: (otherOptions?: FetcherOptions) => Promise<SetCSRFTokenResult>;
134
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<GetOAuth2TokenResult>;
135
135
  };
136
136
  dictionary: {
137
- getDictionaries: (filters?: import("@intlayer/backend").GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesResult>;
138
- getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesKeysResult>;
139
- getDictionary: (dictionaryKey: import("@intlayer/backend").GetDictionaryParams["dictionaryKey"], version?: import("@intlayer/backend").GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionaryResult>;
140
- pushDictionaries: (dictionaries: import("@intlayer/backend").PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").PushDictionariesResult>;
141
- addDictionary: (dictionary: import("@intlayer/backend").AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddDictionaryResult>;
142
- updateDictionary: (dictionaryId: import("@intlayer/backend").UpdateDictionaryParam["dictionaryId"], dictionary: import("@intlayer/backend").UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateDictionaryResult>;
143
- deleteDictionary: (id: import("@intlayer/backend").DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteDictionaryResult>;
137
+ getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
138
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
139
+ getDictionary: (dictionaryKey: GetDictionaryParams, version?: GetDictionaryQuery, otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
140
+ pushDictionaries: (dictionaries: PushDictionariesBody, otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
141
+ addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
142
+ updateDictionary: (dictionaryId: UpdateDictionaryParam, dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
143
+ deleteDictionary: (id: DeleteDictionaryParam, otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
144
144
  };
145
145
  stripe: {
146
- getSubscription: (body?: import("@intlayer/backend").GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
147
- cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
146
+ getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
147
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
148
148
  };
149
149
  ai: {
150
- auditContentDeclaration: (body?: import("@intlayer/backend").AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationResult>;
151
- auditContentDeclarationField: (body?: import("@intlayer/backend").AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationFieldResult>;
152
- auditContentDeclarationMetadata: (body?: import("@intlayer/backend").AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationMetadataResult>;
153
- auditTag: (body?: import("@intlayer/backend").AuditTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditTagResult>;
154
- askDocQuestion: (body?: import("@intlayer/backend").AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskDocQuestionResult>;
150
+ auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
151
+ auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
152
+ auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
153
+ auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
154
+ askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<AskDocQuestionResult>;
155
155
  };
156
156
  tag: {
157
- getTags: (filters?: import("@intlayer/backend").GetTagsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetTagsResult>;
158
- addTag: (tag: import("@intlayer/backend").AddTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddTagResult>;
159
- updateTag: (tagId: import("@intlayer/backend").UpdateTagParams["tagId"], tag: import("@intlayer/backend").UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateTagResult>;
160
- deleteTag: (tagId: import("@intlayer/backend").DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteTagResult>;
157
+ getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
158
+ addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
159
+ updateTag: (tagId: UpdateTagParams, tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
160
+ deleteTag: (tagId: DeleteTagParams, otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
161
161
  };
162
162
  editor: {
163
163
  getConfiguration: (otherOptions?: FetcherOptions) => Promise<GetConfigurationResult>;
@@ -1,4 +1,4 @@
1
- import type { AddOrganizationBody, AddOrganizationResult, DeleteOrganizationResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, UpdateOrganizationBody, UpdateOrganizationResult, SelectOrganizationParam, SelectOrganizationResult, UnselectOrganizationResult, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, AddOrganizationMemberBody, AddOrganizationMemberResult } from '@intlayer/backend';
1
+ import type { AddOrganizationBody, GetOrganizationParam, GetOrganizationsParams, UpdateOrganizationBody, SelectOrganizationParam, UpdateOrganizationMembersBody, AddOrganizationMemberBody } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getOrganizationAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/organization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EAEnB,qBAAqB,EAErB,wBAAwB,EAExB,oBAAoB,EAEpB,qBAAqB,EAErB,sBAAsB,EAEtB,sBAAsB,EAEtB,sBAAsB,EAEtB,wBAAwB,EAExB,uBAAuB,EAEvB,wBAAwB,EAExB,0BAA0B,EAE1B,6BAA6B,EAE7B,+BAA+B,EAE/B,yBAAyB,EAEzB,2BAA2B,EAE5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,kBAAkB,oBACb,cAAc,mBACb,cAAc;iCAUnB,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;AAEF,eAAO,MAAM,eAAe;iCA5Jd,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;CAuBf,CAAC"}
1
+ {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/organization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EAMnB,oBAAoB,EAIpB,sBAAsB,EAItB,sBAAsB,EAItB,uBAAuB,EAMvB,6BAA6B,EAI7B,yBAAyB,EAI1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,kBAAkB,oBACb,cAAc,mBACb,cAAc;iCAUnB,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;AAEF,eAAO,MAAM,eAAe;iCA5Jd,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;CAuBf,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AddProjectBody, AddProjectResult, DeleteProjectResult, GetProjectsParams, GetProjectsResult, UpdateProjectBody, UpdateProjectResult, SelectProjectParam, SelectProjectResult, UnselectProjectResult, AddNewAccessKeyBody, AddNewAccessKeyResponse, DeleteAccessKeyBody, DeleteAccessKeyResponse, RefreshAccessKeyBody, RefreshAccessKeyResponse, UpdateProjectMembersBody, UpdateProjectMembersResult, PushProjectConfigurationBody, PushProjectConfigurationResult } from '@intlayer/backend';
1
+ import type { AddProjectBody, GetProjectsParams, UpdateProjectBody, SelectProjectParam, AddNewAccessKeyBody, DeleteAccessKeyBody, RefreshAccessKeyBody, UpdateProjectMembersBody, PushProjectConfigurationBody } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAEd,gBAAgB,EAEhB,mBAAmB,EAEnB,iBAAiB,EAEjB,iBAAiB,EAEjB,iBAAiB,EAEjB,mBAAmB,EAEnB,kBAAkB,EAElB,mBAAmB,EAEnB,qBAAqB,EAErB,mBAAmB,EAEnB,uBAAuB,EAEvB,mBAAmB,EAEnB,uBAAuB,EAEvB,oBAAoB,EAEpB,wBAAwB,EAExB,wBAAwB,EAExB,0BAA0B,EAE1B,4BAA4B,EAE5B,8BAA8B,EAE/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,aAAa,oBACR,cAAc,mBACb,cAAc;4BAUnB,iBAAiB,iBACb,cAAc;0BAgBnB,cAAc,iBACT,cAAc;6BAiBnB,iB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B,cAAc;qDAgBN,4BAA4B,iBACpC,cAAc;mCAgBa,cAAc;+BAe5C,kBAAkB,CAAC,WAAW,CAAC,iBAC5B,cAAc;qCAee,cAAc;iCAiB9C,mBAAmB,iBAChB,cAAc;gCAmBlB,mBAAmB,CAAC,UAAU,CAAC,iBAC3B,cAAc;iCAmBlB,oBAAoB,CAAC,UAAU,CAAC,iBAC5B,cAAc;CAyB/B,CAAC;AAEF,eAAO,MAAM,UAAU;4BA3MT,iBAAiB,iBACb,cAAc;0BAgBnB,cAAc,iBACT,cAAc;6BAiBnB,iBAAiB,iBACZ,cAAc;iCAiBtB,wBAAwB,iBAChB,cAAc;qDAgBN,4BAA4B,iBACpC,cAAc;mCAgBa,cAAc;+BAe5C,kBAAkB,CAAC,WAAW,CAAC,iBAC5B,cAAc;qCAee,cAAc;iCAiB9C,mBAAmB,iBAChB,cAAc;gCAmBlB,mBAAmB,CAAC,UAAU,CAAC,iBAC3B,cAAc;iCAmBlB,oBAAoB,CAAC,UAAU,CAAC,iBAC5B,cAAc;CA2BS,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { GetCheckoutSessionBody, GetCheckoutSessionResult } from '@intlayer/backend';
1
+ import type { GetCheckoutSessionBody } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getStripeAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/stripe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,sBAAsB,EAEtB,wBAAwB,EAEzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,YAAY,oBACP,cAAc,mBACb,cAAc;6BAUtB,sBAAsB,iBACf,cAAc;wCAgBkB,cAAc;CAc/D,CAAC"}
1
+ {"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/stripe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,sBAAsB,EAIvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,YAAY,oBACP,cAAc,mBACb,cAAc;6BAUtB,sBAAsB,iBACf,cAAc;wCAgBkB,cAAc;CAc/D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AddTagBody, AddTagResult, DeleteTagParams, DeleteTagResult, GetTagsParams, GetTagsResult, UpdateTagBody, UpdateTagParams, UpdateTagResult } from '@intlayer/backend';
1
+ import type { AddTagBody, DeleteTagParams, GetTagsParams, UpdateTagBody, UpdateTagParams } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getTagAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,UAAU,EAEV,YAAY,EAEZ,eAAe,EAEf,eAAe,EAEf,aAAa,EAEb,aAAa,EAEb,aAAa,EAEb,eAAe,EAEf,eAAe,EAEhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,SAAS,oBACJ,cAAc,mBACb,cAAc;wBAUnB,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;AAEF,eAAO,MAAM,MAAM;wBAxEL,aAAa,iBACT,cAAc;kBAeH,UAAU,iBAAgB,cAAc;uBAgB1D,eAAe,CAAC,OAAO,CAAC,OAC1B,aAAa,iBACJ,cAAc;uBAiBrB,eAAe,CAAC,OAAO,CAAC,iBAEjB,cAAc;CAmBC,CAAC"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,UAAU,EAIV,eAAe,EAIf,aAAa,EAIb,aAAa,EAEb,eAAe,EAIhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,SAAS,oBACJ,cAAc,mBACb,cAAc;wBAUnB,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;AAEF,eAAO,MAAM,MAAM;wBAxEL,aAAa,iBACT,cAAc;kBAeH,UAAU,iBAAgB,cAAc;uBAgB1D,eAAe,CAAC,OAAO,CAAC,OAC1B,aAAa,iBACJ,cAAc;uBAiBrB,eAAe,CAAC,OAAO,CAAC,iBAEjB,cAAc;CAmBC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CreateUserBody, CreateUserResult, GetUserByAccountParams, GetUserByAccountResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, UpdateUserBody, UpdateUserResult } from '@intlayer/backend';
1
+ import type { CreateUserBody, GetUserByAccountParams, GetUserByEmailParams, GetUserByIdParams, GetUsersParams, UpdateUserBody } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
3
  import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getUserAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAEd,gBAAgB,EAEhB,sBAAsB,EAEtB,sBAAsB,EAEtB,oBAAoB,EAEpB,oBAAoB,EAEpB,iBAAiB,EAEjB,iBAAiB,EAEjB,cAAc,EAEd,cAAc,EAEd,cAAc,EAEd,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,UAAU,oBACL,cAAc,mBACb,cAAc;uBA2EvB,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;AAEF,eAAO,MAAM,OAAO;uBA7DV,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;CAsBG,CAAC"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAId,sBAAsB,EAItB,oBAAoB,EAIpB,iBAAiB,EAIjB,cAAc,EAId,cAAc,EAIf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,UAAU,oBACL,cAAc,mBACb,cAAc;uBA2EvB,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;AAEF,eAAO,MAAM,OAAO;uBA7DV,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;CAsBG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/api",
3
- "version": "5.0.6",
3
+ "version": "5.1.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": [
@@ -57,29 +57,29 @@
57
57
  "./package.json"
58
58
  ],
59
59
  "dependencies": {
60
- "@intlayer/config": "5.0.6"
60
+ "@intlayer/config": "5.1.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@changesets/changelog-github": "0.5.0",
64
64
  "@changesets/cli": "2.27.12",
65
65
  "@types/node": "^22.10.6",
66
- "@typescript-eslint/parser": "^8.20.0",
66
+ "@typescript-eslint/parser": "^8.24.0",
67
67
  "concurrently": "^9.1.2",
68
- "eslint": "^9.18.0",
69
- "prettier": "^3.4.2",
68
+ "eslint": "^9.20.0",
69
+ "prettier": "^3.5.0",
70
70
  "rimraf": "^6.0.1",
71
71
  "tsc-alias": "^1.8.10",
72
72
  "tsup": "^8.3.5",
73
73
  "typescript": "^5.7.3",
74
- "@intlayer/backend": "5.0.6",
74
+ "@utils/ts-config": "1.0.4",
75
75
  "@utils/ts-config-types": "1.0.4",
76
76
  "@utils/tsup-config": "1.0.4",
77
- "intlayer-editor": "5.0.6",
78
- "@utils/ts-config": "1.0.4",
77
+ "intlayer-editor": "5.1.0",
78
+ "@intlayer/backend": "5.1.0",
79
79
  "@utils/eslint-config": "1.0.4"
80
80
  },
81
81
  "peerDependencies": {
82
- "@intlayer/config": "5.0.6"
82
+ "@intlayer/config": "5.1.0"
83
83
  },
84
84
  "engines": {
85
85
  "node": ">=14.18"