glitch-javascript-sdk 2.2.0 → 2.2.1
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 +53 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +36 -0
- package/dist/esm/index.js +53 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +36 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +52 -0
- package/src/routes/TitlesRoute.ts +7 -1
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -367,5 +367,41 @@ 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>>;
|
|
370
406
|
}
|
|
371
407
|
export default Titles;
|
package/dist/esm/index.js
CHANGED
|
@@ -11352,7 +11352,13 @@ 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 },
|
|
11356
11362
|
};
|
|
11357
11363
|
return TitlesRoute;
|
|
11358
11364
|
}());
|
|
@@ -11837,6 +11843,52 @@ var Titles = /** @class */ (function () {
|
|
|
11837
11843
|
Titles.retryAdConversionEvent = function (title_id, event_id) {
|
|
11838
11844
|
return Requests.processRoute(TitlesRoute.routes.retryAdConversionEvent, {}, { title_id: title_id, event_id: event_id });
|
|
11839
11845
|
};
|
|
11846
|
+
/**
|
|
11847
|
+
* List all landing pages for a specific title.
|
|
11848
|
+
* @param title_id The UUID of the title.
|
|
11849
|
+
* @param params Optional query parameters for pagination.
|
|
11850
|
+
*/
|
|
11851
|
+
Titles.listLandingPages = function (title_id, params) {
|
|
11852
|
+
return Requests.processRoute(TitlesRoute.routes.listLandingPages, {}, { title_id: title_id }, params);
|
|
11853
|
+
};
|
|
11854
|
+
/**
|
|
11855
|
+
* Create a new landing page for a title.
|
|
11856
|
+
* @param title_id The UUID of the title.
|
|
11857
|
+
* @param data The data for the new landing page.
|
|
11858
|
+
*/
|
|
11859
|
+
Titles.createLandingPage = function (title_id, data, params) {
|
|
11860
|
+
return Requests.processRoute(TitlesRoute.routes.createLandingPage, data, { title_id: title_id }, params);
|
|
11861
|
+
};
|
|
11862
|
+
/**
|
|
11863
|
+
* View a specific landing page by its ID.
|
|
11864
|
+
* @param landing_page_id The UUID of the landing page.
|
|
11865
|
+
*/
|
|
11866
|
+
Titles.viewLandingPage = function (landing_page_id, params) {
|
|
11867
|
+
return Requests.processRoute(TitlesRoute.routes.viewLandingPage, {}, { landing_page_id: landing_page_id }, params);
|
|
11868
|
+
};
|
|
11869
|
+
/**
|
|
11870
|
+
* Update an existing landing page.
|
|
11871
|
+
* @param landing_page_id The UUID of the landing page to update.
|
|
11872
|
+
* @param data The new data for the landing page.
|
|
11873
|
+
*/
|
|
11874
|
+
Titles.updateLandingPage = function (landing_page_id, data, params) {
|
|
11875
|
+
return Requests.processRoute(TitlesRoute.routes.updateLandingPage, data, { landing_page_id: landing_page_id }, params);
|
|
11876
|
+
};
|
|
11877
|
+
/**
|
|
11878
|
+
* Delete a landing page.
|
|
11879
|
+
* @param landing_page_id The UUID of the landing page to delete.
|
|
11880
|
+
*/
|
|
11881
|
+
Titles.deleteLandingPage = function (landing_page_id, params) {
|
|
11882
|
+
return Requests.processRoute(TitlesRoute.routes.deleteLandingPage, {}, { landing_page_id: landing_page_id }, params);
|
|
11883
|
+
};
|
|
11884
|
+
/**
|
|
11885
|
+
* Trigger an AI translation for a landing page.
|
|
11886
|
+
* @param landing_page_id The UUID of the landing page.
|
|
11887
|
+
* @param data An object containing the target language code, e.g., { language_code: 'es' }.
|
|
11888
|
+
*/
|
|
11889
|
+
Titles.translateLandingPage = function (landing_page_id, data, params) {
|
|
11890
|
+
return Requests.processRoute(TitlesRoute.routes.translateLandingPage, data, { landing_page_id: landing_page_id }, params);
|
|
11891
|
+
};
|
|
11840
11892
|
return Titles;
|
|
11841
11893
|
}());
|
|
11842
11894
|
|