@intlayer/api 6.1.6 → 7.0.0-canary.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 (117) hide show
  1. package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
  2. package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs +18 -55
  3. package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs.map +1 -1
  4. package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs +20 -58
  5. package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs.map +1 -1
  6. package/dist/cjs/distantDictionary/index.cjs +5 -25
  7. package/dist/cjs/fetcher.cjs +113 -89
  8. package/dist/cjs/fetcher.cjs.map +1 -1
  9. package/dist/cjs/getIntlayerAPI/ai.cjs +163 -188
  10. package/dist/cjs/getIntlayerAPI/ai.cjs.map +1 -1
  11. package/dist/cjs/getIntlayerAPI/dictionary.cjs +69 -117
  12. package/dist/cjs/getIntlayerAPI/dictionary.cjs.map +1 -1
  13. package/dist/cjs/getIntlayerAPI/editor.cjs +37 -74
  14. package/dist/cjs/getIntlayerAPI/editor.cjs.map +1 -1
  15. package/dist/cjs/getIntlayerAPI/index.cjs +27 -49
  16. package/dist/cjs/getIntlayerAPI/index.cjs.map +1 -1
  17. package/dist/cjs/getIntlayerAPI/newsletter.cjs +40 -77
  18. package/dist/cjs/getIntlayerAPI/newsletter.cjs.map +1 -1
  19. package/dist/cjs/getIntlayerAPI/oAuth.cjs +26 -65
  20. package/dist/cjs/getIntlayerAPI/oAuth.cjs.map +1 -1
  21. package/dist/cjs/getIntlayerAPI/organization.cjs +93 -130
  22. package/dist/cjs/getIntlayerAPI/organization.cjs.map +1 -1
  23. package/dist/cjs/getIntlayerAPI/project.cjs +109 -154
  24. package/dist/cjs/getIntlayerAPI/project.cjs.map +1 -1
  25. package/dist/cjs/getIntlayerAPI/search.cjs +22 -58
  26. package/dist/cjs/getIntlayerAPI/search.cjs.map +1 -1
  27. package/dist/cjs/getIntlayerAPI/stripe.cjs +38 -77
  28. package/dist/cjs/getIntlayerAPI/stripe.cjs.map +1 -1
  29. package/dist/cjs/getIntlayerAPI/tag.cjs +47 -86
  30. package/dist/cjs/getIntlayerAPI/tag.cjs.map +1 -1
  31. package/dist/cjs/getIntlayerAPI/user.cjs +79 -106
  32. package/dist/cjs/getIntlayerAPI/user.cjs.map +1 -1
  33. package/dist/cjs/index.cjs +30 -49
  34. package/dist/cjs/proxy.cjs +90 -115
  35. package/dist/cjs/proxy.cjs.map +1 -1
  36. package/dist/cjs/types.cjs +0 -17
  37. package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs +17 -20
  38. package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs.map +1 -1
  39. package/dist/esm/distantDictionary/fetchDistantDictionary.mjs +19 -23
  40. package/dist/esm/distantDictionary/fetchDistantDictionary.mjs.map +1 -1
  41. package/dist/esm/distantDictionary/index.mjs +4 -3
  42. package/dist/esm/fetcher.mjs +111 -64
  43. package/dist/esm/fetcher.mjs.map +1 -1
  44. package/dist/esm/getIntlayerAPI/ai.mjs +160 -153
  45. package/dist/esm/getIntlayerAPI/ai.mjs.map +1 -1
  46. package/dist/esm/getIntlayerAPI/dictionary.mjs +66 -82
  47. package/dist/esm/getIntlayerAPI/dictionary.mjs.map +1 -1
  48. package/dist/esm/getIntlayerAPI/editor.mjs +34 -39
  49. package/dist/esm/getIntlayerAPI/editor.mjs.map +1 -1
  50. package/dist/esm/getIntlayerAPI/index.mjs +16 -14
  51. package/dist/esm/getIntlayerAPI/index.mjs.map +1 -1
  52. package/dist/esm/getIntlayerAPI/newsletter.mjs +37 -42
  53. package/dist/esm/getIntlayerAPI/newsletter.mjs.map +1 -1
  54. package/dist/esm/getIntlayerAPI/oAuth.mjs +23 -30
  55. package/dist/esm/getIntlayerAPI/oAuth.mjs.map +1 -1
  56. package/dist/esm/getIntlayerAPI/organization.mjs +90 -95
  57. package/dist/esm/getIntlayerAPI/organization.mjs.map +1 -1
  58. package/dist/esm/getIntlayerAPI/project.mjs +106 -119
  59. package/dist/esm/getIntlayerAPI/project.mjs.map +1 -1
  60. package/dist/esm/getIntlayerAPI/search.mjs +19 -23
  61. package/dist/esm/getIntlayerAPI/search.mjs.map +1 -1
  62. package/dist/esm/getIntlayerAPI/stripe.mjs +35 -42
  63. package/dist/esm/getIntlayerAPI/stripe.mjs.map +1 -1
  64. package/dist/esm/getIntlayerAPI/tag.mjs +44 -51
  65. package/dist/esm/getIntlayerAPI/tag.mjs.map +1 -1
  66. package/dist/esm/getIntlayerAPI/user.mjs +76 -71
  67. package/dist/esm/getIntlayerAPI/user.mjs.map +1 -1
  68. package/dist/esm/index.mjs +16 -15
  69. package/dist/esm/proxy.mjs +89 -90
  70. package/dist/esm/proxy.mjs.map +1 -1
  71. package/dist/esm/types.mjs +0 -1
  72. package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts +8 -3
  73. package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts.map +1 -1
  74. package/dist/types/distantDictionary/fetchDistantDictionary.d.ts +8 -3
  75. package/dist/types/distantDictionary/fetchDistantDictionary.d.ts.map +1 -1
  76. package/dist/types/distantDictionary/index.d.ts +3 -3
  77. package/dist/types/fetcher.d.ts +14 -11
  78. package/dist/types/fetcher.d.ts.map +1 -1
  79. package/dist/types/getIntlayerAPI/ai.d.ts +22 -18
  80. package/dist/types/getIntlayerAPI/ai.d.ts.map +1 -1
  81. package/dist/types/getIntlayerAPI/dictionary.d.ts +16 -12
  82. package/dist/types/getIntlayerAPI/dictionary.d.ts.map +1 -1
  83. package/dist/types/getIntlayerAPI/editor.d.ts +11 -7
  84. package/dist/types/getIntlayerAPI/editor.d.ts.map +1 -1
  85. package/dist/types/getIntlayerAPI/index.d.ts +30 -27
  86. package/dist/types/getIntlayerAPI/index.d.ts.map +1 -1
  87. package/dist/types/getIntlayerAPI/newsletter.d.ts +11 -7
  88. package/dist/types/getIntlayerAPI/newsletter.d.ts.map +1 -1
  89. package/dist/types/getIntlayerAPI/oAuth.d.ts +8 -5
  90. package/dist/types/getIntlayerAPI/oAuth.d.ts.map +1 -1
  91. package/dist/types/getIntlayerAPI/organization.d.ts +18 -13
  92. package/dist/types/getIntlayerAPI/organization.d.ts.map +1 -1
  93. package/dist/types/getIntlayerAPI/project.d.ts +19 -15
  94. package/dist/types/getIntlayerAPI/project.d.ts.map +1 -1
  95. package/dist/types/getIntlayerAPI/search.d.ts +9 -5
  96. package/dist/types/getIntlayerAPI/search.d.ts.map +1 -1
  97. package/dist/types/getIntlayerAPI/stripe.d.ts +11 -7
  98. package/dist/types/getIntlayerAPI/stripe.d.ts.map +1 -1
  99. package/dist/types/getIntlayerAPI/tag.d.ts +12 -8
  100. package/dist/types/getIntlayerAPI/tag.d.ts.map +1 -1
  101. package/dist/types/getIntlayerAPI/user.d.ts +16 -12
  102. package/dist/types/getIntlayerAPI/user.d.ts.map +1 -1
  103. package/dist/types/index.d.ts +16 -15
  104. package/dist/types/proxy.d.ts +10 -5
  105. package/dist/types/proxy.d.ts.map +1 -1
  106. package/dist/types/types.d.ts +13 -12
  107. package/dist/types/types.d.ts.map +1 -1
  108. package/package.json +29 -38
  109. package/LICENSE +0 -202
  110. package/dist/cjs/distantDictionary/index.cjs.map +0 -1
  111. package/dist/cjs/index.cjs.map +0 -1
  112. package/dist/cjs/types.cjs.map +0 -1
  113. package/dist/esm/distantDictionary/index.mjs.map +0 -1
  114. package/dist/esm/index.mjs.map +0 -1
  115. package/dist/esm/types.mjs.map +0 -1
  116. package/dist/types/distantDictionary/index.d.ts.map +0 -1
  117. package/dist/types/index.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/proxy.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/config/client';\nimport type { FetcherOptions } from './fetcher';\nimport { getIntlayerAPI } from './getIntlayerAPI';\nimport type { IntlayerAPI } from './getIntlayerAPI/index';\nimport { getOAuthAPI } from './getIntlayerAPI/oAuth';\n\ntype OAuthTokenLike = {\n accessToken?: string;\n accessTokenExpiresAt?: string | Date;\n expires_in?: number;\n expiresIn?: number;\n expiresAt?: string | Date;\n};\n\nconst ONE_MINUTE_MS = 60_000;\n\n/**\n * Returns the expiration timestamp in ms from an OAuth token-like object.\n */\nconst getExpiryTimestamp = (\n token: OAuthTokenLike | undefined\n): number | undefined => {\n if (!token) return undefined;\n const dateLike = (token.accessTokenExpiresAt ?? token.expiresAt) as\n | string\n | Date\n | undefined;\n if (dateLike) {\n const ts =\n typeof dateLike === 'string'\n ? Date.parse(dateLike)\n : dateLike.getTime?.();\n if (typeof ts === 'number' && Number.isFinite(ts)) return ts;\n }\n const seconds = token.expires_in ?? token.expiresIn;\n if (typeof seconds === 'number' && Number.isFinite(seconds)) {\n return Date.now() + seconds * 1000;\n }\n return undefined;\n};\n\nlet currentAccessToken: string | undefined;\nlet currentExpiryTs: number | undefined;\nlet pendingRefresh: Promise<void> | undefined;\n\n/**\n * Build an auto-auth proxy around getIntlayerAPI that:\n * - Fetches an OAuth2 token when needed\n * - Injects Authorization header for each request\n * - Refreshes token proactively when near expiry\n *\n * The returned API matches the shape of getIntlayerAPI.\n */\nexport const getIntlayerAPIProxy = (\n _baseAuthOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n): IntlayerAPI => {\n // Use a shared mutable auth options object captured by the API closures\n const authOptionsRef: FetcherOptions = { ..._baseAuthOptions };\n const hasCMSAuth =\n intlayerConfig?.editor.clientId && intlayerConfig?.editor.clientSecret;\n const baseApi = getIntlayerAPI(authOptionsRef, intlayerConfig);\n\n const needsRefresh = (): boolean => {\n if (!currentAccessToken) return true;\n if (!currentExpiryTs) return false; // If unknown, assume usable until failure\n return Date.now() + ONE_MINUTE_MS >= currentExpiryTs; // refresh 1 min before expiry\n };\n\n const refreshToken = async (): Promise<void> => {\n const doRefresh = async () => {\n const authApi = getOAuthAPI(intlayerConfig);\n const res = await authApi.getOAuth2AccessToken();\n const tokenData = res?.data as OAuthTokenLike | undefined;\n currentAccessToken = tokenData?.accessToken;\n currentExpiryTs = getExpiryTimestamp(tokenData);\n };\n\n if (!pendingRefresh) {\n pendingRefresh = doRefresh().finally(() => {\n pendingRefresh = undefined;\n });\n }\n await pendingRefresh;\n };\n\n const ensureValidToken = async () => {\n if (needsRefresh()) {\n await refreshToken();\n }\n };\n\n const applyAuthHeaderToRef = () => {\n if (!currentAccessToken) return;\n authOptionsRef.headers = {\n ...(authOptionsRef.headers ?? {}),\n Authorization: `Bearer ${currentAccessToken}`,\n } as HeadersInit;\n };\n\n const wrapSection = <T extends Record<string, unknown>>(\n section: T,\n skipAuth = !hasCMSAuth\n ): T => {\n return new Proxy(section, {\n get(target, prop, receiver) {\n const value = Reflect.get(target, prop, receiver);\n\n if (typeof value === 'function') {\n // Wrap section method to inject token and headers\n return async (...args: unknown[]) => {\n if (!skipAuth) {\n await ensureValidToken();\n applyAuthHeaderToRef();\n }\n\n try {\n return await value.apply(target, args);\n } catch (err) {\n // Best-effort retry: if token might be stale, refresh once and retry\n if (!skipAuth) {\n await refreshToken();\n applyAuthHeaderToRef();\n return await value.apply(target, args);\n }\n throw err;\n }\n };\n }\n\n return value;\n },\n });\n };\n\n return {\n organization: wrapSection(baseApi.organization),\n project: wrapSection(baseApi.project),\n user: wrapSection(baseApi.user),\n oAuth: wrapSection(baseApi.oAuth, true), // do NOT inject auth for token endpoint\n dictionary: wrapSection(baseApi.dictionary),\n stripe: wrapSection(baseApi.stripe),\n ai: wrapSection(baseApi.ai),\n tag: wrapSection(baseApi.tag),\n search: wrapSection(baseApi.search),\n editor: wrapSection(baseApi.editor),\n newsletter: wrapSection(baseApi.newsletter),\n } as IntlayerAPI;\n};\n\nexport type IntlayerAPIProxy = ReturnType<typeof getIntlayerAPIProxy>;\n"],"mappings":"AAEA,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAU5B,MAAM,gBAAgB;AAKtB,MAAM,qBAAqB,CACzB,UACuB;AACvB,MAAI,CAAC,MAAO,QAAO;AAC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A,MACvB,GAAI,eAAe,WAAW,CAAC;AAAA,MAC/B,eAAe,UAAU,kBAAkB;AAAA,IAC7C;AAAA,EACF;AAEA,QAAM,cAAc,CAClB,SACA,WAAW,CAAC,eACN;AACN,WAAO,IAAI,MAAM,SAAS;AAAA,MACxB,IAAI,QAAQ,MAAM,UAAU;AAC1B,cAAM,QAAQ,QAAQ,IAAI,QAAQ,MAAM,QAAQ;AAEhD,YAAI,OAAO,UAAU,YAAY;AAE/B,iBAAO,UAAU,SAAoB;AACnC,gBAAI,CAAC,UAAU;AACb,oBAAM,iBAAiB;AACvB,mCAAqB;AAAA,YACvB;AAEA,gBAAI;AACF,qBAAO,MAAM,MAAM,MAAM,QAAQ,IAAI;AAAA,YACvC,SAAS,KAAK;AAEZ,kBAAI,CAAC,UAAU;AACb,sBAAM,aAAa;AACnB,qCAAqB;AACrB,uBAAO,MAAM,MAAM,MAAM,QAAQ,IAAI;AAAA,cACvC;AACA,oBAAM;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAEA,eAAO;AAAA,MACT;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,cAAc,YAAY,QAAQ,YAAY;AAAA,IAC9C,SAAS,YAAY,QAAQ,OAAO;AAAA,IACpC,MAAM,YAAY,QAAQ,IAAI;AAAA,IAC9B,OAAO,YAAY,QAAQ,OAAO,IAAI;AAAA;AAAA,IACtC,YAAY,YAAY,QAAQ,UAAU;AAAA,IAC1C,QAAQ,YAAY,QAAQ,MAAM;AAAA,IAClC,IAAI,YAAY,QAAQ,EAAE;AAAA,IAC1B,KAAK,YAAY,QAAQ,GAAG;AAAA,IAC5B,QAAQ,YAAY,QAAQ,MAAM;AAAA,IAClC,QAAQ,YAAY,QAAQ,MAAM;AAAA,IAClC,YAAY,YAAY,QAAQ,UAAU;AAAA,EAC5C;AACF;","names":[]}
