glitch-javascript-sdk 2.2.1 → 2.2.2
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/index.js +18 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +16 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +16 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +17 -0
- package/src/routes/CommunitiesRoute.ts +1 -0
- package/src/routes/TitlesRoute.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -3993,6 +3993,22 @@ declare class Titles {
|
|
|
3993
3993
|
static translateLandingPage<T>(landing_page_id: string, data: {
|
|
3994
3994
|
language_code: string;
|
|
3995
3995
|
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3996
|
+
/**
|
|
3997
|
+
* Generate or regenerate AI-powered HTML content for a landing page.
|
|
3998
|
+
* @param landing_page_id The UUID of the landing page.
|
|
3999
|
+
* @param data An object containing the prompt, language_code, and privacy_mode.
|
|
4000
|
+
*/
|
|
4001
|
+
static generateLandingPageAiContent<T>(landing_page_id: string, data: {
|
|
4002
|
+
prompt: string;
|
|
4003
|
+
language_code: string;
|
|
4004
|
+
privacy_mode: string;
|
|
4005
|
+
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4006
|
+
/**
|
|
4007
|
+
* Create or update a specific translation for a landing page.
|
|
4008
|
+
* @param landing_page_id The UUID of the landing page.
|
|
4009
|
+
* @param translationData The full translation object to be saved.
|
|
4010
|
+
*/
|
|
4011
|
+
static saveLandingPageTranslation<T>(landing_page_id: string, translationData: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3996
4012
|
}
|
|
3997
4013
|
|
|
3998
4014
|
declare class Campaigns {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -817,6 +817,23 @@ class Titles {
|
|
|
817
817
|
return Requests.processRoute(TitlesRoute.routes.translateLandingPage, data, { landing_page_id }, params);
|
|
818
818
|
}
|
|
819
819
|
|
|
820
|
+
/**
|
|
821
|
+
* Generate or regenerate AI-powered HTML content for a landing page.
|
|
822
|
+
* @param landing_page_id The UUID of the landing page.
|
|
823
|
+
* @param data An object containing the prompt, language_code, and privacy_mode.
|
|
824
|
+
*/
|
|
825
|
+
public static generateLandingPageAiContent<T>(landing_page_id: string, data: { prompt: string, language_code: string, privacy_mode: string }, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
826
|
+
return Requests.processRoute(TitlesRoute.routes.generateLandingPageAiContent, data, { landing_page_id }, params);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Create or update a specific translation for a landing page.
|
|
831
|
+
* @param landing_page_id The UUID of the landing page.
|
|
832
|
+
* @param translationData The full translation object to be saved.
|
|
833
|
+
*/
|
|
834
|
+
public static saveLandingPageTranslation<T>(landing_page_id: string, translationData: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
835
|
+
return Requests.processRoute(TitlesRoute.routes.saveLandingPageTranslation, translationData, { landing_page_id }, params);
|
|
836
|
+
}
|
|
820
837
|
}
|
|
821
838
|
|
|
822
839
|
export default Titles;
|
|
@@ -155,6 +155,9 @@ class TitlesRoute {
|
|
|
155
155
|
deleteLandingPage: { url: '/landing-pages/{landing_page_id}', method: HTTP_METHODS.DELETE },
|
|
156
156
|
translateLandingPage: { url: '/landing-pages/{landing_page_id}/translate', method: HTTP_METHODS.POST },
|
|
157
157
|
|
|
158
|
+
generateLandingPageAiContent: { url: '/landing-pages/{landing_page_id}/generate-ai-content', method: HTTP_METHODS.POST },
|
|
159
|
+
saveLandingPageTranslation: { url: '/landing-pages/{landing_page_id}/translations', method: HTTP_METHODS.POST },
|
|
160
|
+
|
|
158
161
|
};
|
|
159
162
|
|
|
160
163
|
}
|