@intlayer/api 7.5.10 → 7.5.11
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/bitbucket.cjs +74 -0
- package/dist/cjs/getIntlayerAPI/bitbucket.cjs.map +1 -0
- package/dist/cjs/getIntlayerAPI/gitlab.cjs +88 -0
- package/dist/cjs/getIntlayerAPI/gitlab.cjs.map +1 -0
- package/dist/cjs/getIntlayerAPI/index.cjs +4 -0
- package/dist/cjs/getIntlayerAPI/index.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/project.cjs +33 -1
- package/dist/cjs/getIntlayerAPI/project.cjs.map +1 -1
- package/dist/esm/getIntlayerAPI/bitbucket.mjs +72 -0
- package/dist/esm/getIntlayerAPI/bitbucket.mjs.map +1 -0
- package/dist/esm/getIntlayerAPI/gitlab.mjs +86 -0
- package/dist/esm/getIntlayerAPI/gitlab.mjs.map +1 -0
- package/dist/esm/getIntlayerAPI/index.mjs +4 -0
- package/dist/esm/getIntlayerAPI/index.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/project.mjs +33 -1
- package/dist/esm/getIntlayerAPI/project.mjs.map +1 -1
- package/dist/types/getIntlayerAPI/bitbucket.d.ts +81 -0
- package/dist/types/getIntlayerAPI/bitbucket.d.ts.map +1 -0
- package/dist/types/getIntlayerAPI/gitlab.d.ts +70 -0
- package/dist/types/getIntlayerAPI/gitlab.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/project.d.ts +5 -1
- package/dist/types/getIntlayerAPI/project.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/types.d.ts +2 -2
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_fetcher = require('../fetcher.cjs');
|
|
3
|
+
let _intlayer_config_built = require("@intlayer/config/built");
|
|
4
|
+
_intlayer_config_built = require_rolldown_runtime.__toESM(_intlayer_config_built);
|
|
5
|
+
|
|
6
|
+
//#region src/getIntlayerAPI/bitbucket.ts
|
|
7
|
+
const getBitbucketAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
8
|
+
const backendURL = intlayerConfig?.editor?.backendURL ?? _intlayer_config_built.default?.editor?.backendURL;
|
|
9
|
+
if (!backendURL) throw new Error("Backend URL is not defined in the Intlayer configuration.");
|
|
10
|
+
const BITBUCKET_API_ROUTE = `${backendURL}/api/bitbucket`;
|
|
11
|
+
/**
|
|
12
|
+
* Get Bitbucket OAuth authorization URL
|
|
13
|
+
* @param redirectUri - Redirect URI after OAuth authorization
|
|
14
|
+
*/
|
|
15
|
+
const getAuthUrl = async (redirectUri, otherOptions = {}) => await require_fetcher.fetcher(`${BITBUCKET_API_ROUTE}/auth-url`, authAPIOptions, otherOptions, { params: { redirectUri } });
|
|
16
|
+
/**
|
|
17
|
+
* Exchange Bitbucket authorization code for access token
|
|
18
|
+
* @param code - Bitbucket authorization code
|
|
19
|
+
*/
|
|
20
|
+
const authenticate = async (code, otherOptions = {}) => await require_fetcher.fetcher(`${BITBUCKET_API_ROUTE}/auth`, authAPIOptions, otherOptions, {
|
|
21
|
+
method: "POST",
|
|
22
|
+
body: { code }
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Get user's Bitbucket repositories
|
|
26
|
+
* @param token - Optional Bitbucket access token. If not provided, backend will use session.
|
|
27
|
+
*/
|
|
28
|
+
const getRepositories = async (token, otherOptions = {}) => await require_fetcher.fetcher(`${BITBUCKET_API_ROUTE}/repos`, authAPIOptions, otherOptions, { params: token ? { token } : void 0 });
|
|
29
|
+
/**
|
|
30
|
+
* Check if intlayer.config.ts exists in a Bitbucket repository
|
|
31
|
+
* @param token - Optional Bitbucket access token. If not provided, backend will use session.
|
|
32
|
+
* @param workspace - Bitbucket workspace slug
|
|
33
|
+
* @param repoSlug - Repository slug
|
|
34
|
+
* @param branch - Branch name (default: 'main')
|
|
35
|
+
*/
|
|
36
|
+
const checkIntlayerConfig = async (token, workspace, repoSlug, branch = "main", otherOptions = {}) => await require_fetcher.fetcher(`${BITBUCKET_API_ROUTE}/check-config`, authAPIOptions, otherOptions, {
|
|
37
|
+
method: "POST",
|
|
38
|
+
body: {
|
|
39
|
+
token: token ?? void 0,
|
|
40
|
+
workspace,
|
|
41
|
+
repoSlug,
|
|
42
|
+
branch
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* Get intlayer.config.ts file contents from a Bitbucket repository
|
|
47
|
+
* @param token - Optional Bitbucket access token. If not provided, backend will use session.
|
|
48
|
+
* @param workspace - Bitbucket workspace slug
|
|
49
|
+
* @param repoSlug - Repository slug
|
|
50
|
+
* @param branch - Branch name (default: 'main')
|
|
51
|
+
* @param path - File path (default: 'intlayer.config.ts')
|
|
52
|
+
*/
|
|
53
|
+
const getConfigFile = async (token, workspace, repoSlug, branch = "main", path = "intlayer.config.ts", otherOptions = {}) => await require_fetcher.fetcher(`${BITBUCKET_API_ROUTE}/get-config-file`, authAPIOptions, otherOptions, {
|
|
54
|
+
method: "POST",
|
|
55
|
+
body: {
|
|
56
|
+
token: token ?? void 0,
|
|
57
|
+
workspace,
|
|
58
|
+
repoSlug,
|
|
59
|
+
branch,
|
|
60
|
+
path
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
getAuthUrl,
|
|
65
|
+
authenticate,
|
|
66
|
+
getRepositories,
|
|
67
|
+
checkIntlayerConfig,
|
|
68
|
+
getConfigFile
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
exports.getBitbucketAPI = getBitbucketAPI;
|
|
74
|
+
//# sourceMappingURL=bitbucket.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bitbucket.cjs","names":["configuration","fetcher"],"sources":["../../../src/getIntlayerAPI/bitbucket.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport type BitbucketRepository = {\n uuid: string;\n name: string;\n full_name: string;\n slug: string;\n mainbranch?: {\n name: string;\n type: string;\n };\n links: {\n html: {\n href: string;\n };\n };\n workspace: {\n slug: string;\n name: string;\n uuid: string;\n };\n owner: {\n display_name: string;\n username?: string;\n uuid: string;\n };\n updated_on: string;\n is_private: boolean;\n};\n\nexport type BitbucketAuthCallbackBody = {\n code: string;\n};\n\nexport type BitbucketAuthCallbackResult = {\n data: {\n token: string;\n };\n};\n\nexport type BitbucketListReposResult = {\n data: BitbucketRepository[];\n};\n\nexport type BitbucketCheckConfigBody = {\n token?: string;\n workspace: string;\n repoSlug: string;\n branch?: string;\n};\n\nexport type BitbucketCheckConfigResult = {\n data: {\n hasConfig: boolean;\n configPaths: string[];\n };\n};\n\nexport type BitbucketGetConfigFileBody = {\n token?: string;\n workspace: string;\n repoSlug: string;\n branch?: string;\n path?: string;\n};\n\nexport type BitbucketGetConfigFileResult = {\n data: {\n content: string;\n };\n};\n\nexport type BitbucketGetAuthUrlResult = {\n data: {\n authUrl: string;\n };\n};\n\nexport const getBitbucketAPI = (\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 BITBUCKET_API_ROUTE = `${backendURL}/api/bitbucket`;\n\n /**\n * Get Bitbucket OAuth authorization URL\n * @param redirectUri - Redirect URI after OAuth authorization\n */\n const getAuthUrl = async (\n redirectUri: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketGetAuthUrlResult>(\n `${BITBUCKET_API_ROUTE}/auth-url`,\n authAPIOptions,\n otherOptions,\n {\n params: { redirectUri },\n }\n );\n\n /**\n * Exchange Bitbucket authorization code for access token\n * @param code - Bitbucket authorization code\n */\n const authenticate = async (\n code: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketAuthCallbackResult>(\n `${BITBUCKET_API_ROUTE}/auth`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { code },\n }\n );\n\n /**\n * Get user's Bitbucket repositories\n * @param token - Optional Bitbucket access token. If not provided, backend will use session.\n */\n const getRepositories = async (\n token?: string | null,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketListReposResult>(\n `${BITBUCKET_API_ROUTE}/repos`,\n authAPIOptions,\n otherOptions,\n {\n params: token ? { token } : undefined,\n }\n );\n\n /**\n * Check if intlayer.config.ts exists in a Bitbucket repository\n * @param token - Optional Bitbucket access token. If not provided, backend will use session.\n * @param workspace - Bitbucket workspace slug\n * @param repoSlug - Repository slug\n * @param branch - Branch name (default: 'main')\n */\n const checkIntlayerConfig = async (\n token: string | null | undefined,\n workspace: string,\n repoSlug: string,\n branch: string = 'main',\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketCheckConfigResult>(\n `${BITBUCKET_API_ROUTE}/check-config`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { token: token ?? undefined, workspace, repoSlug, branch },\n }\n );\n\n /**\n * Get intlayer.config.ts file contents from a Bitbucket repository\n * @param token - Optional Bitbucket access token. If not provided, backend will use session.\n * @param workspace - Bitbucket workspace slug\n * @param repoSlug - Repository slug\n * @param branch - Branch name (default: 'main')\n * @param path - File path (default: 'intlayer.config.ts')\n */\n const getConfigFile = async (\n token: string | null | undefined,\n workspace: string,\n repoSlug: string,\n branch: string = 'main',\n path: string = 'intlayer.config.ts',\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketGetConfigFileResult>(\n `${BITBUCKET_API_ROUTE}/get-config-file`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: {\n token: token ?? undefined,\n workspace,\n repoSlug,\n branch,\n path,\n },\n }\n );\n\n return {\n getAuthUrl,\n authenticate,\n getRepositories,\n checkIntlayerConfig,\n getConfigFile,\n };\n};\n"],"mappings":";;;;;;AAgFA,MAAa,mBACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAcA,gCAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,sBAAsB,GAAG,WAAW;;;;;CAM1C,MAAM,aAAa,OACjB,aACA,eAA+B,EAAE,KAEjC,MAAMC,wBACJ,GAAG,oBAAoB,YACvB,gBACA,cACA,EACE,QAAQ,EAAE,aAAa,EACxB,CACF;;;;;CAMH,MAAM,eAAe,OACnB,MACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,oBAAoB,QACvB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,MAAM;EACf,CACF;;;;;CAMH,MAAM,kBAAkB,OACtB,OACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,oBAAoB,SACvB,gBACA,cACA,EACE,QAAQ,QAAQ,EAAE,OAAO,GAAG,QAC7B,CACF;;;;;;;;CASH,MAAM,sBAAsB,OAC1B,OACA,WACA,UACA,SAAiB,QACjB,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,oBAAoB,gBACvB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GAAE,OAAO,SAAS;GAAW;GAAW;GAAU;GAAQ;EACjE,CACF;;;;;;;;;CAUH,MAAM,gBAAgB,OACpB,OACA,WACA,UACA,SAAiB,QACjB,OAAe,sBACf,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,oBAAoB,mBACvB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GACJ,OAAO,SAAS;GAChB;GACA;GACA;GACA;GACD;EACF,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_fetcher = require('../fetcher.cjs');
|
|
3
|
+
let _intlayer_config_built = require("@intlayer/config/built");
|
|
4
|
+
_intlayer_config_built = require_rolldown_runtime.__toESM(_intlayer_config_built);
|
|
5
|
+
|
|
6
|
+
//#region src/getIntlayerAPI/gitlab.ts
|
|
7
|
+
const getGitlabAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
8
|
+
const backendURL = intlayerConfig?.editor?.backendURL ?? _intlayer_config_built.default?.editor?.backendURL;
|
|
9
|
+
if (!backendURL) throw new Error("Backend URL is not defined in the Intlayer configuration.");
|
|
10
|
+
const GITLAB_API_ROUTE = `${backendURL}/api/gitlab`;
|
|
11
|
+
/**
|
|
12
|
+
* Get GitLab OAuth authorization URL
|
|
13
|
+
* @param redirectUri - Redirect URI after OAuth authorization
|
|
14
|
+
* @param instanceUrl - Custom GitLab instance URL (optional, for self-hosted)
|
|
15
|
+
*/
|
|
16
|
+
const getAuthUrl = async (redirectUri, instanceUrl, otherOptions = {}) => await require_fetcher.fetcher(`${GITLAB_API_ROUTE}/auth-url`, authAPIOptions, otherOptions, { params: {
|
|
17
|
+
redirectUri,
|
|
18
|
+
...instanceUrl && { instanceUrl }
|
|
19
|
+
} });
|
|
20
|
+
/**
|
|
21
|
+
* Exchange GitLab authorization code for access token
|
|
22
|
+
* @param code - GitLab authorization code
|
|
23
|
+
* @param redirectUri - Redirect URI used in the authorization request
|
|
24
|
+
* @param instanceUrl - Custom GitLab instance URL (optional)
|
|
25
|
+
*/
|
|
26
|
+
const authenticate = async (code, redirectUri, instanceUrl, otherOptions = {}) => await require_fetcher.fetcher(`${GITLAB_API_ROUTE}/auth`, authAPIOptions, otherOptions, {
|
|
27
|
+
method: "POST",
|
|
28
|
+
body: {
|
|
29
|
+
code,
|
|
30
|
+
redirectUri,
|
|
31
|
+
instanceUrl
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Get user's GitLab projects
|
|
36
|
+
* @param token - Optional GitLab access token. If not provided, backend will use session.
|
|
37
|
+
* @param instanceUrl - Custom GitLab instance URL (optional)
|
|
38
|
+
*/
|
|
39
|
+
const getProjects = async (token, instanceUrl, otherOptions = {}) => await require_fetcher.fetcher(`${GITLAB_API_ROUTE}/projects`, authAPIOptions, otherOptions, { params: {
|
|
40
|
+
...token && { token },
|
|
41
|
+
...instanceUrl && { instanceUrl }
|
|
42
|
+
} });
|
|
43
|
+
/**
|
|
44
|
+
* Check if intlayer.config.ts exists in a GitLab repository
|
|
45
|
+
* @param token - Optional GitLab access token. If not provided, backend will use session.
|
|
46
|
+
* @param projectId - GitLab project ID
|
|
47
|
+
* @param branch - Branch name (default: 'main')
|
|
48
|
+
* @param instanceUrl - Custom GitLab instance URL (optional)
|
|
49
|
+
*/
|
|
50
|
+
const checkIntlayerConfig = async (token, projectId, branch = "main", instanceUrl, otherOptions = {}) => await require_fetcher.fetcher(`${GITLAB_API_ROUTE}/check-config`, authAPIOptions, otherOptions, {
|
|
51
|
+
method: "POST",
|
|
52
|
+
body: {
|
|
53
|
+
token: token ?? void 0,
|
|
54
|
+
projectId,
|
|
55
|
+
branch,
|
|
56
|
+
...instanceUrl && { instanceUrl }
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* Get intlayer.config.ts file contents from a GitLab repository
|
|
61
|
+
* @param token - Optional GitLab access token. If not provided, backend will use session.
|
|
62
|
+
* @param projectId - GitLab project ID
|
|
63
|
+
* @param branch - Branch name (default: 'main')
|
|
64
|
+
* @param path - File path (default: 'intlayer.config.ts')
|
|
65
|
+
* @param instanceUrl - Custom GitLab instance URL (optional)
|
|
66
|
+
*/
|
|
67
|
+
const getConfigFile = async (token, projectId, branch = "main", path = "intlayer.config.ts", instanceUrl, otherOptions = {}) => await require_fetcher.fetcher(`${GITLAB_API_ROUTE}/get-config-file`, authAPIOptions, otherOptions, {
|
|
68
|
+
method: "POST",
|
|
69
|
+
body: {
|
|
70
|
+
token: token ?? void 0,
|
|
71
|
+
projectId,
|
|
72
|
+
branch,
|
|
73
|
+
path,
|
|
74
|
+
...instanceUrl && { instanceUrl }
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
getAuthUrl,
|
|
79
|
+
authenticate,
|
|
80
|
+
getProjects,
|
|
81
|
+
checkIntlayerConfig,
|
|
82
|
+
getConfigFile
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
exports.getGitlabAPI = getGitlabAPI;
|
|
88
|
+
//# sourceMappingURL=gitlab.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab.cjs","names":["configuration","fetcher"],"sources":["../../../src/getIntlayerAPI/gitlab.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport type GitLabProject = {\n id: number;\n name: string;\n path_with_namespace: string;\n web_url: string;\n default_branch: string;\n visibility: string;\n last_activity_at: string;\n namespace: {\n id: number;\n name: string;\n path: string;\n };\n};\n\nexport type GitLabAuthCallbackBody = {\n code: string;\n redirectUri: string;\n instanceUrl?: string;\n};\n\nexport type GitLabAuthCallbackResult = {\n data: {\n token: string;\n };\n};\n\nexport type GitLabListProjectsResult = {\n data: GitLabProject[];\n};\n\nexport type GitLabCheckConfigBody = {\n token?: string;\n projectId: number;\n branch?: string;\n instanceUrl?: string;\n};\n\nexport type GitLabCheckConfigResult = {\n data: {\n hasConfig: boolean;\n configPaths: string[];\n };\n};\n\nexport type GitLabGetConfigFileBody = {\n token?: string;\n projectId: number;\n branch?: string;\n path?: string;\n instanceUrl?: string;\n};\n\nexport type GitLabGetConfigFileResult = {\n data: {\n content: string;\n };\n};\n\nexport type GitLabGetAuthUrlResult = {\n data: {\n authUrl: string;\n };\n};\n\nexport const getGitlabAPI = (\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 GITLAB_API_ROUTE = `${backendURL}/api/gitlab`;\n\n /**\n * Get GitLab OAuth authorization URL\n * @param redirectUri - Redirect URI after OAuth authorization\n * @param instanceUrl - Custom GitLab instance URL (optional, for self-hosted)\n */\n const getAuthUrl = async (\n redirectUri: string,\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabGetAuthUrlResult>(\n `${GITLAB_API_ROUTE}/auth-url`,\n authAPIOptions,\n otherOptions,\n {\n params: { redirectUri, ...(instanceUrl && { instanceUrl }) },\n }\n );\n\n /**\n * Exchange GitLab authorization code for access token\n * @param code - GitLab authorization code\n * @param redirectUri - Redirect URI used in the authorization request\n * @param instanceUrl - Custom GitLab instance URL (optional)\n */\n const authenticate = async (\n code: string,\n redirectUri: string,\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabAuthCallbackResult>(\n `${GITLAB_API_ROUTE}/auth`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { code, redirectUri, instanceUrl },\n }\n );\n\n /**\n * Get user's GitLab projects\n * @param token - Optional GitLab access token. If not provided, backend will use session.\n * @param instanceUrl - Custom GitLab instance URL (optional)\n */\n const getProjects = async (\n token?: string | null,\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabListProjectsResult>(\n `${GITLAB_API_ROUTE}/projects`,\n authAPIOptions,\n otherOptions,\n {\n params: {\n ...(token && { token }),\n ...(instanceUrl && { instanceUrl }),\n },\n }\n );\n\n /**\n * Check if intlayer.config.ts exists in a GitLab repository\n * @param token - Optional GitLab access token. If not provided, backend will use session.\n * @param projectId - GitLab project ID\n * @param branch - Branch name (default: 'main')\n * @param instanceUrl - Custom GitLab instance URL (optional)\n */\n const checkIntlayerConfig = async (\n token: string | null | undefined,\n projectId: number,\n branch: string = 'main',\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabCheckConfigResult>(\n `${GITLAB_API_ROUTE}/check-config`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: {\n token: token ?? undefined,\n projectId,\n branch,\n ...(instanceUrl && { instanceUrl }),\n },\n }\n );\n\n /**\n * Get intlayer.config.ts file contents from a GitLab repository\n * @param token - Optional GitLab access token. If not provided, backend will use session.\n * @param projectId - GitLab project ID\n * @param branch - Branch name (default: 'main')\n * @param path - File path (default: 'intlayer.config.ts')\n * @param instanceUrl - Custom GitLab instance URL (optional)\n */\n const getConfigFile = async (\n token: string | null | undefined,\n projectId: number,\n branch: string = 'main',\n path: string = 'intlayer.config.ts',\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabGetConfigFileResult>(\n `${GITLAB_API_ROUTE}/get-config-file`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: {\n token: token ?? undefined,\n projectId,\n branch,\n path,\n ...(instanceUrl && { instanceUrl }),\n },\n }\n );\n\n return {\n getAuthUrl,\n authenticate,\n getProjects,\n checkIntlayerConfig,\n getConfigFile,\n };\n};\n"],"mappings":";;;;;;AAqEA,MAAa,gBACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAcA,gCAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,mBAAmB,GAAG,WAAW;;;;;;CAOvC,MAAM,aAAa,OACjB,aACA,aACA,eAA+B,EAAE,KAEjC,MAAMC,wBACJ,GAAG,iBAAiB,YACpB,gBACA,cACA,EACE,QAAQ;EAAE;EAAa,GAAI,eAAe,EAAE,aAAa;EAAG,EAC7D,CACF;;;;;;;CAQH,MAAM,eAAe,OACnB,MACA,aACA,aACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,iBAAiB,QACpB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GAAE;GAAM;GAAa;GAAa;EACzC,CACF;;;;;;CAOH,MAAM,cAAc,OAClB,OACA,aACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,iBAAiB,YACpB,gBACA,cACA,EACE,QAAQ;EACN,GAAI,SAAS,EAAE,OAAO;EACtB,GAAI,eAAe,EAAE,aAAa;EACnC,EACF,CACF;;;;;;;;CASH,MAAM,sBAAsB,OAC1B,OACA,WACA,SAAiB,QACjB,aACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,iBAAiB,gBACpB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GACJ,OAAO,SAAS;GAChB;GACA;GACA,GAAI,eAAe,EAAE,aAAa;GACnC;EACF,CACF;;;;;;;;;CAUH,MAAM,gBAAgB,OACpB,OACA,WACA,SAAiB,QACjB,OAAe,sBACf,aACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,iBAAiB,mBACpB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GACJ,OAAO,SAAS;GAChB;GACA;GACA;GACA,GAAI,eAAe,EAAE,aAAa;GACnC;EACF,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const require_getIntlayerAPI_ai = require('./ai.cjs');
|
|
2
2
|
const require_getIntlayerAPI_audit = require('./audit.cjs');
|
|
3
|
+
const require_getIntlayerAPI_bitbucket = require('./bitbucket.cjs');
|
|
3
4
|
const require_getIntlayerAPI_dictionary = require('./dictionary.cjs');
|
|
4
5
|
const require_getIntlayerAPI_editor = require('./editor.cjs');
|
|
5
6
|
const require_getIntlayerAPI_github = require('./github.cjs');
|
|
7
|
+
const require_getIntlayerAPI_gitlab = require('./gitlab.cjs');
|
|
6
8
|
const require_getIntlayerAPI_newsletter = require('./newsletter.cjs');
|
|
7
9
|
const require_getIntlayerAPI_oAuth = require('./oAuth.cjs');
|
|
8
10
|
const require_getIntlayerAPI_organization = require('./organization.cjs');
|
|
@@ -26,6 +28,8 @@ const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
|
26
28
|
editor: require_getIntlayerAPI_editor.getEditorAPI(authAPIOptions, intlayerConfig),
|
|
27
29
|
newsletter: require_getIntlayerAPI_newsletter.getNewsletterAPI(authAPIOptions, intlayerConfig),
|
|
28
30
|
github: require_getIntlayerAPI_github.getGithubAPI(authAPIOptions, intlayerConfig),
|
|
31
|
+
gitlab: require_getIntlayerAPI_gitlab.getGitlabAPI(authAPIOptions, intlayerConfig),
|
|
32
|
+
bitbucket: require_getIntlayerAPI_bitbucket.getBitbucketAPI(authAPIOptions, intlayerConfig),
|
|
29
33
|
audit: require_getIntlayerAPI_audit.getAuditAPI(authAPIOptions, intlayerConfig)
|
|
30
34
|
});
|
|
31
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["getOrganizationAPI","getProjectAPI","getUserAPI","getOAuthAPI","getDictionaryAPI","getStripeAPI","getAiAPI","getTagAPI","getSearchAPI","getEditorAPI","getNewsletterAPI","getGithubAPI","getAuditAPI"],"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 { getDictionaryAPI } from './dictionary';\nimport { getEditorAPI } from './editor';\nimport { getGithubAPI } from './github';\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 audit: ReturnType<typeof getAuditAPI>;\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 audit: getAuditAPI(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","getTagAPI","getSearchAPI","getEditorAPI","getNewsletterAPI","getGithubAPI","getGitlabAPI","getBitbucketAPI","getAuditAPI"],"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 { 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 audit: ReturnType<typeof getAuditAPI>;\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 audit: getAuditAPI(authAPIOptions, intlayerConfig),\n});\n\nexport type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;\n"],"mappings":";;;;;;;;;;;;;;;;;AAoCA,MAAa,kBACX,iBAAiC,EAAE,EACnC,oBACuB;CACvB,cAAcA,uDAAmB,gBAAgB,eAAe;CAChE,SAASC,6CAAc,gBAAgB,eAAe;CACtD,MAAMC,uCAAW,gBAAgB,eAAe;CAChD,OAAOC,yCAAY,eAAe;CAClC,YAAYC,mDAAiB,gBAAgB,eAAe;CAC5D,QAAQC,2CAAa,gBAAgB,eAAe;CACpD,IAAIC,mCAAS,gBAAgB,eAAe;CAC5C,KAAKC,qCAAU,gBAAgB,eAAe;CAC9C,QAAQC,2CAAa,gBAAgB,eAAe;CACpD,QAAQC,2CAAa,gBAAgB,eAAe;CACpD,YAAYC,mDAAiB,gBAAgB,eAAe;CAC5D,QAAQC,2CAAa,gBAAgB,eAAe;CACpD,QAAQC,2CAAa,gBAAgB,eAAe;CACpD,WAAWC,iDAAgB,gBAAgB,eAAe;CAC1D,OAAOC,yCAAY,gBAAgB,eAAe;CACnD"}
|
|
@@ -92,6 +92,34 @@ const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
92
92
|
method: "PATCH",
|
|
93
93
|
body: { clientId }
|
|
94
94
|
});
|
|
95
|
+
/**
|
|
96
|
+
* Triggers CI builds for a project (Git provider pipelines and webhooks).
|
|
97
|
+
* @param otherOptions - Fetcher options.
|
|
98
|
+
* @returns The trigger results.
|
|
99
|
+
*/
|
|
100
|
+
const triggerBuild = async (otherOptions = {}) => await require_fetcher.fetcher(`${PROJECT_API_ROUTE}/build`, authAPIOptions, otherOptions, { method: "POST" });
|
|
101
|
+
/**
|
|
102
|
+
* Triggers a single webhook by index.
|
|
103
|
+
* @param webhookIndex - The index of the webhook to trigger.
|
|
104
|
+
* @param otherOptions - Fetcher options.
|
|
105
|
+
* @returns The trigger result.
|
|
106
|
+
*/
|
|
107
|
+
const triggerWebhook = async (webhookIndex, otherOptions = {}) => await require_fetcher.fetcher(`${PROJECT_API_ROUTE}/webhook`, authAPIOptions, otherOptions, {
|
|
108
|
+
method: "POST",
|
|
109
|
+
body: { webhookIndex }
|
|
110
|
+
});
|
|
111
|
+
/**
|
|
112
|
+
* Get CI configuration status for the current project.
|
|
113
|
+
* @param otherOptions - Fetcher options.
|
|
114
|
+
* @returns The CI configuration status.
|
|
115
|
+
*/
|
|
116
|
+
const getCIConfig = async (otherOptions = {}) => await require_fetcher.fetcher(`${PROJECT_API_ROUTE}/ci`, authAPIOptions, otherOptions, { method: "GET" });
|
|
117
|
+
/**
|
|
118
|
+
* Push CI configuration file to the repository.
|
|
119
|
+
* @param otherOptions - Fetcher options.
|
|
120
|
+
* @returns Success status.
|
|
121
|
+
*/
|
|
122
|
+
const pushCIConfig = async (otherOptions = {}) => await require_fetcher.fetcher(`${PROJECT_API_ROUTE}/ci`, authAPIOptions, otherOptions, { method: "POST" });
|
|
95
123
|
return {
|
|
96
124
|
getProjects,
|
|
97
125
|
addProject,
|
|
@@ -103,7 +131,11 @@ const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
103
131
|
unselectProject,
|
|
104
132
|
addNewAccessKey,
|
|
105
133
|
deleteAccessKey,
|
|
106
|
-
refreshAccessKey
|
|
134
|
+
refreshAccessKey,
|
|
135
|
+
triggerBuild,
|
|
136
|
+
triggerWebhook,
|
|
137
|
+
getCIConfig,
|
|
138
|
+
pushCIConfig
|
|
107
139
|
};
|
|
108
140
|
};
|
|
109
141
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.cjs","names":["configuration","fetcher"],"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 GetProjectsParams,\n GetProjectsResult,\n PushProjectConfigurationBody,\n PushProjectConfigurationResult,\n RefreshAccessKeyBody,\n RefreshAccessKeyResponse,\n SelectProjectParam,\n SelectProjectResult,\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 return {\n getProjects,\n addProject,\n updateProject,\n updateProjectMembers,\n pushProjectConfiguration,\n deleteProject,\n selectProject,\n unselectProject,\n addNewAccessKey,\n deleteAccessKey,\n refreshAccessKey,\n };\n};\n"],"mappings":";;;;;;AA0BA,MAAa,iBACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAcA,gCAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,oBAAoB,GAAG,WAAW;;;;;CAMxC,MAAM,cAAc,OAClB,SACA,eAA+B,EAAE,KAEjC,MAAMC,wBACJ,mBACA,gBACA,cACA;EACE,OAAO;EAEP,QAAQ;EACT,CACF;;;;;CAMH,MAAM,aAAa,OACjB,SACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,gBAAgB,OACpB,SACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,uBAAuB,OAC3B,MACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,WACrB,gBACA,cACA;EACE,QAAQ;EACR;EACD,CACF;;;;CAKH,MAAM,2BAA2B,OAC/B,sBACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,iBACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,gBAAgB,OAAO,eAA+B,EAAE,KAC5D,MAAMA,wBACJ,GAAG,qBACH,gBACA,cACA,EACE,QAAQ,UACT,CACF;;;;;CAMH,MAAM,gBAAgB,OACpB,WACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,GAAG,OAAO,UAAU,IACzC,gBACA,cACA,EACE,QAAQ,OACT,CACF;;;;;CAMH,MAAM,kBAAkB,OAAO,eAA+B,EAAE,KAC9D,MAAMA,wBACJ,GAAG,kBAAkB,UACrB,gBACA,cACA,EACE,QAAQ,QACT,CACF;;;;;;;CAQH,MAAM,kBAAkB,OACtB,WACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;;;CAQH,MAAM,kBAAkB,OACtB,UACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,UAAU;EACnB,CACF;;;;;;;CAQH,MAAM,mBAAmB,OACvB,UACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,UAAU;EACnB,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
|
|
1
|
+
{"version":3,"file":"project.cjs","names":["configuration","fetcher"],"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":";;;;;;AA+BA,MAAa,iBACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAcA,gCAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,oBAAoB,GAAG,WAAW;;;;;CAMxC,MAAM,cAAc,OAClB,SACA,eAA+B,EAAE,KAEjC,MAAMC,wBACJ,mBACA,gBACA,cACA;EACE,OAAO;EAEP,QAAQ;EACT,CACF;;;;;CAMH,MAAM,aAAa,OACjB,SACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,gBAAgB,OACpB,SACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,uBAAuB,OAC3B,MACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,WACrB,gBACA,cACA;EACE,QAAQ;EACR;EACD,CACF;;;;CAKH,MAAM,2BAA2B,OAC/B,sBACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,iBACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,gBAAgB,OAAO,eAA+B,EAAE,KAC5D,MAAMA,wBACJ,GAAG,qBACH,gBACA,cACA,EACE,QAAQ,UACT,CACF;;;;;CAMH,MAAM,gBAAgB,OACpB,WACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,GAAG,OAAO,UAAU,IACzC,gBACA,cACA,EACE,QAAQ,OACT,CACF;;;;;CAMH,MAAM,kBAAkB,OAAO,eAA+B,EAAE,KAC9D,MAAMA,wBACJ,GAAG,kBAAkB,UACrB,gBACA,cACA,EACE,QAAQ,QACT,CACF;;;;;;;CAQH,MAAM,kBAAkB,OACtB,WACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;;;CAQH,MAAM,kBAAkB,OACtB,UACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,UAAU;EACnB,CACF;;;;;;;CAQH,MAAM,mBAAmB,OACvB,UACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,UAAU;EACnB,CACF;;;;;;CAOH,MAAM,eAAe,OAAO,eAA+B,EAAE,KAC3D,MAAMA,wBACJ,GAAG,kBAAkB,SACrB,gBACA,cACA,EACE,QAAQ,QACT,CACF;;;;;;;CAQH,MAAM,iBAAiB,OACrB,cACA,eAA+B,EAAE,KAEjC,MAAMA,wBACJ,GAAG,kBAAkB,WACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,cAAc;EACvB,CACF;;;;;;CAOH,MAAM,cAAc,OAAO,eAA+B,EAAE,KAC1D,MAAMA,wBACJ,GAAG,kBAAkB,MACrB,gBACA,cACA,EACE,QAAQ,OACT,CACF;;;;;;CAOH,MAAM,eAAe,OAAO,eAA+B,EAAE,KAC3D,MAAMA,wBACJ,GAAG,kBAAkB,MACrB,gBACA,cACA,EACE,QAAQ,QACT,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { fetcher } from "../fetcher.mjs";
|
|
2
|
+
import configuration from "@intlayer/config/built";
|
|
3
|
+
|
|
4
|
+
//#region src/getIntlayerAPI/bitbucket.ts
|
|
5
|
+
const getBitbucketAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
6
|
+
const backendURL = intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;
|
|
7
|
+
if (!backendURL) throw new Error("Backend URL is not defined in the Intlayer configuration.");
|
|
8
|
+
const BITBUCKET_API_ROUTE = `${backendURL}/api/bitbucket`;
|
|
9
|
+
/**
|
|
10
|
+
* Get Bitbucket OAuth authorization URL
|
|
11
|
+
* @param redirectUri - Redirect URI after OAuth authorization
|
|
12
|
+
*/
|
|
13
|
+
const getAuthUrl = async (redirectUri, otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/auth-url`, authAPIOptions, otherOptions, { params: { redirectUri } });
|
|
14
|
+
/**
|
|
15
|
+
* Exchange Bitbucket authorization code for access token
|
|
16
|
+
* @param code - Bitbucket authorization code
|
|
17
|
+
*/
|
|
18
|
+
const authenticate = async (code, otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/auth`, authAPIOptions, otherOptions, {
|
|
19
|
+
method: "POST",
|
|
20
|
+
body: { code }
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Get user's Bitbucket repositories
|
|
24
|
+
* @param token - Optional Bitbucket access token. If not provided, backend will use session.
|
|
25
|
+
*/
|
|
26
|
+
const getRepositories = async (token, otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/repos`, authAPIOptions, otherOptions, { params: token ? { token } : void 0 });
|
|
27
|
+
/**
|
|
28
|
+
* Check if intlayer.config.ts exists in a Bitbucket repository
|
|
29
|
+
* @param token - Optional Bitbucket access token. If not provided, backend will use session.
|
|
30
|
+
* @param workspace - Bitbucket workspace slug
|
|
31
|
+
* @param repoSlug - Repository slug
|
|
32
|
+
* @param branch - Branch name (default: 'main')
|
|
33
|
+
*/
|
|
34
|
+
const checkIntlayerConfig = async (token, workspace, repoSlug, branch = "main", otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/check-config`, authAPIOptions, otherOptions, {
|
|
35
|
+
method: "POST",
|
|
36
|
+
body: {
|
|
37
|
+
token: token ?? void 0,
|
|
38
|
+
workspace,
|
|
39
|
+
repoSlug,
|
|
40
|
+
branch
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Get intlayer.config.ts file contents from a Bitbucket repository
|
|
45
|
+
* @param token - Optional Bitbucket access token. If not provided, backend will use session.
|
|
46
|
+
* @param workspace - Bitbucket workspace slug
|
|
47
|
+
* @param repoSlug - Repository slug
|
|
48
|
+
* @param branch - Branch name (default: 'main')
|
|
49
|
+
* @param path - File path (default: 'intlayer.config.ts')
|
|
50
|
+
*/
|
|
51
|
+
const getConfigFile = async (token, workspace, repoSlug, branch = "main", path = "intlayer.config.ts", otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/get-config-file`, authAPIOptions, otherOptions, {
|
|
52
|
+
method: "POST",
|
|
53
|
+
body: {
|
|
54
|
+
token: token ?? void 0,
|
|
55
|
+
workspace,
|
|
56
|
+
repoSlug,
|
|
57
|
+
branch,
|
|
58
|
+
path
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
getAuthUrl,
|
|
63
|
+
authenticate,
|
|
64
|
+
getRepositories,
|
|
65
|
+
checkIntlayerConfig,
|
|
66
|
+
getConfigFile
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { getBitbucketAPI };
|
|
72
|
+
//# sourceMappingURL=bitbucket.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bitbucket.mjs","names":[],"sources":["../../../src/getIntlayerAPI/bitbucket.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport type BitbucketRepository = {\n uuid: string;\n name: string;\n full_name: string;\n slug: string;\n mainbranch?: {\n name: string;\n type: string;\n };\n links: {\n html: {\n href: string;\n };\n };\n workspace: {\n slug: string;\n name: string;\n uuid: string;\n };\n owner: {\n display_name: string;\n username?: string;\n uuid: string;\n };\n updated_on: string;\n is_private: boolean;\n};\n\nexport type BitbucketAuthCallbackBody = {\n code: string;\n};\n\nexport type BitbucketAuthCallbackResult = {\n data: {\n token: string;\n };\n};\n\nexport type BitbucketListReposResult = {\n data: BitbucketRepository[];\n};\n\nexport type BitbucketCheckConfigBody = {\n token?: string;\n workspace: string;\n repoSlug: string;\n branch?: string;\n};\n\nexport type BitbucketCheckConfigResult = {\n data: {\n hasConfig: boolean;\n configPaths: string[];\n };\n};\n\nexport type BitbucketGetConfigFileBody = {\n token?: string;\n workspace: string;\n repoSlug: string;\n branch?: string;\n path?: string;\n};\n\nexport type BitbucketGetConfigFileResult = {\n data: {\n content: string;\n };\n};\n\nexport type BitbucketGetAuthUrlResult = {\n data: {\n authUrl: string;\n };\n};\n\nexport const getBitbucketAPI = (\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 BITBUCKET_API_ROUTE = `${backendURL}/api/bitbucket`;\n\n /**\n * Get Bitbucket OAuth authorization URL\n * @param redirectUri - Redirect URI after OAuth authorization\n */\n const getAuthUrl = async (\n redirectUri: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketGetAuthUrlResult>(\n `${BITBUCKET_API_ROUTE}/auth-url`,\n authAPIOptions,\n otherOptions,\n {\n params: { redirectUri },\n }\n );\n\n /**\n * Exchange Bitbucket authorization code for access token\n * @param code - Bitbucket authorization code\n */\n const authenticate = async (\n code: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketAuthCallbackResult>(\n `${BITBUCKET_API_ROUTE}/auth`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { code },\n }\n );\n\n /**\n * Get user's Bitbucket repositories\n * @param token - Optional Bitbucket access token. If not provided, backend will use session.\n */\n const getRepositories = async (\n token?: string | null,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketListReposResult>(\n `${BITBUCKET_API_ROUTE}/repos`,\n authAPIOptions,\n otherOptions,\n {\n params: token ? { token } : undefined,\n }\n );\n\n /**\n * Check if intlayer.config.ts exists in a Bitbucket repository\n * @param token - Optional Bitbucket access token. If not provided, backend will use session.\n * @param workspace - Bitbucket workspace slug\n * @param repoSlug - Repository slug\n * @param branch - Branch name (default: 'main')\n */\n const checkIntlayerConfig = async (\n token: string | null | undefined,\n workspace: string,\n repoSlug: string,\n branch: string = 'main',\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketCheckConfigResult>(\n `${BITBUCKET_API_ROUTE}/check-config`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { token: token ?? undefined, workspace, repoSlug, branch },\n }\n );\n\n /**\n * Get intlayer.config.ts file contents from a Bitbucket repository\n * @param token - Optional Bitbucket access token. If not provided, backend will use session.\n * @param workspace - Bitbucket workspace slug\n * @param repoSlug - Repository slug\n * @param branch - Branch name (default: 'main')\n * @param path - File path (default: 'intlayer.config.ts')\n */\n const getConfigFile = async (\n token: string | null | undefined,\n workspace: string,\n repoSlug: string,\n branch: string = 'main',\n path: string = 'intlayer.config.ts',\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<BitbucketGetConfigFileResult>(\n `${BITBUCKET_API_ROUTE}/get-config-file`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: {\n token: token ?? undefined,\n workspace,\n repoSlug,\n branch,\n path,\n },\n }\n );\n\n return {\n getAuthUrl,\n authenticate,\n getRepositories,\n checkIntlayerConfig,\n getConfigFile,\n };\n};\n"],"mappings":";;;;AAgFA,MAAa,mBACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAc,eAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,sBAAsB,GAAG,WAAW;;;;;CAM1C,MAAM,aAAa,OACjB,aACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,oBAAoB,YACvB,gBACA,cACA,EACE,QAAQ,EAAE,aAAa,EACxB,CACF;;;;;CAMH,MAAM,eAAe,OACnB,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,oBAAoB,QACvB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,MAAM;EACf,CACF;;;;;CAMH,MAAM,kBAAkB,OACtB,OACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,oBAAoB,SACvB,gBACA,cACA,EACE,QAAQ,QAAQ,EAAE,OAAO,GAAG,QAC7B,CACF;;;;;;;;CASH,MAAM,sBAAsB,OAC1B,OACA,WACA,UACA,SAAiB,QACjB,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,oBAAoB,gBACvB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GAAE,OAAO,SAAS;GAAW;GAAW;GAAU;GAAQ;EACjE,CACF;;;;;;;;;CAUH,MAAM,gBAAgB,OACpB,OACA,WACA,UACA,SAAiB,QACjB,OAAe,sBACf,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,oBAAoB,mBACvB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GACJ,OAAO,SAAS;GAChB;GACA;GACA;GACA;GACD;EACF,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { fetcher } from "../fetcher.mjs";
|
|
2
|
+
import configuration from "@intlayer/config/built";
|
|
3
|
+
|
|
4
|
+
//#region src/getIntlayerAPI/gitlab.ts
|
|
5
|
+
const getGitlabAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
6
|
+
const backendURL = intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;
|
|
7
|
+
if (!backendURL) throw new Error("Backend URL is not defined in the Intlayer configuration.");
|
|
8
|
+
const GITLAB_API_ROUTE = `${backendURL}/api/gitlab`;
|
|
9
|
+
/**
|
|
10
|
+
* Get GitLab OAuth authorization URL
|
|
11
|
+
* @param redirectUri - Redirect URI after OAuth authorization
|
|
12
|
+
* @param instanceUrl - Custom GitLab instance URL (optional, for self-hosted)
|
|
13
|
+
*/
|
|
14
|
+
const getAuthUrl = async (redirectUri, instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/auth-url`, authAPIOptions, otherOptions, { params: {
|
|
15
|
+
redirectUri,
|
|
16
|
+
...instanceUrl && { instanceUrl }
|
|
17
|
+
} });
|
|
18
|
+
/**
|
|
19
|
+
* Exchange GitLab authorization code for access token
|
|
20
|
+
* @param code - GitLab authorization code
|
|
21
|
+
* @param redirectUri - Redirect URI used in the authorization request
|
|
22
|
+
* @param instanceUrl - Custom GitLab instance URL (optional)
|
|
23
|
+
*/
|
|
24
|
+
const authenticate = async (code, redirectUri, instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/auth`, authAPIOptions, otherOptions, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
body: {
|
|
27
|
+
code,
|
|
28
|
+
redirectUri,
|
|
29
|
+
instanceUrl
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Get user's GitLab projects
|
|
34
|
+
* @param token - Optional GitLab access token. If not provided, backend will use session.
|
|
35
|
+
* @param instanceUrl - Custom GitLab instance URL (optional)
|
|
36
|
+
*/
|
|
37
|
+
const getProjects = async (token, instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/projects`, authAPIOptions, otherOptions, { params: {
|
|
38
|
+
...token && { token },
|
|
39
|
+
...instanceUrl && { instanceUrl }
|
|
40
|
+
} });
|
|
41
|
+
/**
|
|
42
|
+
* Check if intlayer.config.ts exists in a GitLab repository
|
|
43
|
+
* @param token - Optional GitLab access token. If not provided, backend will use session.
|
|
44
|
+
* @param projectId - GitLab project ID
|
|
45
|
+
* @param branch - Branch name (default: 'main')
|
|
46
|
+
* @param instanceUrl - Custom GitLab instance URL (optional)
|
|
47
|
+
*/
|
|
48
|
+
const checkIntlayerConfig = async (token, projectId, branch = "main", instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/check-config`, authAPIOptions, otherOptions, {
|
|
49
|
+
method: "POST",
|
|
50
|
+
body: {
|
|
51
|
+
token: token ?? void 0,
|
|
52
|
+
projectId,
|
|
53
|
+
branch,
|
|
54
|
+
...instanceUrl && { instanceUrl }
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Get intlayer.config.ts file contents from a GitLab repository
|
|
59
|
+
* @param token - Optional GitLab access token. If not provided, backend will use session.
|
|
60
|
+
* @param projectId - GitLab project ID
|
|
61
|
+
* @param branch - Branch name (default: 'main')
|
|
62
|
+
* @param path - File path (default: 'intlayer.config.ts')
|
|
63
|
+
* @param instanceUrl - Custom GitLab instance URL (optional)
|
|
64
|
+
*/
|
|
65
|
+
const getConfigFile = async (token, projectId, branch = "main", path = "intlayer.config.ts", instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/get-config-file`, authAPIOptions, otherOptions, {
|
|
66
|
+
method: "POST",
|
|
67
|
+
body: {
|
|
68
|
+
token: token ?? void 0,
|
|
69
|
+
projectId,
|
|
70
|
+
branch,
|
|
71
|
+
path,
|
|
72
|
+
...instanceUrl && { instanceUrl }
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
getAuthUrl,
|
|
77
|
+
authenticate,
|
|
78
|
+
getProjects,
|
|
79
|
+
checkIntlayerConfig,
|
|
80
|
+
getConfigFile
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
export { getGitlabAPI };
|
|
86
|
+
//# sourceMappingURL=gitlab.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab.mjs","names":[],"sources":["../../../src/getIntlayerAPI/gitlab.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\nexport type GitLabProject = {\n id: number;\n name: string;\n path_with_namespace: string;\n web_url: string;\n default_branch: string;\n visibility: string;\n last_activity_at: string;\n namespace: {\n id: number;\n name: string;\n path: string;\n };\n};\n\nexport type GitLabAuthCallbackBody = {\n code: string;\n redirectUri: string;\n instanceUrl?: string;\n};\n\nexport type GitLabAuthCallbackResult = {\n data: {\n token: string;\n };\n};\n\nexport type GitLabListProjectsResult = {\n data: GitLabProject[];\n};\n\nexport type GitLabCheckConfigBody = {\n token?: string;\n projectId: number;\n branch?: string;\n instanceUrl?: string;\n};\n\nexport type GitLabCheckConfigResult = {\n data: {\n hasConfig: boolean;\n configPaths: string[];\n };\n};\n\nexport type GitLabGetConfigFileBody = {\n token?: string;\n projectId: number;\n branch?: string;\n path?: string;\n instanceUrl?: string;\n};\n\nexport type GitLabGetConfigFileResult = {\n data: {\n content: string;\n };\n};\n\nexport type GitLabGetAuthUrlResult = {\n data: {\n authUrl: string;\n };\n};\n\nexport const getGitlabAPI = (\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 GITLAB_API_ROUTE = `${backendURL}/api/gitlab`;\n\n /**\n * Get GitLab OAuth authorization URL\n * @param redirectUri - Redirect URI after OAuth authorization\n * @param instanceUrl - Custom GitLab instance URL (optional, for self-hosted)\n */\n const getAuthUrl = async (\n redirectUri: string,\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabGetAuthUrlResult>(\n `${GITLAB_API_ROUTE}/auth-url`,\n authAPIOptions,\n otherOptions,\n {\n params: { redirectUri, ...(instanceUrl && { instanceUrl }) },\n }\n );\n\n /**\n * Exchange GitLab authorization code for access token\n * @param code - GitLab authorization code\n * @param redirectUri - Redirect URI used in the authorization request\n * @param instanceUrl - Custom GitLab instance URL (optional)\n */\n const authenticate = async (\n code: string,\n redirectUri: string,\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabAuthCallbackResult>(\n `${GITLAB_API_ROUTE}/auth`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { code, redirectUri, instanceUrl },\n }\n );\n\n /**\n * Get user's GitLab projects\n * @param token - Optional GitLab access token. If not provided, backend will use session.\n * @param instanceUrl - Custom GitLab instance URL (optional)\n */\n const getProjects = async (\n token?: string | null,\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabListProjectsResult>(\n `${GITLAB_API_ROUTE}/projects`,\n authAPIOptions,\n otherOptions,\n {\n params: {\n ...(token && { token }),\n ...(instanceUrl && { instanceUrl }),\n },\n }\n );\n\n /**\n * Check if intlayer.config.ts exists in a GitLab repository\n * @param token - Optional GitLab access token. If not provided, backend will use session.\n * @param projectId - GitLab project ID\n * @param branch - Branch name (default: 'main')\n * @param instanceUrl - Custom GitLab instance URL (optional)\n */\n const checkIntlayerConfig = async (\n token: string | null | undefined,\n projectId: number,\n branch: string = 'main',\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabCheckConfigResult>(\n `${GITLAB_API_ROUTE}/check-config`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: {\n token: token ?? undefined,\n projectId,\n branch,\n ...(instanceUrl && { instanceUrl }),\n },\n }\n );\n\n /**\n * Get intlayer.config.ts file contents from a GitLab repository\n * @param token - Optional GitLab access token. If not provided, backend will use session.\n * @param projectId - GitLab project ID\n * @param branch - Branch name (default: 'main')\n * @param path - File path (default: 'intlayer.config.ts')\n * @param instanceUrl - Custom GitLab instance URL (optional)\n */\n const getConfigFile = async (\n token: string | null | undefined,\n projectId: number,\n branch: string = 'main',\n path: string = 'intlayer.config.ts',\n instanceUrl?: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GitLabGetConfigFileResult>(\n `${GITLAB_API_ROUTE}/get-config-file`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: {\n token: token ?? undefined,\n projectId,\n branch,\n path,\n ...(instanceUrl && { instanceUrl }),\n },\n }\n );\n\n return {\n getAuthUrl,\n authenticate,\n getProjects,\n checkIntlayerConfig,\n getConfigFile,\n };\n};\n"],"mappings":";;;;AAqEA,MAAa,gBACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAc,eAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,mBAAmB,GAAG,WAAW;;;;;;CAOvC,MAAM,aAAa,OACjB,aACA,aACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,iBAAiB,YACpB,gBACA,cACA,EACE,QAAQ;EAAE;EAAa,GAAI,eAAe,EAAE,aAAa;EAAG,EAC7D,CACF;;;;;;;CAQH,MAAM,eAAe,OACnB,MACA,aACA,aACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,iBAAiB,QACpB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GAAE;GAAM;GAAa;GAAa;EACzC,CACF;;;;;;CAOH,MAAM,cAAc,OAClB,OACA,aACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,iBAAiB,YACpB,gBACA,cACA,EACE,QAAQ;EACN,GAAI,SAAS,EAAE,OAAO;EACtB,GAAI,eAAe,EAAE,aAAa;EACnC,EACF,CACF;;;;;;;;CASH,MAAM,sBAAsB,OAC1B,OACA,WACA,SAAiB,QACjB,aACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,iBAAiB,gBACpB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GACJ,OAAO,SAAS;GAChB;GACA;GACA,GAAI,eAAe,EAAE,aAAa;GACnC;EACF,CACF;;;;;;;;;CAUH,MAAM,gBAAgB,OACpB,OACA,WACA,SAAiB,QACjB,OAAe,sBACf,aACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,iBAAiB,mBACpB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;GACJ,OAAO,SAAS;GAChB;GACA;GACA;GACA,GAAI,eAAe,EAAE,aAAa;GACnC;EACF,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { getAiAPI } from "./ai.mjs";
|
|
2
2
|
import { getAuditAPI } from "./audit.mjs";
|
|
3
|
+
import { getBitbucketAPI } from "./bitbucket.mjs";
|
|
3
4
|
import { getDictionaryAPI } from "./dictionary.mjs";
|
|
4
5
|
import { getEditorAPI } from "./editor.mjs";
|
|
5
6
|
import { getGithubAPI } from "./github.mjs";
|
|
7
|
+
import { getGitlabAPI } from "./gitlab.mjs";
|
|
6
8
|
import { getNewsletterAPI } from "./newsletter.mjs";
|
|
7
9
|
import { getOAuthAPI } from "./oAuth.mjs";
|
|
8
10
|
import { getOrganizationAPI } from "./organization.mjs";
|
|
@@ -26,6 +28,8 @@ const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
|
|
|
26
28
|
editor: getEditorAPI(authAPIOptions, intlayerConfig),
|
|
27
29
|
newsletter: getNewsletterAPI(authAPIOptions, intlayerConfig),
|
|
28
30
|
github: getGithubAPI(authAPIOptions, intlayerConfig),
|
|
31
|
+
gitlab: getGitlabAPI(authAPIOptions, intlayerConfig),
|
|
32
|
+
bitbucket: getBitbucketAPI(authAPIOptions, intlayerConfig),
|
|
29
33
|
audit: getAuditAPI(authAPIOptions, intlayerConfig)
|
|
30
34
|
});
|
|
31
35
|
|
|
@@ -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 { getAuditAPI } from './audit';\nimport { getDictionaryAPI } from './dictionary';\nimport { getEditorAPI } from './editor';\nimport { getGithubAPI } from './github';\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 audit: ReturnType<typeof getAuditAPI>;\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 audit: getAuditAPI(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 { 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 audit: ReturnType<typeof getAuditAPI>;\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 audit: getAuditAPI(authAPIOptions, intlayerConfig),\n});\n\nexport type IntlayerAPI = ReturnType<typeof getIntlayerAPI>;\n"],"mappings":";;;;;;;;;;;;;;;;;AAoCA,MAAa,kBACX,iBAAiC,EAAE,EACnC,oBACuB;CACvB,cAAc,mBAAmB,gBAAgB,eAAe;CAChE,SAAS,cAAc,gBAAgB,eAAe;CACtD,MAAM,WAAW,gBAAgB,eAAe;CAChD,OAAO,YAAY,eAAe;CAClC,YAAY,iBAAiB,gBAAgB,eAAe;CAC5D,QAAQ,aAAa,gBAAgB,eAAe;CACpD,IAAI,SAAS,gBAAgB,eAAe;CAC5C,KAAK,UAAU,gBAAgB,eAAe;CAC9C,QAAQ,aAAa,gBAAgB,eAAe;CACpD,QAAQ,aAAa,gBAAgB,eAAe;CACpD,YAAY,iBAAiB,gBAAgB,eAAe;CAC5D,QAAQ,aAAa,gBAAgB,eAAe;CACpD,QAAQ,aAAa,gBAAgB,eAAe;CACpD,WAAW,gBAAgB,gBAAgB,eAAe;CAC1D,OAAO,YAAY,gBAAgB,eAAe;CACnD"}
|
|
@@ -90,6 +90,34 @@ const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
90
90
|
method: "PATCH",
|
|
91
91
|
body: { clientId }
|
|
92
92
|
});
|
|
93
|
+
/**
|
|
94
|
+
* Triggers CI builds for a project (Git provider pipelines and webhooks).
|
|
95
|
+
* @param otherOptions - Fetcher options.
|
|
96
|
+
* @returns The trigger results.
|
|
97
|
+
*/
|
|
98
|
+
const triggerBuild = async (otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/build`, authAPIOptions, otherOptions, { method: "POST" });
|
|
99
|
+
/**
|
|
100
|
+
* Triggers a single webhook by index.
|
|
101
|
+
* @param webhookIndex - The index of the webhook to trigger.
|
|
102
|
+
* @param otherOptions - Fetcher options.
|
|
103
|
+
* @returns The trigger result.
|
|
104
|
+
*/
|
|
105
|
+
const triggerWebhook = async (webhookIndex, otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/webhook`, authAPIOptions, otherOptions, {
|
|
106
|
+
method: "POST",
|
|
107
|
+
body: { webhookIndex }
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* Get CI configuration status for the current project.
|
|
111
|
+
* @param otherOptions - Fetcher options.
|
|
112
|
+
* @returns The CI configuration status.
|
|
113
|
+
*/
|
|
114
|
+
const getCIConfig = async (otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/ci`, authAPIOptions, otherOptions, { method: "GET" });
|
|
115
|
+
/**
|
|
116
|
+
* Push CI configuration file to the repository.
|
|
117
|
+
* @param otherOptions - Fetcher options.
|
|
118
|
+
* @returns Success status.
|
|
119
|
+
*/
|
|
120
|
+
const pushCIConfig = async (otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/ci`, authAPIOptions, otherOptions, { method: "POST" });
|
|
93
121
|
return {
|
|
94
122
|
getProjects,
|
|
95
123
|
addProject,
|
|
@@ -101,7 +129,11 @@ const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
101
129
|
unselectProject,
|
|
102
130
|
addNewAccessKey,
|
|
103
131
|
deleteAccessKey,
|
|
104
|
-
refreshAccessKey
|
|
132
|
+
refreshAccessKey,
|
|
133
|
+
triggerBuild,
|
|
134
|
+
triggerWebhook,
|
|
135
|
+
getCIConfig,
|
|
136
|
+
pushCIConfig
|
|
105
137
|
};
|
|
106
138
|
};
|
|
107
139
|
|
|
@@ -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 GetProjectsParams,\n GetProjectsResult,\n PushProjectConfigurationBody,\n PushProjectConfigurationResult,\n RefreshAccessKeyBody,\n RefreshAccessKeyResponse,\n SelectProjectParam,\n SelectProjectResult,\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 return {\n getProjects,\n addProject,\n updateProject,\n updateProjectMembers,\n pushProjectConfiguration,\n deleteProject,\n selectProject,\n unselectProject,\n addNewAccessKey,\n deleteAccessKey,\n refreshAccessKey,\n };\n};\n"],"mappings":";;;;AA0BA,MAAa,iBACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAc,eAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,oBAAoB,GAAG,WAAW;;;;;CAMxC,MAAM,cAAc,OAClB,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,mBACA,gBACA,cACA;EACE,OAAO;EAEP,QAAQ;EACT,CACF;;;;;CAMH,MAAM,aAAa,OACjB,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,gBAAgB,OACpB,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,uBAAuB,OAC3B,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,WACrB,gBACA,cACA;EACE,QAAQ;EACR;EACD,CACF;;;;CAKH,MAAM,2BAA2B,OAC/B,sBACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,iBACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,gBAAgB,OAAO,eAA+B,EAAE,KAC5D,MAAM,QACJ,GAAG,qBACH,gBACA,cACA,EACE,QAAQ,UACT,CACF;;;;;CAMH,MAAM,gBAAgB,OACpB,WACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,GAAG,OAAO,UAAU,IACzC,gBACA,cACA,EACE,QAAQ,OACT,CACF;;;;;CAMH,MAAM,kBAAkB,OAAO,eAA+B,EAAE,KAC9D,MAAM,QACJ,GAAG,kBAAkB,UACrB,gBACA,cACA,EACE,QAAQ,QACT,CACF;;;;;;;CAQH,MAAM,kBAAkB,OACtB,WACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;;;CAQH,MAAM,kBAAkB,OACtB,UACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,UAAU;EACnB,CACF;;;;;;;CAQH,MAAM,mBAAmB,OACvB,UACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,UAAU;EACnB,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
|
|
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":";;;;AA+BA,MAAa,iBACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAc,eAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,oBAAoB,GAAG,WAAW;;;;;CAMxC,MAAM,cAAc,OAClB,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,mBACA,gBACA,cACA;EACE,OAAO;EAEP,QAAQ;EACT,CACF;;;;;CAMH,MAAM,aAAa,OACjB,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,gBAAgB,OACpB,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,uBAAuB,OAC3B,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,WACrB,gBACA,cACA;EACE,QAAQ;EACR;EACD,CACF;;;;CAKH,MAAM,2BAA2B,OAC/B,sBACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,iBACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,gBAAgB,OAAO,eAA+B,EAAE,KAC5D,MAAM,QACJ,GAAG,qBACH,gBACA,cACA,EACE,QAAQ,UACT,CACF;;;;;CAMH,MAAM,gBAAgB,OACpB,WACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,GAAG,OAAO,UAAU,IACzC,gBACA,cACA,EACE,QAAQ,OACT,CACF;;;;;CAMH,MAAM,kBAAkB,OAAO,eAA+B,EAAE,KAC9D,MAAM,QACJ,GAAG,kBAAkB,UACrB,gBACA,cACA,EACE,QAAQ,QACT,CACF;;;;;;;CAQH,MAAM,kBAAkB,OACtB,WACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;;;CAQH,MAAM,kBAAkB,OACtB,UACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,UAAU;EACnB,CACF;;;;;;;CAQH,MAAM,mBAAmB,OACvB,UACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,cACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,UAAU;EACnB,CACF;;;;;;CAOH,MAAM,eAAe,OAAO,eAA+B,EAAE,KAC3D,MAAM,QACJ,GAAG,kBAAkB,SACrB,gBACA,cACA,EACE,QAAQ,QACT,CACF;;;;;;;CAQH,MAAM,iBAAiB,OACrB,cACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,WACrB,gBACA,cACA;EACE,QAAQ;EACR,MAAM,EAAE,cAAc;EACvB,CACF;;;;;;CAOH,MAAM,cAAc,OAAO,eAA+B,EAAE,KAC1D,MAAM,QACJ,GAAG,kBAAkB,MACrB,gBACA,cACA,EACE,QAAQ,OACT,CACF;;;;;;CAOH,MAAM,eAAe,OAAO,eAA+B,EAAE,KAC3D,MAAM,QACJ,GAAG,kBAAkB,MACrB,gBACA,cACA,EACE,QAAQ,QACT,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
3
|
+
|
|
4
|
+
//#region src/getIntlayerAPI/bitbucket.d.ts
|
|
5
|
+
type BitbucketRepository = {
|
|
6
|
+
uuid: string;
|
|
7
|
+
name: string;
|
|
8
|
+
full_name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
mainbranch?: {
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
links: {
|
|
15
|
+
html: {
|
|
16
|
+
href: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
workspace: {
|
|
20
|
+
slug: string;
|
|
21
|
+
name: string;
|
|
22
|
+
uuid: string;
|
|
23
|
+
};
|
|
24
|
+
owner: {
|
|
25
|
+
display_name: string;
|
|
26
|
+
username?: string;
|
|
27
|
+
uuid: string;
|
|
28
|
+
};
|
|
29
|
+
updated_on: string;
|
|
30
|
+
is_private: boolean;
|
|
31
|
+
};
|
|
32
|
+
type BitbucketAuthCallbackBody = {
|
|
33
|
+
code: string;
|
|
34
|
+
};
|
|
35
|
+
type BitbucketAuthCallbackResult = {
|
|
36
|
+
data: {
|
|
37
|
+
token: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
type BitbucketListReposResult = {
|
|
41
|
+
data: BitbucketRepository[];
|
|
42
|
+
};
|
|
43
|
+
type BitbucketCheckConfigBody = {
|
|
44
|
+
token?: string;
|
|
45
|
+
workspace: string;
|
|
46
|
+
repoSlug: string;
|
|
47
|
+
branch?: string;
|
|
48
|
+
};
|
|
49
|
+
type BitbucketCheckConfigResult = {
|
|
50
|
+
data: {
|
|
51
|
+
hasConfig: boolean;
|
|
52
|
+
configPaths: string[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
type BitbucketGetConfigFileBody = {
|
|
56
|
+
token?: string;
|
|
57
|
+
workspace: string;
|
|
58
|
+
repoSlug: string;
|
|
59
|
+
branch?: string;
|
|
60
|
+
path?: string;
|
|
61
|
+
};
|
|
62
|
+
type BitbucketGetConfigFileResult = {
|
|
63
|
+
data: {
|
|
64
|
+
content: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
type BitbucketGetAuthUrlResult = {
|
|
68
|
+
data: {
|
|
69
|
+
authUrl: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
declare const getBitbucketAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
73
|
+
getAuthUrl: (redirectUri: string, otherOptions?: FetcherOptions) => Promise<BitbucketGetAuthUrlResult>;
|
|
74
|
+
authenticate: (code: string, otherOptions?: FetcherOptions) => Promise<BitbucketAuthCallbackResult>;
|
|
75
|
+
getRepositories: (token?: string | null, otherOptions?: FetcherOptions) => Promise<BitbucketListReposResult>;
|
|
76
|
+
checkIntlayerConfig: (token: string | null | undefined, workspace: string, repoSlug: string, branch?: string, otherOptions?: FetcherOptions) => Promise<BitbucketCheckConfigResult>;
|
|
77
|
+
getConfigFile: (token: string | null | undefined, workspace: string, repoSlug: string, branch?: string, path?: string, otherOptions?: FetcherOptions) => Promise<BitbucketGetConfigFileResult>;
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
export { BitbucketAuthCallbackBody, BitbucketAuthCallbackResult, BitbucketCheckConfigBody, BitbucketCheckConfigResult, BitbucketGetAuthUrlResult, BitbucketGetConfigFileBody, BitbucketGetConfigFileResult, BitbucketListReposResult, BitbucketRepository, getBitbucketAPI };
|
|
81
|
+
//# sourceMappingURL=bitbucket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bitbucket.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/bitbucket.ts"],"sourcesContent":[],"mappings":";;;;KAIY,mBAAA;;EAAA,IAAA,EAAA,MAAA;EA4BA,SAAA,EAAA,MAAA;EAIA,IAAA,EAAA,MAAA;EAMA,UAAA,CAAA,EAAA;IAIA,IAAA,EAAA,MAAA;IAOA,IAAA,EAAA,MAAA;EAOA,CAAA;EAQA,KAAA,EAAA;IAMA,IAAA,EAAA;MAMC,IAAA,EAAA,MAkIZ;IAjIiB,CAAA;EACC,CAAA;EAmBD,SAAA,EAAA;IAAc,IAAA,EAAA,MAAA;IAAA,IAAA,EAAA,MAAA;IAiBd,IAAA,EAAA,MAAA;EAAc,CAAA;EAAA,KAAA,EAAA;IAkBd,YAAA,EAAA,MAAA;IAAc,QAAA,CAAA,EAAA,MAAA;IAAA,IAAA,EAAA,MAAA;EAuBd,CAAA;EAAc,UAAA,EAAA,MAAA;EAAA,UAAA,EAAA,OAAA;CA0Bd;AAAc,KAzJpB,yBAAA,GAyJoB;EAAA,IAAA,EAAA,MAAA;CAAA;KArJpB,2BAAA;;;;;KAMA,wBAAA;QACJ;;KAGI,wBAAA;;;;;;KAOA,0BAAA;;;;;;KAOA,0BAAA;;;;;;;KAQA,4BAAA;;;;;KAMA,yBAAA;;;;;cAMC,mCACK,iCACC;mDAmBD,mBAAc,QAAA;8CAiBd,mBAAc,QAAA;0DAkBd,mBAAc,QAAA;+HAuBd,mBAAc,QAAA;wIA0Bd,mBAAc,QAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { FetcherOptions } from "../fetcher.js";
|
|
2
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
3
|
+
|
|
4
|
+
//#region src/getIntlayerAPI/gitlab.d.ts
|
|
5
|
+
type GitLabProject = {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
path_with_namespace: string;
|
|
9
|
+
web_url: string;
|
|
10
|
+
default_branch: string;
|
|
11
|
+
visibility: string;
|
|
12
|
+
last_activity_at: string;
|
|
13
|
+
namespace: {
|
|
14
|
+
id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
path: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type GitLabAuthCallbackBody = {
|
|
20
|
+
code: string;
|
|
21
|
+
redirectUri: string;
|
|
22
|
+
instanceUrl?: string;
|
|
23
|
+
};
|
|
24
|
+
type GitLabAuthCallbackResult = {
|
|
25
|
+
data: {
|
|
26
|
+
token: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type GitLabListProjectsResult = {
|
|
30
|
+
data: GitLabProject[];
|
|
31
|
+
};
|
|
32
|
+
type GitLabCheckConfigBody = {
|
|
33
|
+
token?: string;
|
|
34
|
+
projectId: number;
|
|
35
|
+
branch?: string;
|
|
36
|
+
instanceUrl?: string;
|
|
37
|
+
};
|
|
38
|
+
type GitLabCheckConfigResult = {
|
|
39
|
+
data: {
|
|
40
|
+
hasConfig: boolean;
|
|
41
|
+
configPaths: string[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type GitLabGetConfigFileBody = {
|
|
45
|
+
token?: string;
|
|
46
|
+
projectId: number;
|
|
47
|
+
branch?: string;
|
|
48
|
+
path?: string;
|
|
49
|
+
instanceUrl?: string;
|
|
50
|
+
};
|
|
51
|
+
type GitLabGetConfigFileResult = {
|
|
52
|
+
data: {
|
|
53
|
+
content: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
type GitLabGetAuthUrlResult = {
|
|
57
|
+
data: {
|
|
58
|
+
authUrl: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
declare const getGitlabAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
|
|
62
|
+
getAuthUrl: (redirectUri: string, instanceUrl?: string, otherOptions?: FetcherOptions) => Promise<GitLabGetAuthUrlResult>;
|
|
63
|
+
authenticate: (code: string, redirectUri: string, instanceUrl?: string, otherOptions?: FetcherOptions) => Promise<GitLabAuthCallbackResult>;
|
|
64
|
+
getProjects: (token?: string | null, instanceUrl?: string, otherOptions?: FetcherOptions) => Promise<GitLabListProjectsResult>;
|
|
65
|
+
checkIntlayerConfig: (token: string | null | undefined, projectId: number, branch?: string, instanceUrl?: string, otherOptions?: FetcherOptions) => Promise<GitLabCheckConfigResult>;
|
|
66
|
+
getConfigFile: (token: string | null | undefined, projectId: number, branch?: string, path?: string, instanceUrl?: string, otherOptions?: FetcherOptions) => Promise<GitLabGetConfigFileResult>;
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { GitLabAuthCallbackBody, GitLabAuthCallbackResult, GitLabCheckConfigBody, GitLabCheckConfigResult, GitLabGetAuthUrlResult, GitLabGetConfigFileBody, GitLabGetConfigFileResult, GitLabListProjectsResult, GitLabProject, getGitlabAPI };
|
|
70
|
+
//# sourceMappingURL=gitlab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/gitlab.ts"],"sourcesContent":[],"mappings":";;;;KAIY,aAAA;;EAAA,IAAA,EAAA,MAAA;EAeA,mBAAA,EAAA,MAAsB;EAMtB,OAAA,EAAA,MAAA;EAMA,cAAA,EAAA,MAAA;EAIA,UAAA,EAAA,MAAA;EAOA,gBAAA,EAAA,MAAA;EAOA,SAAA,EAAA;IAQA,EAAA,EAAA,MAAA;IAMA,IAAA,EAAA,MAAA;IAMC,IAAA,EAAA,MAkJZ;EAjJiB,CAAA;CACC;AAqBD,KAzEN,sBAAA,GAyEM;EAAc,IAAA,EAAA,MAAA;EAAA,WAAA,EAAA,MAAA;EAqBd,WAAA,CAAA,EAAA,MAAA;CAAc;AAAA,KAxFpB,wBAAA,GAwFoB;EAoBd,IAAA,EAAA;IAAc,KAAA,EAAA,MAAA;EAAA,CAAA;CA0Bd;AAAc,KAhIpB,wBAAA,GAgIoB;EAAA,IAAA,EA/HxB,aA+HwB,EAAA;CA+Bd;AAAc,KA3JpB,qBAAA,GA2JoB;EAAA,KAAA,CAAA,EAAA,MAAA;EAAA,SAAA,EAAA,MAAA;;;;KApJpB,uBAAA;;;;;;KAOA,uBAAA;;;;;;;KAQA,yBAAA;;;;;KAMA,sBAAA;;;;;cAMC,gCACK,iCACC;yEAqBD,mBAAc,QAAA;yFAqBd,mBAAc,QAAA;4EAoBd,mBAAc,QAAA;mIA0Bd,mBAAc,QAAA;4IA+Bd,mBAAc,QAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { FetcherOptions } from "../fetcher.js";
|
|
2
2
|
import { getAiAPI } from "./ai.js";
|
|
3
3
|
import { getAuditAPI } from "./audit.js";
|
|
4
|
+
import { getBitbucketAPI } from "./bitbucket.js";
|
|
4
5
|
import { getDictionaryAPI } from "./dictionary.js";
|
|
5
6
|
import { getEditorAPI } from "./editor.js";
|
|
6
7
|
import { getGithubAPI } from "./github.js";
|
|
8
|
+
import { getGitlabAPI } from "./gitlab.js";
|
|
7
9
|
import { getNewsletterAPI } from "./newsletter.js";
|
|
8
10
|
import { getOAuthAPI } from "./oAuth.js";
|
|
9
11
|
import { getOrganizationAPI } from "./organization.js";
|
|
@@ -28,6 +30,8 @@ interface IntlayerAPIReturn {
|
|
|
28
30
|
editor: ReturnType<typeof getEditorAPI>;
|
|
29
31
|
newsletter: ReturnType<typeof getNewsletterAPI>;
|
|
30
32
|
github: ReturnType<typeof getGithubAPI>;
|
|
33
|
+
gitlab: ReturnType<typeof getGitlabAPI>;
|
|
34
|
+
bitbucket: ReturnType<typeof getBitbucketAPI>;
|
|
31
35
|
audit: ReturnType<typeof getAuditAPI>;
|
|
32
36
|
}
|
|
33
37
|
declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => IntlayerAPIReturn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;UAkBU,iBAAA;gBACM,kBAAkB;EADxB,OAAA,EAEC,UAFD,CAAiB,OAEE,aAFF,CAAA;EACO,IAAA,EAE1B,UAF0B,CAAA,OAER,UAFQ,CAAA;EAAlB,KAAA,EAGP,UAHO,CAAA,OAGW,WAHX,CAAA;EACa,UAAA,EAGf,UAHe,CAAA,OAGG,gBAHH,CAAA;EAAlB,MAAA,EAID,UAJC,CAAA,OAIiB,YAJjB,CAAA;EACe,EAAA,EAIpB,UAJoB,CAAA,OAIF,QAJE,CAAA;EAAlB,GAAA,EAKD,UALC,CAAA,OAKiB,SALjB,CAAA;EACmB,MAAA,EAKjB,UALiB,CAAA,OAKC,YALD,CAAA;EAAlB,MAAA,EAMC,UAND,CAAA,OAMmB,YANnB,CAAA;EACuB,UAAA,EAMlB,UANkB,CAAA,OAMA,gBANA,CAAA;EAAlB,MAAA,EAOJ,UAPI,CAAA,OAOc,YAPd,CAAA;EACc,MAAA,EAOlB,UAPkB,CAAA,OAOA,YAPA,CAAA;EAAlB,SAAA,EAQG,UARH,CAAA,OAQqB,eARrB,CAAA;EACc,KAAA,EAQf,UARe,CAAA,OAQG,WARH,CAAA;;AACC,cAUZ,cAVY,EAAA,CAAA,cAAA,CAAA,EAWP,cAXO,EAAA,cAAA,CAAA,EAYN,cAZM,EAAA,GAatB,iBAbsB;AAAlB,KA+BK,WAAA,GAAc,UA/BnB,CAAA,OA+BqC,cA/BrC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddNewAccessKeyBody, AddProjectBody, DeleteAccessKeyBody, GetProjectsParams, PushProjectConfigurationBody, RefreshAccessKeyBody, SelectProjectParam, UpdateProjectBody, UpdateProjectMembersBody } from "../types.js";
|
|
1
|
+
import { AddNewAccessKeyBody, AddProjectBody, DeleteAccessKeyBody, GetProjectsParams, PushProjectConfigurationBody, RefreshAccessKeyBody, SelectProjectParam, TriggerWebhookBody, UpdateProjectBody, UpdateProjectMembersBody } from "../types.js";
|
|
2
2
|
import { FetcherOptions } from "../fetcher.js";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types";
|
|
4
4
|
|
|
@@ -15,6 +15,10 @@ declare const getProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?:
|
|
|
15
15
|
addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
|
|
16
16
|
deleteAccessKey: (clientId: DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
|
|
17
17
|
refreshAccessKey: (clientId: RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
|
|
18
|
+
triggerBuild: (otherOptions?: FetcherOptions) => Promise<TriggerBuildResult>;
|
|
19
|
+
triggerWebhook: (webhookIndex: TriggerWebhookBody["webhookIndex"], otherOptions?: FetcherOptions) => Promise<TriggerWebhookResult>;
|
|
20
|
+
getCIConfig: (otherOptions?: FetcherOptions) => Promise<GetCIConfigResult>;
|
|
21
|
+
pushCIConfig: (otherOptions?: FetcherOptions) => Promise<PushCIConfigResult>;
|
|
18
22
|
};
|
|
19
23
|
//#endregion
|
|
20
24
|
export { getProjectAPI };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/project.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"project.d.ts","names":[],"sources":["../../../src/getIntlayerAPI/project.ts"],"sourcesContent":[],"mappings":";;;;;cA+Ba,iCACK,iCACC;0BAkBL,kCACI,mBAAc,QAAA;EArBnB,UAAA,EAAA,CAAA,OAoSZ,EA7PY,cA6PZ,EAAA,YAAA,CAAA,EA5PiB,cA4PjB,EAAA,GA5P+B,OA4P/B,CA5P+B,gBA4P/B,CAAA;EAnSiB,aAAA,EAAA,CAAA,OAAA,EAwDL,iBAxDK,EAAA,YAAA,CAAA,EAyDA,cAzDA,EAAA,GAyDc,OAzDd,CAyDc,mBAzDd,CAAA;EACC,oBAAA,EAAA,CAAA,IAAA,EAyET,wBAzES,EAAA,YAAA,CAAA,EA0ED,cA1EC,EAAA,GA0Ea,OA1Eb,CA0Ea,0BA1Eb,CAAA;EAkBL,wBAAA,EAAA,CAAA,oBAAA,EAwEY,4BAxEZ,EAAA,YAAA,CAAA,EAyEI,cAzEJ,EAAA,GAyEkB,OAzElB,CAyEkB,8BAzElB,CAAA;EACI,aAAA,EAAA,CAAA,YAAA,CAAA,EAwF2B,cAxF3B,EAAA,GAwFyC,OAxFzC,CAwFyC,mBAxFzC,CAAA;EAAc,aAAA,EAAA,CAAA,SAAA,EAuGjB,kBAvGiB,CAAA,WAAA,CAAA,EAAA,YAAA,CAAA,EAwGd,cAxGc,EAAA,GAwGA,OAxGA,CAwGA,mBAxGA,CAAA;EAAA,eAAA,EAAA,CAAA,YAAA,CAAA,EAuHe,cAvHf,EAAA,GAuH6B,OAvH7B,CAuH6B,qBAvH7B,CAAA;EAkBnB,eAAA,EAAA,CAAA,SAAA,EAsHE,mBAtHF,EAAA,YAAA,CAAA,EAuHK,cAvHL,EAAA,GAuHmB,OAvHnB,CAuHmB,uBAvHnB,CAAA;EACK,eAAA,EAAA,CAAA,QAAA,EAyIJ,mBAzII,CAAA,UAAA,CAAA,EAAA,YAAA,CAAA,EA0IA,cA1IA,EAAA,GA0Ic,OA1Id,CA0Ic,uBA1Id,CAAA;EAAc,gBAAA,EAAA,CAAA,QAAA,EA6JlB,oBA7JkB,CAAA,UAAA,CAAA,EAAA,YAAA,CAAA,EA8Jd,cA9Jc,EAAA,GA8JA,OA9JA,CA8JA,wBA9JA,CAAA;EAAA,YAAA,EAAA,CAAA,YAAA,CAAA,EA+KY,cA/KZ,EAAA,GA+K0B,OA/K1B,CA+K0B,kBA/K1B,CAAA;EAiBnB,cAAA,EAAA,CAAA,YAAA,EA+KK,kBA/KL,CAAA,cAAA,CAAA,EAAA,YAAA,CAAA,EAgLK,cAhLL,EAAA,GAgLmB,OAhLnB,CAgLmB,oBAhLnB,CAAA;EACK,WAAA,EAAA,CAAA,YAAA,CAAA,EAgMyB,cAhMzB,EAAA,GAgMuC,OAhMvC,CAgMuC,iBAhMvC,CAAA;EAAc,YAAA,EAAA,CAAA,YAAA,CAAA,EA+MY,cA/MZ,EAAA,GA+M0B,OA/M1B,CA+M0B,kBA/M1B,CAAA;CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, 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, PushDictionariesBody, PushDictionariesResult, PushProjectConfigurationBody, PushProjectConfigurationResult, RefreshAccessKeyBody, RefreshAccessKeyResponse, RegisterBody, RegisterQuery, RegisterResult, SearchDocUtilParams, SearchDocUtilResult, SelectOrganizationParam, SelectOrganizationResult, SelectProjectParam, SelectProjectResult, SetCSRFTokenResult, TranslateJSONBody, TranslateJSONResult, UnselectOrganizationResult, UnselectProjectResult, UpdateDictionaryBody, UpdateDictionaryParam, UpdateDictionaryResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult, UpdatePasswordBody, UpdatePasswordResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult, UpdateTagBody, UpdateTagParams, UpdateTagResult, UpdateUserBody, UpdateUserResult, UserAPI, ValidEmailParams, ValidEmailResult, WriteContentDeclarationBody, WriteContentDeclarationResult } from "./types.js";
|
|
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
2
|
import { fetchDistantDictionaries } from "./distantDictionary/fetchDistantDictionaries.js";
|
|
3
3
|
import { fetchDistantDictionary } from "./distantDictionary/fetchDistantDictionary.js";
|
|
4
4
|
import "./distantDictionary/index.js";
|
|
@@ -16,4 +16,4 @@ import { getTagAPI } from "./getIntlayerAPI/tag.js";
|
|
|
16
16
|
import { getUserAPI } from "./getIntlayerAPI/user.js";
|
|
17
17
|
import { IntlayerAPI, getIntlayerAPI } from "./getIntlayerAPI/index.js";
|
|
18
18
|
import { IntlayerAPIProxy, getIntlayerAPIProxy } from "./proxy.js";
|
|
19
|
-
export { AIOptions, AIProvider, AddDictionaryBody, AddDictionaryResult, AddNewAccessKeyBody, AddNewAccessKeyResponse, AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, AddProjectBody, AddProjectResult, AddTagBody, AddTagResult, AskDocQuestionBody, 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, FetcherOptions, GetAuditByIdParams, GetAuditByIdResult, GetAuditsParams, GetAuditsResult, 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, GitHubAuthCallbackBody, GitHubAuthCallbackResult, GitHubCheckConfigBody, GitHubCheckConfigResult, GitHubGetAuthUrlResult, GitHubGetConfigFileBody, GitHubGetConfigFileResult, GitHubListReposResult, GitHubRepository, GithubLoginQueryParams, GoogleLoginQueryParams, IntlayerAPI, IntlayerAPIProxy, LoginBody, LoginResult, Messages, NewsletterSubscriptionBody, NewsletterSubscriptionResult, NewsletterUnsubscriptionBody, PushDictionariesBody, PushDictionariesResult, PushProjectConfigurationBody, PushProjectConfigurationResult, RefreshAccessKeyBody, RefreshAccessKeyResponse, RegisterBody, RegisterQuery, RegisterResult, SearchDocUtilParams, SearchDocUtilResult, SelectOrganizationParam, SelectOrganizationResult, SelectProjectParam, SelectProjectResult, SetCSRFTokenResult, TranslateJSONBody, TranslateJSONResult, UnselectOrganizationResult, UnselectProjectResult, UpdateDictionaryBody, UpdateDictionaryParam, UpdateDictionaryResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult, UpdatePasswordBody, UpdatePasswordResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult, UpdateTagBody, UpdateTagParams, UpdateTagResult, UpdateUserBody, UpdateUserResult, UserAPI, ValidEmailParams, ValidEmailResult, WriteContentDeclarationBody, WriteContentDeclarationResult, fetchDistantDictionaries, fetchDistantDictionary, fetcher, fetcherOptions, getAiAPI, getAuditAPI, getDictionaryAPI, getEditorAPI, getGithubAPI, getIntlayerAPI, getIntlayerAPIProxy, getOAuthAPI, getOrganizationAPI, getProjectAPI, getStripeAPI, getTagAPI, getUserAPI };
|
|
19
|
+
export { AIOptions, AIProvider, AddDictionaryBody, AddDictionaryResult, AddNewAccessKeyBody, AddNewAccessKeyResponse, AddOrganizationBody, AddOrganizationMemberBody, AddOrganizationMemberResult, AddOrganizationResult, AddProjectBody, AddProjectResult, AddTagBody, AddTagResult, AskDocQuestionBody, 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, FetcherOptions, 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, GitHubAuthCallbackBody, GitHubAuthCallbackResult, GitHubCheckConfigBody, GitHubCheckConfigResult, GitHubGetAuthUrlResult, GitHubGetConfigFileBody, GitHubGetConfigFileResult, GitHubListReposResult, GitHubRepository, GithubLoginQueryParams, GoogleLoginQueryParams, IntlayerAPI, IntlayerAPIProxy, 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, fetchDistantDictionaries, fetchDistantDictionary, fetcher, fetcherOptions, getAiAPI, getAuditAPI, getDictionaryAPI, getEditorAPI, getGithubAPI, getIntlayerAPI, getIntlayerAPIProxy, getOAuthAPI, getOrganizationAPI, getProjectAPI, getStripeAPI, getTagAPI, getUserAPI };
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AIOptions as AIOptions$1, 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, 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, GetCheckoutSessionBody, GetCheckoutSessionResult, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionariesUpdateTimestampResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetDiscussionsParams, GetDiscussionsResult, 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, PushDictionariesBody, PushDictionariesResult, PushProjectConfigurationBody, PushProjectConfigurationResult, RefreshAccessKeyBody, RefreshAccessKeyResponse, RegisterBody, RegisterQuery, RegisterResult, SearchDocUtilParams, SearchDocUtilResult, SelectOrganizationParam, SelectOrganizationResult, SelectProjectParam, SelectProjectResult, SetCSRFTokenResult, TranslateJSONBody, TranslateJSONResult, UnselectOrganizationResult, UnselectProjectResult, UpdateDictionaryBody, UpdateDictionaryParam, UpdateDictionaryResult, UpdateOrganizationBody, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, UpdateOrganizationResult, UpdatePasswordBody, UpdatePasswordResult, UpdateProjectBody, UpdateProjectMembersBody, UpdateProjectMembersResult, UpdateProjectResult, UpdateTagBody, UpdateTagParams, UpdateTagResult, UpdateUserBody, UpdateUserResult, UserAPI, ValidEmailParams, ValidEmailResult } from "@intlayer/backend";
|
|
1
|
+
import { AIOptions as AIOptions$1, 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, 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, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionariesUpdateTimestampResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, GetDiscussionsParams, GetDiscussionsResult, 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 } from "@intlayer/backend";
|
|
2
2
|
import { GetConfigurationResult, GetEditorDictionariesResult, WriteContentDeclarationBody, WriteContentDeclarationResult } from "intlayer-editor";
|
|
3
3
|
|
|
4
4
|
//#region src/types.d.ts
|
|
@@ -11,5 +11,5 @@ type AutocompleteBody = {
|
|
|
11
11
|
contextAfter?: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
|
-
export { type AIOptions$1 as AIOptions, type AIProvider, type AddDictionaryBody, type AddDictionaryResult, type AddNewAccessKeyBody, type AddNewAccessKeyResponse, type AddOrganizationBody, type AddOrganizationMemberBody, type AddOrganizationMemberResult, type AddOrganizationResult, type AddProjectBody, type AddProjectResult, type AddTagBody, type AddTagResult, type AskDocQuestionResult, type AskResetPasswordBody, type AskResetPasswordResult, type AuditContentDeclarationBody, type AuditContentDeclarationFieldBody, type AuditContentDeclarationFieldResult, type AuditContentDeclarationMetadataBody, type AuditContentDeclarationMetadataResult, type AuditContentDeclarationResult, type AuditTagBody, type AuditTagResult, type AuthClient, type AutocompleteBody, type AutocompleteResponse, type ChatCompletionRequestMessage, type CheckIfUserHasPasswordResult, type CreateAuditBody, type CreateAuditResult, type CreateSessionBody, type CreateSessionResult, type CreateUserBody, type CreateUserResult, type CustomQueryBody, type CustomQueryResult, type DefinePasswordBody, type DefinePasswordResult, type DeleteAccessKeyBody, type DeleteAccessKeyResponse, type DeleteDictionaryParam, type DeleteDictionaryResult, type DeleteOrganizationResult, type DeleteProjectResult, type DeleteTagParams, type DeleteTagResult, type DictionaryAPI, type GetAuditByIdParams, type GetAuditByIdResult, type GetAuditsParams, type GetAuditsResult, type GetCheckoutSessionBody, type GetCheckoutSessionResult, type GetConfigurationResult, type GetDictionariesKeysResult, type GetDictionariesParams, type GetDictionariesResult, type GetDictionariesUpdateTimestampResult, type GetDictionaryParams, type GetDictionaryQuery, type GetDictionaryResult, type GetDiscussionsParams, type GetDiscussionsResult, type GetEditorDictionariesResult, type GetOAuth2TokenBody, type GetOAuth2TokenResult, type GetOrganizationParam, type GetOrganizationResult, type GetOrganizationSSOConfigBody, type GetOrganizationSSOConfigResult, type GetOrganizationsParams, type GetOrganizationsResult, type GetPricingBody, type GetPricingResult, type GetProjectsParams, type GetProjectsResult, type GetSessionInformationQuery, type GetSessionInformationResult, type GetTagsParams, type GetTagsResult, type GetUserByAccountParams, type GetUserByAccountResult, type GetUserByEmailParams, type GetUserByEmailResult, type GetUserByIdParams, type GetUserByIdResult, type GetUsersParams, type GetUsersResult, type GithubLoginQueryParams, type GoogleLoginQueryParams, type LoginBody, type LoginResult, type Messages, type NewsletterSubscriptionBody, type NewsletterSubscriptionResult, type NewsletterUnsubscriptionBody, type PushDictionariesBody, type PushDictionariesResult, type PushProjectConfigurationBody, type PushProjectConfigurationResult, type RefreshAccessKeyBody, type RefreshAccessKeyResponse, type RegisterBody, type RegisterQuery, type RegisterResult, type SearchDocUtilParams, type SearchDocUtilResult, type SelectOrganizationParam, type SelectOrganizationResult, type SelectProjectParam, type SelectProjectResult, type SetCSRFTokenResult, type TranslateJSONBody, type TranslateJSONResult, type UnselectOrganizationResult, type UnselectProjectResult, type UpdateDictionaryBody, type UpdateDictionaryParam, type UpdateDictionaryResult, type UpdateOrganizationBody, type UpdateOrganizationMembersBody, type UpdateOrganizationMembersResult, type UpdateOrganizationResult, type UpdatePasswordBody, type UpdatePasswordResult, type UpdateProjectBody, type UpdateProjectMembersBody, type UpdateProjectMembersResult, type UpdateProjectResult, type UpdateTagBody, type UpdateTagParams, type UpdateTagResult, type UpdateUserBody, type UpdateUserResult, type UserAPI, type ValidEmailParams, type ValidEmailResult, type WriteContentDeclarationBody, type WriteContentDeclarationResult };
|
|
14
|
+
export { type AIOptions$1 as AIOptions, type AIProvider, type AddDictionaryBody, type AddDictionaryResult, type AddNewAccessKeyBody, type AddNewAccessKeyResponse, type AddOrganizationBody, type AddOrganizationMemberBody, type AddOrganizationMemberResult, type AddOrganizationResult, type AddProjectBody, type AddProjectResult, type AddTagBody, type AddTagResult, type AskDocQuestionResult, type AskResetPasswordBody, type AskResetPasswordResult, type AuditContentDeclarationBody, type AuditContentDeclarationFieldBody, type AuditContentDeclarationFieldResult, type AuditContentDeclarationMetadataBody, type AuditContentDeclarationMetadataResult, type AuditContentDeclarationResult, type AuditTagBody, type AuditTagResult, type AuthClient, type AutocompleteBody, type AutocompleteResponse, type ChatCompletionRequestMessage, type CheckIfUserHasPasswordResult, type CreateAuditBody, type CreateAuditResult, type CreateSessionBody, type CreateSessionResult, type CreateUserBody, type CreateUserResult, type CustomQueryBody, type CustomQueryResult, type DefinePasswordBody, type DefinePasswordResult, type DeleteAccessKeyBody, type DeleteAccessKeyResponse, type DeleteDictionaryParam, type DeleteDictionaryResult, type DeleteOrganizationResult, type DeleteProjectResult, type DeleteTagParams, type DeleteTagResult, type DictionaryAPI, type GetAuditByIdParams, type GetAuditByIdResult, type GetAuditsParams, type GetAuditsResult, type GetCIConfigResult, type GetCheckoutSessionBody, type GetCheckoutSessionResult, type GetConfigurationResult, type GetDictionariesKeysResult, type GetDictionariesParams, type GetDictionariesResult, type GetDictionariesUpdateTimestampResult, type GetDictionaryParams, type GetDictionaryQuery, type GetDictionaryResult, type GetDiscussionsParams, type GetDiscussionsResult, type GetEditorDictionariesResult, type GetOAuth2TokenBody, type GetOAuth2TokenResult, type GetOrganizationParam, type GetOrganizationResult, type GetOrganizationSSOConfigBody, type GetOrganizationSSOConfigResult, type GetOrganizationsParams, type GetOrganizationsResult, type GetPricingBody, type GetPricingResult, type GetProjectsParams, type GetProjectsResult, type GetSessionInformationQuery, type GetSessionInformationResult, type GetTagsParams, type GetTagsResult, type GetUserByAccountParams, type GetUserByAccountResult, type GetUserByEmailParams, type GetUserByEmailResult, type GetUserByIdParams, type GetUserByIdResult, type GetUsersParams, type GetUsersResult, type GithubLoginQueryParams, type GoogleLoginQueryParams, type LoginBody, type LoginResult, type Messages, type NewsletterSubscriptionBody, type NewsletterSubscriptionResult, type NewsletterUnsubscriptionBody, type ProjectConfigCI, type PushCIConfigResult, type PushDictionariesBody, type PushDictionariesResult, type PushProjectConfigurationBody, type PushProjectConfigurationResult, type RefreshAccessKeyBody, type RefreshAccessKeyResponse, type RegisterBody, type RegisterQuery, type RegisterResult, type SearchDocUtilParams, type SearchDocUtilResult, type SelectOrganizationParam, type SelectOrganizationResult, type SelectProjectParam, type SelectProjectResult, type SetCSRFTokenResult, type TranslateJSONBody, type TranslateJSONResult, type TriggerBuildResult, type TriggerWebhookBody, type TriggerWebhookResult, type UnselectOrganizationResult, type UnselectProjectResult, type UpdateDictionaryBody, type UpdateDictionaryParam, type UpdateDictionaryResult, type UpdateOrganizationBody, type UpdateOrganizationMembersBody, type UpdateOrganizationMembersResult, type UpdateOrganizationResult, type UpdatePasswordBody, type UpdatePasswordResult, type UpdateProjectBody, type UpdateProjectMembersBody, type UpdateProjectMembersResult, type UpdateProjectResult, type UpdateTagBody, type UpdateTagParams, type UpdateTagResult, type UpdateUserBody, type UpdateUserResult, type UserAPI, type ValidEmailParams, type ValidEmailResult, type Webhook, type WriteContentDeclarationBody, type WriteContentDeclarationResult };
|
|
15
15
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"sourcesContent":[],"mappings":";;;;;KAgKY,gBAAA;;cAEE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/api",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.11",
|
|
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": [
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@intlayer/config": "7.5.
|
|
77
|
-
"@intlayer/types": "7.5.
|
|
76
|
+
"@intlayer/config": "7.5.11",
|
|
77
|
+
"@intlayer/types": "7.5.11"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/node": "25.0.3",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"vitest": "4.0.16"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@intlayer/backend": "7.5.
|
|
91
|
-
"intlayer-editor": "7.5.
|
|
90
|
+
"@intlayer/backend": "7.5.11",
|
|
91
|
+
"intlayer-editor": "7.5.11"
|
|
92
92
|
},
|
|
93
93
|
"peerDependenciesMeta": {
|
|
94
94
|
"@intlayer/backend": {
|