@intlayer/api 8.1.7 → 8.1.8
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/distantDictionary/fetchDistantDictionaries.cjs.map +1 -1
- package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/ai.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/dictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/editor.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/index.cjs +1 -1
- package/dist/cjs/getIntlayerAPI/index.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/newsletter.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/oAuth.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/organization.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/project.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/search.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/stripe.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/tag.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/user.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs.map +1 -1
- package/dist/esm/distantDictionary/fetchDistantDictionary.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/ai.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/dictionary.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/editor.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/index.mjs +1 -1
- package/dist/esm/getIntlayerAPI/index.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/newsletter.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/oAuth.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/organization.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/project.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/search.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/stripe.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/tag.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/user.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/types/@intlayer/unmerged-dictionaries-entry/dist/types/index.d.ts +8 -0
- package/dist/types/@intlayer/unmerged-dictionaries-entry/dist/types/index.d.ts.map +1 -0
- package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionary.d.ts +1 -1
- package/dist/types/getIntlayerAPI/ai.d.ts +9 -2
- package/dist/types/getIntlayerAPI/ai.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/dictionary.d.ts +1 -1
- package/dist/types/getIntlayerAPI/editor.d.ts +3 -1
- package/dist/types/getIntlayerAPI/editor.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/index.d.ts +0 -2
- package/dist/types/getIntlayerAPI/index.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/newsletter.d.ts +1 -1
- package/dist/types/getIntlayerAPI/oAuth.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/organization.d.ts +1 -1
- package/dist/types/getIntlayerAPI/project.d.ts +3 -3
- package/dist/types/getIntlayerAPI/project.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/search.d.ts +1 -1
- package/dist/types/getIntlayerAPI/search.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/stripe.d.ts +1 -1
- package/dist/types/getIntlayerAPI/tag.d.ts +1 -1
- package/dist/types/getIntlayerAPI/user.d.ts +6 -2
- package/dist/types/getIntlayerAPI/user.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -4
- package/dist/types/intlayer-editor/server/dist/controllers/configuration.controller.d.ts +12 -0
- package/dist/types/intlayer-editor/server/dist/controllers/configuration.controller.d.ts.map +1 -0
- package/dist/types/intlayer-editor/server/dist/controllers/dictionary.controller.d.ts +25 -0
- package/dist/types/intlayer-editor/server/dist/controllers/dictionary.controller.d.ts.map +1 -0
- package/dist/types/intlayer-editor/server/dist/export.d.ts +2 -0
- package/dist/types/intlayer-editor/server/dist/utils/httpStatusCodes.d.ts +408 -0
- package/dist/types/intlayer-editor/server/dist/utils/httpStatusCodes.d.ts.map +1 -0
- package/dist/types/intlayer-editor/server/dist/utils/responseData.d.ts +20 -0
- package/dist/types/intlayer-editor/server/dist/utils/responseData.d.ts.map +1 -0
- package/dist/types/types.d.ts +1 -14
- package/package.json +3 -15
- package/dist/cjs/getIntlayerAPI/audit.cjs +0 -2
- package/dist/cjs/getIntlayerAPI/audit.cjs.map +0 -1
- package/dist/esm/getIntlayerAPI/audit.mjs +0 -2
- package/dist/esm/getIntlayerAPI/audit.mjs.map +0 -1
- package/dist/types/getIntlayerAPI/audit.d.ts +0 -13
- package/dist/types/getIntlayerAPI/audit.d.ts.map +0 -1
- package/dist/types/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.mjs","names":[],"sources":["../../../src/getIntlayerAPI/organization.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"organization.mjs","names":[],"sources":["../../../src/getIntlayerAPI/organization.ts"],"sourcesContent":["import type {\n AddOrganizationBody,\n AddOrganizationMemberBody,\n AddOrganizationMemberResult,\n AddOrganizationResult,\n DeleteOrganizationResult,\n GetOrganizationParam,\n GetOrganizationResult,\n GetOrganizationsParams,\n GetOrganizationsResult,\n SelectOrganizationParam,\n SelectOrganizationResult,\n UnselectOrganizationResult,\n UpdateOrganizationBody,\n UpdateOrganizationMembersBody,\n UpdateOrganizationMembersResult,\n UpdateOrganizationResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport const getOrganizationAPI = (\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 ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;\n\n /**\n * Retrieves a list of organizations based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getOrganizations = async (\n filters?: GetOrganizationsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetOrganizationsResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n // @ts-ignore Number of parameter will be stringified by the fetcher\n params: filters,\n }\n );\n\n /**\n * Retrieves an organization by its ID.\n * @param organizationId - Organization ID.\n */\n const getOrganization = async (\n organizationId: GetOrganizationParam['organizationId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Adds a new organization to the database.\n * @param organization - Organization data.\n */\n const addOrganization = async (\n organization: AddOrganizationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: organization,\n }\n );\n\n /**\n * Updates an existing organization in the database.\n * @param organization - Updated organization data.\n */\n const updateOrganization = async (\n organization: UpdateOrganizationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: organization,\n }\n );\n\n /**\n * Update members to the organization in the database.\n * @param body - Updated organization members data.\n */\n const updateOrganizationMembers = async (\n body: UpdateOrganizationMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationMembersResult>(\n `${ORGANIZATION_API_ROUTE}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /**\n * Admin-only: Update members of any organization by ID\n * @param organizationId - Organization ID\n * @param body - Updated organization members data.\n */\n const updateOrganizationMembersById = async (\n organizationId: string,\n body: UpdateOrganizationMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationMembersResult>(\n `${ORGANIZATION_API_ROUTE}/${organizationId}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /**\n * Add member to the organization in the database.\n * @param body - Updated organization members data.\n */\n const addOrganizationMember = async (\n body: AddOrganizationMemberBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<AddOrganizationMemberResult>(\n `${ORGANIZATION_API_ROUTE}/member`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Deletes an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const deleteOrganization = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<DeleteOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Select an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const selectOrganization = async (\n organizationId: SelectOrganizationParam['organizationId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SelectOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Unselect an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const unselectOrganization = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<UnselectOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getOrganizations,\n getOrganization,\n addOrganization,\n addOrganizationMember,\n updateOrganization,\n updateOrganizationMembers,\n updateOrganizationMembersById,\n deleteOrganization,\n selectOrganization,\n unselectOrganization,\n };\n};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,EAAuB,SAC1B,EACA,EACA,CACE,OAAQ,OACT,CACF,CAaF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.mjs","names":[],"sources":["../../../src/getIntlayerAPI/project.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\nimport type {\n AddNewAccessKeyBody,\n AddNewAccessKeyResponse,\n AddProjectBody,\n AddProjectResult,\n DeleteAccessKeyBody,\n DeleteAccessKeyResponse,\n DeleteProjectResult,\n GetCIConfigResult,\n GetProjectsParams,\n GetProjectsResult,\n PushCIConfigResult,\n PushProjectConfigurationBody,\n PushProjectConfigurationResult,\n RefreshAccessKeyBody,\n RefreshAccessKeyResponse,\n SelectProjectParam,\n SelectProjectResult,\n TriggerBuildResult,\n TriggerWebhookBody,\n TriggerWebhookResult,\n UnselectProjectResult,\n UpdateProjectBody,\n UpdateProjectMembersBody,\n UpdateProjectMembersResult,\n UpdateProjectResult,\n} from '../types';\n\nexport const getProjectAPI = (\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 PROJECT_API_ROUTE = `${backendURL}/api/project`;\n\n /**\n * Retrieves a list of projects based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getProjects = async (\n filters?: GetProjectsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetProjectsResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n // @ts-ignore Number of parameter will be stringified by the fetcher\n params: filters,\n }\n );\n\n /**\n * Adds a new project to the database.\n * @param project - Project data.\n */\n const addProject = async (\n project: AddProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: project,\n }\n );\n\n /**\n * Updates an existing project in the database.\n * @param project - Updated project data.\n */\n const updateProject = async (\n project: UpdateProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: project,\n }\n );\n\n /**\n * Updates project members in the database.\n * @param project - Updated project data.\n */\n const updateProjectMembers = async (\n body: UpdateProjectMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateProjectMembersResult>(\n `${PROJECT_API_ROUTE}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /** Pushes a project configuration to the database.\n * @param projectConfiguration - Project configuration data.\n */\n const pushProjectConfiguration = async (\n projectConfiguration: PushProjectConfigurationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<PushProjectConfigurationResult>(\n `${PROJECT_API_ROUTE}/configuration`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: projectConfiguration,\n }\n );\n\n /**\n * Deletes a project from the database by its ID.\n * @param id - Project ID.\n */\n const deleteProject = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<DeleteProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Select a project from the database by its ID.\n * @param projectId - Organization ID.\n */\n const selectProject = async (\n projectId: SelectProjectParam['projectId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SelectProjectResult>(\n `${PROJECT_API_ROUTE}/${String(projectId)}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Unselect a project from the database by its ID.\n * @param projectId - Project ID.\n */\n const unselectProject = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<UnselectProjectResult>(\n `${PROJECT_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Add a new access key to a project.\n * @param accessKey - Access key data.\n * @param otherOptions - Fetcher options.\n * @returns The new access key.\n */\n const addNewAccessKey = async (\n accessKey: AddNewAccessKeyBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddNewAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: accessKey,\n }\n );\n\n /**\n * Delete a project access key.\n * @param clientId - Access key client ID.\n * @param otherOptions - Fetcher options.\n * @returns The deleted project.\n */\n const deleteAccessKey = async (\n clientId: DeleteAccessKeyBody['clientId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n body: { clientId },\n }\n );\n\n /**\n * Refreshes an access key from a project.\n * @param clientId - The ID of the client to refresh.\n * @param projectId - The ID of the project to refresh the access key from.\n * @returns The new access key.\n */\n const refreshAccessKey = async (\n clientId: RefreshAccessKeyBody['clientId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<RefreshAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PATCH',\n body: { clientId },\n }\n );\n\n /**\n * Triggers CI builds for a project (Git provider pipelines and webhooks).\n * @param otherOptions - Fetcher options.\n * @returns The trigger results.\n */\n const triggerBuild = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<TriggerBuildResult>(\n `${PROJECT_API_ROUTE}/build`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Triggers a single webhook by index.\n * @param webhookIndex - The index of the webhook to trigger.\n * @param otherOptions - Fetcher options.\n * @returns The trigger result.\n */\n const triggerWebhook = async (\n webhookIndex: TriggerWebhookBody['webhookIndex'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<TriggerWebhookResult>(\n `${PROJECT_API_ROUTE}/webhook`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { webhookIndex },\n }\n );\n\n /**\n * Get CI configuration status for the current project.\n * @param otherOptions - Fetcher options.\n * @returns The CI configuration status.\n */\n const getCIConfig = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetCIConfigResult>(\n `${PROJECT_API_ROUTE}/ci`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n }\n );\n\n /**\n * Push CI configuration file to the repository.\n * @param otherOptions - Fetcher options.\n * @returns Success status.\n */\n const pushCIConfig = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<PushCIConfigResult>(\n `${PROJECT_API_ROUTE}/ci`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getProjects,\n addProject,\n updateProject,\n updateProjectMembers,\n pushProjectConfiguration,\n deleteProject,\n selectProject,\n unselectProject,\n addNewAccessKey,\n deleteAccessKey,\n refreshAccessKey,\n triggerBuild,\n triggerWebhook,\n getCIConfig,\n pushCIConfig,\n };\n};\n"],"mappings":"+EA+BA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAc,GAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAoB,GAAG,EAAW,cAsQxC,MAAO,CACL,YAjQkB,MAClB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,EACA,EACA,EACA,CACE,MAAO,WAEP,OAAQ,EACT,CACF,CAqPD,WA/OiB,MACjB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,IACH,EACA,EACA,CACE,OAAQ,OACR,KAAM,EACP,CACF,CAoOD,cA9NoB,MACpB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,IACH,EACA,EACA,CACE,OAAQ,MACR,KAAM,EACP,CACF,CAmND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,MAAM,EACJ,GAAG,EAAkB,KACrB,EACA,EACA,CACE,OAAQ,MACT,CACF,CAgCD,aAzBmB,MAAO,EAA+B,EAAE,GAC3D,MAAM,EACJ,GAAG,EAAkB,KACrB,EACA,EACA,CACE,OAAQ,OACT,CACF,CAkBF"}
|
|
1
|
+
{"version":3,"file":"project.mjs","names":[],"sources":["../../../src/getIntlayerAPI/project.ts"],"sourcesContent":["import type {\n AddNewAccessKeyBody,\n AddNewAccessKeyResponse,\n AddProjectBody,\n AddProjectResult,\n DeleteAccessKeyBody,\n DeleteAccessKeyResponse,\n DeleteProjectResult,\n GetProjectsParams,\n GetProjectsResult,\n PushProjectConfigurationBody,\n PushProjectConfigurationResult,\n RefreshAccessKeyBody,\n RefreshAccessKeyResponse,\n ResponseData,\n SelectProjectParam,\n SelectProjectResult,\n TriggerBuildResult,\n TriggerWebhookBody,\n TriggerWebhookResult,\n UnselectProjectResult,\n UpdateProjectBody,\n UpdateProjectMembersBody,\n UpdateProjectMembersResult,\n UpdateProjectResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport const getProjectAPI = (\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 PROJECT_API_ROUTE = `${backendURL}/api/project`;\n\n /**\n * Retrieves a list of projects based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getProjects = async (\n filters?: GetProjectsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetProjectsResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n // @ts-ignore Number of parameter will be stringified by the fetcher\n params: filters,\n }\n );\n\n /**\n * Adds a new project to the database.\n * @param project - Project data.\n */\n const addProject = async (\n project: AddProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: project,\n }\n );\n\n /**\n * Updates an existing project in the database.\n * @param project - Updated project data.\n */\n const updateProject = async (\n project: UpdateProjectBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: project,\n }\n );\n\n /**\n * Updates project members in the database.\n * @param project - Updated project data.\n */\n const updateProjectMembers = async (\n body: UpdateProjectMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateProjectMembersResult>(\n `${PROJECT_API_ROUTE}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /** Pushes a project configuration to the database.\n * @param projectConfiguration - Project configuration data.\n */\n const pushProjectConfiguration = async (\n projectConfiguration: PushProjectConfigurationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<PushProjectConfigurationResult>(\n `${PROJECT_API_ROUTE}/configuration`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: projectConfiguration,\n }\n );\n\n /**\n * Deletes a project from the database by its ID.\n * @param id - Project ID.\n */\n const deleteProject = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<DeleteProjectResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Select a project from the database by its ID.\n * @param projectId - Organization ID.\n */\n const selectProject = async (\n projectId: SelectProjectParam['projectId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SelectProjectResult>(\n `${PROJECT_API_ROUTE}/${String(projectId)}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Unselect a project from the database by its ID.\n * @param projectId - Project ID.\n */\n const unselectProject = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<UnselectProjectResult>(\n `${PROJECT_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Add a new access key to a project.\n * @param accessKey - Access key data.\n * @param otherOptions - Fetcher options.\n * @returns The new access key.\n */\n const addNewAccessKey = async (\n accessKey: AddNewAccessKeyBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddNewAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: accessKey,\n }\n );\n\n /**\n * Delete a project access key.\n * @param clientId - Access key client ID.\n * @param otherOptions - Fetcher options.\n * @returns The deleted project.\n */\n const deleteAccessKey = async (\n clientId: DeleteAccessKeyBody['clientId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n body: { clientId },\n }\n );\n\n /**\n * Refreshes an access key from a project.\n * @param clientId - The ID of the client to refresh.\n * @param projectId - The ID of the project to refresh the access key from.\n * @returns The new access key.\n */\n const refreshAccessKey = async (\n clientId: RefreshAccessKeyBody['clientId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<RefreshAccessKeyResponse>(\n `${PROJECT_API_ROUTE}/access_key`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PATCH',\n body: { clientId },\n }\n );\n\n /**\n * Triggers CI builds for a project (Git provider pipelines and webhooks).\n * @param otherOptions - Fetcher options.\n * @returns The trigger results.\n */\n const triggerBuild = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<TriggerBuildResult>(\n `${PROJECT_API_ROUTE}/build`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Triggers a single webhook by index.\n * @param webhookIndex - The index of the webhook to trigger.\n * @param otherOptions - Fetcher options.\n * @returns The trigger result.\n */\n const triggerWebhook = async (\n webhookIndex: TriggerWebhookBody['webhookIndex'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<TriggerWebhookResult>(\n `${PROJECT_API_ROUTE}/webhook`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { webhookIndex },\n }\n );\n\n /**\n * Get CI configuration status for the current project.\n * @param otherOptions - Fetcher options.\n * @returns The CI configuration status.\n */\n const getCIConfig = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<ResponseData<any>>(\n `${PROJECT_API_ROUTE}/ci`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n }\n );\n\n /**\n * Push CI configuration file to the repository.\n * @param otherOptions - Fetcher options.\n * @returns Success status.\n */\n const pushCIConfig = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<ResponseData<any>>(\n `${PROJECT_API_ROUTE}/ci`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getProjects,\n addProject,\n updateProject,\n updateProjectMembers,\n pushProjectConfiguration,\n deleteProject,\n selectProject,\n unselectProject,\n addNewAccessKey,\n deleteAccessKey,\n refreshAccessKey,\n triggerBuild,\n triggerWebhook,\n getCIConfig,\n pushCIConfig,\n };\n};\n"],"mappings":"+EA8BA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAc,GAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAoB,GAAG,EAAW,cAsQxC,MAAO,CACL,YAjQkB,MAClB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,EACA,EACA,EACA,CACE,MAAO,WAEP,OAAQ,EACT,CACF,CAqPD,WA/OiB,MACjB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,IACH,EACA,EACA,CACE,OAAQ,OACR,KAAM,EACP,CACF,CAoOD,cA9NoB,MACpB,EACA,EAA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CACE,OAAQ,OACR,KAAM,CAAE,eAAc,CACvB,CACF,CA8CD,YAvCkB,MAAO,EAA+B,EAAE,GAC1D,MAAM,EACJ,GAAG,EAAkB,KACrB,EACA,EACA,CACE,OAAQ,MACT,CACF,CAgCD,aAzBmB,MAAO,EAA+B,EAAE,GAC3D,MAAM,EACJ,GAAG,EAAkB,KACrB,EACA,EACA,CACE,OAAQ,OACT,CACF,CAkBF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.mjs","names":[],"sources":["../../../src/getIntlayerAPI/search.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\
|
|
1
|
+
{"version":3,"file":"search.mjs","names":[],"sources":["../../../src/getIntlayerAPI/search.ts"],"sourcesContent":["import type {\n SearchDocUtilParams,\n SearchDocUtilResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport const getSearchAPI = (\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 AI_API_ROUTE = `${backendURL}/api/search`;\n\n /**\n * Search documentation\n * @param params - Search parameters containing the input query.\n * @returns Search results with GitHub URLs.\n */\n const searchDoc = async (\n params?: SearchDocUtilParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SearchDocUtilResult>(\n `${AI_API_ROUTE}/doc`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n params: params,\n }\n );\n\n return {\n searchDoc,\n };\n};\n"],"mappings":"+EAQA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAc,GAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAe,GAAG,EAAW,aAqBnC,MAAO,CACL,UAfgB,MAChB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAa,MAChB,EACA,EACA,CACE,OAAQ,MACA,SACT,CACF,CAIF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.mjs","names":[],"sources":["../../../src/getIntlayerAPI/stripe.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\
|
|
1
|
+
{"version":3,"file":"stripe.mjs","names":[],"sources":["../../../src/getIntlayerAPI/stripe.ts"],"sourcesContent":["import type {\n GetCheckoutSessionBody,\n GetCheckoutSessionResult,\n GetPricingBody,\n GetPricingResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport const getStripeAPI = (\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 STRIPE_API_ROUTE = `${backendURL}/api/stripe`;\n\n /**\n * Get a pricing plan calculated for a given promotion code.\n * @param body - Pricing plan body.\n */\n const getPricing = async (\n body?: GetPricingBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetPricingResult>(\n `${STRIPE_API_ROUTE}/pricing`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Retrieves a checkout session.\n * @param body - Checkout session body.\n */\n const getSubscription = async (\n body?: GetCheckoutSessionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetCheckoutSessionResult>(\n `${STRIPE_API_ROUTE}/create-subscription`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Cancels a subscription.\n * @param body - Checkout session body.\n */\n const cancelSubscription = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetCheckoutSessionResult>(\n `${STRIPE_API_ROUTE}/cancel-subscription`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getPricing,\n getSubscription,\n cancelSubscription,\n };\n};\n"],"mappings":"+EAUA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAc,GAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAmB,GAAG,EAAW,aAoDvC,MAAO,CACL,WA/CiB,MACjB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAiB,UACpB,EACA,EACA,CACE,OAAQ,OACR,OACD,CACF,CAoCD,gBA9BsB,MACtB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAiB,sBACpB,EACA,EACA,CACE,OAAQ,OACR,OACD,CACF,CAmBD,mBAbyB,MAAO,EAA+B,EAAE,GACjE,MAAM,EACJ,GAAG,EAAiB,sBACpB,EACA,EACA,CACE,OAAQ,OACT,CACF,CAMF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.mjs","names":[],"sources":["../../../src/getIntlayerAPI/tag.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\
|
|
1
|
+
{"version":3,"file":"tag.mjs","names":[],"sources":["../../../src/getIntlayerAPI/tag.ts"],"sourcesContent":["import type {\n AddTagBody,\n AddTagResult,\n DeleteTagParams,\n DeleteTagResult,\n GetTagsParams,\n GetTagsResult,\n UpdateTagBody,\n UpdateTagParams,\n UpdateTagResult,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport const getTagAPI = (\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 PROJECT_API_ROUTE = `${backendURL}/api/tag`;\n\n /**\n * Retrieves a list of tags based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getTags = async (\n filters?: GetTagsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetTagsResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n // @ts-ignore Number of parameter will be stringified by the fetcher\n params: filters,\n }\n );\n\n /**\n * Adds a new tag to the database.\n * @param tag - Tag data.\n */\n const addTag = async (tag: AddTagBody, otherOptions: FetcherOptions = {}) =>\n await fetcher<AddTagResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: tag,\n }\n );\n\n /**\n * Updates an existing tag in the database.\n * @param tag - Updated tag data.\n */\n const updateTag = async (\n tagId: UpdateTagParams['tagId'],\n tag: UpdateTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateTagResult>(\n `${PROJECT_API_ROUTE}/${tagId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: tag,\n }\n );\n\n /**\n * Deletes a tag from the database by its ID.\n * @param tagId - Tag ID.\n */\n const deleteTag = async (\n tagId: DeleteTagParams['tagId'],\n\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteTagResult>(\n `${PROJECT_API_ROUTE}/${tagId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n return {\n getTags,\n addTag,\n updateTag,\n deleteTag,\n };\n};\n"],"mappings":"+EAeA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAc,GAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAoB,GAAG,EAAW,UAyExC,MAAO,CACL,QApEc,MACd,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,EACA,EACA,EACA,CACE,MAAO,WAEP,OAAQ,EACT,CACF,CAwDD,OAlDa,MAAO,EAAiB,EAA+B,EAAE,GACtE,MAAM,EACJ,GAAG,IACH,EACA,EACA,CACE,OAAQ,OACR,KAAM,EACP,CACF,CA0CD,UApCgB,MAChB,EACA,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAkB,GAAG,IACxB,EACA,EACA,CACE,OAAQ,MACR,KAAM,EACP,CACF,CAwBD,UAlBgB,MAChB,EAEA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAkB,GAAG,IACxB,EACA,EACA,CACE,OAAQ,SACT,CACF,CAOF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.mjs","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\
|
|
1
|
+
{"version":3,"file":"user.mjs","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"sourcesContent":["import type {\n CreateUserBody,\n CreateUserResult,\n GetUserByEmailParams,\n GetUserByEmailResult,\n GetUserByIdParams,\n GetUserByIdResult,\n GetUsersParams,\n GetUsersResult,\n UpdateUserBody,\n UpdateUserResult,\n UserAPI,\n} from '@intlayer/backend';\nimport configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\ntype GetUserByAccountParams = { providerAccountId: string; provider: string };\ntype GetUserByAccountResult = import('@intlayer/backend').ResponseData<UserAPI>;\n\nexport const getUserAPI = (\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 USER_API_ROUTE = `${backendURL}/api/user`;\n\n /**\n * Retrieves a list of users based on filters and pagination.\n * @param filters - Filters and pagination options.\n * @returns List of users.\n */\n const getUsers = async (\n filters?: GetUsersParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUsersResult>(\n USER_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n // @ts-ignore Number of parameter will be stringified by the fetcher\n params: filters,\n }\n );\n\n /**\n * Retrieves a user by ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const getUserById = async (\n userId: GetUserByIdParams['userId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByIdResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Retrieves a user by email.\n * @param email - User email.\n * @returns User object.\n */\n const getUserByEmail = async (\n email: GetUserByEmailParams['email'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByEmailResult>(\n `${USER_API_ROUTE}/email/${email}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Retrieves a user by account.\n * @param providerAccountId - The provider account ID.\n * @param provider - The provider of the account.\n */\n const getUserByAccount = async (\n providerAccountId: GetUserByAccountParams['providerAccountId'],\n provider: GetUserByAccountParams['provider'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByAccountResult>(\n `${USER_API_ROUTE}/account/${provider}/${providerAccountId}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Creates a new user.\n * @param user - User credentials.\n * @returns User object.\n */\n const createUser = async (\n user: CreateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CreateUserResult>(\n `${USER_API_ROUTE}/`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n }\n );\n\n /**\n * Updates the user with the provided data.\n * @param user - Updated user data.\n * @returns User object.\n */\n const updateUser = async (\n user: UpdateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: user,\n }\n );\n\n /**\n * Deletes a user with the provided ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const deleteUser = async (\n userId: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Gets the verify email status URL to use in the SSE.\n * @param userId - User ID.\n * @returns The verify email status URL.\n */\n const getVerifyEmailStatusURL = (userId: string | UserAPI['id']) =>\n `${USER_API_ROUTE}/verify-email-status/${String(userId)}`;\n\n return {\n createUser,\n getUsers,\n getUserById,\n getUserByAccount,\n getUserByEmail,\n updateUser,\n deleteUser,\n getVerifyEmailStatusURL,\n };\n};\n"],"mappings":"+EAoBA,MAAa,GACX,EAAiC,EAAE,CACnC,IACG,CACH,IAAM,EACJ,GAAgB,QAAQ,YAAc,GAAe,QAAQ,WAE/D,GAAI,CAAC,EACH,MAAU,MACR,4DACD,CAGH,IAAM,EAAiB,GAAG,EAAW,WA6IrC,MAAO,CACL,WA5DiB,MACjB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAe,GAClB,EACA,EACA,CACE,OAAQ,OACR,KAAM,EACP,CACF,CAiDD,SAxIe,MACf,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,EACA,EACA,EACA,CACE,MAAO,WAEP,OAAQ,EACT,CACF,CA4HD,YArHkB,MAClB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAe,GAAG,IACrB,EACA,EACA,CACE,MAAO,WACR,CACF,CA2GD,iBAlFuB,MACvB,EACA,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAe,WAAW,EAAS,GAAG,IACzC,EACA,EACA,CACE,MAAO,WACR,CACF,CAuED,eArGqB,MACrB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAe,SAAS,IAC3B,EACA,EACA,CACE,MAAO,WACR,CACF,CA2FD,WA9CiB,MACjB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,IACH,EACA,EACA,CACE,OAAQ,MACR,KAAM,EACP,CACF,CAmCD,WA5BiB,MACjB,EACA,EAA+B,EAAE,GAEjC,MAAM,EACJ,GAAG,EAAe,GAAG,IACrB,EACA,EACA,CACE,OAAQ,SACT,CACF,CAkBD,wBAX+B,GAC/B,GAAG,EAAe,uBAAuB,OAAO,EAAO,GAWxD"}
|
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{getBitbucketAPI as r}from"./getIntlayerAPI/bitbucket.mjs";import{getDictionaryAPI as i}from"./getIntlayerAPI/dictionary.mjs";import{getEditorAPI as a}from"./getIntlayerAPI/editor.mjs";import{getGithubAPI as o}from"./getIntlayerAPI/github.mjs";import{getGitlabAPI as s}from"./getIntlayerAPI/gitlab.mjs";import{getNewsletterAPI as c}from"./getIntlayerAPI/newsletter.mjs";import{getOAuthAPI as l}from"./getIntlayerAPI/oAuth.mjs";import{getOrganizationAPI as u}from"./getIntlayerAPI/organization.mjs";import{getProjectAPI as d}from"./getIntlayerAPI/project.mjs";import{getSearchAPI as f}from"./getIntlayerAPI/search.mjs";import{getStripeAPI as p}from"./getIntlayerAPI/stripe.mjs";import{getTagAPI as m}from"./getIntlayerAPI/tag.mjs";import{getUserAPI as h}from"./getIntlayerAPI/user.mjs";import{getIntlayerAPI as g}from"./getIntlayerAPI/index.mjs";import{getIntlayerAPIProxy as _}from"./proxy.mjs";import{fetchDistantDictionaries as v}from"./distantDictionary/fetchDistantDictionaries.mjs";import{fetchDistantDictionary as y}from"./distantDictionary/fetchDistantDictionary.mjs";export{v as fetchDistantDictionaries,y as fetchDistantDictionary,e as fetcher,t as fetcherOptions,n as getAiAPI,r as getBitbucketAPI,i as getDictionaryAPI,a as getEditorAPI,o as getGithubAPI,s as getGitlabAPI,g as getIntlayerAPI,_ as getIntlayerAPIProxy,c as getNewsletterAPI,l as getOAuthAPI,u as getOrganizationAPI,d as getProjectAPI,f as getSearchAPI,p as getStripeAPI,m as getTagAPI,h as getUserAPI};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dictionary, DictionaryKeys, IntlayerConfig } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region ../unmerged-dictionaries-entry/dist/types/index.d.ts
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { UnmergedDictionaries };
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["Dictionary","DictionaryKeys","IntlayerConfig","UnmergedDictionaries","Record","GetUnmergedDictionaries","configuration","getUnmergedDictionaries"],"sources":["../../../../../../../unmerged-dictionaries-entry/dist/types/index.d.ts"],"mappings":";;;;KAGKG,oBAAAA,GAAuBC,MAAAA,CAAOH,cAAAA,EAAgBD,UAAAA"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, AutocompleteBody, ChatCompletionRequestMessage, CustomQueryBody, GetDiscussionsParams, TranslateJSONBody } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AIOptions, AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, ChatCompletionRequestMessage, CustomQueryBody, GetDiscussionsParams, TranslateJSONBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/ai.d.ts
|
|
6
|
+
type AutocompleteBody = {
|
|
7
|
+
text: string;
|
|
8
|
+
aiOptions?: AIOptions;
|
|
9
|
+
contextBefore?: string;
|
|
10
|
+
currentLine?: string;
|
|
11
|
+
contextAfter?: string;
|
|
12
|
+
};
|
|
6
13
|
type AskDocQuestionBody = {
|
|
7
14
|
messages: ChatCompletionRequestMessage[];
|
|
8
15
|
discussionId: string;
|
|
@@ -21,5 +28,5 @@ declare const getAiAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: Intla
|
|
|
21
28
|
getDiscussions: (params?: GetDiscussionsParams, otherOptions?: FetcherOptions) => Promise<GetDiscussionsResult>;
|
|
22
29
|
};
|
|
23
30
|
//#endregion
|
|
24
|
-
export { AskDocQuestionBody, type AskDocQuestionResult, getAiAPI };
|
|
31
|
+
export { AskDocQuestionBody, type AskDocQuestionResult, AutocompleteBody, getAiAPI };
|
|
25
32
|
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/ai.ts"],"mappings":";;;;;KAwBY,kBAAA;EACV,QAAA,EAAU,4BAAA;EACV,YAAA;EACA,SAAA,IAAa,KAAA;EACb,MAAA,IAAU,QAAA,EAAU,oBAAA;AAAA;AAAA,cAKT,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,cAAA,KAAc,OAAA,CAAA,kCAAA;2CAkBrB,mCAAA,EAAmC,YAAA,GAC5B,cAAA,KAAc,OAAA,CAAA,qCAAA;oBAkBrB,YAAA,EAAY,YAAA,GACL,cAAA,KAAc,OAAA,CAAA,cAAA;0BAgCrB,kBAAA,EAAkB,YAAA,GACX,cAAA,KAAc,OAAA;wBAuFrB,gBAAA,EAAgB,YAAA,GACT,cAAA,KAAc,OAAA,CAAA,oBAAA;4BAgBnB,oBAAA,EAAoB,YAAA,GACf,cAAA,KAAc,OAAA,CAAA,oBAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddDictionaryBody, DeleteDictionaryParam, GetDictionariesParams, GetDictionaryParams, GetDictionaryQuery, PushDictionariesBody, UpdateDictionaryBody } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AddDictionaryBody, DeleteDictionaryParam, GetDictionariesParams, GetDictionaryParams, GetDictionaryQuery, PushDictionariesBody, UpdateDictionaryBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/dictionary.d.ts
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { GetConfigurationResult, GetEditorDictionariesResult, WriteContentDeclarationBody, WriteContentDeclarationResult } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { GetConfigurationResult } from "../intlayer-editor/server/dist/controllers/configuration.controller.js";
|
|
3
|
+
import { GetEditorDictionariesResult, WriteContentDeclarationBody, WriteContentDeclarationResult } from "../intlayer-editor/server/dist/controllers/dictionary.controller.js";
|
|
4
|
+
import "../intlayer-editor/server/dist/export.js";
|
|
3
5
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
6
|
|
|
5
7
|
//#region src/getIntlayerAPI/editor.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/editor.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/editor.ts"],"mappings":";;;;;;;cAUa,YAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;mCA8BD,cAAA,KACb,OAAA,CAAQ,2BAAA;oCAhBK,cAAA,KACb,OAAA,CAAQ,sBAAA;0BA8BH,2BAAA,EAA2B,YAAA,GACnB,cAAA,KAAc,OAAA,CAAA,6BAAA;AAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
2
|
import { getAiAPI } from "./ai.js";
|
|
3
|
-
import { getAuditAPI } from "./audit.js";
|
|
4
3
|
import { getBitbucketAPI } from "./bitbucket.js";
|
|
5
4
|
import { getDictionaryAPI } from "./dictionary.js";
|
|
6
5
|
import { getEditorAPI } from "./editor.js";
|
|
@@ -32,7 +31,6 @@ interface IntlayerAPIReturn {
|
|
|
32
31
|
github: ReturnType<typeof getGithubAPI>;
|
|
33
32
|
gitlab: ReturnType<typeof getGitlabAPI>;
|
|
34
33
|
bitbucket: ReturnType<typeof getBitbucketAPI>;
|
|
35
|
-
audit: ReturnType<typeof getAuditAPI>;
|
|
36
34
|
}
|
|
37
35
|
declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => IntlayerAPIReturn;
|
|
38
36
|
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":";;;;;;;;;;;;;;;;;;UAiBU,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,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;AAAA;AAAA,cAGlB,cAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA,KAChB,iBAAA;AAAA,KAiBS,WAAA,GAAc,UAAA,QAAkB,cAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NewsletterSubscriptionBody, NewsletterUnsubscriptionBody } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { NewsletterSubscriptionBody, NewsletterUnsubscriptionBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/newsletter.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oAuth.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/oAuth.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"oAuth.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/oAuth.ts"],"mappings":";;;;cAQa,WAAA,GAAe,cAAA,GAAiB,cAAA;wCAeO,cAAA,KAAc,OAAA,CAAA,oBAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddOrganizationBody, AddOrganizationMemberBody, GetOrganizationParam, GetOrganizationsParams, SelectOrganizationParam, UpdateOrganizationBody, UpdateOrganizationMembersBody } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AddOrganizationBody, AddOrganizationMemberBody, GetOrganizationParam, GetOrganizationsParams, SelectOrganizationParam, UpdateOrganizationBody, UpdateOrganizationMembersBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/organization.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddNewAccessKeyBody, AddProjectBody, DeleteAccessKeyBody, GetProjectsParams, PushProjectConfigurationBody, RefreshAccessKeyBody, SelectProjectParam, TriggerWebhookBody, UpdateProjectBody, UpdateProjectMembersBody } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AddNewAccessKeyBody, AddProjectBody, DeleteAccessKeyBody, GetProjectsParams, PushProjectConfigurationBody, RefreshAccessKeyBody, SelectProjectParam, TriggerWebhookBody, UpdateProjectBody, UpdateProjectMembersBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/project.d.ts
|
|
@@ -17,8 +17,8 @@ declare const getProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?:
|
|
|
17
17
|
refreshAccessKey: (clientId: RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
|
|
18
18
|
triggerBuild: (otherOptions?: FetcherOptions) => Promise<TriggerBuildResult>;
|
|
19
19
|
triggerWebhook: (webhookIndex: TriggerWebhookBody["webhookIndex"], otherOptions?: FetcherOptions) => Promise<TriggerWebhookResult>;
|
|
20
|
-
getCIConfig: (otherOptions?: FetcherOptions) => Promise<
|
|
21
|
-
pushCIConfig: (otherOptions?: FetcherOptions) => Promise<
|
|
20
|
+
getCIConfig: (otherOptions?: FetcherOptions) => Promise<ResponseData<any>>;
|
|
21
|
+
pushCIConfig: (otherOptions?: FetcherOptions) => Promise<ResponseData<any>>;
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
24
24
|
export { getProjectAPI };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/project.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"project.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/project.ts"],"mappings":";;;;;cA8Ba,aAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;0BAkBL,iBAAA,EAAiB,YAAA,GACb,cAAA,KAAc,OAAA,CAAA,iBAAA;wBAkBnB,cAAA,EAAc,YAAA,GACT,cAAA,KAAc,OAAA,CAAA,gBAAA;2BAiBnB,iBAAA,EAAiB,YAAA,GACZ,cAAA,KAAc,OAAA,CAAA,mBAAA;+BAiBtB,wBAAA,EAAwB,YAAA,GAChB,cAAA,KAAc,OAAA,CAAA,0BAAA;mDAgBN,4BAAA,EAA4B,YAAA,GACpC,cAAA,KAAc,OAAA,CAAA,8BAAA;iCAgBa,cAAA,KAAc,OAAA,CAAA,mBAAA;6BAe5C,kBAAA,eAA+B,YAAA,GAC5B,cAAA,KAAc,OAAA,CAAA,mBAAA;mCAee,cAAA,KAAc,OAAA,CAAA,qBAAA;+BAiB9C,mBAAA,EAAmB,YAAA,GAChB,cAAA,KAAc,OAAA,CAAA,uBAAA;8BAmBlB,mBAAA,cAA+B,YAAA,GAC3B,cAAA,KAAc,OAAA,CAAA,uBAAA;+BAmBlB,oBAAA,cAAgC,YAAA,GAC5B,cAAA,KAAc,OAAA,CAAA,wBAAA;gCAiBY,cAAA,KAAc,OAAA,CAAA,kBAAA;iCAiBxC,kBAAA,kBAAkC,YAAA,GAClC,cAAA,KAAc,OAAA,CAAA,oBAAA;+BAiBW,cAAA,KAAc,OAAA,CAAA,YAAA;gCAeb,cAAA,KAAc,OAAA,CAAA,YAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/search.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"search.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/search.ts"],"mappings":";;;;;cAQa,YAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;uBAmBN,mBAAA,EAAmB,YAAA,GACd,cAAA,KAAc,OAAA,CAAA,mBAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GetCheckoutSessionBody, GetPricingBody } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { GetCheckoutSessionBody, GetPricingBody } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/stripe.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddTagBody, DeleteTagParams, GetTagsParams, UpdateTagBody, UpdateTagParams } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { AddTagBody, DeleteTagParams, GetTagsParams, UpdateTagBody, UpdateTagParams } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/tag.d.ts
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { CreateUserBody, GetUserByAccountParams, GetUserByEmailParams, GetUserByIdParams, GetUsersParams, UpdateUserBody, UserAPI } from "../types.js";
|
|
2
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { CreateUserBody, GetUserByEmailParams, GetUserByIdParams, GetUsersParams, UpdateUserBody, UserAPI } from "@intlayer/backend";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/getIntlayerAPI/user.d.ts
|
|
6
|
+
type GetUserByAccountParams = {
|
|
7
|
+
providerAccountId: string;
|
|
8
|
+
provider: string;
|
|
9
|
+
};
|
|
6
10
|
declare const getUserAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
7
11
|
createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
|
|
8
12
|
getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
|
|
9
13
|
getUserById: (userId: GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<GetUserByIdResult>;
|
|
10
|
-
getUserByAccount: (providerAccountId: GetUserByAccountParams["providerAccountId"], provider: GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<
|
|
14
|
+
getUserByAccount: (providerAccountId: GetUserByAccountParams["providerAccountId"], provider: GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<any>;
|
|
11
15
|
getUserByEmail: (email: GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<GetUserByEmailResult>;
|
|
12
16
|
updateUser: (user: UpdateUserBody, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
|
|
13
17
|
deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"user.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"mappings":";;;;;KAiBK,sBAAA;EAA2B,iBAAA;EAA2B,QAAA;AAAA;AAAA,cAG9C,UAAA,GACX,cAAA,GAAgB,cAAA,EAChB,cAAA,GAAiB,cAAA;qBA8FT,cAAA,EAAc,YAAA,GACN,cAAA,KAAc,OAAA,CAAA,gBAAA;uBA5ElB,cAAA,EAAc,YAAA,GACV,cAAA,KAAc,OAAA,CAAA,cAAA;wBAmBpB,iBAAA,YAA2B,YAAA,GACrB,cAAA,KAAc,OAAA,CAAA,iBAAA;wCAmCT,sBAAA,uBAA2C,QAAA,EACpD,sBAAA,cAAkC,YAAA,GAC9B,cAAA,KAAc,OAAA;0BApBrB,oBAAA,WAA6B,YAAA,GACtB,cAAA,KAAc,OAAA,CAAA,oBAAA;qBAuDtB,cAAA,EAAc,YAAA,GACN,cAAA,KAAc,OAAA,CAAA,gBAAA;+BAkBd,YAAA,GACA,cAAA,KAAc,OAAA,CAAA,gBAAA;6CAgBoB,OAAA;AAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { AIOptions, AIProvider, AddDictionaryBody, AddDictionaryResult, AddNewAccessKeyBody, AddNewAccessKeyResponse, AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, AddProjectBody, AddProjectResult, AddTagBody, AddTagResult, AskDocQuestionResult, AskResetPasswordBody, AskResetPasswordResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult, AuthClient, AutocompleteBody, AutocompleteResponse, ChatCompletionRequestMessage, CheckIfUserHasPasswordResult, CreateAuditBody, CreateAuditResult, CreateSessionBody, CreateSessionResult, CreateUserBody, CreateUserResult, CustomQueryBody, CustomQueryResult, DefinePasswordBody, DefinePasswordResult, DeleteAccessKeyBody, DeleteAccessKeyResponse, DeleteDictionaryParam, DeleteDictionaryResult, DeleteOrganizationResult, DeleteProjectResult, DeleteTagParams, DeleteTagResult, DictionaryAPI, GetAuditByIdParams, GetAuditByIdResult, GetAuditsParams, GetAuditsResult, GetCIConfigResult, GetCheckoutSessionBody, GetCheckoutSessionResult, GetConfigurationResult, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionariesUpdateTimestampResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetDiscussionsParams, GetDiscussionsResult, GetEditorDictionariesResult, GetOAuth2TokenBody, GetOAuth2TokenResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationSSOConfigBody, GetOrganizationSSOConfigResult, GetOrganizationsParams, GetOrganizationsResult, GetPricingBody, GetPricingResult, GetProjectsParams, GetProjectsResult, GetSessionInformationQuery, GetSessionInformationResult, GetTagsParams, GetTagsResult, GetUserByAccountParams, GetUserByAccountResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, GithubLoginQueryParams, GoogleLoginQueryParams, LoginBody, LoginResult, Messages, NewsletterSubscriptionBody, NewsletterSubscriptionResult, NewsletterUnsubscriptionBody, ProjectConfigCI, PushCIConfigResult, PushDictionariesBody, PushDictionariesResult, PushProjectConfigurationBody, PushProjectConfigurationResult, RefreshAccessKeyBody, RefreshAccessKeyResponse, RegisterBody, RegisterQuery, RegisterResult, SearchDocUtilParams, SearchDocUtilResult, SelectOrganizationParam, SelectOrganizationResult, SelectProjectParam, SelectProjectResult, SetCSRFTokenResult, TranslateJSONBody, TranslateJSONResult, TriggerBuildResult, TriggerWebhookBody, TriggerWebhookResult, UnselectOrganizationResult, UnselectProjectResult, UpdateDictionaryBody, UpdateDictionaryParam, UpdateDictionaryResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult, UpdatePasswordBody, UpdatePasswordResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult, UpdateTagBody, UpdateTagParams, UpdateTagResult, UpdateUserBody, UpdateUserResult, UserAPI, ValidEmailParams, ValidEmailResult, Webhook, WriteContentDeclarationBody, WriteContentDeclarationResult } from "./types.js";
|
|
2
1
|
import { fetchDistantDictionaries } from "./distantDictionary/fetchDistantDictionaries.js";
|
|
3
2
|
import { fetchDistantDictionary } from "./distantDictionary/fetchDistantDictionary.js";
|
|
4
3
|
import "./distantDictionary/index.js";
|
|
5
4
|
import { FetcherOptions, fetcher, fetcherOptions } from "./fetcher.js";
|
|
6
|
-
import { AskDocQuestionBody, getAiAPI } from "./getIntlayerAPI/ai.js";
|
|
7
|
-
import { getAuditAPI } from "./getIntlayerAPI/audit.js";
|
|
5
|
+
import { AskDocQuestionBody, AskDocQuestionResult, AutocompleteBody, getAiAPI } from "./getIntlayerAPI/ai.js";
|
|
8
6
|
import { BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, getBitbucketAPI } from "./getIntlayerAPI/bitbucket.js";
|
|
9
7
|
import { getDictionaryAPI } from "./getIntlayerAPI/dictionary.js";
|
|
10
8
|
import { getEditorAPI } from "./getIntlayerAPI/editor.js";
|
|
@@ -20,4 +18,4 @@ import { getTagAPI } from "./getIntlayerAPI/tag.js";
|
|
|
20
18
|
import { getUserAPI } from "./getIntlayerAPI/user.js";
|
|
21
19
|
import { IntlayerAPI, getIntlayerAPI } from "./getIntlayerAPI/index.js";
|
|
22
20
|
import { IntlayerAPIProxy, getIntlayerAPIProxy } from "./proxy.js";
|
|
23
|
-
export {
|
|
21
|
+
export { 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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResponseData } from "../utils/responseData.js";
|
|
2
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
3
|
+
|
|
4
|
+
//#region ../../intlayer-editor/server/dist/controllers/configuration.controller.d.ts
|
|
5
|
+
//#region src/controllers/configuration.controller.d.ts
|
|
6
|
+
type GetConfigurationResult = ResponseData<IntlayerConfig>;
|
|
7
|
+
/**
|
|
8
|
+
* Get the Intlayer configuration
|
|
9
|
+
*/
|
|
10
|
+
//#endregion
|
|
11
|
+
export { GetConfigurationResult };
|
|
12
|
+
//# sourceMappingURL=configuration.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.controller.d.ts","names":["ResponseData","IntlayerConfig","FastifyReply","FastifyRequest","GetConfigurationResult","getConfiguration","Promise","_req","res"],"sources":["../../../../../../../../intlayer-editor/server/dist/controllers/configuration.controller.d.ts"],"mappings":";;;;;KAKKI,sBAAAA,GAAyBJ,YAAAA,CAAaC,cAAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ResponseData } from "../utils/responseData.js";
|
|
2
|
+
import { UnmergedDictionaries } from "../../../../@intlayer/unmerged-dictionaries-entry/dist/types/index.js";
|
|
3
|
+
import { Dictionary } from "@intlayer/types";
|
|
4
|
+
import { DictionaryStatus } from "@intlayer/chokidar/build";
|
|
5
|
+
|
|
6
|
+
//#region ../../intlayer-editor/server/dist/controllers/dictionary.controller.d.ts
|
|
7
|
+
//#region src/controllers/dictionary.controller.d.ts
|
|
8
|
+
type GetEditorDictionariesResult = ResponseData<UnmergedDictionaries>;
|
|
9
|
+
/**
|
|
10
|
+
* Get the Intlayer configuration
|
|
11
|
+
*/
|
|
12
|
+
type WriteContentDeclarationBody = {
|
|
13
|
+
dictionary: Dictionary;
|
|
14
|
+
};
|
|
15
|
+
type WriteContentDeclarationResultData = {
|
|
16
|
+
status: DictionaryStatus;
|
|
17
|
+
path: string;
|
|
18
|
+
};
|
|
19
|
+
type WriteContentDeclarationResult = ResponseData<WriteContentDeclarationResultData>;
|
|
20
|
+
/**
|
|
21
|
+
* Adds a new dictionary to the database.
|
|
22
|
+
*/
|
|
23
|
+
//#endregion
|
|
24
|
+
export { GetEditorDictionariesResult, WriteContentDeclarationBody, WriteContentDeclarationResult };
|
|
25
|
+
//# sourceMappingURL=dictionary.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary.controller.d.ts","names":["ResponseData","Dictionary","FastifyReply","FastifyRequest","DictionaryStatus","UnmergedDictionaries","GetEditorDictionariesResult","getDictionaries","Promise","_req","res","WriteContentDeclarationBody","dictionary","WriteContentDeclarationResultData","status","path","WriteContentDeclarationResult","writeContentDeclaration","Body","req"],"sources":["../../../../../../../../intlayer-editor/server/dist/controllers/dictionary.controller.d.ts"],"mappings":";;;;;;;KAOKM,2BAAAA,GAA8BN,YAAAA,CAAaK,oBAAAA;;;;KAK3CM,2BAAAA;EACHC,UAAAA,EAAYX,UAAAA;AAAAA;AAAAA,KAETY,iCAAAA;EACHC,MAAAA,EAAQV,gBAAAA;EACRW,IAAAA;AAAAA;AAAAA,KAEGC,6BAAAA,GAAgChB,YAAAA,CAAaa,iCAAAA"}
|