1
+ {"version":3,"file":"proxy.mjs","names":["currentAccessToken: string | undefined","currentExpiryTs: number | undefined","pendingRefresh: Promise<void> | undefined","authOptionsRef: FetcherOptions"],"sources":["../../src/proxy.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types';\nimport type { FetcherOptions } from './fetcher';\nimport { getIntlayerAPI } from './getIntlayerAPI';\nimport type { IntlayerAPI } from './getIntlayerAPI/index';\nimport { getOAuthAPI } from './getIntlayerAPI/oAuth';\n\ntype OAuthTokenLike = {\n accessToken?: string;\n accessTokenExpiresAt?: string | Date;\n expires_in?: number;\n expiresIn?: number;\n expiresAt?: string | Date;\n};\n\nconst ONE_MINUTE_MS = 60_000;\n\n/**\n * Returns the expiration timestamp in ms from an OAuth token-like object.\n */\nconst getExpiryTimestamp = (\n token: OAuthTokenLike | undefined\n): number | undefined => {\n if (!token) return undefined;\n const dateLike = (token.accessTokenExpiresAt ?? token.expiresAt) as\n | string\n | Date\n | undefined;\n if (dateLike) {\n const ts =\n typeof dateLike === 'string'\n ? Date.parse(dateLike)\n : dateLike.getTime?.();\n if (typeof ts === 'number' && Number.isFinite(ts)) return ts;\n }\n const seconds = token.expires_in ?? token.expiresIn;\n if (typeof seconds === 'number' && Number.isFinite(seconds)) {\n return Date.now() + seconds * 1000;\n }\n return undefined;\n};\n\nlet currentAccessToken: string | undefined;\nlet currentExpiryTs: number | undefined;\nlet pendingRefresh: Promise<void> | undefined;\n\n/**\n * Build an auto-auth proxy around getIntlayerAPI that:\n * - Fetches an OAuth2 token when needed\n * - Injects Authorization header for each request\n * - Refreshes token proactively when near expiry\n *\n * The returned API matches the shape of getIntlayerAPI.\n */\nexport const getIntlayerAPIProxy = (\n _baseAuthOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n): IntlayerAPI => {\n // Use a shared mutable auth options object captured by the API closures\n const authOptionsRef: FetcherOptions = { ..._baseAuthOptions };\n const hasCMSAuth =\n intlayerConfig?.editor?.clientId && intlayerConfig?.editor?.clientSecret;\n const baseApi = getIntlayerAPI(authOptionsRef, intlayerConfig);\n\n const needsRefresh = (): boolean => {\n if (!currentAccessToken) return true;\n if (!currentExpiryTs) return false; // If unknown, assume usable until failure\n\n return Date.now() + ONE_MINUTE_MS >= currentExpiryTs; // refresh 1 min before expiry\n };\n\n const refreshToken = async (): Promise<void> => {\n const doRefresh = async () => {\n const authApi = getOAuthAPI(intlayerConfig);\n const res = await authApi.getOAuth2AccessToken();\n const tokenData = res?.data as OAuthTokenLike | undefined;\n\n currentAccessToken = tokenData?.accessToken;\n currentExpiryTs = getExpiryTimestamp(tokenData);\n };\n\n if (!pendingRefresh) {\n pendingRefresh = doRefresh().finally(() => {\n pendingRefresh = undefined;\n });\n }\n await pendingRefresh;\n };\n\n const ensureValidToken = async () => {\n if (needsRefresh()) {\n await refreshToken();\n }\n };\n\n const applyAuthHeaderToRef = () => {\n if (!currentAccessToken) return;\n authOptionsRef.headers = {\n ...(authOptionsRef.headers ?? {}),\n Authorization: `Bearer ${currentAccessToken}`,\n } as HeadersInit;\n };\n\n const wrapSection = <T extends Record<string, unknown>>(\n section: T,\n skipAuth = !hasCMSAuth\n ): T => {\n return new Proxy(section, {\n get(target, prop, receiver) {\n const value = Reflect.get(target, prop, receiver);\n\n if (typeof value === 'function') {\n // Wrap section method to inject token and headers\n return async (...args: unknown[]) => {\n if (!skipAuth) {\n await ensureValidToken();\n applyAuthHeaderToRef();\n }\n\n try {\n return await value.apply(target, args);\n } catch (err) {\n // Best-effort retry: if token might be stale, refresh once and retry\n if (!skipAuth) {\n await refreshToken();\n applyAuthHeaderToRef();\n return await value.apply(target, args);\n }\n throw err;\n }\n };\n }\n\n return value;\n },\n });\n };\n\n return {\n organization: wrapSection(baseApi.organization),\n project: wrapSection(baseApi.project),\n user: wrapSection(baseApi.user),\n oAuth: wrapSection(baseApi.oAuth, true), // do NOT inject auth for token endpoint\n dictionary: wrapSection(baseApi.dictionary),\n stripe: wrapSection(baseApi.stripe),\n ai: wrapSection(baseApi.ai),\n tag: wrapSection(baseApi.tag),\n search: wrapSection(baseApi.search),\n editor: wrapSection(baseApi.editor),\n newsletter: wrapSection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AU;GACvB,GAAI,eAAe,WAAW,EAAE;GAChC,eAAe,UAAU;GAC1B;;CAGH,MAAM,eACJ,SACA,WAAW,CAAC,eACN;AACN,SAAO,IAAI,MAAM,SAAS,EACxB,IAAI,QAAQ,MAAM,UAAU;GAC1B,MAAM,QAAQ,QAAQ,IAAI,QAAQ,MAAM,SAAS;AAEjD,OAAI,OAAO,UAAU,WAEnB,QAAO,OAAO,GAAG,SAAoB;AACnC,QAAI,CAAC,UAAU;AACb,WAAM,kBAAkB;AACxB,2BAAsB;;AAGxB,QAAI;AACF,YAAO,MAAM,MAAM,MAAM,QAAQ,KAAK;aAC/B,KAAK;AAEZ,SAAI,CAAC,UAAU;AACb,YAAM,cAAc;AACpB,4BAAsB;AACtB,aAAO,MAAM,MAAM,MAAM,QAAQ,KAAK;;AAExC,WAAM;;;AAKZ,UAAO;KAEV,CAAC;;AAGJ,QAAO;EACL,cAAc,YAAY,QAAQ,aAAa;EAC/C,SAAS,YAAY,QAAQ,QAAQ;EACrC,MAAM,YAAY,QAAQ,KAAK;EAC/B,OAAO,YAAY,QAAQ,OAAO,KAAK;EACvC,YAAY,YAAY,QAAQ,WAAW;EAC3C,QAAQ,YAAY,QAAQ,OAAO;EACnC,IAAI,YAAY,QAAQ,GAAG;EAC3B,KAAK,YAAY,QAAQ,IAAI;EAC7B,QAAQ,YAAY,QAAQ,OAAO;EACnC,QAAQ,YAAY,QAAQ,OAAO;EACnC,YAAY,YAAY,QAAQ,WAAW;EAC5C"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.mjs.map
@@ -1,7 +1,12 @@
1
- import { type DictionaryAPI } from '@intlayer/backend';
2
- import { type IntlayerConfig } from '@intlayer/config/client';
1
+ import { DictionaryAPI } from "../types.js";
2
+ import { IntlayerConfig } from "@intlayer/types";
3
+
4
+ //#region src/distantDictionary/fetchDistantDictionaries.d.ts
5
+
3
6
  /**
4
7
  * Fetch distant dictionary
5
8
  */
6
- export declare const fetchDistantDictionaries: (intlayerConfig?: IntlayerConfig) => Promise<DictionaryAPI[] | null | undefined>;
9
+ declare const fetchDistantDictionaries: (intlayerConfig: IntlayerConfig) => Promise<DictionaryAPI[] | null | undefined>;
10
+ //#endregion
11
+ export { fetchDistantDictionaries };
7
12
  //# sourceMappingURL=fetchDistantDictionaries.d.ts.map
@@ -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;AAG9D;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,iBAAgB,cAA8B,KAC7C,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,GAAG,SAAS,CAsB5C,CAAC"}
1
+ {"version":3,"file":"fetchDistantDictionaries.d.ts","names":[],"sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"sourcesContent":[],"mappings":";;;;;;;AAOA;AACkB,cADL,wBACK,EAAA,CAAA,cAAA,EAAA,cAAA,EAAA,GACf,OADe,CACP,aADO,EAAA,GAAA,IAAA,GAAA,SAAA,CAAA"}
@@ -1,7 +1,12 @@
1
- import type { DictionaryAPI } from '@intlayer/backend';
2
- import type { IntlayerConfig } from '@intlayer/config/client';
1
+ import { DictionaryAPI } from "../types.js";
2
+ import { IntlayerConfig } from "@intlayer/types";
3
+
4
+ //#region src/distantDictionary/fetchDistantDictionary.d.ts
5
+
3
6
  /**
4
7
  * Fetch distant dictionary
5
8
  */
6
- export declare const fetchDistantDictionary: (dictionaryKey: string, intlayerConfig?: IntlayerConfig) => Promise<DictionaryAPI | undefined>;
9
+ declare const fetchDistantDictionary: (dictionaryKey: string, intlayerConfig: IntlayerConfig) => Promise<DictionaryAPI | undefined>;
10
+ //#endregion
11
+ export { fetchDistantDictionary };
7
12
  //# sourceMappingURL=fetchDistantDictionary.d.ts.map
@@ -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;AAG9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,eAAe,MAAM,EACrB,iBAAgB,cAA8B,KAC7C,OAAO,CAAC,aAAa,GAAG,SAAS,CA2BnC,CAAC"}
1
+ {"version":3,"file":"fetchDistantDictionary.d.ts","names":[],"sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"sourcesContent":[],"mappings":";;;;;;;AAOA;AAEkB,cAFL,sBAEK,EAAA,CAAA,aAAA,EAAA,MAAA,EAAA,cAAA,EAAA,cAAA,EAAA,GACf,OADe,CACP,aADO,GAAA,SAAA,CAAA"}
@@ -1,3 +1,3 @@
1
- export * from './fetchDistantDictionaries';
2
- export * from './fetchDistantDictionary';
3
- //# sourceMappingURL=index.d.ts.map
1
+ import { fetchDistantDictionaries } from "./fetchDistantDictionaries.js";
2
+ import { fetchDistantDictionary } from "./fetchDistantDictionary.js";
3
+ export { fetchDistantDictionaries, fetchDistantDictionary };
@@ -1,24 +1,25 @@
1
+ //#region src/fetcher.d.ts
1
2
  /**
2
3
  * Type definition for options used in the fetcher function.
3
4
  * Extends the standard RequestInit interface (excluding 'body'),
4
5
  * and adds 'body' and 'params' properties for convenience.
5
6
  */
6
- export type FetcherOptions = Omit<RequestInit, 'body'> & {
7
- /**
8
- * Body of the request. Should be a key-value pair object.
9
- */
10
- body?: Record<string, unknown>;
11
- /**
12
- * Query parameters to be appended to the URL.
13
- */
14
- params?: Record<string, string | string[] | undefined> | string[] | URLSearchParams;
7
+ type FetcherOptions = Omit<RequestInit, 'body'> & {
8
+ /**
9
+ * Body of the request. Should be a key-value pair object.
10
+ */
11
+ body?: Record<string, unknown>;
12
+ /**
13
+ * Query parameters to be appended to the URL.
14
+ */
15
+ params?: Record<string, string | string[] | undefined> | string[] | URLSearchParams;
15
16
  };
16
17
  /**
17
18
  * Default options for the fetcher function.
18
19
  * Sets the default method to 'GET', the 'Content-Type' header to 'application/json',
19
20
  * and includes credentials in the request.
20
21
  */
21
- export declare const fetcherOptions: FetcherOptions;
22
+ declare const fetcherOptions: FetcherOptions;
22
23
  /**
23
24
  * Fetcher function to make HTTP requests.
24
25
  * It merges default options with user-provided options,
@@ -66,5 +67,7 @@ export declare const fetcherOptions: FetcherOptions;
66
67
  * }
67
68
  * ```
68
69
  */
69
- export declare const fetcher: <T>(url: string, ...options: FetcherOptions[]) => Promise<T>;
70
+ declare const fetcher: <T>(url: string, ...options: FetcherOptions[]) => Promise<T>;
71
+ //#endregion
72
+ export { FetcherOptions, fetcher, fetcherOptions };
70
73
  //# sourceMappingURL=fetcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../src/fetcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG;IACvD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAC7C,MAAM,EAAE,GACR,eAAe,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,cAM5B,CAAC;AAwCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,OAAO,GAAU,CAAC,EAC7B,KAAK,MAAM,EACX,GAAG,SAAS,cAAc,EAAE,KAC3B,OAAO,CAAC,CAAC,CAwEX,CAAC"}
1
+ {"version":3,"file":"fetcher.d.ts","names":[],"sources":["../../src/fetcher.ts"],"sourcesContent":[],"mappings":";;AAKA;;;;AASM,KATM,cAAA,GAAiB,IASvB,CAT4B,WAS5B,EAAA,MAAA,CAAA,GAAA;EAEA;;AAQN;EA6Fa,IAAA,CAAA,EA5GJ,MAuLR,CAAA,MAAA,EAAA,OAAA,CAAA;EAzEa;;;EACJ,MAAA,CAAA,EA1GJ,MA0GI,CAAA,MAAA,EAAA,MAAA,GAAA,MAAA,EAAA,GAAA,SAAA,CAAA,GAAA,MAAA,EAAA,GAxGJ,eAwGI;;;;;;;cAhGG,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6FhB,sCAEC,qBACX,QAAQ"}
@@ -1,21 +1,25 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { type FetcherOptions } from '../fetcher';
3
- import type { AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult, AutocompleteBody, AutocompleteResponse, ChatCompletionRequestMessage, CustomQueryBody, CustomQueryResult, TranslateJSONBody, TranslateJSONResult } from '../types';
4
- export type AskDocQuestionBody = {
5
- messages: ChatCompletionRequestMessage[];
6
- discutionId: string;
7
- onMessage?: (chunk: string) => void;
8
- onDone?: (response: AskDocQuestionResult) => void;
1
+ import { AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, AutocompleteBody, ChatCompletionRequestMessage, CustomQueryBody, GetDiscussionsParams, TranslateJSONBody } from "../types.js";
2
+ import { FetcherOptions } from "../fetcher.js";
3
+ import { IntlayerConfig } from "@intlayer/types";
4
+
5
+ //#region src/getIntlayerAPI/ai.d.ts
6
+ type AskDocQuestionBody = {
7
+ messages: ChatCompletionRequestMessage[];
8
+ discussionId: string;
9
+ onMessage?: (chunk: string) => void;
10
+ onDone?: (response: AskDocQuestionResult) => void;
9
11
  };
10
- export type { AskDocQuestionResult };
11
- export declare const getAiAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
12
- customQuery: (body?: CustomQueryBody, otherOptions?: FetcherOptions) => Promise<CustomQueryResult>;
13
- translateJSON: (body?: TranslateJSONBody, otherOptions?: FetcherOptions) => Promise<TranslateJSONResult>;
14
- auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
15
- auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
16
- auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
17
- auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
18
- askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<void>;
19
- autocomplete: (body?: AutocompleteBody, otherOptions?: FetcherOptions) => Promise<AutocompleteResponse>;
12
+ declare const getAiAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
13
+ customQuery: (body?: CustomQueryBody, otherOptions?: FetcherOptions) => Promise<CustomQueryResult>;
14
+ translateJSON: (body?: TranslateJSONBody, otherOptions?: FetcherOptions) => Promise<TranslateJSONResult>;
15
+ auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
16
+ auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
17
+ auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
18
+ auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
19
+ askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<void>;
20
+ autocomplete: (body?: AutocompleteBody, otherOptions?: FetcherOptions) => Promise<AutocompleteResponse>;
21
+ getDiscussions: (params?: GetDiscussionsParams, otherOptions?: FetcherOptions) => Promise<GetDiscussionsResult>;
20
22
  };
23
+ //#endregion
24
+ export { AskDocQuestionBody, type AskDocQuestionResult, getAiAPI };
21
25
  //# sourceMappingURL=ai.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/ai.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,EACnC,qCAAqC,EACrC,6BAA6B,EAC7B,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,4BAA4B,EAAE,CAAC;IACzC,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;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YAAA,CAAA,EA4Ed,cA5Ec,EAAA,GA4EA,OA5EA,CA4EA,cA5EA,CAAA;EAkBrB,cAAA,EAAA,CAAA,IAAA,CAAA,EA0FA,kBA1FA,EAAA,YAAA,CAAA,EA2FO,cA3FP,EAAA,GA2FqB,OA3FrB,CAAA,IAAA,CAAA;EACO,YAAA,EAAA,CAAA,IAAA,CAAA,EAiLP,gBAjLO,EAAA,YAAA,CAAA,EAkLA,cAlLA,EAAA,GAkLc,OAlLd,CAkLc,oBAlLd,CAAA;EAAc,cAAA,EAAA,CAAA,MAAA,CAAA,EAkMnB,oBAlMmB,EAAA,YAAA,CAAA,EAmMd,cAnMc,EAAA,GAmMA,OAnMA,CAmMA,oBAnMA,CAAA;CAAA"}
@@ -1,14 +1,18 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { type FetcherOptions } from '../fetcher';
3
- import type { AddDictionaryBody, AddDictionaryResult, DeleteDictionaryParam, DeleteDictionaryResult, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionariesUpdateTimestampResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, PushDictionariesBody, PushDictionariesResult, UpdateDictionaryBody, UpdateDictionaryResult } from '../types';
4
- export declare const getDictionaryAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
- getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
6
- getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
7
- getDictionariesUpdateTimestamp: (otherOptions?: FetcherOptions) => Promise<GetDictionariesUpdateTimestampResult>;
8
- getDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
9
- pushDictionaries: (dictionaries: PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
10
- addDictionary: (body: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
11
- updateDictionary: (dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
12
- deleteDictionary: (id: DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
1
+ import { AddDictionaryBody, DeleteDictionaryParam, GetDictionariesParams, GetDictionaryParams, GetDictionaryQuery, PushDictionariesBody, UpdateDictionaryBody } from "../types.js";
2
+ import { FetcherOptions } from "../fetcher.js";
3
+ import { IntlayerConfig } from "@intlayer/types";
4
+
5
+ //#region src/getIntlayerAPI/dictionary.d.ts
6
+ declare const getDictionaryAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
7
+ getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
8
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
9
+ getDictionariesUpdateTimestamp: (otherOptions?: FetcherOptions) => Promise<GetDictionariesUpdateTimestampResult>;
10
+ getDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
11
+ pushDictionaries: (dictionaries: PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
12
+ addDictionary: (body: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
13
+ updateDictionary: (dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
14
+ deleteDictionary: (id: DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
13
15
  };
16
+ //#endregion
17
+ export { getDictionaryAPI };
14
18
  //# sourceMappingURL=dictionary.d.ts.map
@@ -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,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,oCAAoC,EACpC,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,gBAAgB,GAC3B,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;gCAkBnB,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;oDAW/C,cAAc;mCAcb,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;0BAftB,iBAAiB,iBACT,cAAc;mCA+BhB,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAqB/B,CAAC"}
1
+ {"version":3,"file":"dictionary.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/dictionary.ts"],"sourcesContent":[],"mappings":";;;;;cAqBa,oCACK,iCACC;8BAkBL,sCACI,mBAAc,QAAA;EArBnB,mBA8JZ,EAAA,CAAA,YAAA,CAAA,EAzHkD,cAyHlD,EAAA,GAzHgE,OAyHhE,CAzHgE,yBAyHhE,CAAA;EA7JiB,8BAAA,EAAA,CAAA,YAAA,CAAA,EAkDA,cAlDA,EAAA,GAkDc,OAlDd,CAkDc,oCAlDd,CAAA;EACC,aAAA,EAAA,CAAA,aAAA,EAkEA,mBAlEA,CAAA,eAAA,CAAA,EAAA,OAAA,CAAA,EAmEL,kBAnEK,CAAA,SAAA,CAAA,EAAA,YAAA,CAAA,EAoED,cApEC,EAAA,GAoEa,OApEb,CAoEa,mBApEb,CAAA;EAkBL,gBAAA,EAAA,CAAA,YAAA,EAgFI,oBAhFJ,CAAA,cAAA,CAAA,EAAA,YAAA,CAAA,EAiFI,cAjFJ,EAAA,GAiFkB,OAjFlB,CAiFkB,sBAjFlB,CAAA;EACI,aAAA,EAAA,CAAA,IAAA,EAiER,iBAjEQ,EAAA,YAAA,CAAA,EAkEA,cAlEA,EAAA,GAkEc,OAlEd,CAkEc,mBAlEd,CAAA;EAAc,gBAAA,EAAA,CAAA,UAAA,EAiGhB,oBAjGgB,EAAA,YAAA,CAAA,EAkGd,cAlGc,EAAA,GAkGA,OAlGA,CAkGA,sBAlGA,CAAA;EAAA,gBAAA,EAAA,CAAA,EAAA,EAmHxB,qBAnHwB,CAAA,cAAA,CAAA,EAAA,YAAA,CAAA,EAoHd,cApHc,EAAA,GAoHA,OApHA,CAoHA,sBApHA,CAAA;CAgBmB"}
@@ -1,9 +1,13 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { type FetcherOptions } from '../fetcher';
3
- import type { GetConfigurationResult, GetEditorDictionariesResult, WriteContentDeclarationBody, WriteContentDeclarationResult } from '../types';
4
- export declare const getEditorAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
- getDictionaries: (otherOptions?: FetcherOptions) => Promise<GetEditorDictionariesResult>;
6
- getConfiguration: (otherOptions?: FetcherOptions) => Promise<GetConfigurationResult>;
7
- writeDictionary: (body: WriteContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<WriteContentDeclarationResult>;
1
+ import { GetConfigurationResult, GetEditorDictionariesResult, WriteContentDeclarationBody } from "../types.js";
2
+ import { FetcherOptions } from "../fetcher.js";
3
+ import { IntlayerConfig } from "@intlayer/types";
4
+
5
+ //#region src/getIntlayerAPI/editor.d.ts
6
+ declare const getEditorAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
7
+ getDictionaries: (otherOptions?: FetcherOptions) => Promise<GetEditorDictionariesResult>;
8
+ getConfiguration: (otherOptions?: FetcherOptions) => Promise<GetConfigurationResult>;
9
+ writeDictionary: (body: WriteContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<WriteContentDeclarationResult>;
8
10
  };
11
+ //#endregion
12
+ export { getEditorAPI };
9
13
  //# sourceMappingURL=editor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/editor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,YAAY,GACvB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;qCA8Bf,cAAc,KAC3B,OAAO,CAAC,2BAA2B,CAAC;sCAhBvB,cAAc,KAC3B,OAAO,CAAC,sBAAsB,CAAC;4BA8B1B,2BAA2B,iBACnB,cAAc;CAiB/B,CAAC"}
1
+ {"version":3,"file":"editor.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/editor.ts"],"sourcesContent":[],"mappings":";;;;;cAUa,gCACK,iCACC;mCA8BD,mBACb,QAAQ;EAjCA,gBAkEZ,EAAA,CAAA,YAAA,CAAA,EAjDiB,cAiDjB,EAAA,GAhDI,OAgDJ,CAhDY,sBAgDZ,CAAA;EAjEiB,eAAA,EAAA,CAAA,IAAA,EA+CR,2BA/CQ,EAAA,YAAA,CAAA,EAgDA,cAhDA,EAAA,GAgDc,OAhDd,CAgDc,6BAhDd,CAAA;CACC"}
@@ -1,30 +1,33 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import type { FetcherOptions } from '../fetcher';
3
- import { getAiAPI } from './ai';
4
- import { getDictionaryAPI } from './dictionary';
5
- import { getEditorAPI } from './editor';
6
- import { getNewsletterAPI } from './newsletter';
7
- import { getOAuthAPI } from './oAuth';
8
- import { getOrganizationAPI } from './organization';
9
- import { getProjectAPI } from './project';
10
- import { getSearchAPI } from './search';
11
- import { getStripeAPI } from './stripe';
12
- import { getTagAPI } from './tag';
13
- import { getUserAPI } from './user';
1
+ import { FetcherOptions } from "../fetcher.js";
2
+ import { getAiAPI } from "./ai.js";
3
+ import { getDictionaryAPI } from "./dictionary.js";
4
+ import { getEditorAPI } from "./editor.js";
5
+ import { getNewsletterAPI } from "./newsletter.js";
6
+ import { getOAuthAPI } from "./oAuth.js";
7
+ import { getOrganizationAPI } from "./organization.js";
8
+ import { getProjectAPI } from "./project.js";
9
+ import { getSearchAPI } from "./search.js";
10
+ import { getStripeAPI } from "./stripe.js";
11
+ import { getTagAPI } from "./tag.js";
12
+ import { getUserAPI } from "./user.js";
13
+ import { IntlayerConfig } from "@intlayer/types";
14
+
15
+ //#region src/getIntlayerAPI/index.d.ts
14
16
  interface IntlayerAPIReturn {
15
- organization: ReturnType<typeof getOrganizationAPI>;
16
- project: ReturnType<typeof getProjectAPI>;
17
- user: ReturnType<typeof getUserAPI>;
18
- oAuth: ReturnType<typeof getOAuthAPI>;
19
- dictionary: ReturnType<typeof getDictionaryAPI>;
20
- stripe: ReturnType<typeof getStripeAPI>;
21
- ai: ReturnType<typeof getAiAPI>;
22
- tag: ReturnType<typeof getTagAPI>;
23
- search: ReturnType<typeof getSearchAPI>;
24
- editor: ReturnType<typeof getEditorAPI>;
25
- newsletter: ReturnType<typeof getNewsletterAPI>;
17
+ organization: ReturnType<typeof getOrganizationAPI>;
18
+ project: ReturnType<typeof getProjectAPI>;
19
+ user: ReturnType<typeof getUserAPI>;
20
+ oAuth: ReturnType<typeof getOAuthAPI>;
21
+ dictionary: ReturnType<typeof getDictionaryAPI>;
22
+ stripe: ReturnType<typeof getStripeAPI>;
23
+ ai: ReturnType<typeof getAiAPI>;
24
+ tag: ReturnType<typeof getTagAPI>;
25
+ search: ReturnType<typeof getSearchAPI>;
26
+ editor: ReturnType<typeof getEditorAPI>;
27
+ newsletter: ReturnType<typeof getNewsletterAPI>;
26
28
  }
27
- export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => IntlayerAPIReturn;
28
- export type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;
29
- export {};
29
+ declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => IntlayerAPIReturn;
30
+ type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;
31
+ //#endregion
32
+ export { IntlayerAPI, getIntlayerAPI };
30
33
  //# sourceMappingURL=index.d.ts.map
@@ -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;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,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,UALC,CAAA,OAKiB,SALjB,CAAA;EACmB,MAAA,EAKjB,UALiB,CAAA,OAKC,YALD,CAAA;EAAlB,MAAA,EAMC,UAND,CAAA,OAMmB,YANnB,CAAA;EACuB,UAAA,EAMlB,UANkB,CAAA,OAMA,gBANA,CAAA;;AACJ,cAQf,cARe,EAAA,CAAA,cAAA,CAAA,EASV,cATU,EAAA,cAAA,CAAA,EAUT,cAVS,EAAA,GAWzB,iBAXyB;AAAlB,KAyBE,WAAA,GAAc,UAzBhB,CAAA,OAyBkC,cAzBlC,CAAA"}
@@ -1,9 +1,13 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { type FetcherOptions } from '../fetcher';
3
- import type { NewsletterSubscriptionBody, NewsletterSubscriptionResult, NewsletterUnsubscriptionBody } from '../types';
4
- export declare const getNewsletterAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
- subscribeToNewsletter: (body: NewsletterSubscriptionBody, otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
6
- unsubscribeFromNewsletter: (body: NewsletterUnsubscriptionBody, otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
7
- getNewsletterStatus: (otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
1
+ import { NewsletterSubscriptionBody, NewsletterUnsubscriptionBody } from "../types.js";
2
+ import { FetcherOptions } from "../fetcher.js";
3
+ import { IntlayerConfig } from "@intlayer/types";
4
+
5
+ //#region src/getIntlayerAPI/newsletter.d.ts
6
+ declare const getNewsletterAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
7
+ subscribeToNewsletter: (body: NewsletterSubscriptionBody, otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
8
+ unsubscribeFromNewsletter: (body: NewsletterUnsubscriptionBody, otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
9
+ getNewsletterStatus: (otherOptions?: FetcherOptions) => Promise<NewsletterSubscriptionResult>;
8
10
  };
11
+ //#endregion
12
+ export { getNewsletterAPI };
9
13
  //# sourceMappingURL=newsletter.d.ts.map
@@ -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,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,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","names":[],"sources":["../../../src/getIntlayerAPI/newsletter.ts"],"sourcesContent":[],"mappings":";;;;;cASa,oCACK,iCACC;gCAmBT,2CACQ,mBAAc,QAAA;EAtBnB,yBAwEZ,EAAA,CAAA,IAAA,EAhCS,4BAgCT,EAAA,YAAA,CAAA,EA/BiB,cA+BjB,EAAA,GA/B+B,OA+B/B,CA/B+B,4BA+B/B,CAAA;EAvEiB,mBAAA,EAAA,CAAA,YAAA,CAAA,EAwDiC,cAxDjC,EAAA,GAwD+C,OAxD/C,CAwD+C,4BAxD/C,CAAA;CACC"}
@@ -1,7 +1,10 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { FetcherOptions } from '../fetcher';
3
- import { GetOAuth2TokenResult } from '../types';
4
- export declare const getOAuthAPI: (intlayerConfig?: IntlayerConfig) => {
5
- getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<GetOAuth2TokenResult>;
1
+ import { FetcherOptions } from "../fetcher.js";
2
+ import { IntlayerConfig } from "@intlayer/types";
3
+
4
+ //#region src/getIntlayerAPI/oAuth.d.ts
5
+ declare const getOAuthAPI: (intlayerConfig?: IntlayerConfig) => {
6
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<GetOAuth2TokenResult>;
6
7
  };
8
+ //#endregion
9
+ export { getOAuthAPI };
7
10
  //# sourceMappingURL=oAuth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oAuth.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/oAuth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAW,MAAM,YAAY,CAAC;AACrD,OAAO,EAAsB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEpE,eAAO,MAAM,WAAW,GAAI,iBAAiB,cAAc;0CAeP,cAAc;CAqBjE,CAAC"}
1
+ {"version":3,"file":"oAuth.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/oAuth.ts"],"sourcesContent":[],"mappings":";;;;cAKa,+BAAgC;wCAeO,mBAAc,QAAA;AAflE,CAAA"}
@@ -1,15 +1,20 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { type FetcherOptions } from '../fetcher';
3
- import type { AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, DeleteOrganizationResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, SelectOrganizationParam, SelectOrganizationResult, UnselectOrganizationResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult } from '../types';
4
- export declare const getOrganizationAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
- getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
6
- getOrganization: (organizationId: GetOrganizationParam["organizationId"], 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["organizationId"], otherOptions?: FetcherOptions) => Promise<SelectOrganizationResult>;
13
- unselectOrganization: (otherOptions?: FetcherOptions) => Promise<UnselectOrganizationResult>;
1
+ import { AddOrganizationBody, AddOrganizationMemberBody, GetOrganizationParam, GetOrganizationsParams, SelectOrganizationParam, UpdateOrganizationBody, UpdateOrganizationMembersBody } from "../types.js";
2
+ import { FetcherOptions } from "../fetcher.js";
3
+ import { IntlayerConfig } from "@intlayer/types";
4
+
5
+ //#region src/getIntlayerAPI/organization.d.ts
6
+ declare const getOrganizationAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
7
+ getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
8
+ getOrganization: (organizationId: GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<GetOrganizationResult>;
9
+ addOrganization: (organization: AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationResult>;
10
+ addOrganizationMember: (body: AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationMemberResult>;
11
+ updateOrganization: (organization: UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationResult>;
12
+ updateOrganizationMembers: (body: UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationMembersResult>;
13
+ updateOrganizationMembersById: (organizationId: string, body: UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationMembersResult>;
14
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<DeleteOrganizationResult>;
15
+ selectOrganization: (organizationId: SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<SelectOrganizationResult>;
16
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<UnselectOrganizationResult>;
14
17
  };
18
+ //#endregion
19
+ export { getOrganizationAPI };
15
20
  //# sourceMappingURL=organization.d.ts.map
@@ -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,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,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,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","names":[],"sources":["../../../src/getIntlayerAPI/organization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@@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { type FetcherOptions } from '../fetcher';
3
- import type { AddNewAccessKeyBody, AddNewAccessKeyResponse, AddProjectBody, AddProjectResult, DeleteAccessKeyBody, DeleteAccessKeyResponse, DeleteProjectResult, GetProjectsParams, GetProjectsResult, PushProjectConfigurationBody, PushProjectConfigurationResult, RefreshAccessKeyBody, RefreshAccessKeyResponse, SelectProjectParam, SelectProjectResult, UnselectProjectResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult } from '../types';
4
- export declare const getProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
- getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
6
- addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
7
- updateProject: (project: UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectResult>;
8
- updateProjectMembers: (body: UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectMembersResult>;
9
- pushProjectConfiguration: (projectConfiguration: PushProjectConfigurationBody, otherOptions?: FetcherOptions) => Promise<PushProjectConfigurationResult>;
10
- deleteProject: (otherOptions?: FetcherOptions) => Promise<DeleteProjectResult>;
11
- selectProject: (projectId: SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<SelectProjectResult>;
12
- unselectProject: (otherOptions?: FetcherOptions) => Promise<UnselectProjectResult>;
13
- addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
14
- deleteAccessKey: (clientId: DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
15
- refreshAccessKey: (clientId: RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
1
+ import { AddNewAccessKeyBody, AddProjectBody, DeleteAccessKeyBody, GetProjectsParams, PushProjectConfigurationBody, RefreshAccessKeyBody, SelectProjectParam, UpdateProjectBody, UpdateProjectMembersBody } from "../types.js";
2
+ import { FetcherOptions } from "../fetcher.js";
3
+ import { IntlayerConfig } from "@intlayer/types";
4
+
5
+ //#region src/getIntlayerAPI/project.d.ts
6
+ declare const getProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
7
+ getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
8
+ addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
9
+ updateProject: (project: UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectResult>;
10
+ updateProjectMembers: (body: UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectMembersResult>;
11
+ pushProjectConfiguration: (projectConfiguration: PushProjectConfigurationBody, otherOptions?: FetcherOptions) => Promise<PushProjectConfigurationResult>;
12
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<DeleteProjectResult>;
13
+ selectProject: (projectId: SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<SelectProjectResult>;
14
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<UnselectProjectResult>;
15
+ addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
16
+ deleteAccessKey: (clientId: DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
17
+ refreshAccessKey: (clientId: RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
16
18
  };
19
+ //#endregion
20
+ export { getProjectAPI };
17
21
  //# sourceMappingURL=project.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/project.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,M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A;EACC,oBAAA,EAAA,CAAA,IAAA,EAyET,wBAzES,EAAA,YAAA,CAAA,EA0ED,cA1EC,EAAA,GA0Ea,OA1Eb,CA0Ea,0BA1Eb,CAAA;EAkBL,wBAAA,EAAA,CAAA,oBAAA,EAwEY,4BAxEZ,EAAA,YAAA,CAAA,EAyEI,cAzEJ,EAAA,GAyEkB,OAzElB,CAyEkB,8BAzElB,CAAA;EACI,aAAA,EAAA,CAAA,YAAA,CAAA,EAwF2B,cAxF3B,EAAA,GAwFyC,OAxFzC,CAwFyC,mBAxFzC,CAAA;EAAc,aAAA,EAAA,CAAA,SAAA,EAuGjB,kBAvGiB,CAAA,WAAA,CAAA,EAAA,YAAA,CAAA,EAwGd,cAxGc,EAAA,GAwGA,OAxGA,CAwGA,mBAxGA,CAAA;EAAA,eAAA,EAAA,CAAA,YAAA,CAAA,EAuHe,cAvHf,EAAA,GAuH6B,OAvH7B,CAuH6B,qBAvH7B,CAAA;EAkBnB,eAAA,EAAA,CAAA,SAAA,EAsHE,mBAtHF,EAAA,YAAA,CAAA,EAuHK,cAvHL,EAAA,GAuHmB,OAvHnB,CAuHmB,uBAvHnB,CAAA;EACK,eAAA,EAAA,CAAA,QAAA,EAyIJ,mBAzII,CAAA,UAAA,CAAA,EAAA,YAAA,CAAA,EA0IA,cA1IA,EAAA,GA0Ic,OA1Id,CA0Ic,uBA1Id,CAAA;EAAc,gBAAA,EAAA,CAAA,QAAA,EA6JlB,oBA7JkB,CAAA,UAAA,CAAA,EAAA,YAAA,CAAA,EA8Jd,cA9Jc,EAAA,GA8JA,OA9JA,CA8JA,wBA9JA,CAAA;CAAA"}
@@ -1,7 +1,11 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { type FetcherOptions } from '../fetcher';
3
- import type { SearchDocUtilParams, SearchDocUtilResult } from '../types';
4
- export declare const getSearchAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
- searchDoc: (params?: SearchDocUtilParams, otherOptions?: FetcherOptions) => Promise<SearchDocUtilResult>;
1
+ import { SearchDocUtilParams } from "../types.js";
2
+ import { FetcherOptions } from "../fetcher.js";
3
+ import { IntlayerConfig } from "@intlayer/types";
4
+
5
+ //#region src/getIntlayerAPI/search.d.ts
6
+ declare const getSearchAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
7
+ searchDoc: (params?: SearchDocUtilParams, otherOptions?: FetcherOptions) => Promise<SearchDocUtilResult>;
6
8
  };
9
+ //#endregion
10
+ export { getSearchAPI };
7
11
  //# sourceMappingURL=search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/search.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEzE,eAAO,MAAM,YAAY,GACvB,iBAAgB,cAAmB,EACnC,iBAAiB,cAAc;yBAmBpB,mBAAmB,iBACd,cAAc;CAe/B,CAAC"}
1
+ {"version":3,"file":"search.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/search.ts"],"sourcesContent":[],"mappings":";;;;;cAKa,gCACK,iCACC;uBAmBN,oCACK,mBAAc,QAAA;AAtBhC,CAAA"}
@@ -1,9 +1,13 @@
1
- import type { IntlayerConfig } from '@intlayer/config/client';
2
- import { type FetcherOptions } from '../fetcher';
3
- import type { GetCheckoutSessionBody, GetCheckoutSessionResult, GetPricingBody, GetPricingResult } from '../types';
4
- export declare const getStripeAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
- getPricing: (body?: GetPricingBody, otherOptions?: FetcherOptions) => Promise<GetPricingResult>;
6
- getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
7
- cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
1
+ import { GetCheckoutSessionBody, GetPricingBody } from "../types.js";
2
+ import { FetcherOptions } from "../fetcher.js";
3
+ import { IntlayerConfig } from "@intlayer/types";
4
+
5
+ //#region src/getIntlayerAPI/stripe.d.ts
6
+ declare const getStripeAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
7
+ getPricing: (body?: GetPricingBody, otherOptions?: FetcherOptions) => Promise<GetPricingResult>;
8
+ getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
9
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
8
10
  };
11
+ //#endregion
12
+ export { getStripeAPI };
9
13
  //# sourceMappingURL=stripe.d.ts.map