@intlayer/api 8.4.0 → 8.4.2

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 (96) hide show
  1. package/dist/cjs/getIntlayerAPI/index.cjs +1 -2
  2. package/dist/cjs/getIntlayerAPI-CUu2tiLP.cjs +2 -0
  3. package/dist/cjs/getIntlayerAPI-CUu2tiLP.cjs.map +1 -0
  4. package/dist/cjs/index.cjs +1 -1
  5. package/dist/cjs/proxy.cjs +1 -1
  6. package/dist/cjs/proxy.cjs.map +1 -1
  7. package/dist/esm/index.mjs +1 -1
  8. package/dist/types/ai-FbIMwui1.d.ts +32 -0
  9. package/dist/types/ai-FbIMwui1.d.ts.map +1 -0
  10. package/dist/types/audit-DzTxbapP.d.ts +44 -0
  11. package/dist/types/audit-DzTxbapP.d.ts.map +1 -0
  12. package/dist/types/bitbucket-DeRx5IlR.d.ts +81 -0
  13. package/dist/types/bitbucket-DeRx5IlR.d.ts.map +1 -0
  14. package/dist/types/dictionary-W5LSPsxq.d.ts +18 -0
  15. package/dist/types/dictionary-W5LSPsxq.d.ts.map +1 -0
  16. package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts +2 -11
  17. package/dist/types/distantDictionary/fetchDistantDictionary.d.ts +2 -11
  18. package/dist/types/distantDictionary/index.d.ts +2 -2
  19. package/dist/types/{intlayer-editor/server/dist/utils/httpStatusCodes.d.ts → editor-DTBh5ovU.d.ts} +61 -3
  20. package/dist/types/editor-DTBh5ovU.d.ts.map +1 -0
  21. package/dist/types/fetchDistantDictionaries-CLQEr6NS.d.ts +11 -0
  22. package/dist/types/fetchDistantDictionaries-CLQEr6NS.d.ts.map +1 -0
  23. package/dist/types/fetchDistantDictionary-C7esreMl.d.ts +11 -0
  24. package/dist/types/fetchDistantDictionary-C7esreMl.d.ts.map +1 -0
  25. package/dist/types/getIntlayerAPI/ai.d.ts +2 -32
  26. package/dist/types/getIntlayerAPI/audit.d.ts +2 -44
  27. package/dist/types/getIntlayerAPI/bitbucket.d.ts +2 -81
  28. package/dist/types/getIntlayerAPI/dictionary.d.ts +2 -18
  29. package/dist/types/getIntlayerAPI/editor.d.ts +2 -14
  30. package/dist/types/getIntlayerAPI/github.d.ts +2 -65
  31. package/dist/types/getIntlayerAPI/gitlab.d.ts +2 -70
  32. package/dist/types/getIntlayerAPI/index.d.ts +16 -16
  33. package/dist/types/getIntlayerAPI/newsletter.d.ts +2 -13
  34. package/dist/types/getIntlayerAPI/oAuth.d.ts +2 -10
  35. package/dist/types/getIntlayerAPI/organization.d.ts +2 -20
  36. package/dist/types/getIntlayerAPI/project.d.ts +2 -25
  37. package/dist/types/getIntlayerAPI/search.d.ts +2 -11
  38. package/dist/types/getIntlayerAPI/showcaseProject.d.ts +2 -33
  39. package/dist/types/getIntlayerAPI/stripe.d.ts +2 -13
  40. package/dist/types/getIntlayerAPI/tag.d.ts +2 -14
  41. package/dist/types/getIntlayerAPI/user.d.ts +2 -22
  42. package/dist/types/github-D077Il7G.d.ts +65 -0
  43. package/dist/types/github-D077Il7G.d.ts.map +1 -0
  44. package/dist/types/gitlab-BrWydMCh.d.ts +70 -0
  45. package/dist/types/gitlab-BrWydMCh.d.ts.map +1 -0
  46. package/dist/types/index.d.ts +17 -17
  47. package/dist/types/newsletter-Dg_6QDY_.d.ts +13 -0
  48. package/dist/types/newsletter-Dg_6QDY_.d.ts.map +1 -0
  49. package/dist/types/oAuth-DfQmGzLO.d.ts +10 -0
  50. package/dist/types/oAuth-DfQmGzLO.d.ts.map +1 -0
  51. package/dist/types/organization-CNkB8dnj.d.ts +20 -0
  52. package/dist/types/organization-CNkB8dnj.d.ts.map +1 -0
  53. package/dist/types/project-DKLgh9Mz.d.ts +25 -0
  54. package/dist/types/project-DKLgh9Mz.d.ts.map +1 -0
  55. package/dist/types/proxy.d.ts.map +1 -1
  56. package/dist/types/search-CVbo1OMK.d.ts +11 -0
  57. package/dist/types/search-CVbo1OMK.d.ts.map +1 -0
  58. package/dist/types/showcaseProject-1zcpB4aW.d.ts +33 -0
  59. package/dist/types/showcaseProject-1zcpB4aW.d.ts.map +1 -0
  60. package/dist/types/stripe-vRfMjdAc.d.ts +13 -0
  61. package/dist/types/stripe-vRfMjdAc.d.ts.map +1 -0
  62. package/dist/types/tag-0oc2-9J5.d.ts +14 -0
  63. package/dist/types/tag-0oc2-9J5.d.ts.map +1 -0
  64. package/dist/types/user-BVi1Ho0Q.d.ts +22 -0
  65. package/dist/types/user-BVi1Ho0Q.d.ts.map +1 -0
  66. package/package.json +3 -3
  67. package/dist/cjs/_virtual/_rolldown/runtime.cjs +0 -1
  68. package/dist/cjs/getIntlayerAPI/index.cjs.map +0 -1
  69. package/dist/types/@intlayer/unmerged-dictionaries-entry/dist/types/index.d.ts +0 -10
  70. package/dist/types/@intlayer/unmerged-dictionaries-entry/dist/types/index.d.ts.map +0 -1
  71. package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts.map +0 -1
  72. package/dist/types/distantDictionary/fetchDistantDictionary.d.ts.map +0 -1
  73. package/dist/types/getIntlayerAPI/ai.d.ts.map +0 -1
  74. package/dist/types/getIntlayerAPI/audit.d.ts.map +0 -1
  75. package/dist/types/getIntlayerAPI/bitbucket.d.ts.map +0 -1
  76. package/dist/types/getIntlayerAPI/dictionary.d.ts.map +0 -1
  77. package/dist/types/getIntlayerAPI/editor.d.ts.map +0 -1
  78. package/dist/types/getIntlayerAPI/github.d.ts.map +0 -1
  79. package/dist/types/getIntlayerAPI/gitlab.d.ts.map +0 -1
  80. package/dist/types/getIntlayerAPI/newsletter.d.ts.map +0 -1
  81. package/dist/types/getIntlayerAPI/oAuth.d.ts.map +0 -1
  82. package/dist/types/getIntlayerAPI/organization.d.ts.map +0 -1
  83. package/dist/types/getIntlayerAPI/project.d.ts.map +0 -1
  84. package/dist/types/getIntlayerAPI/search.d.ts.map +0 -1
  85. package/dist/types/getIntlayerAPI/showcaseProject.d.ts.map +0 -1
  86. package/dist/types/getIntlayerAPI/stripe.d.ts.map +0 -1
  87. package/dist/types/getIntlayerAPI/tag.d.ts.map +0 -1
  88. package/dist/types/getIntlayerAPI/user.d.ts.map +0 -1
  89. package/dist/types/intlayer-editor/server/dist/controllers/configuration.controller.d.ts +0 -12
  90. package/dist/types/intlayer-editor/server/dist/controllers/configuration.controller.d.ts.map +0 -1
  91. package/dist/types/intlayer-editor/server/dist/controllers/dictionary.controller.d.ts +0 -25
  92. package/dist/types/intlayer-editor/server/dist/controllers/dictionary.controller.d.ts.map +0 -1
  93. package/dist/types/intlayer-editor/server/dist/export.d.ts +0 -2
  94. package/dist/types/intlayer-editor/server/dist/utils/httpStatusCodes.d.ts.map +0 -1
  95. package/dist/types/intlayer-editor/server/dist/utils/responseData.d.ts +0 -20
  96. package/dist/types/intlayer-editor/server/dist/utils/responseData.d.ts.map +0 -1
