glitch-javascript-sdk 2.2.0 → 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.
@@ -367,5 +367,57 @@ declare class Titles {
367
367
  * Retry a failed or pending ad conversion event
368
368
  */
369
369
  static retryAdConversionEvent<T>(title_id: string, event_id: string): AxiosPromise<Response<T>>;
370
+ /**
371
+ * List all landing pages for a specific title.
372
+ * @param title_id The UUID of the title.
373
+ * @param params Optional query parameters for pagination.
374
+ */
375
+ static listLandingPages<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
376
+ /**
377
+ * Create a new landing page for a title.
378
+ * @param title_id The UUID of the title.
379
+ * @param data The data for the new landing page.
380
+ */
381
+ static createLandingPage<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
382
+ /**
383
+ * View a specific landing page by its ID.
384
+ * @param landing_page_id The UUID of the landing page.
385
+ */
386
+ static viewLandingPage<T>(landing_page_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
387
+ /**
388
+ * Update an existing landing page.
389
+ * @param landing_page_id The UUID of the landing page to update.
390
+ * @param data The new data for the landing page.
391
+ */
392
+ static updateLandingPage<T>(landing_page_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
393
+ /**
394
+ * Delete a landing page.
395
+ * @param landing_page_id The UUID of the landing page to delete.
396
+ */
397
+ static deleteLandingPage<T>(landing_page_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
398
+ /**
399
+ * Trigger an AI translation for a landing page.
400
+ * @param landing_page_id The UUID of the landing page.
401
+ * @param data An object containing the target language code, e.g., { language_code: 'es' }.
402
+ */
403
+ static translateLandingPage<T>(landing_page_id: string, data: {
404
+ language_code: string;
405
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
406
+ /**
407
+ * Generate or regenerate AI-powered HTML content for a landing page.
408
+ * @param landing_page_id The UUID of the landing page.
409
+ * @param data An object containing the prompt, language_code, and privacy_mode.
410
+ */
411
+ static generateLandingPageAiContent<T>(landing_page_id: string, data: {
412
+ prompt: string;
413
+ language_code: string;
414
+ privacy_mode: string;
415
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
416
+ /**
417
+ * Create or update a specific translation for a landing page.
418
+ * @param landing_page_id The UUID of the landing page.
419
+ * @param translationData The full translation object to be saved.
420
+ */
421
+ static saveLandingPageTranslation<T>(landing_page_id: string, translationData: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
370
422
  }
371
423
  export default Titles;
package/dist/esm/index.js CHANGED
@@ -11352,7 +11352,15 @@ var TitlesRoute = /** @class */ (function () {
11352
11352
  retryAdConversionEvent: {
11353
11353
  url: '/titles/{title_id}/ad-conversion-events/{event_id}/retry',
11354
11354
  method: HTTP_METHODS.POST
11355
- }
11355
+ },
11356
+ listLandingPages: { url: '/titles/{title_id}/landing-pages', method: HTTP_METHODS.GET },
11357
+ createLandingPage: { url: '/titles/{title_id}/landing-pages', method: HTTP_METHODS.POST },
11358
+ viewLandingPage: { url: '/landing-pages/{landing_page_id}', method: HTTP_METHODS.GET },
11359
+ updateLandingPage: { url: '/landing-pages/{landing_page_id}', method: HTTP_METHODS.PUT },
11360
+ deleteLandingPage: { url: '/landing-pages/{landing_page_id}', method: HTTP_METHODS.DELETE },
11361
+ translateLandingPage: { url: '/landing-pages/{landing_page_id}/translate', method: HTTP_METHODS.POST },
11362
+ generateLandingPageAiContent: { url: '/landing-pages/{landing_page_id}/generate-ai-content', method: HTTP_METHODS.POST },
11363
+ saveLandingPageTranslation: { url: '/landing-pages/{landing_page_id}/translations', method: HTTP_METHODS.POST },
11356
11364
  };
11357
11365
  return TitlesRoute;
11358
11366
  }());
@@ -11837,6 +11845,68 @@ var Titles = /** @class */ (function () {
11837
11845
  Titles.retryAdConversionEvent = function (title_id, event_id) {
11838
11846
  return Requests.processRoute(TitlesRoute.routes.retryAdConversionEvent, {}, { title_id: title_id, event_id: event_id });
11839
11847
  };
11848
+ /**
11849
+ * List all landing pages for a specific title.
11850
+ * @param title_id The UUID of the title.
11851
+ * @param params Optional query parameters for pagination.
11852
+ */
11853
+ Titles.listLandingPages = function (title_id, params) {
11854
+ return Requests.processRoute(TitlesRoute.routes.listLandingPages, {}, { title_id: title_id }, params);
11855
+ };
11856
+ /**
11857
+ * Create a new landing page for a title.
11858
+ * @param title_id The UUID of the title.
11859
+ * @param data The data for the new landing page.
11860
+ */
11861
+ Titles.createLandingPage = function (title_id, data, params) {
11862
+ return Requests.processRoute(TitlesRoute.routes.createLandingPage, data, { title_id: title_id }, params);
11863
+ };
11864
+ /**
11865
+ * View a specific landing page by its ID.
11866
+ * @param landing_page_id The UUID of the landing page.
11867
+ */
11868
+ Titles.viewLandingPage = function (landing_page_id, params) {
11869
+ return Requests.processRoute(TitlesRoute.routes.viewLandingPage, {}, { landing_page_id: landing_page_id }, params);
11870
+ };
11871
+ /**
11872
+ * Update an existing landing page.
11873
+ * @param landing_page_id The UUID of the landing page to update.
11874
+ * @param data The new data for the landing page.
11875
+ */
11876
+ Titles.updateLandingPage = function (landing_page_id, data, params) {
11877
+ return Requests.processRoute(TitlesRoute.routes.updateLandingPage, data, { landing_page_id: landing_page_id }, params);
11878
+ };
11879
+ /**
11880
+ * Delete a landing page.
11881
+ * @param landing_page_id The UUID of the landing page to delete.
11882
+ */
11883
+ Titles.deleteLandingPage = function (landing_page_id, params) {
11884
+ return Requests.processRoute(TitlesRoute.routes.deleteLandingPage, {}, { landing_page_id: landing_page_id }, params);
11885
+ };
11886
+ /**
11887
+ * Trigger an AI translation for a landing page.
11888
+ * @param landing_page_id The UUID of the landing page.
11889
+ * @param data An object containing the target language code, e.g., { language_code: 'es' }.
11890
+ */
11891
+ Titles.translateLandingPage = function (landing_page_id, data, params) {
11892
+ return Requests.processRoute(TitlesRoute.routes.translateLandingPage, data, { landing_page_id: landing_page_id }, params);
11893
+ };
11894
+ /**
11895
+ * Generate or regenerate AI-powered HTML content for a landing page.
11896
+ * @param landing_page_id The UUID of the landing page.
11897
+ * @param data An object containing the prompt, language_code, and privacy_mode.
11898
+ */
11899
+ Titles.generateLandingPageAiContent = function (landing_page_id, data, params) {
11900
+ return Requests.processRoute(TitlesRoute.routes.generateLandingPageAiContent, data, { landing_page_id: landing_page_id }, params);
11901
+ };
11902
+ /**
11903
+ * Create or update a specific translation for a landing page.
11904
+ * @param landing_page_id The UUID of the landing page.
11905
+ * @param translationData The full translation object to be saved.
11906
+ */
11907
+ Titles.saveLandingPageTranslation = function (landing_page_id, translationData, params) {
11908
+ return Requests.processRoute(TitlesRoute.routes.saveLandingPageTranslation, translationData, { landing_page_id: landing_page_id }, params);
11909
+ };
11840
11910
  return Titles;
11841
11911
  }());
11842
11912