@intlayer/api 8.2.2 → 8.2.4
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 +31 -0
- package/dist/types/apps/backend/dist/types/controllers/recursiveAudit.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/showcaseProject.controller.d.ts +69 -0
- package/dist/types/apps/backend/dist/types/controllers/showcaseProject.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/export.d.ts +5 -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/types/project.types.d.ts +2 -1
- package/dist/types/apps/backend/dist/types/types/project.types.d.ts.map +1 -1
- package/dist/types/apps/backend/dist/types/types/showcaseProject.types.d.ts +59 -0
- package/dist/types/apps/backend/dist/types/types/showcaseProject.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/getIntlayerAPI/audit.d.ts +45 -0
- package/dist/types/getIntlayerAPI/audit.d.ts.map +1 -0
- package/dist/types/getIntlayerAPI/index.d.ts +4 -0
- package/dist/types/getIntlayerAPI/index.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/showcaseProject.d.ts +33 -0
- package/dist/types/getIntlayerAPI/showcaseProject.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -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{discoverUrls:async(n,r={})=>await t.fetcher(`${a}/recursive/discover`,e,r,{method:`GET`,params:n}),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?.url?{url:n.url}:void 0,body:n?.urls===void 0?void 0:{urls:n.urls}}),getRecursiveAuditStatus:async(n,r={})=>await t.fetcher(`${a}/recursive/${n?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(n,r={})=>await t.fetcher(`${a}/recursive/${n?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(n,r={})=>await t.fetcher(`${a}/recursive/${n?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(n,r={})=>await t.fetcher(`${a}/recursive/${n?.jobId}/resume`,e,r,{method:`POST`})}};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 DiscoverUrlsParams = {\n url: string;\n};\n\nexport type DiscoverUrlsResult = {\n urls: string[];\n};\n\nexport type StartRecursiveAuditBody = {\n url: string;\n urls?: string[];\n};\n\nexport type GetRecursiveAuditStatusParams = {\n jobId: string;\n};\n\nexport type RecursiveAuditJobParams = {\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 discoverUrls = async (\n params?: DiscoverUrlsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DiscoverUrlsResult>(\n `${AUDIT_API_ROUTE}/recursive/discover`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n params,\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\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 malformed 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 params: body?.url ? { url: body.url } : undefined,\n body: body?.urls !== undefined ? { urls: body.urls as any } : undefined,\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 const cancelRecursiveAudit = async (\n params?: RecursiveAuditJobParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ success: boolean }>(\n `${AUDIT_API_ROUTE}/recursive/${params?.jobId}/cancel`,\n authAPIOptions,\n otherOptions,\n { method: 'POST' }\n );\n\n const pauseRecursiveAudit = async (\n params?: RecursiveAuditJobParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ success: boolean }>(\n `${AUDIT_API_ROUTE}/recursive/${params?.jobId}/pause`,\n authAPIOptions,\n otherOptions,\n { method: 'POST' }\n );\n\n const resumeRecursiveAudit = async (\n params?: RecursiveAuditJobParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ success: boolean }>(\n `${AUDIT_API_ROUTE}/recursive/${params?.jobId}/resume`,\n authAPIOptions,\n otherOptions,\n { method: 'POST' }\n );\n\n return {\n discoverUrls,\n scanUrl,\n startRecursiveAudit,\n getRecursiveAuditStatus,\n cancelRecursiveAudit,\n pauseRecursiveAudit,\n resumeRecursiveAudit,\n };\n};\n"],"mappings":"2MA0CA,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,WAmKtC,MAAO,CACL,aAtJmB,MACnB,EACA,EAA+B,EAAE,GAEjC,MAAMC,EAAAA,QACJ,GAAG,EAAgB,qBACnB,EACA,EACA,CACE,OAAQ,MACR,SACD,CACF,CA2ID,QAzIc,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,CAE3C,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,EAyEV,oBAnE0B,MAC1B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAgB,kBACnB,EACA,EACA,CACE,OAAQ,OACR,OAAQ,GAAM,IAAM,CAAE,IAAK,EAAK,IAAK,CAAG,IAAA,GACxC,KAAM,GAAM,OAAS,IAAA,GAAyC,IAAA,GAA7B,CAAE,KAAM,EAAK,KAAa,CAC5D,CACF,CAuDD,wBAlD8B,MAC9B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAgB,aAAa,GAAQ,QACxC,EACA,EACA,CACE,OAAQ,MACT,CACF,CAwCD,qBAtC2B,MAC3B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAgB,aAAa,GAAQ,MAAM,SAC9C,EACA,EACA,CAAE,OAAQ,OAAQ,CACnB,CA8BD,oBA5B0B,MAC1B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAgB,aAAa,GAAQ,MAAM,QAC9C,EACA,EACA,CAAE,OAAQ,OAAQ,CACnB,CAoBD,qBAlB2B,MAC3B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAgB,aAAa,GAAQ,MAAM,SAC9C,EACA,EACA,CAAE,OAAQ,OAAQ,CACnB,CAUF"}
|
|
@@ -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={})=>{let i={excludeId:n.excludeId};return n.limit!==void 0&&(i.limit=String(n.limit)),await t.fetcher(`${a}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(n,r={})=>await t.fetcher(`${a}/submit`,e,r,{method:`POST`,body:n}),toggleShowcaseUpvote:async(n,r={})=>await t.fetcher(`${a}/upvote`,e,r,{method:`POST`,body:n}),toggleShowcaseDownvote:async(n,r={})=>await t.fetcher(`${a}/downvote`,e,r,{method:`POST`,body:n}),deleteShowcaseProject:async(n,r={})=>await t.fetcher(`${a}/${n}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(n,r,i={})=>await t.fetcher(`${a}/${n}`,e,i,{method:`PATCH`,body:r})}};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 type {\n GetOtherShowcaseProjectsResult,\n GetShowcaseProjectByIdParams,\n GetShowcaseProjectByIdResult,\n GetShowcaseProjectsResult,\n SubmitShowcaseProjectBody,\n SubmitShowcaseProjectResult,\n ToggleShowcaseDownvoteBody,\n ToggleShowcaseDownvoteResult,\n ToggleShowcaseUpvoteBody,\n ToggleShowcaseUpvoteResult,\n UpdateShowcaseProjectBody,\n UpdateShowcaseProjectResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\n// Client-side query types use proper JS types (numbers/booleans) rather than\n// the backend querystring types which are always strings.\nexport type ShowcaseProjectsQuery = {\n page?: number;\n pageSize?: number;\n search?: string;\n selectedUseCases?: string[];\n isOpenSource?: boolean;\n};\n\nexport type OtherShowcaseProjectsQuery = {\n excludeId: string;\n limit?: number;\n};\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<GetShowcaseProjectsResult>(\n SHOWCASE_API_ROUTE,\n authAPIOptions,\n otherOptions,\n { method: 'GET', params: params as any }\n );\n };\n\n const getShowcaseProjectById = async (\n projectId: GetShowcaseProjectByIdParams['projectId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetShowcaseProjectByIdResult>(\n `${SHOWCASE_API_ROUTE}/${projectId}`,\n authAPIOptions,\n otherOptions,\n { method: 'GET' }\n );\n\n const getOtherShowcaseProjects = async (\n query: OtherShowcaseProjectsQuery,\n otherOptions: FetcherOptions = {}\n ) => {\n const params: Record<string, string> = { excludeId: query.excludeId };\n if (query.limit !== undefined) params.limit = String(query.limit);\n return await fetcher<GetOtherShowcaseProjectsResult>(\n `${SHOWCASE_API_ROUTE}/others`,\n authAPIOptions,\n otherOptions,\n { method: 'GET', params: params as any }\n );\n };\n\n const submitShowcaseProject = async (\n body: SubmitShowcaseProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SubmitShowcaseProjectResult>(\n `${SHOWCASE_API_ROUTE}/submit`,\n authAPIOptions,\n otherOptions,\n { method: 'POST', body }\n );\n\n const toggleShowcaseUpvote = async (\n body: ToggleShowcaseUpvoteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ToggleShowcaseUpvoteResult>(\n `${SHOWCASE_API_ROUTE}/upvote`,\n authAPIOptions,\n otherOptions,\n { method: 'POST', body }\n );\n\n const toggleShowcaseDownvote = async (\n body: ToggleShowcaseDownvoteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ToggleShowcaseDownvoteResult>(\n `${SHOWCASE_API_ROUTE}/downvote`,\n authAPIOptions,\n otherOptions,\n { method: 'POST', body }\n );\n\n const deleteShowcaseProject = async (\n projectId: GetShowcaseProjectByIdParams['projectId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ data: { success: boolean } }>(\n `${SHOWCASE_API_ROUTE}/${projectId}`,\n authAPIOptions,\n otherOptions,\n { method: 'DELETE' }\n );\n\n const updateShowcaseProject = async (\n projectId: GetShowcaseProjectByIdParams['projectId'],\n body: UpdateShowcaseProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateShowcaseProjectResult>(\n `${SHOWCASE_API_ROUTE}/${projectId}`,\n authAPIOptions,\n otherOptions,\n { method: 'PATCH', body }\n );\n\n return {\n getShowcaseProjects,\n getShowcaseProjectById,\n getOtherShowcaseProjects,\n submitShowcaseProject,\n toggleShowcaseUpvote,\n toggleShowcaseDownvote,\n deleteShowcaseProject,\n updateShowcaseProject,\n };\n};\n"],"mappings":"2MAiCA,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,uBAwGzC,MAAO,CACL,oBAvG0B,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,EAsFD,uBAnF6B,MAC7B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAmB,GAAG,IACzB,EACA,EACA,CAAE,OAAQ,MAAO,CAClB,CA2ED,yBAzE+B,MAC/B,EACA,EAA+B,EAAE,GAC9B,CACH,IAAM,EAAiC,CAAE,UAAW,EAAM,UAAW,CAErE,OADI,EAAM,QAAU,IAAA,KAAW,EAAO,MAAQ,OAAO,EAAM,MAAM,EAC1D,MAAMA,EAAAA,QACX,GAAG,EAAmB,SACtB,EACA,EACA,CAAE,OAAQ,MAAe,SAAe,CACzC,EA+DD,sBA5D4B,MAC5B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAmB,SACtB,EACA,EACA,CAAE,OAAQ,OAAQ,OAAM,CACzB,CAoDD,qBAlD2B,MAC3B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAmB,SACtB,EACA,EACA,CAAE,OAAQ,OAAQ,OAAM,CACzB,CA0CD,uBAxC6B,MAC7B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAmB,WACtB,EACA,EACA,CAAE,OAAQ,OAAQ,OAAM,CACzB,CAgCD,sBA9B4B,MAC5B,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAmB,GAAG,IACzB,EACA,EACA,CAAE,OAAQ,SAAU,CACrB,CAsBD,sBApB4B,MAC5B,EACA,EACA,EAA+B,EAAE,GAEjC,MAAMA,EAAAA,QACJ,GAAG,EAAmB,GAAG,IACzB,EACA,EACA,CAAE,OAAQ,QAAS,OAAM,CAC1B,CAWF"}
|
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{discoverUrls:async(t,r={})=>await e(`${a}/recursive/discover`,n,r,{method:`GET`,params:t}),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?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await e(`${a}/recursive/${t?.jobId}`,n,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await e(`${a}/recursive/${t?.jobId}/cancel`,n,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await e(`${a}/recursive/${t?.jobId}/pause`,n,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await e(`${a}/recursive/${t?.jobId}/resume`,n,r,{method:`POST`})}};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 DiscoverUrlsParams = {\n url: string;\n};\n\nexport type DiscoverUrlsResult = {\n urls: string[];\n};\n\nexport type StartRecursiveAuditBody = {\n url: string;\n urls?: string[];\n};\n\nexport type GetRecursiveAuditStatusParams = {\n jobId: string;\n};\n\nexport type RecursiveAuditJobParams = {\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 discoverUrls = async (\n params?: DiscoverUrlsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DiscoverUrlsResult>(\n `${AUDIT_API_ROUTE}/recursive/discover`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n params,\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\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 malformed 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 params: body?.url ? { url: body.url } : undefined,\n body: body?.urls !== undefined ? { urls: body.urls as any } : undefined,\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 const cancelRecursiveAudit = async (\n params?: RecursiveAuditJobParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ success: boolean }>(\n `${AUDIT_API_ROUTE}/recursive/${params?.jobId}/cancel`,\n authAPIOptions,\n otherOptions,\n { method: 'POST' }\n );\n\n const pauseRecursiveAudit = async (\n params?: RecursiveAuditJobParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ success: boolean }>(\n `${AUDIT_API_ROUTE}/recursive/${params?.jobId}/pause`,\n authAPIOptions,\n otherOptions,\n { method: 'POST' }\n );\n\n const resumeRecursiveAudit = async (\n params?: RecursiveAuditJobParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ success: boolean }>(\n `${AUDIT_API_ROUTE}/recursive/${params?.jobId}/resume`,\n authAPIOptions,\n otherOptions,\n { method: 'POST' }\n );\n\n return {\n discoverUrls,\n scanUrl,\n startRecursiveAudit,\n getRecursiveAuditStatus,\n cancelRecursiveAudit,\n pauseRecursiveAudit,\n resumeRecursiveAudit,\n };\n};\n"],"mappings":"+EA0CA,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,WAmKtC,MAAO,CACL,aAtJmB,MACnB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAgB,qBACnB,EACA,EACA,CACE,OAAQ,MACR,SACD,CACF,CA2ID,QAzIc,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,CAE3C,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,EAyEV,oBAnE0B,MAC1B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAgB,kBACnB,EACA,EACA,CACE,OAAQ,OACR,OAAQ,GAAM,IAAM,CAAE,IAAK,EAAK,IAAK,CAAG,IAAA,GACxC,KAAM,GAAM,OAAS,IAAA,GAAyC,IAAA,GAA7B,CAAE,KAAM,EAAK,KAAa,CAC5D,CACF,CAuDD,wBAlD8B,MAC9B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAgB,aAAa,GAAQ,QACxC,EACA,EACA,CACE,OAAQ,MACT,CACF,CAwCD,qBAtC2B,MAC3B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAgB,aAAa,GAAQ,MAAM,SAC9C,EACA,EACA,CAAE,OAAQ,OAAQ,CACnB,CA8BD,oBA5B0B,MAC1B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAgB,aAAa,GAAQ,MAAM,QAC9C,EACA,EACA,CAAE,OAAQ,OAAQ,CACnB,CAoBD,qBAlB2B,MAC3B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAgB,aAAa,GAAQ,MAAM,SAC9C,EACA,EACA,CAAE,OAAQ,OAAQ,CACnB,CAUF"}
|
|
@@ -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={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await e(`${a}/others`,n,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await e(`${a}/submit`,n,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await e(`${a}/upvote`,n,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await e(`${a}/downvote`,n,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await e(`${a}/${t}`,n,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await e(`${a}/${t}`,n,i,{method:`PATCH`,body:r})}};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 type {\n GetOtherShowcaseProjectsResult,\n GetShowcaseProjectByIdParams,\n GetShowcaseProjectByIdResult,\n GetShowcaseProjectsResult,\n SubmitShowcaseProjectBody,\n SubmitShowcaseProjectResult,\n ToggleShowcaseDownvoteBody,\n ToggleShowcaseDownvoteResult,\n ToggleShowcaseUpvoteBody,\n ToggleShowcaseUpvoteResult,\n UpdateShowcaseProjectBody,\n UpdateShowcaseProjectResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\n// Client-side query types use proper JS types (numbers/booleans) rather than\n// the backend querystring types which are always strings.\nexport type ShowcaseProjectsQuery = {\n page?: number;\n pageSize?: number;\n search?: string;\n selectedUseCases?: string[];\n isOpenSource?: boolean;\n};\n\nexport type OtherShowcaseProjectsQuery = {\n excludeId: string;\n limit?: number;\n};\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<GetShowcaseProjectsResult>(\n SHOWCASE_API_ROUTE,\n authAPIOptions,\n otherOptions,\n { method: 'GET', params: params as any }\n );\n };\n\n const getShowcaseProjectById = async (\n projectId: GetShowcaseProjectByIdParams['projectId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetShowcaseProjectByIdResult>(\n `${SHOWCASE_API_ROUTE}/${projectId}`,\n authAPIOptions,\n otherOptions,\n { method: 'GET' }\n );\n\n const getOtherShowcaseProjects = async (\n query: OtherShowcaseProjectsQuery,\n otherOptions: FetcherOptions = {}\n ) => {\n const params: Record<string, string> = { excludeId: query.excludeId };\n if (query.limit !== undefined) params.limit = String(query.limit);\n return await fetcher<GetOtherShowcaseProjectsResult>(\n `${SHOWCASE_API_ROUTE}/others`,\n authAPIOptions,\n otherOptions,\n { method: 'GET', params: params as any }\n );\n };\n\n const submitShowcaseProject = async (\n body: SubmitShowcaseProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SubmitShowcaseProjectResult>(\n `${SHOWCASE_API_ROUTE}/submit`,\n authAPIOptions,\n otherOptions,\n { method: 'POST', body }\n );\n\n const toggleShowcaseUpvote = async (\n body: ToggleShowcaseUpvoteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ToggleShowcaseUpvoteResult>(\n `${SHOWCASE_API_ROUTE}/upvote`,\n authAPIOptions,\n otherOptions,\n { method: 'POST', body }\n );\n\n const toggleShowcaseDownvote = async (\n body: ToggleShowcaseDownvoteBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ToggleShowcaseDownvoteResult>(\n `${SHOWCASE_API_ROUTE}/downvote`,\n authAPIOptions,\n otherOptions,\n { method: 'POST', body }\n );\n\n const deleteShowcaseProject = async (\n projectId: GetShowcaseProjectByIdParams['projectId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<{ data: { success: boolean } }>(\n `${SHOWCASE_API_ROUTE}/${projectId}`,\n authAPIOptions,\n otherOptions,\n { method: 'DELETE' }\n );\n\n const updateShowcaseProject = async (\n projectId: GetShowcaseProjectByIdParams['projectId'],\n body: UpdateShowcaseProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateShowcaseProjectResult>(\n `${SHOWCASE_API_ROUTE}/${projectId}`,\n authAPIOptions,\n otherOptions,\n { method: 'PATCH', body }\n );\n\n return {\n getShowcaseProjects,\n getShowcaseProjectById,\n getOtherShowcaseProjects,\n submitShowcaseProject,\n toggleShowcaseUpvote,\n toggleShowcaseDownvote,\n deleteShowcaseProject,\n updateShowcaseProject,\n };\n};\n"],"mappings":"+EAiCA,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,uBAwGzC,MAAO,CACL,oBAvG0B,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,EAsFD,uBAnF6B,MAC7B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAmB,GAAG,IACzB,EACA,EACA,CAAE,OAAQ,MAAO,CAClB,CA2ED,yBAzE+B,MAC/B,EACA,EAA+B,EAAE,GAC9B,CACH,IAAM,EAAiC,CAAE,UAAW,EAAM,UAAW,CAErE,OADI,EAAM,QAAU,IAAA,KAAW,EAAO,MAAQ,OAAO,EAAM,MAAM,EAC1D,MAAM,EACX,GAAG,EAAmB,SACtB,EACA,EACA,CAAE,OAAQ,MAAe,SAAe,CACzC,EA+DD,sBA5D4B,MAC5B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAmB,SACtB,EACA,EACA,CAAE,OAAQ,OAAQ,OAAM,CACzB,CAoDD,qBAlD2B,MAC3B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAmB,SACtB,EACA,EACA,CAAE,OAAQ,OAAQ,OAAM,CACzB,CA0CD,uBAxC6B,MAC7B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAmB,WACtB,EACA,EACA,CAAE,OAAQ,OAAQ,OAAM,CACzB,CAgCD,sBA9B4B,MAC5B,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAmB,GAAG,IACzB,EACA,EACA,CAAE,OAAQ,SAAU,CACrB,CAsBD,sBApB4B,MAC5B,EACA,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAmB,GAAG,IACzB,EACA,EACA,CAAE,OAAQ,QAAS,OAAM,CAC1B,CAWF"}
|
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,31 @@
|
|
|
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' | 'paused' | 'cancelled' | '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
|
+
results?: any[];
|
|
24
|
+
};
|
|
25
|
+
type GetRecursiveAuditStatusResult = {
|
|
26
|
+
job: RecursiveAuditJobInfo;
|
|
27
|
+
pages: RecursiveAuditPageInfo[];
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { GetRecursiveAuditStatusResult, RecursiveAuditJobInfo, RecursiveAuditPageInfo, StartRecursiveAuditResult };
|
|
31
|
+
//# sourceMappingURL=recursiveAudit.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recursiveAudit.controller.d.ts","names":["FastifyReply","FastifyRequest","StartRecursiveAuditResult","jobId","DiscoverUrlsResult","urls","RecursiveAuditJobInfo","Date","_id","targetUrl","userId","status","progress","totalPageCount","completedPageCount","createdAt","updatedAt","RecursiveAuditPageInfo","url","score","error","results","GetRecursiveAuditStatusResult","job","pages","discoverUrls","Promise","Querystring","request","reply","startRecursiveAudit","Body","getRecursiveAuditStatus","Params","cancelRecursiveAudit","pauseRecursiveAudit","resumeRecursiveAudit"],"sources":["../../../../../../../../../../apps/backend/dist/types/controllers/recursiveAudit.controller.d.ts"],"mappings":";;KAGKE,yBAAAA;EACHC,KAAAA;AAAAA;AAAAA,KAKGG,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;EACAC,OAAAA;AAAAA;AAAAA,KAEGC,6BAAAA;EACHC,GAAAA,EAAKjB,qBAAAA;EACLkB,KAAAA,EAAOP,sBAAAA;AAAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { PaginatedResponse, ResponseData } from "../utils/responseData.js";
|
|
2
|
+
import { ShowcaseProjectAPI } from "../types/showcaseProject.types.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region ../../../apps/backend/dist/types/controllers/showcaseProject.controller.d.ts
|
|
6
|
+
//#region src/controllers/showcaseProject.controller.d.ts
|
|
7
|
+
type SubmitShowcaseProjectResult = ResponseData<ShowcaseProjectAPI>;
|
|
8
|
+
/**
|
|
9
|
+
* POST /api/showcase-project/submit
|
|
10
|
+
* Submits a new project to the showcase.
|
|
11
|
+
*/
|
|
12
|
+
type GetShowcaseProjectsResult = PaginatedResponse<ShowcaseProjectAPI>;
|
|
13
|
+
/**
|
|
14
|
+
* GET /api/showcase-project
|
|
15
|
+
*/
|
|
16
|
+
type GetShowcaseProjectByIdParams = {
|
|
17
|
+
projectId: string;
|
|
18
|
+
};
|
|
19
|
+
type GetShowcaseProjectByIdResult = ResponseData<ShowcaseProjectAPI>;
|
|
20
|
+
/**
|
|
21
|
+
* GET /api/showcase-project/:projectId
|
|
22
|
+
*/
|
|
23
|
+
type GetOtherShowcaseProjectsResult = ResponseData<ShowcaseProjectAPI[]>;
|
|
24
|
+
/**
|
|
25
|
+
* GET /api/showcase-project/others?excludeId=...&limit=...
|
|
26
|
+
*/
|
|
27
|
+
type ToggleShowcaseUpvoteBody = {
|
|
28
|
+
projectId: string;
|
|
29
|
+
};
|
|
30
|
+
type ToggleShowcaseUpvoteResult = ResponseData<{
|
|
31
|
+
upvotes: number;
|
|
32
|
+
isUpVoted: boolean;
|
|
33
|
+
downvotes: number;
|
|
34
|
+
isDownVoted: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* POST /api/showcase-project/upvote
|
|
38
|
+
* Requires authentication — userId is read from the session.
|
|
39
|
+
*/
|
|
40
|
+
type ToggleShowcaseDownvoteBody = {
|
|
41
|
+
projectId: string;
|
|
42
|
+
};
|
|
43
|
+
type ToggleShowcaseDownvoteResult = ResponseData<{
|
|
44
|
+
upvotes: number;
|
|
45
|
+
isUpVoted: boolean;
|
|
46
|
+
downvotes: number;
|
|
47
|
+
isDownVoted: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* POST /api/showcase-project/downvote
|
|
51
|
+
* Requires authentication — userId is read from the session.
|
|
52
|
+
*/
|
|
53
|
+
declare const updateProjectSchema: z.ZodObject<{
|
|
54
|
+
name: z.ZodOptional<z.ZodString>;
|
|
55
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
56
|
+
githubUrl: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string, string>>;
|
|
57
|
+
tagline: z.ZodOptional<z.ZodString>;
|
|
58
|
+
description: z.ZodOptional<z.ZodString>;
|
|
59
|
+
useCases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
type UpdateShowcaseProjectBody = z.input<typeof updateProjectSchema>;
|
|
62
|
+
type UpdateShowcaseProjectResult = ResponseData<ShowcaseProjectAPI>;
|
|
63
|
+
/**
|
|
64
|
+
* PATCH /api/showcase-project/:projectId
|
|
65
|
+
* Updates an existing project. Only the owner can update.
|
|
66
|
+
*/
|
|
67
|
+
//#endregion
|
|
68
|
+
export { GetOtherShowcaseProjectsResult, GetShowcaseProjectByIdParams, GetShowcaseProjectByIdResult, GetShowcaseProjectsResult, SubmitShowcaseProjectResult, ToggleShowcaseDownvoteBody, ToggleShowcaseDownvoteResult, ToggleShowcaseUpvoteBody, ToggleShowcaseUpvoteResult, UpdateShowcaseProjectBody, UpdateShowcaseProjectResult };
|
|
69
|
+
//# sourceMappingURL=showcaseProject.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcaseProject.controller.d.ts","names":["PaginatedResponse","ResponseData","ShowcaseProjectAPI","FastifyReply","FastifyRequest","z","SubmitShowcaseProjectResult","submitShowcaseProject","SubmitShowcaseProjectBody","Promise","Body","request","reply","GetShowcaseProjectsQuery","page","pageSize","search","selectedUseCases","isOpenSource","GetShowcaseProjectsResult","getShowcaseProjects","Querystring","GetShowcaseProjectByIdParams","projectId","GetShowcaseProjectByIdResult","getShowcaseProjectById","Params","GetOtherShowcaseProjectsQuery","excludeId","limit","GetOtherShowcaseProjectsResult","getOtherShowcaseProjects","ToggleShowcaseUpvoteBody","ToggleShowcaseUpvoteResult","upvotes","isUpVoted","downvotes","isDownVoted","toggleShowcaseUpvote","ToggleShowcaseDownvoteBody","ToggleShowcaseDownvoteResult","toggleShowcaseDownvote","updateProjectSchema","ZodString","ZodOptional","ZodURL","ZodTransform","ZodPipe","ZodArray","core","$strip","ZodObject","name","url","githubUrl","tagline","description","useCases","UpdateShowcaseProjectBody","input","UpdateShowcaseProjectParams","UpdateShowcaseProjectResult","updateShowcaseProjectHandler","DeleteShowcaseProjectParams","deleteShowcaseProjectHandler","ScanShowcaseProjectParams","scanShowcaseProject"],"sources":["../../../../../../../../../../apps/backend/dist/types/controllers/showcaseProject.controller.d.ts"],"mappings":";;;;;;KAMKM,2BAAAA,GAA8BL,YAAAA,CAAaC,kBAAAA;;;;AAalC;KAETiB,yBAAAA,GAA4BnB,iBAAAA,CAAkBE,kBAAAA;;;;KAO9CoB,4BAAAA;EACHC,SAAAA;AAAAA;AAAAA,KAEGC,4BAAAA,GAA+BvB,YAAAA,CAAaC,kBAAAA;;;;KAW5C4B,8BAAAA,GAAiC7B,YAAAA,CAAaC,kBAAAA;;;;KAO9C8B,wBAAAA;EACHT,SAAAA;AAAAA;AAAAA,KAEGU,0BAAAA,GAA6BhC,YAAAA;EAChCiC,OAAAA;EACAC,SAAAA;EACAC,SAAAA;EACAC,WAAAA;AAAAA;;;;;KASGE,0BAAAA;EACHhB,SAAAA;AAAAA;AAAAA,KAEGiB,4BAAAA,GAA+BvC,YAAAA;EAClCiC,OAAAA;EACAC,SAAAA;EACAC,SAAAA;EACAC,WAAAA;AAAAA;;;;;cASYK,mBAAAA,EAAqBrC,CAAAA,CAAE8C,SAAAA;EACnCC,IAAAA,EAAM/C,CAAAA,CAAEuC,WAAAA,CAAYvC,CAAAA,CAAEsC,SAAAA;EACtBU,GAAAA,EAAKhD,CAAAA,CAAEuC,WAAAA,CAAYvC,CAAAA,CAAEwC,MAAAA;EACrBS,SAAAA,EAAWjD,CAAAA,CAAE0C,OAAAA,CAAQ1C,CAAAA,CAAEuC,WAAAA,CAAYvC,CAAAA,CAAEsC,SAAAA,GAAYtC,CAAAA,CAAEyC,YAAAA;EACnDS,OAAAA,EAASlD,CAAAA,CAAEuC,WAAAA,CAAYvC,CAAAA,CAAEsC,SAAAA;EACzBa,WAAAA,EAAanD,CAAAA,CAAEuC,WAAAA,CAAYvC,CAAAA,CAAEsC,SAAAA;EAC7Bc,QAAAA,EAAUpD,CAAAA,CAAEuC,WAAAA,CAAYvC,CAAAA,CAAE2C,QAAAA,CAAS3C,CAAAA,CAAEsC,SAAAA;AAAAA,GACpCtC,CAAAA,CAAE4C,IAAAA,CAAKC,MAAAA;AAAAA,KACLQ,yBAAAA,GAA4BrD,CAAAA,CAAEsD,KAAAA,QAAajB,mBAAAA;AAAAA,KAI3CmB,2BAAAA,GAA8B5D,YAAAA,CAAaC,kBAAAA"}
|
|
@@ -17,7 +17,11 @@ 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";
|
|
22
|
+
import { ShowcaseProject, ShowcaseProjectAPI, ShowcaseProjectStatus, ShowcaseScanDetails } from "./types/showcaseProject.types.js";
|
|
23
|
+
import { GetOtherShowcaseProjectsResult, GetShowcaseProjectByIdParams, GetShowcaseProjectByIdResult, GetShowcaseProjectsResult, SubmitShowcaseProjectResult, ToggleShowcaseDownvoteBody, ToggleShowcaseDownvoteResult, ToggleShowcaseUpvoteBody, ToggleShowcaseUpvoteResult, UpdateShowcaseProjectBody, UpdateShowcaseProjectResult } from "./controllers/showcaseProject.controller.js";
|
|
21
24
|
import { GetCheckoutSessionBody, GetCheckoutSessionResult, GetPricingBody, GetPricingResult } from "./controllers/stripe.controller.js";
|
|
22
25
|
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";
|
|
26
|
+
import { CreateUserBody, CreateUserResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, UpdateUserBody, UpdateUserResult } from "./controllers/user.controller.js";
|
|
27
|
+
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"}
|
|
@@ -61,7 +61,8 @@ type ProjectData = {
|
|
|
61
61
|
creatorId: User['id'];
|
|
62
62
|
configuration?: ProjectConfiguration;
|
|
63
63
|
repository?: RepositoryConnection;
|
|
64
|
-
webhooks?: ProjectConfigCI;
|
|
64
|
+
webhooks?: ProjectConfigCI; /** Screenshot of the application URL, generated automatically when applicationURL is set */
|
|
65
|
+
imageUrl?: string;
|
|
65
66
|
};
|
|
66
67
|
type AccessKeyData = {
|
|
67
68
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.types.d.ts","names":["RenameId","User","UserAPI","Organization","OrganizationAPI","IntlayerConfig","Document","Model","ObjectIdToString","Types","Token","ProjectCreationData","Project","name","ProjectConfigInternationalization","Pick","Partial","ProjectConfigEditor","ProjectConfigAI","apiKeyConfigured","Webhook","id","url","enabled","secret","ProjectConfigCI","autoTriggerBuilds","webhooks","ProjectConfiguration","internationalization","editor","ai","RepositoryProvider","BaseRepository","provider","owner","repository","branch","configFilePath","GitHubRepository","installationId","GitLabRepository","projectId","instanceUrl","BitbucketRepository","workspace","RepositoryConnection","ProjectData","organizationId","membersIds","adminsIds","creatorId","configuration","AccessKeyData","Date","grants","expiresAt","OAuth2AccessData","clientId","clientSecret","accessToken","userId","OAuth2AccessContext","ProjectAPI","user","project","organization","OAuth2Access","ObjectId","createdAt","updatedAt","OAuth2AccessAPI","oAuth2Access","ProjectSchema","ProjectModelType","ProjectDocument"],"sources":["../../../../../../../../../../apps/backend/dist/types/types/project.types.d.ts"],"mappings":";;;;;;;;KAQKW,mBAAAA;EACHE,IAAAA,EAAMD,OAAAA;AAAAA;AAAAA,KAEHE,iCAAAA,GAAoCE,OAAAA,CAAQD,IAAAA,CAAKV,cAAAA;AAAAA,KACjDY,mBAAAA,GAAsBD,OAAAA,CAAQD,IAAAA,CAAKV,cAAAA;AAAAA,KACnCa,eAAAA,GAAkBF,OAAAA,CAAQD,IAAAA,CAAKV,cAAAA;EAClCc,gBAAAA;AAAAA;AAAAA,KAEGC,OAAAA;EACHC,EAAAA;EACAR,IAAAA;EACAS,GAAAA;EACAC,OAAAA;EACAC,MAAAA;AAAAA;AAAAA,KAEGC,eAAAA;EACHC,iBAAAA;EACAC,QAAAA,GAAWP,OAAAA;AAAAA;AAAAA,KAERQ,oBAAAA;EACHC,oBAAAA,GAAuBf,iCAAAA;EACvBgB,MAAAA,GAASb,mBAAAA;EACTc,EAAAA,GAAKb,eAAAA;AAAAA;AAAAA,KAEFc,kBAAAA;AAAAA,KACAC,cAAAA;EACHC,QAAAA,EAAUF,kBAAAA;EACVG,KAAAA;EACAC,UAAAA;EACAC,MAAAA;EACAf,GAAAA;EACAgB,cAAAA;AAAAA;AAAAA,KAEGC,gBAAAA,GAAmBN,cAAAA;EACtBC,QAAAA;EACAM,cAAAA;AAAAA;AAAAA,KAEGC,gBAAAA,GAAmBR,cAAAA;EACtBC,QAAAA;EACAQ,SAAAA,WAlC6B3B;EAmC7B4B,WAAAA;AAAAA;AAAAA,KAEGC,mBAAAA,GAAsBX,cAAAA;EACzBC,QAAAA;EACAW,SAAAA;AAAAA;AAAAA,KAEGC,oBAAAA,GAAuBP,gBAAAA,GAAmBE,gBAAAA,GAAmBG,mBAAAA;AAAAA,KAC7DG,WAAAA;EACHC,cAAAA,EAAgB7C,YAAAA;EAChBU,IAAAA;EACAoC,UAAAA,EAAYhD,IAAAA;EACZiD,SAAAA,EAAWjD,IAAAA;EACXkD,SAAAA,EAAWlD,IAAAA;EACXmD,aAAAA,GAAgBxB,oBAAAA;EAChBQ,UAAAA,GAAaU,oBAAAA;EACbnB,QAAAA,GAAWF,eAAAA;AAAAA;AAAAA,
|
|
1
|
+
{"version":3,"file":"project.types.d.ts","names":["RenameId","User","UserAPI","Organization","OrganizationAPI","IntlayerConfig","Document","Model","ObjectIdToString","Types","Token","ProjectCreationData","Project","name","ProjectConfigInternationalization","Pick","Partial","ProjectConfigEditor","ProjectConfigAI","apiKeyConfigured","Webhook","id","url","enabled","secret","ProjectConfigCI","autoTriggerBuilds","webhooks","ProjectConfiguration","internationalization","editor","ai","RepositoryProvider","BaseRepository","provider","owner","repository","branch","configFilePath","GitHubRepository","installationId","GitLabRepository","projectId","instanceUrl","BitbucketRepository","workspace","RepositoryConnection","ProjectData","organizationId","membersIds","adminsIds","creatorId","configuration","imageUrl","AccessKeyData","Date","grants","expiresAt","OAuth2AccessData","clientId","clientSecret","accessToken","userId","OAuth2AccessContext","ProjectAPI","user","project","organization","OAuth2Access","ObjectId","createdAt","updatedAt","OAuth2AccessAPI","oAuth2Access","ProjectSchema","ProjectModelType","ProjectDocument"],"sources":["../../../../../../../../../../apps/backend/dist/types/types/project.types.d.ts"],"mappings":";;;;;;;;KAQKW,mBAAAA;EACHE,IAAAA,EAAMD,OAAAA;AAAAA;AAAAA,KAEHE,iCAAAA,GAAoCE,OAAAA,CAAQD,IAAAA,CAAKV,cAAAA;AAAAA,KACjDY,mBAAAA,GAAsBD,OAAAA,CAAQD,IAAAA,CAAKV,cAAAA;AAAAA,KACnCa,eAAAA,GAAkBF,OAAAA,CAAQD,IAAAA,CAAKV,cAAAA;EAClCc,gBAAAA;AAAAA;AAAAA,KAEGC,OAAAA;EACHC,EAAAA;EACAR,IAAAA;EACAS,GAAAA;EACAC,OAAAA;EACAC,MAAAA;AAAAA;AAAAA,KAEGC,eAAAA;EACHC,iBAAAA;EACAC,QAAAA,GAAWP,OAAAA;AAAAA;AAAAA,KAERQ,oBAAAA;EACHC,oBAAAA,GAAuBf,iCAAAA;EACvBgB,MAAAA,GAASb,mBAAAA;EACTc,EAAAA,GAAKb,eAAAA;AAAAA;AAAAA,KAEFc,kBAAAA;AAAAA,KACAC,cAAAA;EACHC,QAAAA,EAAUF,kBAAAA;EACVG,KAAAA;EACAC,UAAAA;EACAC,MAAAA;EACAf,GAAAA;EACAgB,cAAAA;AAAAA;AAAAA,KAEGC,gBAAAA,GAAmBN,cAAAA;EACtBC,QAAAA;EACAM,cAAAA;AAAAA;AAAAA,KAEGC,gBAAAA,GAAmBR,cAAAA;EACtBC,QAAAA;EACAQ,SAAAA,WAlC6B3B;EAmC7B4B,WAAAA;AAAAA;AAAAA,KAEGC,mBAAAA,GAAsBX,cAAAA;EACzBC,QAAAA;EACAW,SAAAA;AAAAA;AAAAA,KAEGC,oBAAAA,GAAuBP,gBAAAA,GAAmBE,gBAAAA,GAAmBG,mBAAAA;AAAAA,KAC7DG,WAAAA;EACHC,cAAAA,EAAgB7C,YAAAA;EAChBU,IAAAA;EACAoC,UAAAA,EAAYhD,IAAAA;EACZiD,SAAAA,EAAWjD,IAAAA;EACXkD,SAAAA,EAAWlD,IAAAA;EACXmD,aAAAA,GAAgBxB,oBAAAA;EAChBQ,UAAAA,GAAaU,oBAAAA;EACbnB,QAAAA,GAAWF,eAAAA,EAxCO;EAyClB4B,QAAAA;AAAAA;AAAAA,KAEGC,aAAAA;EACHzC,IAAAA;EACA2C,MAAAA;EACAC,SAAAA,GAAYF,IAAAA;AAAAA;AAAAA,KAETG,gBAAAA,GAAmBJ,aAAAA;EACtBK,QAAAA;EACAC,YAAAA;EACAC,WAAAA;EACAC,MAAAA,EAAQ7D,IAAAA;AAAAA;AAAAA,KASLmE,YAAAA,GAAeV,gBAAAA;EAClBrC,EAAAA,EAAIZ,KAAAA,CAAM4D,QAAAA;EACVC,SAAAA;EACAC,SAAAA;AAAAA;AAAAA,KAGG3D,OAAAA,GAAUmC,WAAAA;EACb1B,EAAAA,EAAIZ,KAAAA,CAAM4D,QAAAA;EACVC,SAAAA;EACAC,SAAAA;EACAE,YAAAA,EAAcL,YAAAA;AAAAA;AAAAA,KAEXJ,UAAAA,GAAaxD,gBAAAA,CAAiBI,OAAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
|
|
3
|
+
//#region ../../../apps/backend/dist/types/types/showcaseProject.types.d.ts
|
|
4
|
+
//#region src/types/showcaseProject.types.d.ts
|
|
5
|
+
interface ShowcaseScanDetails {
|
|
6
|
+
score: number;
|
|
7
|
+
langTag: string;
|
|
8
|
+
htmlDir: string;
|
|
9
|
+
hreflangs: string[];
|
|
10
|
+
hasXDefault: boolean;
|
|
11
|
+
hasCanonical: boolean;
|
|
12
|
+
hasLocalizedLinks: boolean;
|
|
13
|
+
allAnchorsLocalized: boolean;
|
|
14
|
+
robotsTxt: {
|
|
15
|
+
accessible: boolean;
|
|
16
|
+
disallowWithoutLocaleAlternates: boolean;
|
|
17
|
+
};
|
|
18
|
+
sitemapXml: {
|
|
19
|
+
urlsDiscoveredCount: number;
|
|
20
|
+
alternatesPresent: boolean;
|
|
21
|
+
xDefaultPresent: boolean;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
type ShowcaseProjectStatus = 'pending_scan' | 'active' | 'scan_failed';
|
|
25
|
+
interface ShowcaseProject {
|
|
26
|
+
_id: Types.ObjectId;
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
imageUrl: string;
|
|
30
|
+
logoUrl?: string;
|
|
31
|
+
websiteUrl: string;
|
|
32
|
+
githubUrl?: string;
|
|
33
|
+
tags: string[];
|
|
34
|
+
upvoters: string[];
|
|
35
|
+
downvoters: string[];
|
|
36
|
+
isOpenSource: boolean;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
intlayerVersion?: string;
|
|
39
|
+
libsUsed: string[];
|
|
40
|
+
/** Map of package name → version for all detected intlayer-related packages */
|
|
41
|
+
packageDetails?: Record<string, string>;
|
|
42
|
+
lastScanDate?: Date;
|
|
43
|
+
scanDetails?: ShowcaseScanDetails;
|
|
44
|
+
owner?: string;
|
|
45
|
+
status?: ShowcaseProjectStatus;
|
|
46
|
+
}
|
|
47
|
+
interface ShowcaseProjectAPI extends Omit<ShowcaseProject, '_id' | 'createdAt' | 'lastScanDate' | 'upvoters' | 'downvoters'> {
|
|
48
|
+
id: string;
|
|
49
|
+
upvotes: number;
|
|
50
|
+
isUpVoted: boolean;
|
|
51
|
+
downvotes: number;
|
|
52
|
+
isDownVoted: boolean;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
lastScanDate?: string;
|
|
55
|
+
isOwner?: boolean;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { ShowcaseProject, ShowcaseProjectAPI, ShowcaseProjectStatus, ShowcaseScanDetails };
|
|
59
|
+
//# sourceMappingURL=showcaseProject.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcaseProject.types.d.ts","names":["Document","Model","Types","ShowcaseScanDetails","score","langTag","htmlDir","hreflangs","hasXDefault","hasCanonical","hasLocalizedLinks","allAnchorsLocalized","robotsTxt","accessible","disallowWithoutLocaleAlternates","sitemapXml","urlsDiscoveredCount","alternatesPresent","xDefaultPresent","ShowcaseProjectStatus","ShowcaseProject","ObjectId","Date","Record","_id","title","description","imageUrl","logoUrl","websiteUrl","githubUrl","tags","upvoters","downvoters","isOpenSource","createdAt","intlayerVersion","libsUsed","packageDetails","lastScanDate","scanDetails","owner","status","ShowcaseProjectData","ShowcaseProjectAPI","Omit","id","upvotes","isUpVoted","downvotes","isDownVoted","isOwner","ShowcaseProjectDocument","ShowcaseProjectModelType"],"sources":["../../../../../../../../../../apps/backend/dist/types/types/showcaseProject.types.d.ts"],"mappings":";;;;UAGUG,mBAAAA;EACRC,KAAAA;EACAC,OAAAA;EACAC,OAAAA;EACAC,SAAAA;EACAC,WAAAA;EACAC,YAAAA;EACAC,iBAAAA;EACAC,mBAAAA;EACAC,SAAAA;IACEC,UAAAA;IACAC,+BAAAA;EAAAA;EAEFC,UAAAA;IACEC,mBAAAA;IACAC,iBAAAA;IACAC,eAAAA;EAAAA;AAAAA;AAAAA,KAGCC,qBAAAA;AAAAA,UACKC,eAAAA;EACRI,GAAAA,EAAKtB,KAAAA,CAAMmB,QAAAA;EACXI,KAAAA;EACAC,WAAAA;EACAC,QAAAA;EACAC,OAAAA;EACAC,UAAAA;EACAC,SAAAA;EACAC,IAAAA;EACAC,QAAAA;EACAC,UAAAA;EACAC,YAAAA;EACAC,SAAAA,EAAWb,IAAAA;EACXc,eAAAA;EACAC,QAAAA;EAM8B;EAJ9BC,cAAAA,GAAiBf,MAAAA;EACjBgB,YAAAA,GAAejB,IAAAA;EACfkB,WAAAA,GAAcrC,mBAAAA;EACdsC,KAAAA;EACAC,MAAAA,GAASvB,qBAAAA;AAAAA;AAAAA,UAkBDyB,kBAAAA,SAA2BC,IAAAA,CAAKzB,eAAAA;EACxC0B,EAAAA;EACAC,OAAAA;EACAC,SAAAA;EACAC,SAAAA;EACAC,WAAAA;EACAf,SAAAA;EACAI,YAAAA;EACAY,OAAAA;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"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { GetRecursiveAuditStatusResult, StartRecursiveAuditResult } from "../apps/backend/dist/types/controllers/recursiveAudit.controller.js";
|
|
2
|
+
import { AuditEvent } from "../apps/backend/dist/types/services/audit/types.js";
|
|
3
|
+
import { FetcherOptions } from "../fetcher.js";
|
|
4
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
5
|
+
|
|
6
|
+
//#region src/getIntlayerAPI/audit.d.ts
|
|
7
|
+
type ScanUrlBody = {
|
|
8
|
+
url: string;
|
|
9
|
+
onMessage?: (event: AuditEvent) => void;
|
|
10
|
+
onDone?: () => void;
|
|
11
|
+
};
|
|
12
|
+
type DiscoverUrlsParams = {
|
|
13
|
+
url: string;
|
|
14
|
+
};
|
|
15
|
+
type DiscoverUrlsResult = {
|
|
16
|
+
urls: string[];
|
|
17
|
+
};
|
|
18
|
+
type StartRecursiveAuditBody = {
|
|
19
|
+
url: string;
|
|
20
|
+
urls?: string[];
|
|
21
|
+
};
|
|
22
|
+
type GetRecursiveAuditStatusParams = {
|
|
23
|
+
jobId: string;
|
|
24
|
+
};
|
|
25
|
+
type RecursiveAuditJobParams = {
|
|
26
|
+
jobId: string;
|
|
27
|
+
};
|
|
28
|
+
declare const getAuditAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
29
|
+
discoverUrls: (params?: DiscoverUrlsParams, otherOptions?: FetcherOptions) => Promise<DiscoverUrlsResult>;
|
|
30
|
+
scanUrl: (body?: ScanUrlBody, otherOptions?: FetcherOptions) => Promise<void>;
|
|
31
|
+
startRecursiveAudit: (body?: StartRecursiveAuditBody, otherOptions?: FetcherOptions) => Promise<StartRecursiveAuditResult>;
|
|
32
|
+
getRecursiveAuditStatus: (params?: GetRecursiveAuditStatusParams, otherOptions?: FetcherOptions) => Promise<GetRecursiveAuditStatusResult>;
|
|
33
|
+
cancelRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
|
|
34
|
+
success: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
pauseRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
|
|
37
|
+
success: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
resumeRecursiveAudit: (params?: RecursiveAuditJobParams, otherOptions?: FetcherOptions) => Promise<{
|
|
40
|
+
success: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { type AuditEvent, DiscoverUrlsParams, DiscoverUrlsResult, GetRecursiveAuditStatusParams, type GetRecursiveAuditStatusResult, RecursiveAuditJobParams, ScanUrlBody, StartRecursiveAuditBody, type StartRecursiveAuditResult, getAuditAPI };
|
|
45
|
+
//# 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,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,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;0BA0BN,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"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { GetOtherShowcaseProjectsResult, GetShowcaseProjectByIdParams, GetShowcaseProjectByIdResult, GetShowcaseProjectsResult, SubmitShowcaseProjectResult, ToggleShowcaseDownvoteBody, ToggleShowcaseDownvoteResult, ToggleShowcaseUpvoteBody, ToggleShowcaseUpvoteResult, UpdateShowcaseProjectBody, UpdateShowcaseProjectResult } from "../apps/backend/dist/types/controllers/showcaseProject.controller.js";
|
|
2
|
+
import { FetcherOptions } from "../fetcher.js";
|
|
3
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
4
|
+
|
|
5
|
+
//#region src/getIntlayerAPI/showcaseProject.d.ts
|
|
6
|
+
type ShowcaseProjectsQuery = {
|
|
7
|
+
page?: number;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
search?: string;
|
|
10
|
+
selectedUseCases?: string[];
|
|
11
|
+
isOpenSource?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type OtherShowcaseProjectsQuery = {
|
|
14
|
+
excludeId: string;
|
|
15
|
+
limit?: number;
|
|
16
|
+
};
|
|
17
|
+
declare const getShowcaseProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
18
|
+
getShowcaseProjects: (query?: ShowcaseProjectsQuery, otherOptions?: FetcherOptions) => Promise<GetShowcaseProjectsResult>;
|
|
19
|
+
getShowcaseProjectById: (projectId: GetShowcaseProjectByIdParams["projectId"], otherOptions?: FetcherOptions) => Promise<GetShowcaseProjectByIdResult>;
|
|
20
|
+
getOtherShowcaseProjects: (query: OtherShowcaseProjectsQuery, otherOptions?: FetcherOptions) => Promise<GetOtherShowcaseProjectsResult>;
|
|
21
|
+
submitShowcaseProject: (body: SubmitShowcaseProjectBody, otherOptions?: FetcherOptions) => Promise<SubmitShowcaseProjectResult>;
|
|
22
|
+
toggleShowcaseUpvote: (body: ToggleShowcaseUpvoteBody, otherOptions?: FetcherOptions) => Promise<ToggleShowcaseUpvoteResult>;
|
|
23
|
+
toggleShowcaseDownvote: (body: ToggleShowcaseDownvoteBody, otherOptions?: FetcherOptions) => Promise<ToggleShowcaseDownvoteResult>;
|
|
24
|
+
deleteShowcaseProject: (projectId: GetShowcaseProjectByIdParams["projectId"], otherOptions?: FetcherOptions) => Promise<{
|
|
25
|
+
data: {
|
|
26
|
+
success: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
updateShowcaseProject: (projectId: GetShowcaseProjectByIdParams["projectId"], body: UpdateShowcaseProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateShowcaseProjectResult>;
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { OtherShowcaseProjectsQuery, ShowcaseProjectsQuery, getShowcaseProjectAPI };
|
|
33
|
+
//# sourceMappingURL=showcaseProject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcaseProject.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/showcaseProject.ts"],"mappings":";;;;;KAoBY,qBAAA;EACV,IAAA;EACA,QAAA;EACA,MAAA;EACA,gBAAA;EACA,YAAA;AAAA;AAAA,KAGU,0BAAA;EACV,SAAA;EACA,KAAA;AAAA;AAAA,cAGW,qBAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;gCAcP,qBAAA,EAAqB,YAAA,GACf,cAAA,KAAc,OAAA,CAAA,yBAAA;sCAoBjB,4BAAA,eAAyC,YAAA,GACtC,cAAA,KAAc,OAAA,CAAA,4BAAA;oCAUrB,0BAAA,EAA0B,YAAA,GACnB,cAAA,KAAc,OAAA,CAAA,8BAAA;gCAatB,yBAAA,EAAyB,YAAA,GACjB,cAAA,KAAc,OAAA,CAAA,2BAAA;+BAUtB,wBAAA,EAAwB,YAAA,GAChB,cAAA,KAAc,OAAA,CAAA,0BAAA;iCAUtB,0BAAA,EAA0B,YAAA,GAClB,cAAA,KAAc,OAAA,CAAA,4BAAA;qCAUjB,4BAAA,eAAyC,YAAA,GACtC,cAAA,KAAc,OAAA;;MAEJ,OAAA;IAAA;EAAA;qCAQb,4BAAA,eAAyC,IAAA,EAC9C,yBAAA,EAAyB,YAAA,GACjB,cAAA,KAAc,OAAA,CAAA,2BAAA;AAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { AIOptions } from "./packages/@intlayer/ai/dist/types/aiSdk.js";
|
|
2
2
|
import { AskDocQuestionResult } from "./apps/backend/dist/types/controllers/ai.controller.js";
|
|
3
|
+
import { GetRecursiveAuditStatusResult, StartRecursiveAuditResult } from "./apps/backend/dist/types/controllers/recursiveAudit.controller.js";
|
|
4
|
+
import { AuditEvent } from "./apps/backend/dist/types/services/audit/types.js";
|
|
3
5
|
import { fetchDistantDictionaries } from "./distantDictionary/fetchDistantDictionaries.js";
|
|
4
6
|
import { fetchDistantDictionary } from "./distantDictionary/fetchDistantDictionary.js";
|
|
5
7
|
import { FetcherOptions, fetcher, fetcherOptions } from "./fetcher.js";
|
|
6
8
|
import { AskDocQuestionBody, AutocompleteBody, getAiAPI } from "./getIntlayerAPI/ai.js";
|
|
9
|
+
import { DiscoverUrlsParams, DiscoverUrlsResult, GetRecursiveAuditStatusParams, RecursiveAuditJobParams, ScanUrlBody, StartRecursiveAuditBody, getAuditAPI } from "./getIntlayerAPI/audit.js";
|
|
7
10
|
import { BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, getBitbucketAPI } from "./getIntlayerAPI/bitbucket.js";
|
|
8
11
|
import { getDictionaryAPI } from "./getIntlayerAPI/dictionary.js";
|
|
9
12
|
import { getEditorAPI } from "./getIntlayerAPI/editor.js";
|
|
@@ -19,4 +22,4 @@ import { getTagAPI } from "./getIntlayerAPI/tag.js";
|
|
|
19
22
|
import { getUserAPI } from "./getIntlayerAPI/user.js";
|
|
20
23
|
import { IntlayerAPI, getIntlayerAPI } from "./getIntlayerAPI/index.js";
|
|
21
24
|
import { IntlayerAPIProxy, getIntlayerAPIProxy } from "./proxy.js";
|
|
22
|
-
export { AIOptions, AskDocQuestionBody, AskDocQuestionResult, AutocompleteBody, BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, FetcherOptions, GitHubAuthCallbackBody, GitHubAuthCallbackResult, GitHubCheckConfigBody, GitHubCheckConfigResult, GitHubGetAuthUrlResult, GitHubGetConfigFileBody, GitHubGetConfigFileResult, GitHubListReposResult, GitHubRepository, GitLabAuthCallbackBody, GitLabAuthCallbackResult, GitLabCheckConfigBody, GitLabCheckConfigResult, GitLabGetAuthUrlResult, GitLabGetConfigFileBody, GitLabGetConfigFileResult, GitLabListProjectsResult, GitLabProject, IntlayerAPI, IntlayerAPIProxy, fetchDistantDictionaries, fetchDistantDictionary, fetcher, fetcherOptions, getAiAPI, getBitbucketAPI, getDictionaryAPI, getEditorAPI, getGithubAPI, getGitlabAPI, getIntlayerAPI, getIntlayerAPIProxy, getNewsletterAPI, getOAuthAPI, getOrganizationAPI, getProjectAPI, getSearchAPI, getStripeAPI, getTagAPI, getUserAPI };
|
|
25
|
+
export { AIOptions, AskDocQuestionBody, AskDocQuestionResult, AuditEvent, AutocompleteBody, BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, DiscoverUrlsParams, DiscoverUrlsResult, FetcherOptions, GetRecursiveAuditStatusParams, GetRecursiveAuditStatusResult, GitHubAuthCallbackBody, GitHubAuthCallbackResult, GitHubCheckConfigBody, GitHubCheckConfigResult, GitHubGetAuthUrlResult, GitHubGetConfigFileBody, GitHubGetConfigFileResult, GitHubListReposResult, GitHubRepository, GitLabAuthCallbackBody, GitLabAuthCallbackResult, GitLabCheckConfigBody, GitLabCheckConfigResult, GitLabGetAuthUrlResult, GitLabGetConfigFileBody, GitLabGetConfigFileResult, GitLabListProjectsResult, GitLabProject, IntlayerAPI, IntlayerAPIProxy, RecursiveAuditJobParams, 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/api",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.4",
|
|
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
|
},
|