@@ -1,2 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`./ai.cjs`),n=require(`./audit.cjs`),r=require(`./bitbucket.cjs`),i=require(`./dictionary.cjs`),a=require(`./editor.cjs`),o=require(`./github.cjs`),s=require(`./gitlab.cjs`),c=require(`./newsletter.cjs`),l=require(`./oAuth.cjs`),u=require(`./organization.cjs`),d=require(`./project.cjs`),f=require(`./search.cjs`),p=require(`./showcaseProject.cjs`),m=require(`./stripe.cjs`),h=require(`./tag.cjs`),g=require(`./user.cjs`);let _=require(`@intlayer/config/built`);_=e.__toESM(_);let v=require(`defu`);const y=(e={},y)=>{let b=(0,v.defu)(y??{},_.default);return{organization:u.getOrganizationAPI(e,b),project:d.getProjectAPI(e,b),user:g.getUserAPI(e,b),oAuth:l.getOAuthAPI(b),dictionary:i.getDictionaryAPI(e,b),stripe:m.getStripeAPI(e,b),ai:t.getAiAPI(e,b),audit:n.getAuditAPI(e,b),tag:h.getTagAPI(e,b),search:f.getSearchAPI(e,b),editor:a.getEditorAPI(e,b),newsletter:c.getNewsletterAPI(e,b),github:o.getGithubAPI(e,b),gitlab:s.getGitlabAPI(e,b),bitbucket:r.getBitbucketAPI(e,b),showcaseProject:p.getShowcaseProjectAPI(e,b)}};exports.getIntlayerAPI=y;
2
- //# sourceMappingURL=index.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../getIntlayerAPI-CUu2tiLP.cjs`);exports.getIntlayerAPI=e.t;
@@ -0,0 +1,2 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./getIntlayerAPI/ai.cjs`),l=require(`./getIntlayerAPI/audit.cjs`),u=require(`./getIntlayerAPI/bitbucket.cjs`),d=require(`./getIntlayerAPI/dictionary.cjs`),f=require(`./getIntlayerAPI/editor.cjs`),p=require(`./getIntlayerAPI/github.cjs`),m=require(`./getIntlayerAPI/gitlab.cjs`),h=require(`./getIntlayerAPI/newsletter.cjs`),g=require(`./getIntlayerAPI/oAuth.cjs`),_=require(`./getIntlayerAPI/organization.cjs`),v=require(`./getIntlayerAPI/project.cjs`),y=require(`./getIntlayerAPI/search.cjs`),b=require(`./getIntlayerAPI/showcaseProject.cjs`),x=require(`./getIntlayerAPI/stripe.cjs`),S=require(`./getIntlayerAPI/tag.cjs`),C=require(`./getIntlayerAPI/user.cjs`);let w=require(`@intlayer/config/built`);w=s(w);let T=require(`defu`);const E=(e={},t)=>{let n=(0,T.defu)(t??{},w.default);return{organization:_.getOrganizationAPI(e,n),project:v.getProjectAPI(e,n),user:C.getUserAPI(e,n),oAuth:g.getOAuthAPI(n),dictionary:d.getDictionaryAPI(e,n),stripe:x.getStripeAPI(e,n),ai:c.getAiAPI(e,n),audit:l.getAuditAPI(e,n),tag:S.getTagAPI(e,n),search:y.getSearchAPI(e,n),editor:f.getEditorAPI(e,n),newsletter:h.getNewsletterAPI(e,n),github:p.getGithubAPI(e,n),gitlab:m.getGitlabAPI(e,n),bitbucket:u.getBitbucketAPI(e,n),showcaseProject:b.getShowcaseProjectAPI(e,n)}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return E}});
2
+ //# sourceMappingURL=getIntlayerAPI-CUu2tiLP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getIntlayerAPI-CUu2tiLP.cjs","names":["builtConfiguration","getOrganizationAPI","getProjectAPI","getUserAPI","getOAuthAPI","getDictionaryAPI","getStripeAPI","getAiAPI","getAuditAPI","getTagAPI","getSearchAPI","getEditorAPI","getNewsletterAPI","getGithubAPI","getGitlabAPI","getBitbucketAPI","getShowcaseProjectAPI"],"sources":["../../src/getIntlayerAPI/index.ts"],"sourcesContent":["import builtConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { defu } from 'defu';\nimport type { FetcherOptions } from '../fetcher';\nimport { getAiAPI } from './ai';\nimport { getAuditAPI } from './audit';\nimport { getBitbucketAPI } from './bitbucket';\nimport { getDictionaryAPI } from './dictionary';\nimport { getEditorAPI } from './editor';\nimport { getGithubAPI } from './github';\nimport { getGitlabAPI } from './gitlab';\nimport { getNewsletterAPI } from './newsletter';\nimport { getOAuthAPI } from './oAuth';\nimport { getOrganizationAPI } from './organization';\nimport { getProjectAPI } from './project';\nimport { getSearchAPI } from './search';\nimport { getShowcaseProjectAPI } from './showcaseProject';\nimport { getStripeAPI } from './stripe';\nimport { getTagAPI } from './tag';\nimport { getUserAPI } from './user';\n\ninterface IntlayerAPIReturn {\n organization: ReturnType<typeof getOrganizationAPI>;\n project: ReturnType<typeof getProjectAPI>;\n user: ReturnType<typeof getUserAPI>;\n oAuth: ReturnType<typeof getOAuthAPI>;\n dictionary: ReturnType<typeof getDictionaryAPI>;\n stripe: ReturnType<typeof getStripeAPI>;\n ai: ReturnType<typeof getAiAPI>;\n audit: ReturnType<typeof getAuditAPI>;\n tag: ReturnType<typeof getTagAPI>;\n search: ReturnType<typeof getSearchAPI>;\n editor: ReturnType<typeof getEditorAPI>;\n newsletter: ReturnType<typeof getNewsletterAPI>;\n github: ReturnType<typeof getGithubAPI>;\n gitlab: ReturnType<typeof getGitlabAPI>;\n bitbucket: ReturnType<typeof getBitbucketAPI>;\n showcaseProject: ReturnType<typeof getShowcaseProjectAPI>;\n}\n\nexport const getIntlayerAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n): IntlayerAPIReturn => {\n const resolvedConfig = defu(\n intlayerConfig ?? {},\n builtConfiguration\n ) as IntlayerConfig;\n\n return {\n organization: getOrganizationAPI(authAPIOptions, resolvedConfig),\n project: getProjectAPI(authAPIOptions, resolvedConfig),\n user: getUserAPI(authAPIOptions, resolvedConfig),\n oAuth: getOAuthAPI(resolvedConfig),\n dictionary: getDictionaryAPI(authAPIOptions, resolvedConfig),\n stripe: getStripeAPI(authAPIOptions, resolvedConfig),\n ai: getAiAPI(authAPIOptions, resolvedConfig),\n audit: getAuditAPI(authAPIOptions, resolvedConfig),\n tag: getTagAPI(authAPIOptions, resolvedConfig),\n search: getSearchAPI(authAPIOptions, resolvedConfig),\n editor: getEditorAPI(authAPIOptions, resolvedConfig),\n newsletter: getNewsletterAPI(authAPIOptions, resolvedConfig),\n github: getGithubAPI(authAPIOptions, resolvedConfig),\n gitlab: getGitlabAPI(authAPIOptions, resolvedConfig),\n bitbucket: getBitbucketAPI(authAPIOptions, resolvedConfig),\n showcaseProject: getShowcaseProjectAPI(authAPIOptions, resolvedConfig),\n };\n};\n\nexport type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;\n"],"mappings":"ysCAwCA,MAAa,GACX,EAAiC,EAAE,CACnC,IACsB,CACtB,IAAM,GAAA,EAAA,EAAA,MACJ,GAAkB,EAAE,CACpBA,EAAAA,QACD,CAED,MAAO,CACL,aAAcC,EAAAA,mBAAmB,EAAgB,EAAe,CAChE,QAASC,EAAAA,cAAc,EAAgB,EAAe,CACtD,KAAMC,EAAAA,WAAW,EAAgB,EAAe,CAChD,MAAOC,EAAAA,YAAY,EAAe,CAClC,WAAYC,EAAAA,iBAAiB,EAAgB,EAAe,CAC5D,OAAQC,EAAAA,aAAa,EAAgB,EAAe,CACpD,GAAIC,EAAAA,SAAS,EAAgB,EAAe,CAC5C,MAAOC,EAAAA,YAAY,EAAgB,EAAe,CAClD,IAAKC,EAAAA,UAAU,EAAgB,EAAe,CAC9C,OAAQC,EAAAA,aAAa,EAAgB,EAAe,CACpD,OAAQC,EAAAA,aAAa,EAAgB,EAAe,CACpD,WAAYC,EAAAA,iBAAiB,EAAgB,EAAe,CAC5D,OAAQC,EAAAA,aAAa,EAAgB,EAAe,CACpD,OAAQC,EAAAA,aAAa,EAAgB,EAAe,CACpD,UAAWC,EAAAA,gBAAgB,EAAgB,EAAe,CAC1D,gBAAiBC,EAAAA,sBAAsB,EAAgB,EAAe,CACvE"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./fetcher.cjs`),t=require(`./getIntlayerAPI/ai.cjs`),n=require(`./getIntlayerAPI/audit.cjs`),r=require(`./getIntlayerAPI/bitbucket.cjs`),i=require(`./getIntlayerAPI/dictionary.cjs`),a=require(`./getIntlayerAPI/editor.cjs`),o=require(`./getIntlayerAPI/github.cjs`),s=require(`./getIntlayerAPI/gitlab.cjs`),c=require(`./getIntlayerAPI/newsletter.cjs`),l=require(`./getIntlayerAPI/oAuth.cjs`),u=require(`./getIntlayerAPI/organization.cjs`),d=require(`./getIntlayerAPI/project.cjs`),f=require(`./getIntlayerAPI/search.cjs`),p=require(`./getIntlayerAPI/stripe.cjs`),m=require(`./getIntlayerAPI/tag.cjs`),h=require(`./getIntlayerAPI/user.cjs`),g=require(`./getIntlayerAPI/index.cjs`),_=require(`./proxy.cjs`),v=require(`./distantDictionary/fetchDistantDictionaries.cjs`),y=require(`./distantDictionary/fetchDistantDictionary.cjs`);exports.fetchDistantDictionaries=v.fetchDistantDictionaries,exports.fetchDistantDictionary=y.fetchDistantDictionary,exports.fetcher=e.fetcher,exports.fetcherOptions=e.fetcherOptions,exports.getAiAPI=t.getAiAPI,exports.getAuditAPI=n.getAuditAPI,exports.getBitbucketAPI=r.getBitbucketAPI,exports.getDictionaryAPI=i.getDictionaryAPI,exports.getEditorAPI=a.getEditorAPI,exports.getGithubAPI=o.getGithubAPI,exports.getGitlabAPI=s.getGitlabAPI,exports.getIntlayerAPI=g.getIntlayerAPI,exports.getIntlayerAPIProxy=_.getIntlayerAPIProxy,exports.getNewsletterAPI=c.getNewsletterAPI,exports.getOAuthAPI=l.getOAuthAPI,exports.getOrganizationAPI=u.getOrganizationAPI,exports.getProjectAPI=d.getProjectAPI,exports.getSearchAPI=f.getSearchAPI,exports.getStripeAPI=p.getStripeAPI,exports.getTagAPI=m.getTagAPI,exports.getUserAPI=h.getUserAPI;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./getIntlayerAPI-CUu2tiLP.cjs`),t=require(`./fetcher.cjs`);require(`./types.cjs`);const n=require(`./getIntlayerAPI/ai.cjs`),r=require(`./getIntlayerAPI/audit.cjs`),i=require(`./getIntlayerAPI/bitbucket.cjs`),a=require(`./getIntlayerAPI/dictionary.cjs`),o=require(`./getIntlayerAPI/editor.cjs`),s=require(`./getIntlayerAPI/github.cjs`),c=require(`./getIntlayerAPI/gitlab.cjs`),l=require(`./getIntlayerAPI/newsletter.cjs`),u=require(`./getIntlayerAPI/oAuth.cjs`),d=require(`./getIntlayerAPI/organization.cjs`),f=require(`./getIntlayerAPI/project.cjs`),p=require(`./getIntlayerAPI/search.cjs`),m=require(`./getIntlayerAPI/stripe.cjs`),h=require(`./getIntlayerAPI/tag.cjs`),g=require(`./getIntlayerAPI/user.cjs`),_=require(`./proxy.cjs`),v=require(`./distantDictionary/fetchDistantDictionaries.cjs`),y=require(`./distantDictionary/fetchDistantDictionary.cjs`);require(`./distantDictionary/index.cjs`),exports.fetchDistantDictionaries=v.fetchDistantDictionaries,exports.fetchDistantDictionary=y.fetchDistantDictionary,exports.fetcher=t.fetcher,exports.fetcherOptions=t.fetcherOptions,exports.getAiAPI=n.getAiAPI,exports.getAuditAPI=r.getAuditAPI,exports.getBitbucketAPI=i.getBitbucketAPI,exports.getDictionaryAPI=a.getDictionaryAPI,exports.getEditorAPI=o.getEditorAPI,exports.getGithubAPI=s.getGithubAPI,exports.getGitlabAPI=c.getGitlabAPI,exports.getIntlayerAPI=e.t,exports.getIntlayerAPIProxy=_.getIntlayerAPIProxy,exports.getNewsletterAPI=l.getNewsletterAPI,exports.getOAuthAPI=u.getOAuthAPI,exports.getOrganizationAPI=d.getOrganizationAPI,exports.getProjectAPI=f.getProjectAPI,exports.getSearchAPI=p.getSearchAPI,exports.getStripeAPI=m.getStripeAPI,exports.getTagAPI=h.getTagAPI,exports.getUserAPI=g.getUserAPI;
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./getIntlayerAPI/oAuth.cjs`),t=require(`./getIntlayerAPI/index.cjs`),n=e=>{if(!e)return;let t=e.accessTokenExpiresAt??e.expiresAt;if(t){let e=typeof t==`string`?Date.parse(t):t.getTime?.();if(typeof e==`number`&&Number.isFinite(e))return e}let n=e.expires_in??e.expiresIn;if(typeof n==`number`&&Number.isFinite(n))return Date.now()+n*1e3};let r,i,a;const o=(o={},s)=>{let c={...o},l=s?.editor?.clientId&&s?.editor?.clientSecret,u=t.getIntlayerAPI(c,s),d=()=>r?i?Date.now()+6e4>=i:!1:!0,f=async()=>{a||=(async()=>{let t=(await e.getOAuthAPI(s).getOAuth2AccessToken())?.data;r=t?.accessToken,i=n(t)})().finally(()=>{a=void 0}),await a},p=async()=>{d()&&await f()},m=()=>{r&&(c.headers={...c.headers??{},Authorization:`Bearer ${r}`})},h=(e,t=!l)=>new Proxy(e,{get(e,n,r){let i=Reflect.get(e,n,r);return typeof i==`function`?async(...n)=>{t||(await p(),m());try{return await i.apply(e,n)}catch(r){if(!t)return await f(),m(),await i.apply(e,n);throw r}}:i}});return{organization:h(u.organization),project:h(u.project),user:h(u.user),oAuth:h(u.oAuth,!0),dictionary:h(u.dictionary),stripe:h(u.stripe),ai:h(u.ai),tag:h(u.tag),search:h(u.search),editor:h(u.editor),newsletter:h(u.newsletter),github:h(u.github)}};exports.getIntlayerAPIProxy=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./getIntlayerAPI-CUu2tiLP.cjs`),t=require(`./getIntlayerAPI/oAuth.cjs`),n=e=>{if(!e)return;let t=e.accessTokenExpiresAt??e.expiresAt;if(t){let e=typeof t==`string`?Date.parse(t):t.getTime?.();if(typeof e==`number`&&Number.isFinite(e))return e}let n=e.expires_in??e.expiresIn;if(typeof n==`number`&&Number.isFinite(n))return Date.now()+n*1e3};let r,i,a;const o=(o={},s)=>{let c={...o},l=s?.editor?.clientId&&s?.editor?.clientSecret,u=e.t(c,s),d=()=>r?i?Date.now()+6e4>=i:!1:!0,f=async()=>{a||=(async()=>{let e=(await t.getOAuthAPI(s).getOAuth2AccessToken())?.data;r=e?.accessToken,i=n(e)})().finally(()=>{a=void 0}),await a},p=async()=>{d()&&await f()},m=()=>{r&&(c.headers={...c.headers??{},Authorization:`Bearer ${r}`})},h=(e,t=!l)=>new Proxy(e,{get(e,n,r){let i=Reflect.get(e,n,r);return typeof i==`function`?async(...n)=>{t||(await p(),m());try{return await i.apply(e,n)}catch(r){if(!t)return await f(),m(),await i.apply(e,n);throw r}}:i}});return{organization:h(u.organization),project:h(u.project),user:h(u.user),oAuth:h(u.oAuth,!0),dictionary:h(u.dictionary),stripe:h(u.stripe),ai:h(u.ai),tag:h(u.tag),search:h(u.search),editor:h(u.editor),newsletter:h(u.newsletter),github:h(u.github)}};exports.getIntlayerAPIProxy=o;
2
2
  //# sourceMappingURL=proxy.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.cjs","names":["getIntlayerAPI","getOAuthAPI"],"sources":["../../src/proxy.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types/config';\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(baseApi.newsletter),\n github: wrapSection(baseApi.github),\n } as IntlayerAPI;\n};\n\nexport type IntlayerAPIProxy = ReturnType<typeof getIntlayerAPIProxy>;\n"],"mappings":"yJAmBM,EACJ,GACuB,CACvB,GAAI,CAAC,EAAO,OACZ,IAAM,EAAY,EAAM,sBAAwB,EAAM,UAItD,GAAI,EAAU,CACZ,IAAM,EACJ,OAAO,GAAa,SAChB,KAAK,MAAM,EAAS,CACpB,EAAS,WAAW,CAC1B,GAAI,OAAO,GAAO,UAAY,OAAO,SAAS,EAAG,CAAE,OAAO,EAE5D,IAAM,EAAU,EAAM,YAAc,EAAM,UAC1C,GAAI,OAAO,GAAY,UAAY,OAAO,SAAS,EAAQ,CACzD,OAAO,KAAK,KAAK,CAAG,EAAU,KAKlC,IAAI,EACA,EACA,EAUJ,MAAa,GACX,EAAkC,EAAE,CACpC,IACgB,CAEhB,IAAM,EAAiC,CAAE,GAAG,EAAiB,CACvD,EACJ,GAAgB,QAAQ,UAAY,GAAgB,QAAQ,aACxD,EAAUA,EAAAA,eAAe,EAAgB,EAAe,CAExD,MACC,EACA,EAEE,KAAK,KAAK,CAAG,KAAiB,EAFR,GADG,GAM5B,EAAe,SAA2B,CAU9C,AACE,KAVgB,SAAY,CAG5B,IAAM,GADM,MADIC,EAAAA,YAAY,EAAe,CACjB,sBAAsB,GACzB,KAEvB,EAAqB,GAAW,YAChC,EAAkB,EAAmB,EAAU,IAInB,CAAC,YAAc,CACzC,EAAiB,IAAA,IACjB,CAEJ,MAAM,GAGF,EAAmB,SAAY,CAC/B,GAAc,EAChB,MAAM,GAAc,EAIlB,MAA6B,CAC5B,IACL,EAAe,QAAU,CACvB,GAAI,EAAe,SAAW,EAAE,CAChC,cAAe,UAAU,IAC1B,GAGG,GACJ,EACA,EAAW,CAAC,IAEL,IAAI,MAAM,EAAS,CACxB,IAAI,EAAQ,EAAM,EAAU,CAC1B,IAAM,EAAQ,QAAQ,IAAI,EAAQ,EAAM,EAAS,CAwBjD,OAtBI,OAAO,GAAU,WAEZ,MAAO,GAAG,IAAoB,CAC9B,IACH,MAAM,GAAkB,CACxB,GAAsB,EAGxB,GAAI,CACF,OAAO,MAAM,EAAM,MAAM,EAAQ,EAAK,OAC/B,EAAK,CAEZ,GAAI,CAAC,EAGH,OAFA,MAAM,GAAc,CACpB,GAAsB,CACf,MAAM,EAAM,MAAM,EAAQ,EAAK,CAExC,MAAM,IAKL,GAEV,CAAC,CAGJ,MAAO,CACL,aAAc,EAAY,EAAQ,aAAa,CAC/C,QAAS,EAAY,EAAQ,QAAQ,CACrC,KAAM,EAAY,EAAQ,KAAK,CAC/B,MAAO,EAAY,EAAQ,MAAO,GAAK,CACvC,WAAY,EAAY,EAAQ,WAAW,CAC3C,OAAQ,EAAY,EAAQ,OAAO,CACnC,GAAI,EAAY,EAAQ,GAAG,CAC3B,IAAK,EAAY,EAAQ,IAAI,CAC7B,OAAQ,EAAY,EAAQ,OAAO,CACnC,OAAQ,EAAY,EAAQ,OAAO,CACnC,WAAY,EAAY,EAAQ,WAAW,CAC3C,OAAQ,EAAY,EAAQ,OAAO,CACpC"}
1
+ {"version":3,"file":"proxy.cjs","names":["getIntlayerAPI","getOAuthAPI"],"sources":["../../src/proxy.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types/config';\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(baseApi.newsletter),\n github: wrapSection(baseApi.github),\n } as IntlayerAPI;\n};\n\nexport type IntlayerAPIProxy = ReturnType<typeof getIntlayerAPIProxy>;\n"],"mappings":"4JAmBM,EACJ,GACuB,CACvB,GAAI,CAAC,EAAO,OACZ,IAAM,EAAY,EAAM,sBAAwB,EAAM,UAItD,GAAI,EAAU,CACZ,IAAM,EACJ,OAAO,GAAa,SAChB,KAAK,MAAM,EAAS,CACpB,EAAS,WAAW,CAC1B,GAAI,OAAO,GAAO,UAAY,OAAO,SAAS,EAAG,CAAE,OAAO,EAE5D,IAAM,EAAU,EAAM,YAAc,EAAM,UAC1C,GAAI,OAAO,GAAY,UAAY,OAAO,SAAS,EAAQ,CACzD,OAAO,KAAK,KAAK,CAAG,EAAU,KAKlC,IAAI,EACA,EACA,EAUJ,MAAa,GACX,EAAkC,EAAE,CACpC,IACgB,CAEhB,IAAM,EAAiC,CAAE,GAAG,EAAiB,CACvD,EACJ,GAAgB,QAAQ,UAAY,GAAgB,QAAQ,aACxD,EAAUA,EAAAA,EAAe,EAAgB,EAAe,CAExD,MACC,EACA,EAEE,KAAK,KAAK,CAAG,KAAiB,EAFR,GADG,GAM5B,EAAe,SAA2B,CAU9C,AACE,KAVgB,SAAY,CAG5B,IAAM,GADM,MADIC,EAAAA,YAAY,EAAe,CACjB,sBAAsB,GACzB,KAEvB,EAAqB,GAAW,YAChC,EAAkB,EAAmB,EAAU,IAInB,CAAC,YAAc,CACzC,EAAiB,IAAA,IACjB,CAEJ,MAAM,GAGF,EAAmB,SAAY,CAC/B,GAAc,EAChB,MAAM,GAAc,EAIlB,MAA6B,CAC5B,IACL,EAAe,QAAU,CACvB,GAAI,EAAe,SAAW,EAAE,CAChC,cAAe,UAAU,IAC1B,GAGG,GACJ,EACA,EAAW,CAAC,IAEL,IAAI,MAAM,EAAS,CACxB,IAAI,EAAQ,EAAM,EAAU,CAC1B,IAAM,EAAQ,QAAQ,IAAI,EAAQ,EAAM,EAAS,CAwBjD,OAtBI,OAAO,GAAU,WAEZ,MAAO,GAAG,IAAoB,CAC9B,IACH,MAAM,GAAkB,CACxB,GAAsB,EAGxB,GAAI,CACF,OAAO,MAAM,EAAM,MAAM,EAAQ,EAAK,OAC/B,EAAK,CAEZ,GAAI,CAAC,EAGH,OAFA,MAAM,GAAc,CACpB,GAAsB,CACf,MAAM,EAAM,MAAM,EAAQ,EAAK,CAExC,MAAM,IAKL,GAEV,CAAC,CAGJ,MAAO,CACL,aAAc,EAAY,EAAQ,aAAa,CAC/C,QAAS,EAAY,EAAQ,QAAQ,CACrC,KAAM,EAAY,EAAQ,KAAK,CAC/B,MAAO,EAAY,EAAQ,MAAO,GAAK,CACvC,WAAY,EAAY,EAAQ,WAAW,CAC3C,OAAQ,EAAY,EAAQ,OAAO,CACnC,GAAI,EAAY,EAAQ,GAAG,CAC3B,IAAK,EAAY,EAAQ,IAAI,CAC7B,OAAQ,EAAY,EAAQ,OAAO,CACnC,OAAQ,EAAY,EAAQ,OAAO,CACnC,WAAY,EAAY,EAAQ,WAAW,CAC3C,OAAQ,EAAY,EAAQ,OAAO,CACpC"}
@@ -1 +1 @@
1
- import{fetcher as e,fetcherOptions as t}from"./fetcher.mjs";import{getAiAPI as n}from"./getIntlayerAPI/ai.mjs";import{getAuditAPI as r}from"./getIntlayerAPI/audit.mjs";import{getBitbucketAPI as i}from"./getIntlayerAPI/bitbucket.mjs";import{getDictionaryAPI as a}from"./getIntlayerAPI/dictionary.mjs";import{getEditorAPI as o}from"./getIntlayerAPI/editor.mjs";import{getGithubAPI as s}from"./getIntlayerAPI/github.mjs";import{getGitlabAPI as c}from"./getIntlayerAPI/gitlab.mjs";import{getNewsletterAPI as l}from"./getIntlayerAPI/newsletter.mjs";import{getOAuthAPI as u}from"./getIntlayerAPI/oAuth.mjs";import{getOrganizationAPI as d}from"./getIntlayerAPI/organization.mjs";import{getProjectAPI as f}from"./getIntlayerAPI/project.mjs";import{getSearchAPI as p}from"./getIntlayerAPI/search.mjs";import{getStripeAPI as m}from"./getIntlayerAPI/stripe.mjs";import{getTagAPI as h}from"./getIntlayerAPI/tag.mjs";import{getUserAPI as g}from"./getIntlayerAPI/user.mjs";import{getIntlayerAPI as _}from"./getIntlayerAPI/index.mjs";import{getIntlayerAPIProxy as v}from"./proxy.mjs";import{fetchDistantDictionaries as y}from"./distantDictionary/fetchDistantDictionaries.mjs";import{fetchDistantDictionary as b}from"./distantDictionary/fetchDistantDictionary.mjs";export{y as fetchDistantDictionaries,b as fetchDistantDictionary,e as fetcher,t as fetcherOptions,n as getAiAPI,r as getAuditAPI,i as getBitbucketAPI,a as getDictionaryAPI,o as getEditorAPI,s as getGithubAPI,c as getGitlabAPI,_ as getIntlayerAPI,v as getIntlayerAPIProxy,l as getNewsletterAPI,u as getOAuthAPI,d as getOrganizationAPI,f as getProjectAPI,p as getSearchAPI,m as getStripeAPI,h as getTagAPI,g as getUserAPI};
1
+ import{fetcher as e,fetcherOptions as t}from"./fetcher.mjs";import"./types.mjs";import{getAiAPI as n}from"./getIntlayerAPI/ai.mjs";import{getAuditAPI as r}from"./getIntlayerAPI/audit.mjs";import{getBitbucketAPI as i}from"./getIntlayerAPI/bitbucket.mjs";import{getDictionaryAPI as a}from"./getIntlayerAPI/dictionary.mjs";import{getEditorAPI as o}from"./getIntlayerAPI/editor.mjs";import{getGithubAPI as s}from"./getIntlayerAPI/github.mjs";import{getGitlabAPI as c}from"./getIntlayerAPI/gitlab.mjs";import{getNewsletterAPI as l}from"./getIntlayerAPI/newsletter.mjs";import{getOAuthAPI as u}from"./getIntlayerAPI/oAuth.mjs";import{getOrganizationAPI as d}from"./getIntlayerAPI/organization.mjs";import{getProjectAPI as f}from"./getIntlayerAPI/project.mjs";import{getSearchAPI as p}from"./getIntlayerAPI/search.mjs";import{getStripeAPI as m}from"./getIntlayerAPI/stripe.mjs";import{getTagAPI as h}from"./getIntlayerAPI/tag.mjs";import{getUserAPI as g}from"./getIntlayerAPI/user.mjs";import{getIntlayerAPI as _}from"./getIntlayerAPI/index.mjs";import{getIntlayerAPIProxy as v}from"./proxy.mjs";import{fetchDistantDictionaries as y}from"./distantDictionary/fetchDistantDictionaries.mjs";import{fetchDistantDictionary as b}from"./distantDictionary/fetchDistantDictionary.mjs";import"./distantDictionary/index.mjs";export{y as fetchDistantDictionaries,b as fetchDistantDictionary,e as fetcher,t as fetcherOptions,n as getAiAPI,r as getAuditAPI,i as getBitbucketAPI,a as getDictionaryAPI,o as getEditorAPI,s as getGithubAPI,c as getGitlabAPI,_ as getIntlayerAPI,v as getIntlayerAPIProxy,l as getNewsletterAPI,u as getOAuthAPI,d as getOrganizationAPI,f as getProjectAPI,p as getSearchAPI,m as getStripeAPI,h as getTagAPI,g as getUserAPI};
@@ -0,0 +1,32 @@
1
+ import { FetcherOptions } from "./fetcher.js";
2
+ import { AIOptions, AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, ChatCompletionRequestMessage, CustomQueryBody, GetDiscussionsParams, TranslateJSONBody } from "@intlayer/backend";
3
+ import { IntlayerConfig } from "@intlayer/types/config";
4
+
5
+ //#region src/getIntlayerAPI/ai.d.ts
6
+ type AutocompleteBody = {
7
+ text: string;
8
+ aiOptions?: AIOptions;
9
+ contextBefore?: string;
10
+ currentLine?: string;
11
+ contextAfter?: string;
12
+ };
13
+ type AskDocQuestionBody = {
14
+ messages: ChatCompletionRequestMessage[];
15
+ discussionId: string;
16
+ onMessage?: (chunk: string) => void;
17
+ onDone?: (response: AskDocQuestionResult) => void;
18
+ };
19
+ declare const getAiAPI: (authAPIOptions: FetcherOptions, intlayerConfig: IntlayerConfig) => {
20
+ customQuery: (body?: CustomQueryBody, otherOptions?: FetcherOptions) => Promise<CustomQueryResult>;
21
+ translateJSON: (body?: TranslateJSONBody, otherOptions?: FetcherOptions) => Promise<TranslateJSONResult>;
22
+ auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
23
+ auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
24
+ auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
25
+ auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
26
+ askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<void>;
27
+ autocomplete: (body?: AutocompleteBody, otherOptions?: FetcherOptions) => Promise<AutocompleteResponse>;
28
+ getDiscussions: (params?: GetDiscussionsParams, otherOptions?: FetcherOptions) => Promise<GetDiscussionsResult>;
29
+ };
30
+ //#endregion
31
+ export { getAiAPI as i, AskDocQuestionResult as n, AutocompleteBody as r, AskDocQuestionBody as t };
32
+ //# sourceMappingURL=ai-FbIMwui1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-FbIMwui1.d.ts","names":[],"sources":["../../src/getIntlayerAPI/ai.ts"],"mappings":";;;;;KAuBY,gBAAA;EACV,IAAA;EACA,SAAA,GAAY,SAAA;EACZ,aAAA;EACA,WAAA;EACA,YAAA;AAAA;AAAA,KAGU,kBAAA;EACV,QAAA,EAAU,4BAAA;EACV,YAAA;EACA,SAAA,IAAa,KAAA;EACb,MAAA,IAAU,QAAA,EAAU,oBAAA;AAAA;AAAA,cAKT,QAAA,GACX,cAAA,EAAgB,cAAA,EAChB,cAAA,EAAgB,cAAA;uBAYP,eAAA,EAAe,YAAA,GACR,cAAA,KAAc,OAAA,CAAA,iBAAA;yBAkBrB,iBAAA,EAAiB,YAAA,GACV,cAAA,KAAc,OAAA,CAAA,mBAAA;mCAkBrB,2BAAA,EAA2B,YAAA,GACpB,cAAA,KAAc,OAAA,CAAA,6BAAA;wCAkBrB,gCAAA,EAAgC,YAAA,GACzB,cAAA,KAAc,OAAA,CAAA,kCAAA;2CAkBrB,mCAAA,EAAmC,YAAA,GAC5B,cAAA,KAAc,OAAA,CAAA,qCAAA;oBAkBrB,YAAA,EAAY,YAAA,GACL,cAAA,KAAc,OAAA,CAAA,cAAA;0BAgCrB,kBAAA,EAAkB,YAAA,GACX,cAAA,KAAc,OAAA;wBAuFrB,gBAAA,EAAgB,YAAA,GACT,cAAA,KAAc,OAAA,CAAA,oBAAA;4BAgBnB,oBAAA,EAAoB,YAAA,GACf,cAAA,KAAc,OAAA,CAAA,oBAAA;AAAA"}
@@ -0,0 +1,44 @@
1
+ import { FetcherOptions } from "./fetcher.js";
2
+ import { AuditEvent, GetRecursiveAuditStatusResult, StartRecursiveAuditResult } from "@intlayer/backend";
3
+ import { IntlayerConfig } from "@intlayer/types/config";
4
+
5
+ //#region src/getIntlayerAPI/audit.d.ts
6
+ type ScanUrlBody = {
7
+ url: string;
8
+ onMessage?: (event: AuditEvent) => void;
9
+ onDone?: () => void;
10
+ };
11
+ type DiscoverUrlsParams = {
12
+ url: string;
13
+ };
14
+ type DiscoverUrlsResult = {
15
+ urls: string[];
16
+ };
17
+ type StartRecursiveAuditBody = {
18
+ url: string;
19
+ urls?: string[];
20
+ };
21
+ type GetRecursiveAuditStatusParams = {
22
+ jobId: string;
23
+ };
24
+ type RecursiveAuditJobParams = {
25
+ jobId: string;
26
+ };
27
+ declare const getAuditAPI: (authAPIOptions: FetcherOptions, intlayerConfig: IntlayerConfig) => {
28
+ discoverUrls: (params?: DiscoverUrlsParams, otherOptions?: FetcherOptions) => Promise<DiscoverUrlsResult>;
29
+ scanUrl: (body?: ScanUrlBody, otherOptions?: FetcherOptions) => Promise<void>;
30
+ startRecursiveAudit: (body?: StartRecursiveAuditBody, otherOptions?: FetcherOptions) => Promise<StartRecursiveAuditResult>;
31
+ getRecursiveAuditStatus: (params?: GetRecursiveAuditStatusParams, otherOptions?: FetcherOptions) => Promise<GetRecursiveAuditStatusResult>;
32
+ cancelRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
33
+ success: boolean;
34
+ }>;
35
+ pauseRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
36
+ success: boolean;
37
+ }>;
38
+ resumeRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
39
+ success: boolean;
40
+ }>;
41
+ };
42
+ //#endregion
43
+ export { GetRecursiveAuditStatusResult as a, StartRecursiveAuditBody as c, GetRecursiveAuditStatusParams as i, StartRecursiveAuditResult as l, DiscoverUrlsParams as n, RecursiveAuditJobParams as o, DiscoverUrlsResult as r, ScanUrlBody as s, AuditEvent as t, getAuditAPI as u };
44
+ //# sourceMappingURL=audit-DzTxbapP.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-DzTxbapP.d.ts","names":[],"sources":["../../src/getIntlayerAPI/audit.ts"],"mappings":";;;;;KAcY,WAAA;EACV,GAAA;EACA,SAAA,IAAa,KAAA,EAAO,UAAA;EACpB,MAAA;AAAA;AAAA,KAGU,kBAAA;EACV,GAAA;AAAA;AAAA,KAGU,kBAAA;EACV,IAAA;AAAA;AAAA,KAGU,uBAAA;EACV,GAAA;EACA,IAAA;AAAA;AAAA,KAGU,6BAAA;EACV,KAAA;AAAA;AAAA,KAGU,uBAAA;EACV,KAAA;AAAA;AAAA,cAGW,WAAA,GACX,cAAA,EAAgB,cAAA,EAChB,cAAA,EAAgB,cAAA;0BAmBL,kBAAA,EAAkB,YAAA,GACb,cAAA,KAAc,OAAA,CAAA,kBAAA;mBAarB,WAAA,EAAW,YAAA,GACJ,cAAA,KAAc,OAAA;+BAsErB,uBAAA,EAAuB,YAAA,GAChB,cAAA,KAAc,OAAA,CAAA,yBAAA;qCAiBnB,6BAAA,EAA6B,YAAA,GACxB,cAAA,KAAc,OAAA,CAAA,6BAAA;kCAYnB,uBAAA,EAAuB,YAAA,GAClB,cAAA,KAAc,OAAA;;;iCAUnB,uBAAA,EAAuB,YAAA,GAClB,cAAA,KAAc,OAAA;;;kCAUnB,uBAAA,EAAuB,YAAA,GAClB,cAAA,KAAc,OAAA"}
@@ -0,0 +1,81 @@
1
+ import { FetcherOptions } from "./fetcher.js";
2
+ import { IntlayerConfig } from "@intlayer/types/config";
3
+
4
+ //#region src/getIntlayerAPI/bitbucket.d.ts
5
+ type BitbucketRepository = {
6
+ uuid: string;
7
+ name: string;
8
+ full_name: string;
9
+ slug: string;
10
+ mainbranch?: {
11
+ name: string;
12
+ type: string;
13
+ };
14
+ links: {
15
+ html: {
16
+ href: string;
17
+ };
18
+ };
19
+ workspace: {
20
+ slug: string;
21
+ name: string;
22
+ uuid: string;
23
+ };
24
+ owner: {
25
+ display_name: string;
26
+ username?: string;
27
+ uuid: string;
28
+ };
29
+ updated_on: string;
30
+ is_private: boolean;
31
+ };
32
+ type BitbucketAuthCallbackBody = {
33
+ code: string;
34
+ };
35
+ type BitbucketAuthCallbackResult = {
36
+ data: {
37
+ token: string;
38
+ };
39
+ };
40
+ type BitbucketListReposResult = {
41
+ data: BitbucketRepository[];
42
+ };
43
+ type BitbucketCheckConfigBody = {
44
+ token?: string;
45
+ workspace: string;
46
+ repoSlug: string;
47
+ branch?: string;
48
+ };
49
+ type BitbucketCheckConfigResult = {
50
+ data: {
51
+ hasConfig: boolean;
52
+ configPaths: string[];
53
+ };
54
+ };
55
+ type BitbucketGetConfigFileBody = {
56
+ token?: string;
57
+ workspace: string;
58
+ repoSlug: string;
59
+ branch?: string;
60
+ path?: string;
61
+ };
62
+ type BitbucketGetConfigFileResult = {
63
+ data: {
64
+ content: string;
65
+ };
66
+ };
67
+ type BitbucketGetAuthUrlResult = {
68
+ data: {
69
+ authUrl: string;
70
+ };
71
+ };
72
+ declare const getBitbucketAPI: (authAPIOptions: FetcherOptions, intlayerConfig: IntlayerConfig) => {
73
+ getAuthUrl: (redirectUri: string, otherOptions?: FetcherOptions) => Promise<BitbucketGetAuthUrlResult>;
74
+ authenticate: (code: string, otherOptions?: FetcherOptions) => Promise<BitbucketAuthCallbackResult>;
75
+ getRepositories: (token?: string | null, otherOptions?: FetcherOptions) => Promise<BitbucketListReposResult>;
76
+ checkIntlayerConfig: (token: string | null | undefined, workspace: string, repoSlug: string, branch?: string, otherOptions?: FetcherOptions) => Promise<BitbucketCheckConfigResult>;
77
+ getConfigFile: (token: string | null | undefined, workspace: string, repoSlug: string, branch?: string, path?: string, otherOptions?: FetcherOptions) => Promise<BitbucketGetConfigFileResult>;
78
+ };
79
+ //#endregion
80
+ export { BitbucketGetAuthUrlResult as a, BitbucketListReposResult as c, BitbucketCheckConfigResult as i, BitbucketRepository as l, BitbucketAuthCallbackResult as n, BitbucketGetConfigFileBody as o, BitbucketCheckConfigBody as r, BitbucketGetConfigFileResult as s, BitbucketAuthCallbackBody as t, getBitbucketAPI as u };
81
+ //# sourceMappingURL=bitbucket-DeRx5IlR.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket-DeRx5IlR.d.ts","names":[],"sources":["../../src/getIntlayerAPI/bitbucket.ts"],"mappings":";;;;KAGY,mBAAA;EACV,IAAA;EACA,IAAA;EACA,SAAA;EACA,IAAA;EACA,UAAA;IACE,IAAA;IACA,IAAA;EAAA;EAEF,KAAA;IACE,IAAA;MACE,IAAA;IAAA;EAAA;EAGJ,SAAA;IACE,IAAA;IACA,IAAA;IACA,IAAA;EAAA;EAEF,KAAA;IACE,YAAA;IACA,QAAA;IACA,IAAA;EAAA;EAEF,UAAA;EACA,UAAA;AAAA;AAAA,KAGU,yBAAA;EACV,IAAA;AAAA;AAAA,KAGU,2BAAA;EACV,IAAA;IACE,KAAA;EAAA;AAAA;AAAA,KAIQ,wBAAA;EACV,IAAA,EAAM,mBAAA;AAAA;AAAA,KAGI,wBAAA;EACV,KAAA;EACA,SAAA;EACA,QAAA;EACA,MAAA;AAAA;AAAA,KAGU,0BAAA;EACV,IAAA;IACE,SAAA;IACA,WAAA;EAAA;AAAA;AAAA,KAIQ,0BAAA;EACV,KAAA;EACA,SAAA;EACA,QAAA;EACA,MAAA;EACA,IAAA;AAAA;AAAA,KAGU,4BAAA;EACV,IAAA;IACE,OAAA;EAAA;AAAA;AAAA,KAIQ,yBAAA;EACV,IAAA;IACE,OAAA;EAAA;AAAA;AAAA,cAIS,eAAA,GACX,cAAA,EAAgB,cAAA,EAChB,cAAA,EAAgB,cAAA;oCAWK,YAAA,GACL,cAAA,KAAc,OAAA,CAAA,yBAAA;+BAgBhB,YAAA,GACE,cAAA,KAAc,OAAA,CAAA,2BAAA;2CAiBP,YAAA,GACP,cAAA,KAAc,OAAA,CAAA,wBAAA;0DAmBI,SAAA,UACf,QAAA,UACD,MAAA,WACF,YAAA,GACA,cAAA,KAAc,OAAA,CAAA,0BAAA;oDAqBI,SAAA,UACf,QAAA,UACD,MAAA,WACF,IAAA,WACF,YAAA,GACE,cAAA,KAAc,OAAA,CAAA,4BAAA;AAAA"}
@@ -0,0 +1,18 @@
1
+ import { FetcherOptions } from "./fetcher.js";
2
+ import { AddDictionaryBody, DeleteDictionaryParam, GetDictionariesParams, GetDictionaryParams, GetDictionaryQuery, PushDictionariesBody, UpdateDictionaryBody } from "@intlayer/backend";
3
+ import { IntlayerConfig } from "@intlayer/types/config";
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>;
15
+ };
16
+ //#endregion
17
+ export { getDictionaryAPI as t };
18
+ //# sourceMappingURL=dictionary-W5LSPsxq.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary-W5LSPsxq.d.ts","names":[],"sources":["../../src/getIntlayerAPI/dictionary.ts"],"mappings":";;;;;cAoBa,gBAAA,GACX,cAAA,EAAgB,cAAA,EAChB,cAAA,EAAgB,cAAA;8BAWJ,qBAAA,EAAqB,YAAA,GACjB,cAAA,KAAc,OAAA,CAAA,qBAAA;uCAgBmB,cAAA,KAAc,OAAA,CAAA,yBAAA;kDAc/C,cAAA,KAAc,OAAA,CAAA,oCAAA;iCAiBb,mBAAA,mBAAoC,OAAA,GACzC,kBAAA,aAA6B,YAAA,GACzB,cAAA,KAAc,OAAA,CAAA,mBAAA;mCA8Bd,oBAAA,kBAAoC,YAAA,GACpC,cAAA,KAAc,OAAA,CAAA,sBAAA;wBAftB,iBAAA,EAAiB,YAAA,GACT,cAAA,KAAc,OAAA,CAAA,mBAAA;iCA+BhB,oBAAA,EAAoB,YAAA,GAClB,cAAA,KAAc,OAAA,CAAA,sBAAA;yBAiBxB,qBAAA,kBAAqC,YAAA,GAC3B,cAAA,KAAc,OAAA,CAAA,sBAAA;AAAA"}
@@ -1,11 +1,2 @@
1
- import { DictionaryAPI } from "@intlayer/backend";
2
- import { IntlayerConfig } from "@intlayer/types/config";
3
-
4
- //#region src/distantDictionary/fetchDistantDictionaries.d.ts
5
- /**
6
- * Fetch distant dictionary
7
- */
8
- declare const fetchDistantDictionaries: (intlayerConfig: IntlayerConfig) => Promise<DictionaryAPI[] | null | undefined>;
9
- //#endregion
10
- export { fetchDistantDictionaries };
11
- //# sourceMappingURL=fetchDistantDictionaries.d.ts.map
1
+ import { t as fetchDistantDictionaries } from "../fetchDistantDictionaries-CLQEr6NS.js";
2
+ export { fetchDistantDictionaries };
@@ -1,11 +1,2 @@
1
- import { DictionaryAPI } from "@intlayer/backend";
2
- import { IntlayerConfig } from "@intlayer/types/config";
3
-
4
- //#region src/distantDictionary/fetchDistantDictionary.d.ts
5
- /**
6
- * Fetch distant dictionary
7
- */
8
- declare const fetchDistantDictionary: (dictionaryKey: string, intlayerConfig: IntlayerConfig) => Promise<DictionaryAPI | undefined>;
9
- //#endregion
10
- export { fetchDistantDictionary };
11
- //# sourceMappingURL=fetchDistantDictionary.d.ts.map
1
+ import { t as fetchDistantDictionary } from "../fetchDistantDictionary-C7esreMl.js";
2
+ export { fetchDistantDictionary };
@@ -1,3 +1,3 @@
1
- import { fetchDistantDictionaries } from "./fetchDistantDictionaries.js";
2
- import { fetchDistantDictionary } from "./fetchDistantDictionary.js";
1
+ import { t as fetchDistantDictionaries } from "../fetchDistantDictionaries-CLQEr6NS.js";
2
+ import { t as fetchDistantDictionary } from "../fetchDistantDictionary-C7esreMl.js";
3
3
  export { fetchDistantDictionaries, fetchDistantDictionary };
@@ -1,4 +1,10 @@
1
- //#region ../../intlayer-editor/server/dist/utils/httpStatusCodes.d.ts
1
+ import { FetcherOptions } from "./fetcher.js";
2
+ import { IntlayerConfig } from "@intlayer/types/config";
3
+ import { DictionaryStatus } from "@intlayer/chokidar/build";
4
+ import { Dictionary } from "@intlayer/types/dictionary";
5
+ import { DictionaryKeys } from "@intlayer/types/module_augmentation";
6
+
7
+ //#region ../../intlayer-editor/server/dist/httpStatusCodes-Bscj19Pj.d.ts
2
8
  //#region src/utils/httpStatusCodes.d.ts
3
9
  /**
4
10
  * Enum for HTTP response status codes.
@@ -404,5 +410,57 @@ declare enum HttpStatusCodes {
404
410
  NETWORK_AUTHENTICATION_REQUIRED_511 = 511
405
411
  } //#endregion
406
412
  //#endregion
407
- export { HttpStatusCodes };
408
- //# sourceMappingURL=httpStatusCodes.d.ts.map
413
+ //#region ../../intlayer-editor/server/dist/responseData-DcKPpb9v.d.ts
414
+ //#region src/utils/responseData.d.ts
415
+ type ErrorData = {
416
+ code: string;
417
+ title: string;
418
+ message: string;
419
+ } & object;
420
+ type ResponseData<T = null> = {
421
+ message?: string;
422
+ description?: string;
423
+ success: boolean;
424
+ status: HttpStatusCodes;
425
+ data: T | null;
426
+ error?: ErrorData | ErrorData[];
427
+ };
428
+ //#endregion
429
+ //#region ../../intlayer-editor/server/dist/controllers/configuration.controller.d.ts
430
+ //#region src/controllers/configuration.controller.d.ts
431
+ type GetConfigurationResult = ResponseData<IntlayerConfig>;
432
+ /**
433
+ * Get the Intlayer configuration
434
+ */
435
+ //#endregion
436
+ //#region ../unmerged-dictionaries-entry/dist/types/index.d.ts
437
+ //#region src/index.d.ts
438
+ type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;
439
+ //#endregion
440
+ //#region ../../intlayer-editor/server/dist/controllers/dictionary.controller.d.ts
441
+ //#region src/controllers/dictionary.controller.d.ts
442
+ type GetEditorDictionariesResult = ResponseData<UnmergedDictionaries>;
443
+ /**
444
+ * Get the Intlayer configuration
445
+ */
446
+ type WriteContentDeclarationBody = {
447
+ dictionary: Dictionary;
448
+ };
449
+ type WriteContentDeclarationResultData = {
450
+ status: DictionaryStatus;
451
+ path: string;
452
+ };
453
+ type WriteContentDeclarationResult = ResponseData<WriteContentDeclarationResultData>;
454
+ /**
455
+ * Adds a new dictionary to the database.
456
+ */
457
+ //#endregion
458
+ //#region src/getIntlayerAPI/editor.d.ts
459
+ declare const getEditorAPI: (authAPIOptions: FetcherOptions, intlayerConfig: IntlayerConfig) => {
460
+ getDictionaries: (otherOptions?: FetcherOptions) => Promise<GetEditorDictionariesResult>;
461
+ getConfiguration: (otherOptions?: FetcherOptions) => Promise<GetConfigurationResult>;
462
+ writeDictionary: (body: WriteContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<WriteContentDeclarationResult>;
463
+ };
464
+ //#endregion
465
+ export { getEditorAPI as t };
466
+ //# sourceMappingURL=editor-DTBh5ovU.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-DTBh5ovU.d.ts","names":["HttpStatusCodes","CONTINUE_100","SWITCHING_PROTOCOLS_101","PROCESSING_102","EARLY_HINTS_103","OK_200","CREATED_201","ACCEPTED_202","NON_AUTHORITATIVE_INFORMATION_203","NO_CONTENT_204","RESET_CONTENT_205","PARTIAL_CONTENT_206","MULTI_STATUS_207","ALREADY_REPORTED_208","IM_USED_226","MULTIPLE_CHOICES_300","MOVED_PERMANENTLY_301","FOUND_302","SEE_OTHER_303","NOT_MODIFIED_304","USE_PROXY_305","SWITCH_PROXY_306","TEMPORARY_REDIRECT_307","PERMANENT_REDIRECT_308","BAD_REQUEST_400","UNAUTHORIZED_401","FORBIDDEN_403","NOT_FOUND_404","METHOD_NOT_ALLOWED_405","NOT_ACCEPTABLE_406","PROXY_AUTHENTICATION_REQUIRED_407","REQUEST_TIMEOUT_408","CONFLICT_409","GONE_410","LENGTH_REQUIRED_411","PRECONDITION_FAILED_412","PAYLOAD_TOO_LARGE_413","URI_TOO_LONG_414","UNSUPPORTED_MEDIA_TYPE_415","RANGE_NOT_SATISFIABLE_416","EXPECTATION_FAILED_417","IM_A_TEAPOT_418","MISDIRECTED_REQUEST_421","UNPROCESSABLE_ENTITY_422","LOCKED_423","FAILED_DEPENDENCY_424","TOO_EARLY_425","UPGRADE_REQUIRED_426","PRECONDITION_REQUIRED_428","TOO_MANY_REQUESTS_429","REQUEST_HEADER_FIELDS_TOO_LARGE_431","UNAVAILABLE_FOR_LEGAL_REASONS_451","INTERNAL_SERVER_ERROR_500","NOT_IMPLEMENTED_501","BAD_GATEWAY_502","SERVICE_UNAVAILABLE_503","GATEWAY_TIMEOUT_504","HTTP_VERSION_NOT_SUPPORTED_505","VARIANT_ALSO_NEGOTIATES_506","INSUFFICIENT_STORAGE_507","LOOP_DETECTED_508","NOT_EXTENDED_510","NETWORK_AUTHENTICATION_REQUIRED_511","t","t","HttpStatusCodes","ErrorData","code","title","message","ResponseData","T","description","success","status","data","error","ValidResponseStatus","OK_200","CREATED_201","ACCEPTED_202","NON_AUTHORITATIVE_INFORMATION_203","NO_CONTENT_204","RESET_CONTENT_205","PARTIAL_CONTENT_206","MULTI_STATUS_207","ALREADY_REPORTED_208","IM_USED_226","SuccessResponseArgs","ErrorResponseArgs","formatResponse","PaginatedResponse","Omit","page","page_size","total_pages","total_items","SuccessPaginatedResponseArgs","pageSize","totalPages","totalItems","ErrorPaginatedResponseArgs","formatPaginatedResponse","i","n","r","n","ResponseData","IntlayerConfig","FastifyReply","FastifyRequest","GetConfigurationResult","getConfiguration","Promise","_req","res","IntlayerConfig","Dictionary","DictionaryKeys","UnmergedDictionaries","Record","GetUnmergedDictionaries","configuration","getUnmergedDictionaries","n","ResponseData","FastifyReply","FastifyRequest","DictionaryStatus","Dictionary","UnmergedDictionaries","GetEditorDictionariesResult","getDictionaries","Promise","_req","res","WriteContentDeclarationBody","dictionary","WriteContentDeclarationResultData","status","path","WriteContentDeclarationResult","writeContentDeclaration","Body","req"],"sources":["../../../../intlayer-editor/server/dist/httpStatusCodes-Bscj19Pj.d.ts","../../../../intlayer-editor/server/dist/responseData-DcKPpb9v.d.ts","../../../../intlayer-editor/server/dist/controllers/configuration.controller.d.ts","../../../unmerged-dictionaries-entry/dist/types/index.d.ts","../../../../intlayer-editor/server/dist/controllers/dictionary.controller.d.ts","../../src/getIntlayerAPI/editor.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAqE;;;;;;;;;AAM5D;;;;;;;;;;;;;;;;;;;;;;;;;ACJ8C;;;;;;;;ACAc;;;;;;;;;;;;;;;;ACEQ;;;;;AAOM;;;;aJsItEA,eAAAA;EIpIW;;;EJwItBC,YAAAA;EIrIA0I;;;EJyIAzI,uBAAAA;EIxII;AAAA;;EJ4IJC,cAAAA;EAAAA;EI1IiF;;;EJ+IjFC,eAAAA;EKzJF;;;EL6JEC,MAAAA;EK3JgB;;;EL+JhBC,WAAAA;EKjJgB;;;ELqJhBC,YAAAA;EKrHgB;;;ELyHhBC,iCAAAA;EKzH8B;;;EL6H9BC,cAAAA;EK3KA;;;EL+KAC,iBAAAA;EKjJG;;;ELqJHC,mBAAAA;;;;EAIAC,gBAAAA;EAAAA;;;;EAKAC,oBAAAA;EAAAA;EK9I8B;;;ELmJ9BC,WAAAA;;;;EAIAC,oBAAAA;;;;EAIAC,qBAAAA;;;;EAIAC,SAAAA;;;;EAIAC,aAAAA;;;;EAIAC,gBAAAA;;;;EAIAC,aAAAA;;;;EAIAC,gBAAAA;;;;EAIAC,sBAAAA;;;;EAIAC,sBAAAA;;;;EAIAC,eAAAA;;;;EAIAC,gBAAAA;;;;EAIAC,aAAAA;;;;EAIAC,aAAAA;;;;EAIAC,sBAAAA;;;;EAIAC,kBAAAA;;;;EAIAC,iCAAAA;;;;EAIAC,mBAAAA;;;;EAIAC,YAAAA;;;;EAIAC,QAAAA;;;;EAIAC,mBAAAA;;;;EAIAC,uBAAAA;;;;EAIAC,qBAAAA;;;;EAIAC,gBAAAA;;;;EAIAC,0BAAAA;;;;EAIAC,yBAAAA;;;;EAIAC,sBAAAA;;;;EAIAC,eAAAA;EAAAA;;;;EAKAC,uBAAAA;;;;EAIAC,wBAAAA;EAAAA;;;;EAKAC,UAAAA;EAAAA;;;;EAKAC,qBAAAA;EAAAA;;;;EAKAC,aAAAA;;;;EAIAC,oBAAAA;;;;EAIAC,yBAAAA;;;;EAIAC,qBAAAA;;;;EAIAC,mCAAAA;;;;EAIAC,iCAAAA;;;;EAIAC,yBAAAA;;;;EAIAC,mBAAAA;;;;EAIAC,eAAAA;;;;EAIAC,uBAAAA;;;;EAIAC,mBAAAA;;;;EAIAC,8BAAAA;;;;EAIAC,2BAAAA;;;;EAIAC,wBAAAA;EAAAA;;;;EAKAC,iBAAAA;EAAAA;;;;EAKAC,gBAAAA;;;;EAIAC,mCAAAA;AAAAA;;;;KC/YGI,SAAAA;EACHC,IAAAA;EACAC,KAAAA;EACAC,OAAAA;AAAAA;AAAAA,KAEGC,YAAAA;EACHD,OAAAA;EACAG,WAAAA;EACAC,OAAAA;EACAC,MAAAA,EAAQT,eAAAA;EACRU,IAAAA,EAAMJ,CAAAA;EACNK,KAAAA,GAAQV,SAAAA,GAAYA,SAAAA;AAAAA;;;;KCTjB6C,sBAAAA,GAAyBJ,YAAAA,CAAaC,cAAAA;;;;;;;KCAtCW,oBAAAA,GAAuBC,MAAAA,CAAOF,cAAAA,EAAgBD,UAAAA;;;;KCE9Cc,2BAAAA,GAA8BN,YAAAA,CAAaK,oBAAAA;;;;KAK3CM,2BAAAA;EACHC,UAAAA,EAAYR,UAAAA;AAAAA;AAAAA,KAETS,iCAAAA;EACHC,MAAAA,EAAQX,gBAAAA;EACRY,IAAAA;AAAAA;AAAAA,KAEGC,6BAAAA,GAAgChB,YAAAA,CAAaa,iCAAAA;;;;;;cCVrC,YAAA,GACX,cAAA,EAAgB,cAAA,EAChB,cAAA,EAAgB,cAAA;mCA6BA,cAAA,KACb,OAAA,CAAQ,2BAAA;oCAhBK,cAAA,KACb,OAAA,CAAQ,sBAAA;0BA8BH,2BAAA,EAA2B,YAAA,GACnB,cAAA,KAAc,OAAA,CAAA,6BAAA;AAAA"}
@@ -0,0 +1,11 @@
1
+ import { DictionaryAPI } from "@intlayer/backend";
2
+ import { IntlayerConfig } from "@intlayer/types/config";
3
+
4
+ //#region src/distantDictionary/fetchDistantDictionaries.d.ts
5
+ /**
6
+ * Fetch distant dictionary
7
+ */
8
+ declare const fetchDistantDictionaries: (intlayerConfig: IntlayerConfig) => Promise<DictionaryAPI[] | null | undefined>;
9
+ //#endregion
10
+ export { fetchDistantDictionaries as t };
11
+ //# sourceMappingURL=fetchDistantDictionaries-CLQEr6NS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchDistantDictionaries-CLQEr6NS.d.ts","names":[],"sources":["../../src/distantDictionary/fetchDistantDictionaries.ts"],"mappings":";;;;;;AAOA;cAAa,wBAAA,GACX,cAAA,EAAgB,cAAA,KACf,OAAA,CAAQ,aAAA"}
@@ -0,0 +1,11 @@
1
+ import { DictionaryAPI } from "@intlayer/backend";
2
+ import { IntlayerConfig } from "@intlayer/types/config";
3
+
4
+ //#region src/distantDictionary/fetchDistantDictionary.d.ts
5
+ /**
6
+ * Fetch distant dictionary
7
+ */
8
+ declare const fetchDistantDictionary: (dictionaryKey: string, intlayerConfig: IntlayerConfig) => Promise<DictionaryAPI | undefined>;
9
+ //#endregion
10
+ export { fetchDistantDictionary as t };
11
+ //# sourceMappingURL=fetchDistantDictionary-C7esreMl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchDistantDictionary-C7esreMl.d.ts","names":[],"sources":["../../src/distantDictionary/fetchDistantDictionary.ts"],"mappings":";;;;;;AAOA;cAAa,sBAAA,GACX,aAAA,UACA,cAAA,EAAgB,cAAA,KACf,OAAA,CAAQ,aAAA"}
@@ -1,32 +1,2 @@
1
- import { FetcherOptions } from "../fetcher.js";
2
- import { AIOptions, AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, ChatCompletionRequestMessage, CustomQueryBody, GetDiscussionsParams, TranslateJSONBody } from "@intlayer/backend";
3
- import { IntlayerConfig } from "@intlayer/types/config";
4
-
5
- //#region src/getIntlayerAPI/ai.d.ts
6
- type AutocompleteBody = {
7
- text: string;
8
- aiOptions?: AIOptions;
9
- contextBefore?: string;
10
- currentLine?: string;
11
- contextAfter?: string;
12
- };
13
- type AskDocQuestionBody = {
14
- messages: ChatCompletionRequestMessage[];
15
- discussionId: string;
16
- onMessage?: (chunk: string) => void;
17
- onDone?: (response: AskDocQuestionResult) => void;
18
- };
19
- declare const getAiAPI: (authAPIOptions: FetcherOptions, intlayerConfig: IntlayerConfig) => {
20
- customQuery: (body?: CustomQueryBody, otherOptions?: FetcherOptions) => Promise<CustomQueryResult>;
21
- translateJSON: (body?: TranslateJSONBody, otherOptions?: FetcherOptions) => Promise<TranslateJSONResult>;
22
- auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
23
- auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
24
- auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
25
- auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
26
- askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<void>;
27
- autocomplete: (body?: AutocompleteBody, otherOptions?: FetcherOptions) => Promise<AutocompleteResponse>;
28
- getDiscussions: (params?: GetDiscussionsParams, otherOptions?: FetcherOptions) => Promise<GetDiscussionsResult>;
29
- };
30
- //#endregion
31
- export { AskDocQuestionBody, type AskDocQuestionResult, AutocompleteBody, getAiAPI };
32
- //# sourceMappingURL=ai.d.ts.map
1
+ import { i as getAiAPI, n as AskDocQuestionResult, r as AutocompleteBody, t as AskDocQuestionBody } from "../ai-FbIMwui1.js";
2
+ export { AskDocQuestionBody, AskDocQuestionResult, AutocompleteBody, getAiAPI };
@@ -1,44 +1,2 @@
1
- import { FetcherOptions } from "../fetcher.js";
2
- import { AuditEvent, GetRecursiveAuditStatusResult, StartRecursiveAuditResult } from "@intlayer/backend";
3
- import { IntlayerConfig } from "@intlayer/types/config";
4
-
5
- //#region src/getIntlayerAPI/audit.d.ts
6
- type ScanUrlBody = {
7
- url: string;
8
- onMessage?: (event: AuditEvent) => void;
9
- onDone?: () => void;
10
- };
11
- type DiscoverUrlsParams = {
12
- url: string;
13
- };
14
- type DiscoverUrlsResult = {
15
- urls: string[];
16
- };
17
- type StartRecursiveAuditBody = {
18
- url: string;
19
- urls?: string[];
20
- };
21
- type GetRecursiveAuditStatusParams = {
22
- jobId: string;
23
- };
24
- type RecursiveAuditJobParams = {
25
- jobId: string;
26
- };
27
- declare const getAuditAPI: (authAPIOptions: FetcherOptions, intlayerConfig: IntlayerConfig) => {
28
- discoverUrls: (params?: DiscoverUrlsParams, otherOptions?: FetcherOptions) => Promise<DiscoverUrlsResult>;
29
- scanUrl: (body?: ScanUrlBody, otherOptions?: FetcherOptions) => Promise<void>;
30
- startRecursiveAudit: (body?: StartRecursiveAuditBody, otherOptions?: FetcherOptions) => Promise<StartRecursiveAuditResult>;
31
- getRecursiveAuditStatus: (params?: GetRecursiveAuditStatusParams, otherOptions?: FetcherOptions) => Promise<GetRecursiveAuditStatusResult>;
32
- cancelRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
33
- success: boolean;
34
- }>;
35
- pauseRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
36
- success: boolean;
37
- }>;
38
- resumeRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
39
- success: boolean;
40
- }>;
41
- };
42
- //#endregion
43
- export { type AuditEvent, DiscoverUrlsParams, DiscoverUrlsResult, GetRecursiveAuditStatusParams, type GetRecursiveAuditStatusResult, RecursiveAuditJobParams, ScanUrlBody, StartRecursiveAuditBody, type StartRecursiveAuditResult, getAuditAPI };
44
- //# sourceMappingURL=audit.d.ts.map
1
+ import { a as GetRecursiveAuditStatusResult, c as StartRecursiveAuditBody, i as GetRecursiveAuditStatusParams, l as StartRecursiveAuditResult, n as DiscoverUrlsParams, o as RecursiveAuditJobParams, r as DiscoverUrlsResult, s as ScanUrlBody, t as AuditEvent, u as getAuditAPI } from "../audit-DzTxbapP.js";
2
+ export { AuditEvent, DiscoverUrlsParams, DiscoverUrlsResult, GetRecursiveAuditStatusParams, GetRecursiveAuditStatusResult, RecursiveAuditJobParams, ScanUrlBody, StartRecursiveAuditBody, StartRecursiveAuditResult, getAuditAPI };
@@ -1,81 +1,2 @@
1
- import { FetcherOptions } from "../fetcher.js";
2
- import { IntlayerConfig } from "@intlayer/types/config";
3
-
4
- //#region src/getIntlayerAPI/bitbucket.d.ts
5
- type BitbucketRepository = {
6
- uuid: string;
7
- name: string;
8
- full_name: string;
9
- slug: string;
10
- mainbranch?: {
11
- name: string;
12
- type: string;
13
- };
14
- links: {
15
- html: {
16
- href: string;
17
- };
18
- };
19
- workspace: {
20
- slug: string;
21
- name: string;
22
- uuid: string;
23
- };
24
- owner: {
25
- display_name: string;
26
- username?: string;
27
- uuid: string;
28
- };
29
- updated_on: string;
30
- is_private: boolean;
31
- };
32
- type BitbucketAuthCallbackBody = {
33
- code: string;
34
- };
35
- type BitbucketAuthCallbackResult = {
36
- data: {
37
- token: string;
38
- };
39
- };
40
- type BitbucketListReposResult = {
41
- data: BitbucketRepository[];
42
- };
43
- type BitbucketCheckConfigBody = {
44
- token?: string;
45
- workspace: string;
46
- repoSlug: string;
47
- branch?: string;
48
- };
49
- type BitbucketCheckConfigResult = {
50
- data: {
51
- hasConfig: boolean;
52
- configPaths: string[];
53
- };
54
- };
55
- type BitbucketGetConfigFileBody = {
56
- token?: string;
57
- workspace: string;
58
- repoSlug: string;
59
- branch?: string;
60
- path?: string;
61
- };
62
- type BitbucketGetConfigFileResult = {
63
- data: {
64
- content: string;
65
- };
66
- };
67
- type BitbucketGetAuthUrlResult = {
68
- data: {
69
- authUrl: string;
70
- };
71
- };
72
- declare const getBitbucketAPI: (authAPIOptions: FetcherOptions, intlayerConfig: IntlayerConfig) => {
73
- getAuthUrl: (redirectUri: string, otherOptions?: FetcherOptions) => Promise<BitbucketGetAuthUrlResult>;
74
- authenticate: (code: string, otherOptions?: FetcherOptions) => Promise<BitbucketAuthCallbackResult>;
75
- getRepositories: (token?: string | null, otherOptions?: FetcherOptions) => Promise<BitbucketListReposResult>;
76
- checkIntlayerConfig: (token: string | null | undefined, workspace: string, repoSlug: string, branch?: string, otherOptions?: FetcherOptions) => Promise<BitbucketCheckConfigResult>;
77
- getConfigFile: (token: string | null | undefined, workspace: string, repoSlug: string, branch?: string, path?: string, otherOptions?: FetcherOptions) => Promise<BitbucketGetConfigFileResult>;
78
- };
79
- //#endregion
80
- export { BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, getBitbucketAPI };
81
- //# sourceMappingURL=bitbucket.d.ts.map
1
+ import { a as BitbucketGetAuthUrlResult, c as BitbucketListReposResult, i as BitbucketCheckConfigResult, l as BitbucketRepository, n as BitbucketAuthCallbackResult, o as BitbucketGetConfigFileBody, r as BitbucketCheckConfigBody, s as BitbucketGetConfigFileResult, t as BitbucketAuthCallbackBody, u as getBitbucketAPI } from "../bitbucket-DeRx5IlR.js";
2
+ export { BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, getBitbucketAPI };