@intlayer/api 8.2.2 → 8.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/getIntlayerAPI/audit.cjs +3 -0
- package/dist/cjs/getIntlayerAPI/audit.cjs.map +1 -0
- package/dist/cjs/getIntlayerAPI/index.cjs +1 -1
- package/dist/cjs/getIntlayerAPI/index.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/showcaseProject.cjs +2 -0
- package/dist/cjs/getIntlayerAPI/showcaseProject.cjs.map +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/getIntlayerAPI/audit.mjs +3 -0
- package/dist/esm/getIntlayerAPI/audit.mjs.map +1 -0
- package/dist/esm/getIntlayerAPI/index.mjs +1 -1
- package/dist/esm/getIntlayerAPI/index.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/showcaseProject.mjs +2 -0
- package/dist/esm/getIntlayerAPI/showcaseProject.mjs.map +1 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/types/apps/backend/dist/types/controllers/recursiveAudit.controller.d.ts +30 -0
- package/dist/types/apps/backend/dist/types/controllers/recursiveAudit.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/export.d.ts +3 -1
- package/dist/types/apps/backend/dist/types/services/audit/types.d.ts +34 -0
- package/dist/types/apps/backend/dist/types/services/audit/types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/auth/getAuth.d.ts +1 -1
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getDictionaryFiltersAndPagination.d.ts.map +1 -1
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getDiscussionFiltersAndPagination.d.ts.map +1 -1
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getOrganizationFiltersAndPagination.d.ts.map +1 -1
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getProjectFiltersAndPagination.d.ts.map +1 -1
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getTagFiltersAndPagination.d.ts.map +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts.map +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionary.d.ts +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionary.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/ai.d.ts +1 -2
- package/dist/types/getIntlayerAPI/ai.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/audit.d.ts +24 -0
- package/dist/types/getIntlayerAPI/audit.d.ts.map +1 -0
- package/dist/types/getIntlayerAPI/dictionary.d.ts +1 -1
- package/dist/types/getIntlayerAPI/editor.d.ts +2 -2
- package/dist/types/getIntlayerAPI/index.d.ts +4 -0
- package/dist/types/getIntlayerAPI/index.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/newsletter.d.ts +1 -1
- package/dist/types/getIntlayerAPI/oAuth.d.ts +0 -1
- package/dist/types/getIntlayerAPI/oAuth.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/organization.d.ts +1 -1
- package/dist/types/getIntlayerAPI/project.d.ts +1 -3
- package/dist/types/getIntlayerAPI/project.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/search.d.ts +1 -1
- package/dist/types/getIntlayerAPI/showcaseProject.d.ts +28 -0
- package/dist/types/getIntlayerAPI/showcaseProject.d.ts.map +1 -0
- package/dist/types/getIntlayerAPI/stripe.d.ts +1 -1
- package/dist/types/getIntlayerAPI/tag.d.ts +1 -1
- package/dist/types/getIntlayerAPI/user.d.ts +2 -5
- package/dist/types/getIntlayerAPI/user.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/types.d.ts +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../fetcher.cjs`);let n=require(`@intlayer/config/built`);n=e.__toESM(n);const r=(e={},r)=>{let i=r?.editor?.backendURL??n.default?.editor?.backendURL;if(!i)throw Error(`Backend URL is not defined in the Intlayer configuration.`);let a=`${i}/api/scan`;return{scanUrl:async(t,n={})=>{if(!t?.url)return;let{url:r,onMessage:i,onDone:o}=t,s=`${a}?${new URLSearchParams({url:r}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...e.headers,...n.headers},credentials:`include`,signal:n.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
|
|
2
|
+
`);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));i?.(t)}catch{}}o?.()},startRecursiveAudit:async(n,r={})=>await t.fetcher(`${a}/recursive/start`,e,r,{method:`POST`,params:n}),getRecursiveAuditStatus:async(n,r={})=>await t.fetcher(`${a}/recursive/${n?.jobId}`,e,r,{method:`GET`})}};exports.getAuditAPI=r;
|
|
3
|
+
//# sourceMappingURL=audit.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.cjs","names":["configuration","fetcher"],"sources":["../../../src/getIntlayerAPI/audit.ts"],"sourcesContent":["import type {\n AuditEvent,\n GetRecursiveAuditStatusResult,\n StartRecursiveAuditResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport type {\n AuditEvent,\n GetRecursiveAuditStatusResult,\n StartRecursiveAuditResult,\n};\n\nexport type ScanUrlBody = {\n url: string;\n onMessage?: (event: AuditEvent) => void;\n onDone?: () => void;\n};\n\nexport type StartRecursiveAuditBody = {\n url: string;\n};\n\nexport type GetRecursiveAuditStatusParams = {\n jobId: string;\n};\n\nexport const getAuditAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const AUDIT_API_ROUTE = `${backendURL}/api/scan`;\n\n /**\n * Streams a single-page SEO audit as Server-Sent Events.\n *\n * Usage:\n * ```ts\n * await audit.scanUrl({\n * url: 'https://example.com',\n * onMessage: (event) => console.log(event),\n * onDone: () => console.log('done'),\n * });\n * ```\n */\n const scanUrl = async (\n body?: ScanUrlBody,\n otherOptions: FetcherOptions = {}\n ) => {\n if (!body?.url) return;\n\n const { url, onMessage, onDone } = body;\n\n const params = new URLSearchParams({ url });\n const endpoint = `${AUDIT_API_ROUTE}?${params.toString()}`;\n\n const response = await fetch(endpoint, {\n method: 'GET',\n headers: {\n Accept: 'text/event-stream',\n ...authAPIOptions.headers,\n ...otherOptions.headers,\n },\n credentials: 'include',\n signal: otherOptions.signal,\n });\n\n if (!response.ok) {\n let errorMessage = 'An error occurred';\n try {\n const errorData = await response.json();\n errorMessage = JSON.stringify(errorData.error) ?? errorMessage;\n } catch {\n try {\n const errorText = await response.text();\n if (errorText) errorMessage = errorText;\n } catch {\n // ignore\n }\n }\n throw new Error(errorMessage);\n }\n\n const reader = response.body?.getReader();\n if (!reader) throw new Error('No reader available');\n\n const decoder = new TextDecoder();\n let buffer = '';\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n');\n buffer = lines.pop() ?? '';\n\n for (const line of lines) {\n if (line.startsWith('data: ')) {\n try {\n const event = JSON.parse(line.slice(6)) as AuditEvent;\n onMessage?.(event);\n } catch {\n // ignore unparseable lines\n }\n }\n }\n }\n\n onDone?.();\n };\n\n /**\n * Starts a recursive audit job for the given URL.\n */\n const startRecursiveAudit = async (\n body?: StartRecursiveAuditBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<StartRecursiveAuditResult>(\n `${AUDIT_API_ROUTE}/recursive/start`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n // @ts-ignore params will be stringified by the fetcher\n params: body,\n }\n );\n\n /**\n * Gets the status of a recursive audit job.\n */\n const getRecursiveAuditStatus = async (\n params?: GetRecursiveAuditStatusParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetRecursiveAuditStatusResult>(\n `${AUDIT_API_ROUTE}/recursive/${params?.jobId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n }\n );\n\n return {\n scanUrl,\n startRecursiveAudit,\n getRecursiveAuditStatus,\n };\n};\n"],"mappings":"2MA6BA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAcA,EAAAA,SAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAkB,GAAG,EAAW,WAmHtC,MAAO,CACL,QAtGc,MACd,EACA,EAA+B,EAAE,GAC9B,CACH,GAAI,CAAC,GAAM,IAAK,OAEhB,GAAM,CAAE,MAAK,YAAW,UAAW,EAG7B,EAAW,GAAG,EAAgB,GADrB,IAAI,gBAAgB,CAAE,MAAK,CAAC,CACG,UAAU,GAElD,EAAW,MAAM,MAAM,EAAU,CACrC,OAAQ,MACR,QAAS,CACP,OAAQ,oBACR,GAAG,EAAe,QAClB,GAAG,EAAa,QACjB,CACD,YAAa,UACb,OAAQ,EAAa,OACtB,CAAC,CAEF,GAAI,CAAC,EAAS,GAAI,CAChB,IAAI,EAAe,oBACnB,GAAI,CACF,IAAM,EAAY,MAAM,EAAS,MAAM,CACvC,EAAe,KAAK,UAAU,EAAU,MAAM,EAAI,OAC5C,CACN,GAAI,CACF,IAAM,EAAY,MAAM,EAAS,MAAM,CACnC,IAAW,EAAe,QACxB,GAIV,MAAU,MAAM,EAAa,CAG/B,IAAM,EAAS,EAAS,MAAM,WAAW,CACzC,GAAI,CAAC,EAAQ,MAAU,MAAM,sBAAsB,CAEnD,IAAM,EAAU,IAAI,YAChB,EAAS,GAEb,OAAa,CACX,GAAM,CAAE,OAAM,SAAU,MAAM,EAAO,MAAM,CAC3C,GAAI,EAAM,MAEV,GAAU,EAAQ,OAAO,EAAO,CAAE,OAAQ,GAAM,CAAC,CACjD,IAAM,EAAQ,EAAO,MAAM;EAAK,CAChC,EAAS,EAAM,KAAK,EAAI,GAExB,IAAK,IAAM,KAAQ,EACjB,GAAI,EAAK,WAAW,SAAS,CAC3B,GAAI,CACF,IAAM,EAAQ,KAAK,MAAM,EAAK,MAAM,EAAE,CAAC,CACvC,IAAY,EAAM,MACZ,GAOd,KAAU,EAuCV,oBAjC0B,MAC1B,EACA,EAA+B,EAAE,GAEjC,MAAMC,EAAAA,QACJ,GAAG,EAAgB,kBACnB,EACA,EACA,CACE,OAAQ,OAER,OAAQ,EACT,CACF,CAqBD,wBAhB8B,MAC9B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAgB,aAAa,GAAQ,QACxC,EACA,EACA,CACE,OAAQ,MACT,CACF,CAMF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./ai.cjs`),t=require(`./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./ai.cjs`),t=require(`./audit.cjs`),n=require(`./bitbucket.cjs`),r=require(`./dictionary.cjs`),i=require(`./editor.cjs`),a=require(`./github.cjs`),o=require(`./gitlab.cjs`),s=require(`./newsletter.cjs`),c=require(`./oAuth.cjs`),l=require(`./organization.cjs`),u=require(`./project.cjs`),d=require(`./search.cjs`),f=require(`./showcaseProject.cjs`),p=require(`./stripe.cjs`),m=require(`./tag.cjs`),h=require(`./user.cjs`),g=(g={},_)=>({organization:l.getOrganizationAPI(g,_),project:u.getProjectAPI(g,_),user:h.getUserAPI(g,_),oAuth:c.getOAuthAPI(_),dictionary:r.getDictionaryAPI(g,_),stripe:p.getStripeAPI(g,_),ai:e.getAiAPI(g,_),audit:t.getAuditAPI(g,_),tag:m.getTagAPI(g,_),search:d.getSearchAPI(g,_),editor:i.getEditorAPI(g,_),newsletter:s.getNewsletterAPI(g,_),github:a.getGithubAPI(g,_),gitlab:o.getGitlabAPI(g,_),bitbucket:n.getBitbucketAPI(g,_),showcaseProject:f.getShowcaseProjectAPI(g,_)});exports.getIntlayerAPI=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["getOrganizationAPI","getProjectAPI","getUserAPI","getOAuthAPI","getDictionaryAPI","getStripeAPI","getAiAPI","getTagAPI","getSearchAPI","getEditorAPI","getNewsletterAPI","getGithubAPI","getGitlabAPI","getBitbucketAPI"],"sources":["../../../src/getIntlayerAPI/index.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types';\nimport type { FetcherOptions } from '../fetcher';\nimport { getAiAPI } from './ai';\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 { 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 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}\n\nexport const getIntlayerAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n): IntlayerAPIReturn => ({\n organization: getOrganizationAPI(authAPIOptions, intlayerConfig),\n project: getProjectAPI(authAPIOptions, intlayerConfig),\n user: getUserAPI(authAPIOptions, intlayerConfig),\n oAuth: getOAuthAPI(intlayerConfig),\n dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),\n stripe: getStripeAPI(authAPIOptions, intlayerConfig),\n ai: getAiAPI(authAPIOptions, intlayerConfig),\n tag: getTagAPI(authAPIOptions, intlayerConfig),\n search: getSearchAPI(authAPIOptions, intlayerConfig),\n editor: getEditorAPI(authAPIOptions, intlayerConfig),\n newsletter: getNewsletterAPI(authAPIOptions, intlayerConfig),\n github: getGithubAPI(authAPIOptions, intlayerConfig),\n gitlab: getGitlabAPI(authAPIOptions, intlayerConfig),\n bitbucket: getBitbucketAPI(authAPIOptions, intlayerConfig),\n});\n\nexport type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["getOrganizationAPI","getProjectAPI","getUserAPI","getOAuthAPI","getDictionaryAPI","getStripeAPI","getAiAPI","getAuditAPI","getTagAPI","getSearchAPI","getEditorAPI","getNewsletterAPI","getGithubAPI","getGitlabAPI","getBitbucketAPI","getShowcaseProjectAPI"],"sources":["../../../src/getIntlayerAPI/index.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types';\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 organization: getOrganizationAPI(authAPIOptions, intlayerConfig),\n project: getProjectAPI(authAPIOptions, intlayerConfig),\n user: getUserAPI(authAPIOptions, intlayerConfig),\n oAuth: getOAuthAPI(intlayerConfig),\n dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),\n stripe: getStripeAPI(authAPIOptions, intlayerConfig),\n ai: getAiAPI(authAPIOptions, intlayerConfig),\n audit: getAuditAPI(authAPIOptions, intlayerConfig),\n tag: getTagAPI(authAPIOptions, intlayerConfig),\n search: getSearchAPI(authAPIOptions, intlayerConfig),\n editor: getEditorAPI(authAPIOptions, intlayerConfig),\n newsletter: getNewsletterAPI(authAPIOptions, intlayerConfig),\n github: getGithubAPI(authAPIOptions, intlayerConfig),\n gitlab: getGitlabAPI(authAPIOptions, intlayerConfig),\n bitbucket: getBitbucketAPI(authAPIOptions, intlayerConfig),\n showcaseProject: getShowcaseProjectAPI(authAPIOptions, intlayerConfig),\n});\n\nexport type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;\n"],"mappings":"yfAsCa,GACX,EAAiC,EAAE,CACnC,KACuB,CACvB,aAAcA,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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../fetcher.cjs`);let n=require(`@intlayer/config/built`);n=e.__toESM(n);const r=(e={},r)=>{let i=r?.editor?.backendURL??n.default?.editor?.backendURL;if(!i)throw Error(`Backend URL is not defined in the Intlayer configuration.`);let a=`${i}/api/showcase-project`;return{getShowcaseProjects:async(n,r={})=>{let i={};return n?.page!==void 0&&(i.page=String(n.page)),n?.pageSize!==void 0&&(i.pageSize=String(n.pageSize)),n?.search!==void 0&&(i.search=n.search),n?.isOpenSource!==void 0&&(i.isOpenSource=String(n.isOpenSource)),n?.selectedUseCases?.length&&(i.selectedUseCases=n.selectedUseCases),await t.fetcher(a,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(n,r={})=>await t.fetcher(`${a}/${n}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(n,r,i={})=>{let o={excludeId:n};return r!==void 0&&(o.limit=String(r)),await t.fetcher(`${a}/others`,e,i,{method:`GET`,params:o})},toggleShowcaseLike:async(n,r={})=>await t.fetcher(`${a}/like`,e,r,{method:`POST`,body:n})}};exports.getShowcaseProjectAPI=r;
|
|
2
|
+
//# sourceMappingURL=showcaseProject.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcaseProject.cjs","names":["configuration","fetcher"],"sources":["../../../src/getIntlayerAPI/showcaseProject.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport type ShowcaseProjectsQuery = {\n page?: number;\n pageSize?: number;\n search?: string;\n selectedUseCases?: string[];\n isOpenSource?: boolean;\n};\n\nexport type ToggleShowcaseLikeBody = { projectId: string };\n\nexport const getShowcaseProjectAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const SHOWCASE_API_ROUTE = `${backendURL}/api/showcase-project`;\n\n const getShowcaseProjects = async (\n query?: ShowcaseProjectsQuery,\n otherOptions: FetcherOptions = {}\n ) => {\n const params: Record<string, string | string[]> = {};\n if (query?.page !== undefined) params.page = String(query.page);\n if (query?.pageSize !== undefined) params.pageSize = String(query.pageSize);\n if (query?.search !== undefined) params.search = query.search;\n if (query?.isOpenSource !== undefined)\n params.isOpenSource = String(query.isOpenSource);\n if (query?.selectedUseCases?.length)\n params.selectedUseCases = query.selectedUseCases;\n\n return await fetcher(\n SHOWCASE_API_ROUTE,\n authAPIOptions,\n otherOptions,\n { method: 'GET', params: params as any }\n );\n };\n\n const getShowcaseProjectById = async (\n projectId: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher(\n `${SHOWCASE_API_ROUTE}/${projectId}`,\n authAPIOptions,\n otherOptions,\n { method: 'GET' }\n );\n\n const getOtherShowcaseProjects = async (\n excludeId: string,\n limit?: number,\n otherOptions: FetcherOptions = {}\n ) => {\n const params: Record<string, string> = { excludeId };\n if (limit !== undefined) params.limit = String(limit);\n return await fetcher(\n `${SHOWCASE_API_ROUTE}/others`,\n authAPIOptions,\n otherOptions,\n { method: 'GET', params: params as any }\n );\n };\n\n const toggleShowcaseLike = async (\n body: ToggleShowcaseLikeBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ data: { upvotes: number; isLiked: boolean } }>(\n `${SHOWCASE_API_ROUTE}/like`,\n authAPIOptions,\n otherOptions,\n { method: 'POST', body }\n );\n\n return {\n getShowcaseProjects,\n getShowcaseProjectById,\n getOtherShowcaseProjects,\n toggleShowcaseLike,\n };\n};\n"],"mappings":"2MAcA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAcA,EAAAA,SAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAqB,GAAG,EAAW,uBA4DzC,MAAO,CACL,oBA3D0B,MAC1B,EACA,EAA+B,EAAE,GAC9B,CACH,IAAM,EAA4C,EAAE,CASpD,OARI,GAAO,OAAS,IAAA,KAAW,EAAO,KAAO,OAAO,EAAM,KAAK,EAC3D,GAAO,WAAa,IAAA,KAAW,EAAO,SAAW,OAAO,EAAM,SAAS,EACvE,GAAO,SAAW,IAAA,KAAW,EAAO,OAAS,EAAM,QACnD,GAAO,eAAiB,IAAA,KAC1B,EAAO,aAAe,OAAO,EAAM,aAAa,EAC9C,GAAO,kBAAkB,SAC3B,EAAO,iBAAmB,EAAM,kBAE3B,MAAMC,EAAAA,QACX,EACA,EACA,EACA,CAAE,OAAQ,MAAe,SAAe,CACzC,EA0CD,uBAvC6B,MAC7B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAmB,GAAG,IACzB,EACA,EACA,CAAE,OAAQ,MAAO,CAClB,CA+BD,yBA7B+B,MAC/B,EACA,EACA,EAA+B,EAAE,GAC9B,CACH,IAAM,EAAiC,CAAE,YAAW,CAEpD,OADI,IAAU,IAAA,KAAW,EAAO,MAAQ,OAAO,EAAM,EAC9C,MAAMA,EAAAA,QACX,GAAG,EAAmB,SACtB,EACA,EACA,CAAE,OAAQ,MAAe,SAAe,CACzC,EAkBD,mBAfyB,MACzB,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAmB,OACtB,EACA,EACA,CAAE,OAAQ,OAAQ,OAAM,CACzB,CAOF"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./fetcher.cjs`),t=require(`./getIntlayerAPI/ai.cjs`),n=require(`./getIntlayerAPI/
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{fetcher as e}from"../fetcher.mjs";import t from"@intlayer/config/built";const n=(n={},r)=>{let i=r?.editor?.backendURL??t?.editor?.backendURL;if(!i)throw Error(`Backend URL is not defined in the Intlayer configuration.`);let a=`${i}/api/scan`;return{scanUrl:async(e,t={})=>{if(!e?.url)return;let{url:r,onMessage:i,onDone:o}=e,s=`${a}?${new URLSearchParams({url:r}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...n.headers,...t.headers},credentials:`include`,signal:t.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
|
|
2
|
+
`);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));i?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await e(`${a}/recursive/start`,n,r,{method:`POST`,params:t}),getRecursiveAuditStatus:async(t,r={})=>await e(`${a}/recursive/${t?.jobId}`,n,r,{method:`GET`})}};export{n as getAuditAPI};
|
|
3
|
+
//# sourceMappingURL=audit.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.mjs","names":[],"sources":["../../../src/getIntlayerAPI/audit.ts"],"sourcesContent":["import type {\n AuditEvent,\n GetRecursiveAuditStatusResult,\n StartRecursiveAuditResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport type {\n AuditEvent,\n GetRecursiveAuditStatusResult,\n StartRecursiveAuditResult,\n};\n\nexport type ScanUrlBody = {\n url: string;\n onMessage?: (event: AuditEvent) => void;\n onDone?: () => void;\n};\n\nexport type StartRecursiveAuditBody = {\n url: string;\n};\n\nexport type GetRecursiveAuditStatusParams = {\n jobId: string;\n};\n\nexport const getAuditAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const AUDIT_API_ROUTE = `${backendURL}/api/scan`;\n\n /**\n * Streams a single-page SEO audit as Server-Sent Events.\n *\n * Usage:\n * ```ts\n * await audit.scanUrl({\n * url: 'https://example.com',\n * onMessage: (event) => console.log(event),\n * onDone: () => console.log('done'),\n * });\n * ```\n */\n const scanUrl = async (\n body?: ScanUrlBody,\n otherOptions: FetcherOptions = {}\n ) => {\n if (!body?.url) return;\n\n const { url, onMessage, onDone } = body;\n\n const params = new URLSearchParams({ url });\n const endpoint = `${AUDIT_API_ROUTE}?${params.toString()}`;\n\n const response = await fetch(endpoint, {\n method: 'GET',\n headers: {\n Accept: 'text/event-stream',\n ...authAPIOptions.headers,\n ...otherOptions.headers,\n },\n credentials: 'include',\n signal: otherOptions.signal,\n });\n\n if (!response.ok) {\n let errorMessage = 'An error occurred';\n try {\n const errorData = await response.json();\n errorMessage = JSON.stringify(errorData.error) ?? errorMessage;\n } catch {\n try {\n const errorText = await response.text();\n if (errorText) errorMessage = errorText;\n } catch {\n // ignore\n }\n }\n throw new Error(errorMessage);\n }\n\n const reader = response.body?.getReader();\n if (!reader) throw new Error('No reader available');\n\n const decoder = new TextDecoder();\n let buffer = '';\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n');\n buffer = lines.pop() ?? '';\n\n for (const line of lines) {\n if (line.startsWith('data: ')) {\n try {\n const event = JSON.parse(line.slice(6)) as AuditEvent;\n onMessage?.(event);\n } catch {\n // ignore unparseable lines\n }\n }\n }\n }\n\n onDone?.();\n };\n\n /**\n * Starts a recursive audit job for the given URL.\n */\n const startRecursiveAudit = async (\n body?: StartRecursiveAuditBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<StartRecursiveAuditResult>(\n `${AUDIT_API_ROUTE}/recursive/start`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n // @ts-ignore params will be stringified by the fetcher\n params: body,\n }\n );\n\n /**\n * Gets the status of a recursive audit job.\n */\n const getRecursiveAuditStatus = async (\n params?: GetRecursiveAuditStatusParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetRecursiveAuditStatusResult>(\n `${AUDIT_API_ROUTE}/recursive/${params?.jobId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n }\n );\n\n return {\n scanUrl,\n startRecursiveAudit,\n getRecursiveAuditStatus,\n };\n};\n"],"mappings":"+EA6BA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAc,GAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAkB,GAAG,EAAW,WAmHtC,MAAO,CACL,QAtGc,MACd,EACA,EAA+B,EAAE,GAC9B,CACH,GAAI,CAAC,GAAM,IAAK,OAEhB,GAAM,CAAE,MAAK,YAAW,UAAW,EAG7B,EAAW,GAAG,EAAgB,GADrB,IAAI,gBAAgB,CAAE,MAAK,CAAC,CACG,UAAU,GAElD,EAAW,MAAM,MAAM,EAAU,CACrC,OAAQ,MACR,QAAS,CACP,OAAQ,oBACR,GAAG,EAAe,QAClB,GAAG,EAAa,QACjB,CACD,YAAa,UACb,OAAQ,EAAa,OACtB,CAAC,CAEF,GAAI,CAAC,EAAS,GAAI,CAChB,IAAI,EAAe,oBACnB,GAAI,CACF,IAAM,EAAY,MAAM,EAAS,MAAM,CACvC,EAAe,KAAK,UAAU,EAAU,MAAM,EAAI,OAC5C,CACN,GAAI,CACF,IAAM,EAAY,MAAM,EAAS,MAAM,CACnC,IAAW,EAAe,QACxB,GAIV,MAAU,MAAM,EAAa,CAG/B,IAAM,EAAS,EAAS,MAAM,WAAW,CACzC,GAAI,CAAC,EAAQ,MAAU,MAAM,sBAAsB,CAEnD,IAAM,EAAU,IAAI,YAChB,EAAS,GAEb,OAAa,CACX,GAAM,CAAE,OAAM,SAAU,MAAM,EAAO,MAAM,CAC3C,GAAI,EAAM,MAEV,GAAU,EAAQ,OAAO,EAAO,CAAE,OAAQ,GAAM,CAAC,CACjD,IAAM,EAAQ,EAAO,MAAM;EAAK,CAChC,EAAS,EAAM,KAAK,EAAI,GAExB,IAAK,IAAM,KAAQ,EACjB,GAAI,EAAK,WAAW,SAAS,CAC3B,GAAI,CACF,IAAM,EAAQ,KAAK,MAAM,EAAK,MAAM,EAAE,CAAC,CACvC,IAAY,EAAM,MACZ,GAOd,KAAU,EAuCV,oBAjC0B,MAC1B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAgB,kBACnB,EACA,EACA,CACE,OAAQ,OAER,OAAQ,EACT,CACF,CAqBD,wBAhB8B,MAC9B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAgB,aAAa,GAAQ,QACxC,EACA,EACA,CACE,OAAQ,MACT,CACF,CAMF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{getAiAPI as e}from"./ai.mjs";import{
|
|
1
|
+
import{getAiAPI as e}from"./ai.mjs";import{getAuditAPI as t}from"./audit.mjs";import{getBitbucketAPI as n}from"./bitbucket.mjs";import{getDictionaryAPI as r}from"./dictionary.mjs";import{getEditorAPI as i}from"./editor.mjs";import{getGithubAPI as a}from"./github.mjs";import{getGitlabAPI as o}from"./gitlab.mjs";import{getNewsletterAPI as s}from"./newsletter.mjs";import{getOAuthAPI as c}from"./oAuth.mjs";import{getOrganizationAPI as l}from"./organization.mjs";import{getProjectAPI as u}from"./project.mjs";import{getSearchAPI as d}from"./search.mjs";import{getShowcaseProjectAPI as f}from"./showcaseProject.mjs";import{getStripeAPI as p}from"./stripe.mjs";import{getTagAPI as m}from"./tag.mjs";import{getUserAPI as h}from"./user.mjs";const g=(g={},_)=>({organization:l(g,_),project:u(g,_),user:h(g,_),oAuth:c(_),dictionary:r(g,_),stripe:p(g,_),ai:e(g,_),audit:t(g,_),tag:m(g,_),search:d(g,_),editor:i(g,_),newsletter:s(g,_),github:a(g,_),gitlab:o(g,_),bitbucket:n(g,_),showcaseProject:f(g,_)});export{g as getIntlayerAPI};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/getIntlayerAPI/index.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types';\nimport type { FetcherOptions } from '../fetcher';\nimport { getAiAPI } from './ai';\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 { 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 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}\n\nexport const getIntlayerAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n): IntlayerAPIReturn => ({\n organization: getOrganizationAPI(authAPIOptions, intlayerConfig),\n project: getProjectAPI(authAPIOptions, intlayerConfig),\n user: getUserAPI(authAPIOptions, intlayerConfig),\n oAuth: getOAuthAPI(intlayerConfig),\n dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),\n stripe: getStripeAPI(authAPIOptions, intlayerConfig),\n ai: getAiAPI(authAPIOptions, intlayerConfig),\n tag: getTagAPI(authAPIOptions, intlayerConfig),\n search: getSearchAPI(authAPIOptions, intlayerConfig),\n editor: getEditorAPI(authAPIOptions, intlayerConfig),\n newsletter: getNewsletterAPI(authAPIOptions, intlayerConfig),\n github: getGithubAPI(authAPIOptions, intlayerConfig),\n gitlab: getGitlabAPI(authAPIOptions, intlayerConfig),\n bitbucket: getBitbucketAPI(authAPIOptions, intlayerConfig),\n});\n\nexport type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/getIntlayerAPI/index.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types';\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 organization: getOrganizationAPI(authAPIOptions, intlayerConfig),\n project: getProjectAPI(authAPIOptions, intlayerConfig),\n user: getUserAPI(authAPIOptions, intlayerConfig),\n oAuth: getOAuthAPI(intlayerConfig),\n dictionary: getDictionaryAPI(authAPIOptions, intlayerConfig),\n stripe: getStripeAPI(authAPIOptions, intlayerConfig),\n ai: getAiAPI(authAPIOptions, intlayerConfig),\n audit: getAuditAPI(authAPIOptions, intlayerConfig),\n tag: getTagAPI(authAPIOptions, intlayerConfig),\n search: getSearchAPI(authAPIOptions, intlayerConfig),\n editor: getEditorAPI(authAPIOptions, intlayerConfig),\n newsletter: getNewsletterAPI(authAPIOptions, intlayerConfig),\n github: getGithubAPI(authAPIOptions, intlayerConfig),\n gitlab: getGitlabAPI(authAPIOptions, intlayerConfig),\n bitbucket: getBitbucketAPI(authAPIOptions, intlayerConfig),\n showcaseProject: getShowcaseProjectAPI(authAPIOptions, intlayerConfig),\n});\n\nexport type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;\n"],"mappings":"guBAsCA,MAAa,GACX,EAAiC,EAAE,CACnC,KACuB,CACvB,aAAc,EAAmB,EAAgB,EAAe,CAChE,QAAS,EAAc,EAAgB,EAAe,CACtD,KAAM,EAAW,EAAgB,EAAe,CAChD,MAAO,EAAY,EAAe,CAClC,WAAY,EAAiB,EAAgB,EAAe,CAC5D,OAAQ,EAAa,EAAgB,EAAe,CACpD,GAAI,EAAS,EAAgB,EAAe,CAC5C,MAAO,EAAY,EAAgB,EAAe,CAClD,IAAK,EAAU,EAAgB,EAAe,CAC9C,OAAQ,EAAa,EAAgB,EAAe,CACpD,OAAQ,EAAa,EAAgB,EAAe,CACpD,WAAY,EAAiB,EAAgB,EAAe,CAC5D,OAAQ,EAAa,EAAgB,EAAe,CACpD,OAAQ,EAAa,EAAgB,EAAe,CACpD,UAAW,EAAgB,EAAgB,EAAe,CAC1D,gBAAiB,EAAsB,EAAgB,EAAe,CACvE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{fetcher as e}from"../fetcher.mjs";import t from"@intlayer/config/built";const n=(n={},r)=>{let i=r?.editor?.backendURL??t?.editor?.backendURL;if(!i)throw Error(`Backend URL is not defined in the Intlayer configuration.`);let a=`${i}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await e(a,n,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await e(`${a}/${t}`,n,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r,i={})=>{let o={excludeId:t};return r!==void 0&&(o.limit=String(r)),await e(`${a}/others`,n,i,{method:`GET`,params:o})},toggleShowcaseLike:async(t,r={})=>await e(`${a}/like`,n,r,{method:`POST`,body:t})}};export{n as getShowcaseProjectAPI};
|
|
2
|
+
//# sourceMappingURL=showcaseProject.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcaseProject.mjs","names":[],"sources":["../../../src/getIntlayerAPI/showcaseProject.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport type ShowcaseProjectsQuery = {\n page?: number;\n pageSize?: number;\n search?: string;\n selectedUseCases?: string[];\n isOpenSource?: boolean;\n};\n\nexport type ToggleShowcaseLikeBody = { projectId: string };\n\nexport const getShowcaseProjectAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const SHOWCASE_API_ROUTE = `${backendURL}/api/showcase-project`;\n\n const getShowcaseProjects = async (\n query?: ShowcaseProjectsQuery,\n otherOptions: FetcherOptions = {}\n ) => {\n const params: Record<string, string | string[]> = {};\n if (query?.page !== undefined) params.page = String(query.page);\n if (query?.pageSize !== undefined) params.pageSize = String(query.pageSize);\n if (query?.search !== undefined) params.search = query.search;\n if (query?.isOpenSource !== undefined)\n params.isOpenSource = String(query.isOpenSource);\n if (query?.selectedUseCases?.length)\n params.selectedUseCases = query.selectedUseCases;\n\n return await fetcher(\n SHOWCASE_API_ROUTE,\n authAPIOptions,\n otherOptions,\n { method: 'GET', params: params as any }\n );\n };\n\n const getShowcaseProjectById = async (\n projectId: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher(\n `${SHOWCASE_API_ROUTE}/${projectId}`,\n authAPIOptions,\n otherOptions,\n { method: 'GET' }\n );\n\n const getOtherShowcaseProjects = async (\n excludeId: string,\n limit?: number,\n otherOptions: FetcherOptions = {}\n ) => {\n const params: Record<string, string> = { excludeId };\n if (limit !== undefined) params.limit = String(limit);\n return await fetcher(\n `${SHOWCASE_API_ROUTE}/others`,\n authAPIOptions,\n otherOptions,\n { method: 'GET', params: params as any }\n );\n };\n\n const toggleShowcaseLike = async (\n body: ToggleShowcaseLikeBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ data: { upvotes: number; isLiked: boolean } }>(\n `${SHOWCASE_API_ROUTE}/like`,\n authAPIOptions,\n otherOptions,\n { method: 'POST', body }\n );\n\n return {\n getShowcaseProjects,\n getShowcaseProjectById,\n getOtherShowcaseProjects,\n toggleShowcaseLike,\n };\n};\n"],"mappings":"+EAcA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAc,GAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAqB,GAAG,EAAW,uBA4DzC,MAAO,CACL,oBA3D0B,MAC1B,EACA,EAA+B,EAAE,GAC9B,CACH,IAAM,EAA4C,EAAE,CASpD,OARI,GAAO,OAAS,IAAA,KAAW,EAAO,KAAO,OAAO,EAAM,KAAK,EAC3D,GAAO,WAAa,IAAA,KAAW,EAAO,SAAW,OAAO,EAAM,SAAS,EACvE,GAAO,SAAW,IAAA,KAAW,EAAO,OAAS,EAAM,QACnD,GAAO,eAAiB,IAAA,KAC1B,EAAO,aAAe,OAAO,EAAM,aAAa,EAC9C,GAAO,kBAAkB,SAC3B,EAAO,iBAAmB,EAAM,kBAE3B,MAAM,EACX,EACA,EACA,EACA,CAAE,OAAQ,MAAe,SAAe,CACzC,EA0CD,uBAvC6B,MAC7B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAmB,GAAG,IACzB,EACA,EACA,CAAE,OAAQ,MAAO,CAClB,CA+BD,yBA7B+B,MAC/B,EACA,EACA,EAA+B,EAAE,GAC9B,CACH,IAAM,EAAiC,CAAE,YAAW,CAEpD,OADI,IAAU,IAAA,KAAW,EAAO,MAAQ,OAAO,EAAM,EAC9C,MAAM,EACX,GAAG,EAAmB,SACtB,EACA,EACA,CAAE,OAAQ,MAAe,SAAe,CACzC,EAkBD,mBAfyB,MACzB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAmB,OACtB,EACA,EACA,CAAE,OAAQ,OAAQ,OAAM,CACzB,CAOF"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fetcher as e,fetcherOptions as t}from"./fetcher.mjs";import{getAiAPI as n}from"./getIntlayerAPI/ai.mjs";import{
|
|
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};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region ../../../apps/backend/dist/types/controllers/recursiveAudit.controller.d.ts
|
|
2
|
+
//#region src/controllers/recursiveAudit.controller.d.ts
|
|
3
|
+
type StartRecursiveAuditResult = {
|
|
4
|
+
jobId: string;
|
|
5
|
+
};
|
|
6
|
+
type RecursiveAuditJobInfo = {
|
|
7
|
+
_id: string;
|
|
8
|
+
targetUrl: string;
|
|
9
|
+
userId?: string;
|
|
10
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
11
|
+
progress: number;
|
|
12
|
+
totalPageCount: number;
|
|
13
|
+
completedPageCount: number;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
};
|
|
17
|
+
type RecursiveAuditPageInfo = {
|
|
18
|
+
_id: string;
|
|
19
|
+
url: string;
|
|
20
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
21
|
+
score?: number;
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
24
|
+
type GetRecursiveAuditStatusResult = {
|
|
25
|
+
job: RecursiveAuditJobInfo;
|
|
26
|
+
pages: RecursiveAuditPageInfo[];
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { GetRecursiveAuditStatusResult, RecursiveAuditJobInfo, RecursiveAuditPageInfo, StartRecursiveAuditResult };
|
|
30
|
+
//# sourceMappingURL=recursiveAudit.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recursiveAudit.controller.d.ts","names":["FastifyReply","FastifyRequest","StartRecursiveAuditResult","jobId","RecursiveAuditJobInfo","Date","_id","targetUrl","userId","status","progress","totalPageCount","completedPageCount","createdAt","updatedAt","RecursiveAuditPageInfo","url","score","error","GetRecursiveAuditStatusResult","job","pages","startRecursiveAudit","Promise","Querystring","request","reply","getRecursiveAuditStatus","Params"],"sources":["../../../../../../../../../../apps/backend/dist/types/controllers/recursiveAudit.controller.d.ts"],"mappings":";;KAGKE,yBAAAA;EACHC,KAAAA;AAAAA;AAAAA,KAEGC,qBAAAA;EACHE,GAAAA;EACAC,SAAAA;EACAC,MAAAA;EACAC,MAAAA;EACAC,QAAAA;EACAC,cAAAA;EACAC,kBAAAA;EACAC,SAAAA,EAAWR,IAAAA;EACXS,SAAAA,EAAWT,IAAAA;AAAAA;AAAAA,KAERU,sBAAAA;EACHT,GAAAA;EACAU,GAAAA;EACAP,MAAAA;EACAQ,KAAAA;EACAC,KAAAA;AAAAA;AAAAA,KAEGC,6BAAAA;EACHC,GAAAA,EAAKhB,qBAAAA;EACLiB,KAAAA,EAAON,sBAAAA;AAAAA"}
|
|
@@ -17,7 +17,9 @@ import { GetOAuth2TokenResult } from "./controllers/oAuth2.controller.js";
|
|
|
17
17
|
import { AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, DeleteOrganizationResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, SelectOrganizationParam, SelectOrganizationResult, UnselectOrganizationResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult } from "./controllers/organization.controller.js";
|
|
18
18
|
import { AddProjectBody, AddProjectResult, DeleteProjectResult, GetProjectsParams, GetProjectsResult, ProjectMemberByIdOption, PushProjectConfigurationBody, PushProjectConfigurationResult, SelectProjectParam, SelectProjectResult, TriggerBuildResult, TriggerWebhookBody, TriggerWebhookResult, UnselectProjectResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult } from "./controllers/project.controller.js";
|
|
19
19
|
import { AddNewAccessKeyBody, AddNewAccessKeyResponse, DeleteAccessKeyBody, DeleteAccessKeyResponse, RefreshAccessKeyBody, RefreshAccessKeyResponse } from "./controllers/projectAccessKey.controller.js";
|
|
20
|
+
import { GetRecursiveAuditStatusResult, RecursiveAuditJobInfo, RecursiveAuditPageInfo, StartRecursiveAuditResult } from "./controllers/recursiveAudit.controller.js";
|
|
20
21
|
import { SearchDocResult, SearchDocUtilParams, SearchDocUtilResult } from "./controllers/search.controller.js";
|
|
21
22
|
import { GetCheckoutSessionBody, GetCheckoutSessionResult, GetPricingBody, GetPricingResult } from "./controllers/stripe.controller.js";
|
|
22
23
|
import { AddTagBody, AddTagResult, DeleteTagParams, DeleteTagResult, GetTagsParams, GetTagsResult, UpdateTagBody, UpdateTagParams, UpdateTagResult } from "./controllers/tag.controller.js";
|
|
23
|
-
import { CreateUserBody, CreateUserResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, UpdateUserBody, UpdateUserResult } from "./controllers/user.controller.js";
|
|
24
|
+
import { CreateUserBody, CreateUserResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, UpdateUserBody, UpdateUserResult } from "./controllers/user.controller.js";
|
|
25
|
+
import { AuditEvent } from "./services/audit/types.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region ../../../apps/backend/dist/types/services/audit/types.d.ts
|
|
2
|
+
type Details = null | undefined | string | number | boolean | Details[] | {
|
|
3
|
+
[key: string]: Details;
|
|
4
|
+
};
|
|
5
|
+
type AuditStatus = 'started' | 'success' | 'warning' | 'error' | 'done';
|
|
6
|
+
type AuditData = {
|
|
7
|
+
successDetails?: Details;
|
|
8
|
+
warningsDetails?: Details;
|
|
9
|
+
errorsDetails?: Details;
|
|
10
|
+
};
|
|
11
|
+
type Url = string;
|
|
12
|
+
type AuditDataList<T extends Url> = `url_hasCanonical\\${T}` | `url_hasLocalizedLinks\\${T}` | `url_currentLocale\\${T}` | `url_htmlLang\\${T}` | `url_htmlDir\\${T}` | `url_hreflang\\${T}` | `url_hasXDefault\\${T}` | `url_allAnchorsLocalized\\${T}` | `url_hasFlagIcons\\${T}` | 'robots_robotsPresent' | 'robots_noLocalizedUrlsForgotten' | 'sitemap_sitemapPresent' | 'sitemap_noLocalizedUrlsForgotten' | 'sitemap_hasXDefault' | 'sitemap_hasAlternates';
|
|
13
|
+
type Locale = string;
|
|
14
|
+
type DomainData = {
|
|
15
|
+
discoveredUrls: Record<Locale, string[]>;
|
|
16
|
+
discoveredLocales: Locale[];
|
|
17
|
+
defaultLocale: Locale;
|
|
18
|
+
image: string;
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
type AuditEvent = {
|
|
23
|
+
type?: AuditDataList<Url>;
|
|
24
|
+
status?: AuditStatus;
|
|
25
|
+
data?: AuditData;
|
|
26
|
+
score?: number;
|
|
27
|
+
progress?: number;
|
|
28
|
+
message?: string;
|
|
29
|
+
globalError?: string;
|
|
30
|
+
domainData?: Partial<DomainData>;
|
|
31
|
+
}; //#endregion
|
|
32
|
+
//#endregion
|
|
33
|
+
export { AuditEvent };
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":["FastifyRequest","CheerioAPI","CheerioAPI$1","CompatibleRequest","AbortSignal","Request","signal","Details","key","AuditStatus","AuditData","successDetails","warningsDetails","errorsDetails","Url","AuditDataList","T","Locale","DomainData","Record","discoveredUrls","discoveredLocales","defaultLocale","image","title","description","AuditEvent","Partial","type","status","data","score","progress","message","globalError","domainData"],"sources":["../../../../../../../../../../../apps/backend/dist/types/services/audit/types.d.ts"],"mappings":";KAUKO,OAAAA,kDAAyDA,OAAAA;EAAAA,CAC3DC,GAAAA,WAAcD,OAAAA;AAAAA;AAAAA,KAEZE,WAAAA;AAAAA,KACAC,SAAAA;EACHC,cAAAA,GAAiBJ,OAAAA;EACjBK,eAAAA,GAAkBL,OAAAA;EAClBM,aAAAA,GAAgBN,OAAAA;AAAAA;AAAAA,KAEbO,GAAAA;AAAAA,KACAC,aAAAA,WAAwBD,GAAAA,yBAA4BE,CAAAA,+BAAgCA,CAAAA,2BAA4BA,CAAAA,sBAAuBA,CAAAA,qBAAsBA,CAAAA,sBAAuBA,CAAAA,yBAA0BA,CAAAA,iCAAkCA,CAAAA,0BAA2BA,CAAAA;AAAAA,KAC3QC,MAAAA;AAAAA,KACAC,UAAAA;EACHE,cAAAA,EAAgBD,MAAAA,CAAOF,MAAAA;EACvBI,iBAAAA,EAAmBJ,MAAAA;EACnBK,aAAAA,EAAeL,MAAAA;EACfM,KAAAA;EACAC,KAAAA;EACAC,WAAAA;AAAAA;AAAAA,KAEGC,UAAAA;EACHE,IAAAA,GAAOb,aAAAA,CAAcD,GAAAA;EACrBe,MAAAA,GAASpB,WAAAA;EACTqB,IAAAA,GAAOpB,SAAAA;EACPqB,KAAAA;EACAC,QAAAA;EACAC,OAAAA;EACAC,WAAAA;EACAC,UAAAA,GAAaR,OAAAA,CAAQT,UAAAA;AAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionaryFiltersAndPagination.d.ts","names":["Dictionary","ResponseWithSession","FiltersAndPagination","
|
|
1
|
+
{"version":3,"file":"getDictionaryFiltersAndPagination.d.ts","names":["Dictionary","ResponseWithSession","FiltersAndPagination","RootFilterQuery","FastifyRequest","Request","DictionaryFiltersParams","ids","projectId","projectIds","organizationId","organizationIds","userId","userIds","creatorId","creatorIds","title","description","key","keys","tags","location","priority","version","search","sortBy","sortOrder","fetchAll","DictionaryFilters","getDictionaryFiltersAndPagination","Record","Querystring","req","res","page","skip","pageSize","getNumberOfPages","totalItems","filters","sortOptions"],"sources":["../../../../../../../../../../../apps/backend/dist/types/utils/filtersAndPagination/getDictionaryFiltersAndPagination.d.ts"],"mappings":";;KAQKM,uBAAAA;EACHC,GAAAA;EACAC,SAAAA;EACAC,UAAAA;EACAC,cAAAA;EACAC,eAAAA;EACAC,MAAAA;EACAC,OAAAA;EACAC,SAAAA;EACAC,UAAAA;EACAC,KAAAA;EACAC,WAAAA;EACAC,GAAAA;EACAC,IAAAA;EACAC,IAAAA;EACAC,QAAAA;EACAC,QAAAA;EACAC,OAAAA;EACAC,MAAAA;EACAC,MAAAA;EACAC,SAAAA;EAIQ;;;EAARC,QAAAA;AAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDiscussionFiltersAndPagination.d.ts","names":["ResponseWithSession","Discussion","FiltersAndPagination","
|
|
1
|
+
{"version":3,"file":"getDiscussionFiltersAndPagination.d.ts","names":["ResponseWithSession","Discussion","FiltersAndPagination","RootFilterQuery","FastifyRequest","Request","DiscussionFiltersParams","ids","userId","userIds","discussionId","search","isArchived","sortBy","sortOrder","fetchAll","DiscussionFilters","getDiscussionFiltersAndPagination","Record","Querystring","req","res","page","skip","pageSize","getNumberOfPages","totalItems","filters","sortOptions"],"sources":["../../../../../../../../../../../apps/backend/dist/types/utils/filtersAndPagination/getDiscussionFiltersAndPagination.d.ts"],"mappings":";;KAQKM,uBAAAA;EACHC,GAAAA;EACAC,MAAAA;EACAC,OAAAA;EACAC,YAAAA;EACAC,MAAAA;EACAC,UAAAA;EACAC,MAAAA;EACAC,SAAAA;EAIQ;;;EAARC,QAAAA;AAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOrganizationFiltersAndPagination.d.ts","names":["Organization","ResponseWithSession","FiltersAndPagination","
|
|
1
|
+
{"version":3,"file":"getOrganizationFiltersAndPagination.d.ts","names":["Organization","ResponseWithSession","FiltersAndPagination","RootFilterQuery","FastifyRequest","Request","OrganizationFiltersParams","ids","name","search","membersIds","sortBy","sortOrder","fetchAll","OrganizationFilters","getOrganizationFiltersAndPagination","Record","Querystring","req","res","page","skip","pageSize","getNumberOfPages","totalItems","filters","sortOptions"],"sources":["../../../../../../../../../../../apps/backend/dist/types/utils/filtersAndPagination/getOrganizationFiltersAndPagination.d.ts"],"mappings":";;KAQKM,yBAAAA;EAWHG;;;;;;;;EAFAF,GAAAA;EACAC,IAAAA;EACAC,MAAAA;EACAC,UAAAA;EACAC,MAAAA;EACAC,SAAAA;;;;EAIAC,QAAAA;AAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProjectFiltersAndPagination.d.ts","names":["Project","ResponseWithSession","FiltersAndPagination","
|
|
1
|
+
{"version":3,"file":"getProjectFiltersAndPagination.d.ts","names":["Project","ResponseWithSession","FiltersAndPagination","RootFilterQuery","FastifyRequest","Request","ProjectFiltersParams","ids","name","search","organizationId","membersIds","sortBy","sortOrder","fetchAll","ProjectFilters","getProjectFiltersAndPagination","Record","Querystring","req","res","page","skip","pageSize","getNumberOfPages","totalItems","filters","sortOptions"],"sources":["../../../../../../../../../../../apps/backend/dist/types/utils/filtersAndPagination/getProjectFiltersAndPagination.d.ts"],"mappings":";;KAQKM,oBAAAA;EACHC,GAAAA;EACAC,IAAAA;EACAC,MAAAA;EACAC,cAAAA;EACAC,UAAAA;EACAC,MAAAA;EACAC,SAAAA;EAIQ;;;EAARC,QAAAA;AAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTagFiltersAndPagination.d.ts","names":["Tag","ResponseWithSession","FiltersAndPagination","
|
|
1
|
+
{"version":3,"file":"getTagFiltersAndPagination.d.ts","names":["Tag","ResponseWithSession","FiltersAndPagination","RootFilterQuery","FastifyRequest","Request","TagFiltersParams","ids","keys","name","search","organizationId","fetchAll","TagFilters","getTagFiltersAndPagination","Record","Querystring","req","res","page","skip","pageSize","getNumberOfPages","totalItems","filters","sortOptions"],"sources":["../../../../../../../../../../../apps/backend/dist/types/utils/filtersAndPagination/getTagFiltersAndPagination.d.ts"],"mappings":";;KAQKM,gBAAAA;EACHC,GAAAA;EACAC,IAAAA;EACAC,IAAAA;EACAC,MAAAA;EACAC,cAAAA;EAIQ;;;EAARC,QAAAA;AAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDistantDictionaries.d.ts","names":[],"sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetchDistantDictionaries.d.ts","names":[],"sources":["../../../src/distantDictionary/fetchDistantDictionaries.ts"],"mappings":";;;;;;AAOA;cAAa,wBAAA,GACX,cAAA,EAAgB,cAAA,KACf,OAAA,CAAQ,aAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDistantDictionary.d.ts","names":[],"sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetchDistantDictionary.d.ts","names":[],"sources":["../../../src/distantDictionary/fetchDistantDictionary.ts"],"mappings":";;;;;;AAOA;cAAa,sBAAA,GACX,aAAA,UACA,cAAA,EAAgB,cAAA,KACf,OAAA,CAAQ,aAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { AIOptions, ChatCompletionRequestMessage } from "../packages/@intlayer/ai/dist/types/aiSdk.js";
|
|
2
|
-
import { AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult, AutocompleteResponse, CustomQueryBody, CustomQueryResult, GetDiscussionsParams, GetDiscussionsResult, TranslateJSONBody, TranslateJSONResult } from "../apps/backend/dist/types/controllers/ai.controller.js";
|
|
3
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AIOptions, AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, ChatCompletionRequestMessage, CustomQueryBody, GetDiscussionsParams, TranslateJSONBody } from "@intlayer/backend";
|
|
4
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
5
4
|
|
|
6
5
|
//#region src/getIntlayerAPI/ai.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/ai.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/ai.ts"],"mappings":";;;;;KAwBY,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,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;uBAmBR,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,24 @@
|
|
|
1
|
+
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AuditEvent, GetRecursiveAuditStatusResult, StartRecursiveAuditResult } from "@intlayer/backend";
|
|
3
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
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 StartRecursiveAuditBody = {
|
|
12
|
+
url: string;
|
|
13
|
+
};
|
|
14
|
+
type GetRecursiveAuditStatusParams = {
|
|
15
|
+
jobId: string;
|
|
16
|
+
};
|
|
17
|
+
declare const getAuditAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
18
|
+
scanUrl: (body?: ScanUrlBody, otherOptions?: FetcherOptions) => Promise<void>;
|
|
19
|
+
startRecursiveAudit: (body?: StartRecursiveAuditBody, otherOptions?: FetcherOptions) => Promise<StartRecursiveAuditResult>;
|
|
20
|
+
getRecursiveAuditStatus: (params?: GetRecursiveAuditStatusParams, otherOptions?: FetcherOptions) => Promise<GetRecursiveAuditStatusResult>;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { type AuditEvent, GetRecursiveAuditStatusParams, type GetRecursiveAuditStatusResult, ScanUrlBody, StartRecursiveAuditBody, type StartRecursiveAuditResult, getAuditAPI };
|
|
24
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/audit.ts"],"mappings":";;;;;KAeY,WAAA;EACV,GAAA;EACA,SAAA,IAAa,KAAA,EAAO,UAAA;EACpB,MAAA;AAAA;AAAA,KAGU,uBAAA;EACV,GAAA;AAAA;AAAA,KAGU,6BAAA;EACV,KAAA;AAAA;AAAA,cAGW,WAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;mBA0BR,WAAA,EAAW,YAAA,GACJ,cAAA,KAAc,OAAA;+BAqErB,uBAAA,EAAuB,YAAA,GAChB,cAAA,KAAc,OAAA,CAAA,yBAAA;qCAiBnB,6BAAA,EAA6B,YAAA,GACxB,cAAA,KAAc,OAAA,CAAA,6BAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddDictionaryBody, AddDictionaryResult, DeleteDictionaryParam, DeleteDictionaryResult, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionariesUpdateTimestampResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, PushDictionariesBody, PushDictionariesResult, UpdateDictionaryBody, UpdateDictionaryResult } from "../apps/backend/dist/types/controllers/dictionary.controller.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AddDictionaryBody, DeleteDictionaryParam, GetDictionariesParams, GetDictionaryParams, GetDictionaryQuery, PushDictionariesBody, UpdateDictionaryBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/dictionary.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
-
import { GetConfigurationResult } from "../
|
|
3
|
-
import { GetEditorDictionariesResult, WriteContentDeclarationBody, WriteContentDeclarationResult } from "../
|
|
2
|
+
import { GetConfigurationResult } from "../intlayer-editor/server/dist/controllers/configuration.controller.js";
|
|
3
|
+
import { GetEditorDictionariesResult, WriteContentDeclarationBody, WriteContentDeclarationResult } from "../intlayer-editor/server/dist/controllers/dictionary.controller.js";
|
|
4
4
|
import { IntlayerConfig } from "@intlayer/types";
|
|
5
5
|
|
|
6
6
|
//#region src/getIntlayerAPI/editor.d.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
2
|
import { getAiAPI } from "./ai.js";
|
|
3
|
+
import { getAuditAPI } from "./audit.js";
|
|
3
4
|
import { getBitbucketAPI } from "./bitbucket.js";
|
|
4
5
|
import { getDictionaryAPI } from "./dictionary.js";
|
|
5
6
|
import { getEditorAPI } from "./editor.js";
|
|
@@ -10,6 +11,7 @@ import { getOAuthAPI } from "./oAuth.js";
|
|
|
10
11
|
import { getOrganizationAPI } from "./organization.js";
|
|
11
12
|
import { getProjectAPI } from "./project.js";
|
|
12
13
|
import { getSearchAPI } from "./search.js";
|
|
14
|
+
import { getShowcaseProjectAPI } from "./showcaseProject.js";
|
|
13
15
|
import { getStripeAPI } from "./stripe.js";
|
|
14
16
|
import { getTagAPI } from "./tag.js";
|
|
15
17
|
import { getUserAPI } from "./user.js";
|
|
@@ -24,6 +26,7 @@ interface IntlayerAPIReturn {
|
|
|
24
26
|
dictionary: ReturnType<typeof getDictionaryAPI>;
|
|
25
27
|
stripe: ReturnType<typeof getStripeAPI>;
|
|
26
28
|
ai: ReturnType<typeof getAiAPI>;
|
|
29
|
+
audit: ReturnType<typeof getAuditAPI>;
|
|
27
30
|
tag: ReturnType<typeof getTagAPI>;
|
|
28
31
|
search: ReturnType<typeof getSearchAPI>;
|
|
29
32
|
editor: ReturnType<typeof getEditorAPI>;
|
|
@@ -31,6 +34,7 @@ interface IntlayerAPIReturn {
|
|
|
31
34
|
github: ReturnType<typeof getGithubAPI>;
|
|
32
35
|
gitlab: ReturnType<typeof getGitlabAPI>;
|
|
33
36
|
bitbucket: ReturnType<typeof getBitbucketAPI>;
|
|
37
|
+
showcaseProject: ReturnType<typeof getShowcaseProjectAPI>;
|
|
34
38
|
}
|
|
35
39
|
declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => IntlayerAPIReturn;
|
|
36
40
|
type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAmBU,iBAAA;EACR,YAAA,EAAc,UAAA,QAAkB,kBAAA;EAChC,OAAA,EAAS,UAAA,QAAkB,aAAA;EAC3B,IAAA,EAAM,UAAA,QAAkB,UAAA;EACxB,KAAA,EAAO,UAAA,QAAkB,WAAA;EACzB,UAAA,EAAY,UAAA,QAAkB,gBAAA;EAC9B,MAAA,EAAQ,UAAA,QAAkB,YAAA;EAC1B,EAAA,EAAI,UAAA,QAAkB,QAAA;EACtB,KAAA,EAAO,UAAA,QAAkB,WAAA;EACzB,GAAA,EAAK,UAAA,QAAkB,SAAA;EACvB,MAAA,EAAQ,UAAA,QAAkB,YAAA;EAC1B,MAAA,EAAQ,UAAA,QAAkB,YAAA;EAC1B,UAAA,EAAY,UAAA,QAAkB,gBAAA;EAC9B,MAAA,EAAQ,UAAA,QAAkB,YAAA;EAC1B,MAAA,EAAQ,UAAA,QAAkB,YAAA;EAC1B,SAAA,EAAW,UAAA,QAAkB,eAAA;EAC7B,eAAA,EAAiB,UAAA,QAAkB,qBAAA;AAAA;AAAA,cAGxB,cAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA,KAChB,iBAAA;AAAA,KAmBS,WAAA,GAAc,UAAA,QAAkB,cAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NewsletterSubscriptionBody, NewsletterSubscriptionResult, NewsletterUnsubscriptionBody } from "../apps/backend/dist/types/controllers/newsletter.controller.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { NewsletterSubscriptionBody, NewsletterUnsubscriptionBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/newsletter.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oAuth.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/oAuth.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"oAuth.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/oAuth.ts"],"mappings":";;;;cAQa,WAAA,GAAe,cAAA,GAAiB,cAAA;wCAeO,cAAA,KAAc,OAAA,CAAA,oBAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, DeleteOrganizationResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, SelectOrganizationParam, SelectOrganizationResult, UnselectOrganizationResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult } from "../apps/backend/dist/types/controllers/organization.controller.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AddOrganizationBody, AddOrganizationMemberBody, GetOrganizationParam, GetOrganizationsParams, SelectOrganizationParam, UpdateOrganizationBody, UpdateOrganizationMembersBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/organization.d.ts
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ResponseData } from "../apps/backend/dist/types/utils/responseData.js";
|
|
2
|
-
import { AddProjectBody, AddProjectResult, DeleteProjectResult, GetProjectsParams, GetProjectsResult, PushProjectConfigurationBody, PushProjectConfigurationResult, SelectProjectParam, SelectProjectResult, TriggerBuildResult, TriggerWebhookBody, TriggerWebhookResult, UnselectProjectResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult } from "../apps/backend/dist/types/controllers/project.controller.js";
|
|
3
|
-
import { AddNewAccessKeyBody, AddNewAccessKeyResponse, DeleteAccessKeyBody, DeleteAccessKeyResponse, RefreshAccessKeyBody, RefreshAccessKeyResponse } from "../apps/backend/dist/types/controllers/projectAccessKey.controller.js";
|
|
4
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AddNewAccessKeyBody, AddProjectBody, DeleteAccessKeyBody, GetProjectsParams, PushProjectConfigurationBody, RefreshAccessKeyBody, SelectProjectParam, TriggerWebhookBody, UpdateProjectBody, UpdateProjectMembersBody } from "@intlayer/backend";
|
|
5
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
6
4
|
|
|
7
5
|
//#region src/getIntlayerAPI/project.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/project.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"project.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/project.ts"],"mappings":";;;;;cA8Ba,aAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;0BAkBL,iBAAA,EAAiB,YAAA,GACb,cAAA,KAAc,OAAA,CAAA,iBAAA;wBAkBnB,cAAA,EAAc,YAAA,GACT,cAAA,KAAc,OAAA,CAAA,gBAAA;2BAiBnB,iBAAA,EAAiB,YAAA,GACZ,cAAA,KAAc,OAAA,CAAA,mBAAA;+BAiBtB,wBAAA,EAAwB,YAAA,GAChB,cAAA,KAAc,OAAA,CAAA,0BAAA;mDAgBN,4BAAA,EAA4B,YAAA,GACpC,cAAA,KAAc,OAAA,CAAA,8BAAA;iCAgBa,cAAA,KAAc,OAAA,CAAA,mBAAA;6BAe5C,kBAAA,eAA+B,YAAA,GAC5B,cAAA,KAAc,OAAA,CAAA,mBAAA;mCAee,cAAA,KAAc,OAAA,CAAA,qBAAA;+BAiB9C,mBAAA,EAAmB,YAAA,GAChB,cAAA,KAAc,OAAA,CAAA,uBAAA;8BAmBlB,mBAAA,cAA+B,YAAA,GAC3B,cAAA,KAAc,OAAA,CAAA,uBAAA;+BAmBlB,oBAAA,cAAgC,YAAA,GAC5B,cAAA,KAAc,OAAA,CAAA,wBAAA;gCAiBY,cAAA,KAAc,OAAA,CAAA,kBAAA;iCAiBxC,kBAAA,kBAAkC,YAAA,GAClC,cAAA,KAAc,OAAA,CAAA,oBAAA;+BAiBW,cAAA,KAAc,OAAA,CAAA,YAAA;gCAeb,cAAA,KAAc,OAAA,CAAA,YAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SearchDocUtilParams, SearchDocUtilResult } from "../apps/backend/dist/types/controllers/search.controller.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { SearchDocUtilParams } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/search.d.ts
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
3
|
+
|
|
4
|
+
//#region src/getIntlayerAPI/showcaseProject.d.ts
|
|
5
|
+
type ShowcaseProjectsQuery = {
|
|
6
|
+
page?: number;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
search?: string;
|
|
9
|
+
selectedUseCases?: string[];
|
|
10
|
+
isOpenSource?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type ToggleShowcaseLikeBody = {
|
|
13
|
+
projectId: string;
|
|
14
|
+
};
|
|
15
|
+
declare const getShowcaseProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
16
|
+
getShowcaseProjects: (query?: ShowcaseProjectsQuery, otherOptions?: FetcherOptions) => Promise<unknown>;
|
|
17
|
+
getShowcaseProjectById: (projectId: string, otherOptions?: FetcherOptions) => Promise<unknown>;
|
|
18
|
+
getOtherShowcaseProjects: (excludeId: string, limit?: number, otherOptions?: FetcherOptions) => Promise<unknown>;
|
|
19
|
+
toggleShowcaseLike: (body: ToggleShowcaseLikeBody, otherOptions?: FetcherOptions) => Promise<{
|
|
20
|
+
data: {
|
|
21
|
+
upvotes: number;
|
|
22
|
+
isLiked: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ShowcaseProjectsQuery, ToggleShowcaseLikeBody, getShowcaseProjectAPI };
|
|
28
|
+
//# sourceMappingURL=showcaseProject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcaseProject.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/showcaseProject.ts"],"mappings":";;;;KAIY,qBAAA;EACV,IAAA;EACA,QAAA;EACA,MAAA;EACA,gBAAA;EACA,YAAA;AAAA;AAAA,KAGU,sBAAA;EAA2B,SAAA;AAAA;AAAA,cAE1B,qBAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;gCAcP,qBAAA,EAAqB,YAAA,GACf,cAAA,KAAc,OAAA;8CAoBX,YAAA,GACH,cAAA,KAAc,OAAA;gDAUX,KAAA,WACH,YAAA,GACA,cAAA,KAAc,OAAA;6BAatB,sBAAA,EAAsB,YAAA,GACd,cAAA,KAAc,OAAA;;MAEJ,OAAA;MAAiB,OAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GetCheckoutSessionBody, GetCheckoutSessionResult, GetPricingBody, GetPricingResult } from "../apps/backend/dist/types/controllers/stripe.controller.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { GetCheckoutSessionBody, GetPricingBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/stripe.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddTagBody, AddTagResult, DeleteTagParams, DeleteTagResult, GetTagsParams, GetTagsResult, UpdateTagBody, UpdateTagParams, UpdateTagResult } from "../apps/backend/dist/types/controllers/tag.controller.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AddTagBody, DeleteTagParams, GetTagsParams, UpdateTagBody, UpdateTagParams } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/tag.d.ts
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { UserAPI } from "../apps/backend/dist/types/types/user.types.js";
|
|
2
|
-
import { ResponseData } from "../apps/backend/dist/types/utils/responseData.js";
|
|
3
|
-
import { CreateUserBody, CreateUserResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, UpdateUserBody, UpdateUserResult } from "../apps/backend/dist/types/controllers/user.controller.js";
|
|
4
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { CreateUserBody, GetUserByEmailParams, GetUserByIdParams, GetUsersParams, UpdateUserBody, UserAPI } from "@intlayer/backend";
|
|
5
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
6
4
|
|
|
7
5
|
//#region src/getIntlayerAPI/user.d.ts
|
|
@@ -9,12 +7,11 @@ type GetUserByAccountParams = {
|
|
|
9
7
|
providerAccountId: string;
|
|
10
8
|
provider: string;
|
|
11
9
|
};
|
|
12
|
-
type GetUserByAccountResult = ResponseData<UserAPI>;
|
|
13
10
|
declare const getUserAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
14
11
|
createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
|
|
15
12
|
getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
|
|
16
13
|
getUserById: (userId: GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<GetUserByIdResult>;
|
|
17
|
-
getUserByAccount: (providerAccountId: GetUserByAccountParams["providerAccountId"], provider: GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<
|
|
14
|
+
getUserByAccount: (providerAccountId: GetUserByAccountParams["providerAccountId"], provider: GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<any>;
|
|
18
15
|
getUserByEmail: (email: GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<GetUserByEmailResult>;
|
|
19
16
|
updateUser: (user: UpdateUserBody, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
|
|
20
17
|
deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"user.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"mappings":";;;;;KAiBK,sBAAA;EAA2B,iBAAA;EAA2B,QAAA;AAAA;AAAA,cAG9C,UAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;qBA8FT,cAAA,EAAc,YAAA,GACN,cAAA,KAAc,OAAA,CAAA,gBAAA;uBA5ElB,cAAA,EAAc,YAAA,GACV,cAAA,KAAc,OAAA,CAAA,cAAA;wBAmBpB,iBAAA,YAA2B,YAAA,GACrB,cAAA,KAAc,OAAA,CAAA,iBAAA;wCAmCT,sBAAA,uBAA2C,QAAA,EACpD,sBAAA,cAAkC,YAAA,GAC9B,cAAA,KAAc,OAAA;0BApBrB,oBAAA,WAA6B,YAAA,GACtB,cAAA,KAAc,OAAA,CAAA,oBAAA;qBAuDtB,cAAA,EAAc,YAAA,GACN,cAAA,KAAc,OAAA,CAAA,gBAAA;+BAkBd,YAAA,GACA,cAAA,KAAc,OAAA,CAAA,gBAAA;6CAgBoB,OAAA;AAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AIOptions } from "./packages/@intlayer/ai/dist/types/aiSdk.js";
|
|
2
|
-
import { AskDocQuestionResult } from "./apps/backend/dist/types/controllers/ai.controller.js";
|
|
3
1
|
import { fetchDistantDictionaries } from "./distantDictionary/fetchDistantDictionaries.js";
|
|
4
2
|
import { fetchDistantDictionary } from "./distantDictionary/fetchDistantDictionary.js";
|
|
5
3
|
import { FetcherOptions, fetcher, fetcherOptions } from "./fetcher.js";
|
|
6
|
-
import { AskDocQuestionBody, AutocompleteBody, getAiAPI } from "./getIntlayerAPI/ai.js";
|
|
4
|
+
import { AskDocQuestionBody, AskDocQuestionResult, AutocompleteBody, getAiAPI } from "./getIntlayerAPI/ai.js";
|
|
5
|
+
import { AuditEvent, GetRecursiveAuditStatusParams, GetRecursiveAuditStatusResult, ScanUrlBody, StartRecursiveAuditBody, StartRecursiveAuditResult, getAuditAPI } from "./getIntlayerAPI/audit.js";
|
|
7
6
|
import { BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, getBitbucketAPI } from "./getIntlayerAPI/bitbucket.js";
|
|
8
7
|
import { getDictionaryAPI } from "./getIntlayerAPI/dictionary.js";
|
|
9
8
|
import { getEditorAPI } from "./getIntlayerAPI/editor.js";
|
|
@@ -19,4 +18,5 @@ import { getTagAPI } from "./getIntlayerAPI/tag.js";
|
|
|
19
18
|
import { getUserAPI } from "./getIntlayerAPI/user.js";
|
|
20
19
|
import { IntlayerAPI, getIntlayerAPI } from "./getIntlayerAPI/index.js";
|
|
21
20
|
import { IntlayerAPIProxy, getIntlayerAPIProxy } from "./proxy.js";
|
|
22
|
-
|
|
21
|
+
import { AIOptions } from "./types.js";
|
|
22
|
+
export { AIOptions, AskDocQuestionBody, AskDocQuestionResult, AuditEvent, AutocompleteBody, BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, FetcherOptions, GetRecursiveAuditStatusParams, GetRecursiveAuditStatusResult, GitHubAuthCallbackBody, GitHubAuthCallbackResult, GitHubCheckConfigBody, GitHubCheckConfigResult, GitHubGetAuthUrlResult, GitHubGetConfigFileBody, GitHubGetConfigFileResult, GitHubListReposResult, GitHubRepository, GitLabAuthCallbackBody, GitLabAuthCallbackResult, GitLabCheckConfigBody, GitLabCheckConfigResult, GitLabGetAuthUrlResult, GitLabGetConfigFileBody, GitLabGetConfigFileResult, GitLabListProjectsResult, GitLabProject, IntlayerAPI, IntlayerAPIProxy, ScanUrlBody, StartRecursiveAuditBody, StartRecursiveAuditResult, fetchDistantDictionaries, fetchDistantDictionary, fetcher, fetcherOptions, getAiAPI, getAuditAPI, getBitbucketAPI, getDictionaryAPI, getEditorAPI, getGithubAPI, getGitlabAPI, getIntlayerAPI, getIntlayerAPIProxy, getNewsletterAPI, getOAuthAPI, getOrganizationAPI, getProjectAPI, getSearchAPI, getStripeAPI, getTagAPI, getUserAPI };
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AIOptions } from "
|
|
1
|
+
import { AIOptions } from "@intlayer/backend";
|
|
2
2
|
export { type AIOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/api",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "SDK for interacting with the Intlayer API, enabling content auditing, and managing organizations, projects, and users.",
|
|
6
6
|
"keywords": [
|
|
@@ -72,16 +72,16 @@
|
|
|
72
72
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@intlayer/config": "8.2.
|
|
76
|
-
"@intlayer/types": "8.2.
|
|
75
|
+
"@intlayer/config": "8.2.3",
|
|
76
|
+
"@intlayer/types": "8.2.3"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@types/node": "25.3.
|
|
79
|
+
"@types/node": "25.3.5",
|
|
80
80
|
"@utils/ts-config": "1.0.4",
|
|
81
81
|
"@utils/ts-config-types": "1.0.4",
|
|
82
82
|
"@utils/tsdown-config": "1.0.4",
|
|
83
83
|
"rimraf": "6.1.3",
|
|
84
|
-
"tsdown": "0.
|
|
84
|
+
"tsdown": "0.21.0",
|
|
85
85
|
"typescript": "5.9.3",
|
|
86
86
|
"vitest": "4.0.18"
|
|
87
87
|
},
|