@intlayer/api 6.1.6-canary.0 → 7.0.0-canary.0
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/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs +18 -55
- package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs.map +1 -1
- package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs +20 -58
- package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs.map +1 -1
- package/dist/cjs/distantDictionary/index.cjs +5 -25
- package/dist/cjs/fetcher.cjs +113 -89
- package/dist/cjs/fetcher.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/ai.cjs +163 -188
- package/dist/cjs/getIntlayerAPI/ai.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/dictionary.cjs +69 -117
- package/dist/cjs/getIntlayerAPI/dictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/editor.cjs +37 -74
- package/dist/cjs/getIntlayerAPI/editor.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/index.cjs +27 -49
- package/dist/cjs/getIntlayerAPI/index.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/newsletter.cjs +40 -77
- package/dist/cjs/getIntlayerAPI/newsletter.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/oAuth.cjs +26 -65
- package/dist/cjs/getIntlayerAPI/oAuth.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/organization.cjs +93 -130
- package/dist/cjs/getIntlayerAPI/organization.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/project.cjs +109 -154
- package/dist/cjs/getIntlayerAPI/project.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/search.cjs +22 -58
- package/dist/cjs/getIntlayerAPI/search.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/stripe.cjs +38 -77
- package/dist/cjs/getIntlayerAPI/stripe.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/tag.cjs +47 -86
- package/dist/cjs/getIntlayerAPI/tag.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/user.cjs +79 -106
- package/dist/cjs/getIntlayerAPI/user.cjs.map +1 -1
- package/dist/cjs/index.cjs +30 -49
- package/dist/cjs/proxy.cjs +90 -115
- package/dist/cjs/proxy.cjs.map +1 -1
- package/dist/cjs/types.cjs +0 -17
- package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs +17 -20
- package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs.map +1 -1
- package/dist/esm/distantDictionary/fetchDistantDictionary.mjs +19 -23
- package/dist/esm/distantDictionary/fetchDistantDictionary.mjs.map +1 -1
- package/dist/esm/distantDictionary/index.mjs +4 -3
- package/dist/esm/fetcher.mjs +111 -64
- package/dist/esm/fetcher.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/ai.mjs +160 -153
- package/dist/esm/getIntlayerAPI/ai.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/dictionary.mjs +66 -82
- package/dist/esm/getIntlayerAPI/dictionary.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/editor.mjs +34 -39
- package/dist/esm/getIntlayerAPI/editor.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/index.mjs +16 -14
- package/dist/esm/getIntlayerAPI/index.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/newsletter.mjs +37 -42
- package/dist/esm/getIntlayerAPI/newsletter.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/oAuth.mjs +23 -30
- package/dist/esm/getIntlayerAPI/oAuth.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/organization.mjs +90 -95
- package/dist/esm/getIntlayerAPI/organization.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/project.mjs +106 -119
- package/dist/esm/getIntlayerAPI/project.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/search.mjs +19 -23
- package/dist/esm/getIntlayerAPI/search.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/stripe.mjs +35 -42
- package/dist/esm/getIntlayerAPI/stripe.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/tag.mjs +44 -51
- package/dist/esm/getIntlayerAPI/tag.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/user.mjs +76 -71
- package/dist/esm/getIntlayerAPI/user.mjs.map +1 -1
- package/dist/esm/index.mjs +16 -15
- package/dist/esm/proxy.mjs +89 -90
- package/dist/esm/proxy.mjs.map +1 -1
- package/dist/esm/types.mjs +0 -1
- package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts +8 -3
- package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts.map +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionary.d.ts +8 -3
- package/dist/types/distantDictionary/fetchDistantDictionary.d.ts.map +1 -1
- package/dist/types/distantDictionary/index.d.ts +3 -3
- package/dist/types/fetcher.d.ts +14 -11
- package/dist/types/fetcher.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/ai.d.ts +22 -18
- package/dist/types/getIntlayerAPI/ai.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/dictionary.d.ts +16 -12
- package/dist/types/getIntlayerAPI/dictionary.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/editor.d.ts +11 -7
- package/dist/types/getIntlayerAPI/editor.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/index.d.ts +30 -27
- package/dist/types/getIntlayerAPI/index.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/newsletter.d.ts +11 -7
- package/dist/types/getIntlayerAPI/newsletter.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/oAuth.d.ts +8 -5
- package/dist/types/getIntlayerAPI/oAuth.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/organization.d.ts +18 -13
- package/dist/types/getIntlayerAPI/organization.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/project.d.ts +19 -15
- package/dist/types/getIntlayerAPI/project.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/search.d.ts +9 -5
- package/dist/types/getIntlayerAPI/search.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/stripe.d.ts +11 -7
- package/dist/types/getIntlayerAPI/stripe.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/tag.d.ts +12 -8
- package/dist/types/getIntlayerAPI/tag.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/user.d.ts +16 -12
- package/dist/types/getIntlayerAPI/user.d.ts.map +1 -1
- package/dist/types/index.d.ts +16 -15
- package/dist/types/proxy.d.ts +10 -5
- package/dist/types/proxy.d.ts.map +1 -1
- package/dist/types/types.d.ts +13 -12
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +29 -38
- package/LICENSE +0 -202
- package/dist/cjs/distantDictionary/index.cjs.map +0 -1
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/types.cjs.map +0 -1
- package/dist/esm/distantDictionary/index.mjs.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/types/distantDictionary/index.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
|
@@ -1,46 +1,39 @@
|
|
|
1
|
-
import configuration from "@intlayer/config/built";
|
|
2
1
|
import { fetcher } from "../fetcher.mjs";
|
|
2
|
+
import configuration from "@intlayer/config/built";
|
|
3
|
+
|
|
4
|
+
//#region src/getIntlayerAPI/stripe.ts
|
|
3
5
|
const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
method: "POST"
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
return {
|
|
38
|
-
getPricing,
|
|
39
|
-
getSubscription,
|
|
40
|
-
cancelSubscription
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export {
|
|
44
|
-
getStripeAPI
|
|
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 STRIPE_API_ROUTE = `${backendURL}/api/stripe`;
|
|
9
|
+
/**
|
|
10
|
+
* Get a pricing plan calculated for a given promotion code.
|
|
11
|
+
* @param body - Pricing plan body.
|
|
12
|
+
*/
|
|
13
|
+
const getPricing = async (body, otherOptions = {}) => await fetcher(`${STRIPE_API_ROUTE}/pricing`, authAPIOptions, otherOptions, {
|
|
14
|
+
method: "POST",
|
|
15
|
+
body
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves a checkout session.
|
|
19
|
+
* @param body - Checkout session body.
|
|
20
|
+
*/
|
|
21
|
+
const getSubscription = async (body, otherOptions = {}) => await fetcher(`${STRIPE_API_ROUTE}/create-subscription`, authAPIOptions, otherOptions, {
|
|
22
|
+
method: "POST",
|
|
23
|
+
body
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Cancels a subscription.
|
|
27
|
+
* @param body - Checkout session body.
|
|
28
|
+
*/
|
|
29
|
+
const cancelSubscription = async (otherOptions = {}) => await fetcher(`${STRIPE_API_ROUTE}/cancel-subscription`, authAPIOptions, otherOptions, { method: "POST" });
|
|
30
|
+
return {
|
|
31
|
+
getPricing,
|
|
32
|
+
getSubscription,
|
|
33
|
+
cancelSubscription
|
|
34
|
+
};
|
|
45
35
|
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { getStripeAPI };
|
|
46
39
|
//# sourceMappingURL=stripe.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/getIntlayerAPI/stripe.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/
|
|
1
|
+
{"version":3,"file":"stripe.mjs","names":[],"sources":["../../../src/getIntlayerAPI/stripe.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\nimport type {\n GetCheckoutSessionBody,\n GetCheckoutSessionResult,\n GetPricingBody,\n GetPricingResult,\n} from '../types';\n\nexport const getStripeAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const STRIPE_API_ROUTE = `${backendURL}/api/stripe`;\n\n /**\n * Get a pricing plan calculated for a given promotion code.\n * @param body - Pricing plan body.\n */\n const getPricing = async (\n body?: GetPricingBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetPricingResult>(\n `${STRIPE_API_ROUTE}/pricing`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Retrieves a checkout session.\n * @param body - Checkout session body.\n */\n const getSubscription = async (\n body?: GetCheckoutSessionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetCheckoutSessionResult>(\n `${STRIPE_API_ROUTE}/create-subscription`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Cancels a subscription.\n * @param body - Checkout session body.\n */\n const cancelSubscription = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetCheckoutSessionResult>(\n `${STRIPE_API_ROUTE}/cancel-subscription`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getPricing,\n getSubscription,\n cancelSubscription,\n };\n};\n"],"mappings":";;;;AAUA,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;;;;;CAMvC,MAAM,aAAa,OACjB,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,iBAAiB,WACpB,gBACA,cACA;EACE,QAAQ;EACR;EACD,CACF;;;;;CAMH,MAAM,kBAAkB,OACtB,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,iBAAiB,uBACpB,gBACA,cACA;EACE,QAAQ;EACR;EACD,CACF;;;;;CAMH,MAAM,qBAAqB,OAAO,eAA+B,EAAE,KACjE,MAAM,QACJ,GAAG,iBAAiB,uBACpB,gBACA,cACA,EACE,QAAQ,QACT,CACF;AAEH,QAAO;EACL;EACA;EACA;EACD"}
|
|
@@ -1,55 +1,48 @@
|
|
|
1
|
-
import configuration from "@intlayer/config/built";
|
|
2
1
|
import { fetcher } from "../fetcher.mjs";
|
|
2
|
+
import configuration from "@intlayer/config/built";
|
|
3
|
+
|
|
4
|
+
//#region src/getIntlayerAPI/tag.ts
|
|
3
5
|
const getTagAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
method: "DELETE"
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
return {
|
|
46
|
-
getTags,
|
|
47
|
-
addTag,
|
|
48
|
-
updateTag,
|
|
49
|
-
deleteTag
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
getTagAPI
|
|
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 PROJECT_API_ROUTE = `${backendURL}/api/tag`;
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves a list of tags based on filters and pagination.
|
|
11
|
+
* @param filters - Filters and pagination options.
|
|
12
|
+
*/
|
|
13
|
+
const getTags = async (filters, otherOptions = {}) => await fetcher(PROJECT_API_ROUTE, authAPIOptions, otherOptions, {
|
|
14
|
+
cache: "no-store",
|
|
15
|
+
params: filters
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Adds a new tag to the database.
|
|
19
|
+
* @param tag - Tag data.
|
|
20
|
+
*/
|
|
21
|
+
const addTag = async (tag, otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}`, authAPIOptions, otherOptions, {
|
|
22
|
+
method: "POST",
|
|
23
|
+
body: tag
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Updates an existing tag in the database.
|
|
27
|
+
* @param tag - Updated tag data.
|
|
28
|
+
*/
|
|
29
|
+
const updateTag = async (tagId, tag, otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/${tagId}`, authAPIOptions, otherOptions, {
|
|
30
|
+
method: "PUT",
|
|
31
|
+
body: tag
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Deletes a tag from the database by its ID.
|
|
35
|
+
* @param tagId - Tag ID.
|
|
36
|
+
*/
|
|
37
|
+
const deleteTag = async (tagId, otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/${tagId}`, authAPIOptions, otherOptions, { method: "DELETE" });
|
|
38
|
+
return {
|
|
39
|
+
getTags,
|
|
40
|
+
addTag,
|
|
41
|
+
updateTag,
|
|
42
|
+
deleteTag
|
|
43
|
+
};
|
|
54
44
|
};
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { getTagAPI };
|
|
55
48
|
//# sourceMappingURL=tag.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/getIntlayerAPI/tag.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/
|
|
1
|
+
{"version":3,"file":"tag.mjs","names":[],"sources":["../../../src/getIntlayerAPI/tag.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\nimport type {\n AddTagBody,\n AddTagResult,\n DeleteTagParams,\n DeleteTagResult,\n GetTagsParams,\n GetTagsResult,\n UpdateTagBody,\n UpdateTagParams,\n UpdateTagResult,\n} from '../types';\n\nexport const getTagAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const PROJECT_API_ROUTE = `${backendURL}/api/tag`;\n\n /**\n * Retrieves a list of tags based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getTags = async (\n filters?: GetTagsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetTagsResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n // @ts-ignore Number of parameter will be stringified by the fetcher\n params: filters,\n }\n );\n\n /**\n * Adds a new tag to the database.\n * @param tag - Tag data.\n */\n const addTag = async (tag: AddTagBody, otherOptions: FetcherOptions = {}) =>\n await fetcher<AddTagResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: tag,\n }\n );\n\n /**\n * Updates an existing tag in the database.\n * @param tag - Updated tag data.\n */\n const updateTag = async (\n tagId: UpdateTagParams['tagId'],\n tag: UpdateTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateTagResult>(\n `${PROJECT_API_ROUTE}/${tagId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: tag,\n }\n );\n\n /**\n * Deletes a tag from the database by its ID.\n * @param tagId - Tag ID.\n */\n const deleteTag = async (\n tagId: DeleteTagParams['tagId'],\n\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteTagResult>(\n `${PROJECT_API_ROUTE}/${tagId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n return {\n getTags,\n addTag,\n updateTag,\n deleteTag,\n };\n};\n"],"mappings":";;;;AAeA,MAAa,aACX,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,UAAU,OACd,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,mBACA,gBACA,cACA;EACE,OAAO;EAEP,QAAQ;EACT,CACF;;;;;CAMH,MAAM,SAAS,OAAO,KAAiB,eAA+B,EAAE,KACtE,MAAM,QACJ,GAAG,qBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,YAAY,OAChB,OACA,KACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,GAAG,SACxB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;CAMH,MAAM,YAAY,OAChB,OAEA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBAAkB,GAAG,SACxB,gBACA,cACA,EACE,QAAQ,UACT,CACF;AAEH,QAAO;EACL;EACA;EACA;EACA;EACD"}
|
|
@@ -1,75 +1,80 @@
|
|
|
1
|
-
import configuration from "@intlayer/config/built";
|
|
2
1
|
import { fetcher } from "../fetcher.mjs";
|
|
2
|
+
import configuration from "@intlayer/config/built";
|
|
3
|
+
|
|
4
|
+
//#region src/getIntlayerAPI/user.ts
|
|
3
5
|
const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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 USER_API_ROUTE = `${backendURL}/api/user`;
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves a list of users based on filters and pagination.
|
|
11
|
+
* @param filters - Filters and pagination options.
|
|
12
|
+
* @returns List of users.
|
|
13
|
+
*/
|
|
14
|
+
const getUsers = async (filters, otherOptions = {}) => await fetcher(USER_API_ROUTE, authAPIOptions, otherOptions, {
|
|
15
|
+
cache: "no-store",
|
|
16
|
+
params: filters
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves a user by ID.
|
|
20
|
+
* @param userId - User ID.
|
|
21
|
+
* @returns User object.
|
|
22
|
+
*/
|
|
23
|
+
const getUserById = async (userId, otherOptions = {}) => await fetcher(`${USER_API_ROUTE}/${userId}`, authAPIOptions, otherOptions, { cache: "no-store" });
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves a user by email.
|
|
26
|
+
* @param email - User email.
|
|
27
|
+
* @returns User object.
|
|
28
|
+
*/
|
|
29
|
+
const getUserByEmail = async (email, otherOptions = {}) => await fetcher(`${USER_API_ROUTE}/email/${email}`, authAPIOptions, otherOptions, { cache: "no-store" });
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves a user by account.
|
|
32
|
+
* @param providerAccountId - The provider account ID.
|
|
33
|
+
* @param provider - The provider of the account.
|
|
34
|
+
*/
|
|
35
|
+
const getUserByAccount = async (providerAccountId, provider, otherOptions = {}) => await fetcher(`${USER_API_ROUTE}/account/${provider}/${providerAccountId}`, authAPIOptions, otherOptions, { cache: "no-store" });
|
|
36
|
+
/**
|
|
37
|
+
* Creates a new user.
|
|
38
|
+
* @param user - User credentials.
|
|
39
|
+
* @returns User object.
|
|
40
|
+
*/
|
|
41
|
+
const createUser = async (user, otherOptions = {}) => await fetcher(`${USER_API_ROUTE}/`, authAPIOptions, otherOptions, {
|
|
42
|
+
method: "POST",
|
|
43
|
+
body: user
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* Updates the user with the provided data.
|
|
47
|
+
* @param user - Updated user data.
|
|
48
|
+
* @returns User object.
|
|
49
|
+
*/
|
|
50
|
+
const updateUser = async (user, otherOptions = {}) => await fetcher(`${USER_API_ROUTE}`, authAPIOptions, otherOptions, {
|
|
51
|
+
method: "PUT",
|
|
52
|
+
body: user
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* Deletes a user with the provided ID.
|
|
56
|
+
* @param userId - User ID.
|
|
57
|
+
* @returns User object.
|
|
58
|
+
*/
|
|
59
|
+
const deleteUser = async (userId, otherOptions = {}) => await fetcher(`${USER_API_ROUTE}/${userId}`, authAPIOptions, otherOptions, { method: "DELETE" });
|
|
60
|
+
/**
|
|
61
|
+
* Gets the verify email status URL to use in the SSE.
|
|
62
|
+
* @param userId - User ID.
|
|
63
|
+
* @returns The verify email status URL.
|
|
64
|
+
*/
|
|
65
|
+
const getVerifyEmailStatusURL = (userId) => `${USER_API_ROUTE}/verify-email-status/${String(userId)}`;
|
|
66
|
+
return {
|
|
67
|
+
createUser,
|
|
68
|
+
getUsers,
|
|
69
|
+
getUserById,
|
|
70
|
+
getUserByAccount,
|
|
71
|
+
getUserByEmail,
|
|
72
|
+
updateUser,
|
|
73
|
+
deleteUser,
|
|
74
|
+
getVerifyEmailStatusURL
|
|
75
|
+
};
|
|
74
76
|
};
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
export { getUserAPI };
|
|
75
80
|
//# sourceMappingURL=user.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/getIntlayerAPI/user.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport {
|
|
1
|
+
{"version":3,"file":"user.mjs","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { type FetcherOptions, fetcher } from '../fetcher';\nimport type {\n CreateUserBody,\n CreateUserResult,\n GetUserByAccountParams,\n GetUserByAccountResult,\n GetUserByEmailParams,\n GetUserByEmailResult,\n GetUserByIdParams,\n GetUserByIdResult,\n GetUsersParams,\n GetUsersResult,\n UpdateUserBody,\n UpdateUserResult,\n UserAPI,\n} from '../types';\n\nexport const getUserAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL =\n intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;\n\n if (!backendURL) {\n throw new Error(\n 'Backend URL is not defined in the Intlayer configuration.'\n );\n }\n\n const USER_API_ROUTE = `${backendURL}/api/user`;\n\n /**\n * Retrieves a list of users based on filters and pagination.\n * @param filters - Filters and pagination options.\n * @returns List of users.\n */\n const getUsers = async (\n filters?: GetUsersParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUsersResult>(\n USER_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n // @ts-ignore Number of parameter will be stringified by the fetcher\n params: filters,\n }\n );\n\n /**\n * Retrieves a user by ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const getUserById = async (\n userId: GetUserByIdParams['userId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByIdResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Retrieves a user by email.\n * @param email - User email.\n * @returns User object.\n */\n const getUserByEmail = async (\n email: GetUserByEmailParams['email'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByEmailResult>(\n `${USER_API_ROUTE}/email/${email}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Retrieves a user by account.\n * @param providerAccountId - The provider account ID.\n * @param provider - The provider of the account.\n */\n const getUserByAccount = async (\n providerAccountId: GetUserByAccountParams['providerAccountId'],\n provider: GetUserByAccountParams['provider'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByAccountResult>(\n `${USER_API_ROUTE}/account/${provider}/${providerAccountId}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Creates a new user.\n * @param user - User credentials.\n * @returns User object.\n */\n const createUser = async (\n user: CreateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CreateUserResult>(\n `${USER_API_ROUTE}/`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n }\n );\n\n /**\n * Updates the user with the provided data.\n * @param user - Updated user data.\n * @returns User object.\n */\n const updateUser = async (\n user: UpdateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: user,\n }\n );\n\n /**\n * Deletes a user with the provided ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const deleteUser = async (\n userId: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Gets the verify email status URL to use in the SSE.\n * @param userId - User ID.\n * @returns The verify email status URL.\n */\n const getVerifyEmailStatusURL = (userId: string | UserAPI['id']) =>\n `${USER_API_ROUTE}/verify-email-status/${String(userId)}`;\n\n return {\n createUser,\n getUsers,\n getUserById,\n getUserByAccount,\n getUserByEmail,\n updateUser,\n deleteUser,\n getVerifyEmailStatusURL,\n };\n};\n"],"mappings":";;;;AAmBA,MAAa,cACX,iBAAiC,EAAE,EACnC,mBACG;CACH,MAAM,aACJ,gBAAgB,QAAQ,cAAc,eAAe,QAAQ;AAE/D,KAAI,CAAC,WACH,OAAM,IAAI,MACR,4DACD;CAGH,MAAM,iBAAiB,GAAG,WAAW;;;;;;CAOrC,MAAM,WAAW,OACf,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,gBACA,gBACA,cACA;EACE,OAAO;EAEP,QAAQ;EACT,CACF;;;;;;CAOH,MAAM,cAAc,OAClB,QACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,GAAG,UACrB,gBACA,cACA,EACE,OAAO,YACR,CACF;;;;;;CAOH,MAAM,iBAAiB,OACrB,OACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,SAAS,SAC3B,gBACA,cACA,EACE,OAAO,YACR,CACF;;;;;;CAOH,MAAM,mBAAmB,OACvB,mBACA,UACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,WAAW,SAAS,GAAG,qBACzC,gBACA,cACA,EACE,OAAO,YACR,CACF;;;;;;CAOH,MAAM,aAAa,OACjB,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,IAClB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;;CAOH,MAAM,aAAa,OACjB,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;;CAOH,MAAM,aAAa,OACjB,QACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,GAAG,UACrB,gBACA,cACA,EACE,QAAQ,UACT,CACF;;;;;;CAOH,MAAM,2BAA2B,WAC/B,GAAG,eAAe,uBAAuB,OAAO,OAAO;AAEzD,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { fetcher, fetcherOptions } from "./fetcher.mjs";
|
|
2
|
+
import { getAiAPI } from "./getIntlayerAPI/ai.mjs";
|
|
3
|
+
import { getDictionaryAPI } from "./getIntlayerAPI/dictionary.mjs";
|
|
4
|
+
import { getEditorAPI } from "./getIntlayerAPI/editor.mjs";
|
|
5
|
+
import { getOAuthAPI } from "./getIntlayerAPI/oAuth.mjs";
|
|
6
|
+
import { getOrganizationAPI } from "./getIntlayerAPI/organization.mjs";
|
|
7
|
+
import { getProjectAPI } from "./getIntlayerAPI/project.mjs";
|
|
8
|
+
import { getStripeAPI } from "./getIntlayerAPI/stripe.mjs";
|
|
9
|
+
import { getTagAPI } from "./getIntlayerAPI/tag.mjs";
|
|
10
|
+
import { getUserAPI } from "./getIntlayerAPI/user.mjs";
|
|
11
|
+
import { getIntlayerAPI } from "./getIntlayerAPI/index.mjs";
|
|
12
|
+
import { getIntlayerAPIProxy } from "./proxy.mjs";
|
|
13
|
+
import { fetchDistantDictionaries } from "./distantDictionary/fetchDistantDictionaries.mjs";
|
|
14
|
+
import { fetchDistantDictionary } from "./distantDictionary/fetchDistantDictionary.mjs";
|
|
15
|
+
|
|
16
|
+
export { fetchDistantDictionaries, fetchDistantDictionary, fetcher, fetcherOptions, getAiAPI, getDictionaryAPI, getEditorAPI, getIntlayerAPI, getIntlayerAPIProxy, getOAuthAPI, getOrganizationAPI, getProjectAPI, getStripeAPI, getTagAPI, getUserAPI };
|
package/dist/esm/proxy.mjs
CHANGED
|
@@ -1,100 +1,99 @@
|
|
|
1
|
-
import { getIntlayerAPI } from "./getIntlayerAPI/index.mjs";
|
|
2
1
|
import { getOAuthAPI } from "./getIntlayerAPI/oAuth.mjs";
|
|
2
|
+
import { getIntlayerAPI } from "./getIntlayerAPI/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/proxy.ts
|
|
3
5
|
const ONE_MINUTE_MS = 6e4;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the expiration timestamp in ms from an OAuth token-like object.
|
|
8
|
+
*/
|
|
4
9
|
const getExpiryTimestamp = (token) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return Date.now() + seconds * 1e3;
|
|
14
|
-
}
|
|
15
|
-
return void 0;
|
|
10
|
+
if (!token) return void 0;
|
|
11
|
+
const dateLike = token.accessTokenExpiresAt ?? token.expiresAt;
|
|
12
|
+
if (dateLike) {
|
|
13
|
+
const ts = typeof dateLike === "string" ? Date.parse(dateLike) : dateLike.getTime?.();
|
|
14
|
+
if (typeof ts === "number" && Number.isFinite(ts)) return ts;
|
|
15
|
+
}
|
|
16
|
+
const seconds = token.expires_in ?? token.expiresIn;
|
|
17
|
+
if (typeof seconds === "number" && Number.isFinite(seconds)) return Date.now() + seconds * 1e3;
|
|
16
18
|
};
|
|
17
19
|
let currentAccessToken;
|
|
18
20
|
let currentExpiryTs;
|
|
19
21
|
let pendingRefresh;
|
|
22
|
+
/**
|
|
23
|
+
* Build an auto-auth proxy around getIntlayerAPI that:
|
|
24
|
+
* - Fetches an OAuth2 token when needed
|
|
25
|
+
* - Injects Authorization header for each request
|
|
26
|
+
* - Refreshes token proactively when near expiry
|
|
27
|
+
*
|
|
28
|
+
* The returned API matches the shape of getIntlayerAPI.
|
|
29
|
+
*/
|
|
20
30
|
const getIntlayerAPIProxy = (_baseAuthOptions = {}, intlayerConfig) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
user: wrapSection(baseApi.user),
|
|
86
|
-
oAuth: wrapSection(baseApi.oAuth, true),
|
|
87
|
-
// do NOT inject auth for token endpoint
|
|
88
|
-
dictionary: wrapSection(baseApi.dictionary),
|
|
89
|
-
stripe: wrapSection(baseApi.stripe),
|
|
90
|
-
ai: wrapSection(baseApi.ai),
|
|
91
|
-
tag: wrapSection(baseApi.tag),
|
|
92
|
-
search: wrapSection(baseApi.search),
|
|
93
|
-
editor: wrapSection(baseApi.editor),
|
|
94
|
-
newsletter: wrapSection(baseApi.newsletter)
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
export {
|
|
98
|
-
getIntlayerAPIProxy
|
|
31
|
+
const authOptionsRef = { ..._baseAuthOptions };
|
|
32
|
+
const hasCMSAuth = intlayerConfig?.editor?.clientId && intlayerConfig?.editor?.clientSecret;
|
|
33
|
+
const baseApi = getIntlayerAPI(authOptionsRef, intlayerConfig);
|
|
34
|
+
const needsRefresh = () => {
|
|
35
|
+
if (!currentAccessToken) return true;
|
|
36
|
+
if (!currentExpiryTs) return false;
|
|
37
|
+
return Date.now() + ONE_MINUTE_MS >= currentExpiryTs;
|
|
38
|
+
};
|
|
39
|
+
const refreshToken = async () => {
|
|
40
|
+
const doRefresh = async () => {
|
|
41
|
+
const tokenData = (await getOAuthAPI(intlayerConfig).getOAuth2AccessToken())?.data;
|
|
42
|
+
currentAccessToken = tokenData?.accessToken;
|
|
43
|
+
currentExpiryTs = getExpiryTimestamp(tokenData);
|
|
44
|
+
};
|
|
45
|
+
if (!pendingRefresh) pendingRefresh = doRefresh().finally(() => {
|
|
46
|
+
pendingRefresh = void 0;
|
|
47
|
+
});
|
|
48
|
+
await pendingRefresh;
|
|
49
|
+
};
|
|
50
|
+
const ensureValidToken = async () => {
|
|
51
|
+
if (needsRefresh()) await refreshToken();
|
|
52
|
+
};
|
|
53
|
+
const applyAuthHeaderToRef = () => {
|
|
54
|
+
if (!currentAccessToken) return;
|
|
55
|
+
authOptionsRef.headers = {
|
|
56
|
+
...authOptionsRef.headers ?? {},
|
|
57
|
+
Authorization: `Bearer ${currentAccessToken}`
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
const wrapSection = (section, skipAuth = !hasCMSAuth) => {
|
|
61
|
+
return new Proxy(section, { get(target, prop, receiver) {
|
|
62
|
+
const value = Reflect.get(target, prop, receiver);
|
|
63
|
+
if (typeof value === "function") return async (...args) => {
|
|
64
|
+
if (!skipAuth) {
|
|
65
|
+
await ensureValidToken();
|
|
66
|
+
applyAuthHeaderToRef();
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
return await value.apply(target, args);
|
|
70
|
+
} catch (err) {
|
|
71
|
+
if (!skipAuth) {
|
|
72
|
+
await refreshToken();
|
|
73
|
+
applyAuthHeaderToRef();
|
|
74
|
+
return await value.apply(target, args);
|
|
75
|
+
}
|
|
76
|
+
throw err;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return value;
|
|
80
|
+
} });
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
organization: wrapSection(baseApi.organization),
|
|
84
|
+
project: wrapSection(baseApi.project),
|
|
85
|
+
user: wrapSection(baseApi.user),
|
|
86
|
+
oAuth: wrapSection(baseApi.oAuth, true),
|
|
87
|
+
dictionary: wrapSection(baseApi.dictionary),
|
|
88
|
+
stripe: wrapSection(baseApi.stripe),
|
|
89
|
+
ai: wrapSection(baseApi.ai),
|
|
90
|
+
tag: wrapSection(baseApi.tag),
|
|
91
|
+
search: wrapSection(baseApi.search),
|
|
92
|
+
editor: wrapSection(baseApi.editor),
|
|
93
|
+
newsletter: wrapSection(baseApi.newsletter)
|
|
94
|
+
};
|
|
99
95
|
};
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
export { getIntlayerAPIProxy };
|
|
100
99
|
//# sourceMappingURL=proxy.mjs.map
|