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/index.d.ts
CHANGED
|
@@ -3957,6 +3957,42 @@ declare class Titles {
|
|
|
3957
3957
|
* Retry a failed or pending ad conversion event
|
|
3958
3958
|
*/
|
|
3959
3959
|
static retryAdConversionEvent<T>(title_id: string, event_id: string): AxiosPromise<Response<T>>;
|
|
3960
|
+
/**
|
|
3961
|
+
* List all landing pages for a specific title.
|
|
3962
|
+
* @param title_id The UUID of the title.
|
|
3963
|
+
* @param params Optional query parameters for pagination.
|
|
3964
|
+
*/
|
|
3965
|
+
static listLandingPages<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3966
|
+
/**
|
|
3967
|
+
* Create a new landing page for a title.
|
|
3968
|
+
* @param title_id The UUID of the title.
|
|
3969
|
+
* @param data The data for the new landing page.
|
|
3970
|
+
*/
|
|
3971
|
+
static createLandingPage<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3972
|
+
/**
|
|
3973
|
+
* View a specific landing page by its ID.
|
|
3974
|
+
* @param landing_page_id The UUID of the landing page.
|
|
3975
|
+
*/
|
|
3976
|
+
static viewLandingPage<T>(landing_page_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3977
|
+
/**
|
|
3978
|
+
* Update an existing landing page.
|
|
3979
|
+
* @param landing_page_id The UUID of the landing page to update.
|
|
3980
|
+
* @param data The new data for the landing page.
|
|
3981
|
+
*/
|
|
3982
|
+
static updateLandingPage<T>(landing_page_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3983
|
+
/**
|
|
3984
|
+
* Delete a landing page.
|
|
3985
|
+
* @param landing_page_id The UUID of the landing page to delete.
|
|
3986
|
+
*/
|
|
3987
|
+
static deleteLandingPage<T>(landing_page_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3988
|
+
/**
|
|
3989
|
+
* Trigger an AI translation for a landing page.
|
|
3990
|
+
* @param landing_page_id The UUID of the landing page.
|
|
3991
|
+
* @param data An object containing the target language code, e.g., { language_code: 'es' }.
|
|
3992
|
+
*/
|
|
3993
|
+
static translateLandingPage<T>(landing_page_id: string, data: {
|
|
3994
|
+
language_code: string;
|
|
3995
|
+
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3960
3996
|
}
|
|
3961
3997
|
|
|
3962
3998
|
declare class Campaigns {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -765,6 +765,58 @@ class Titles {
|
|
|
765
765
|
);
|
|
766
766
|
}
|
|
767
767
|
|
|
768
|
+
/**
|
|
769
|
+
* List all landing pages for a specific title.
|
|
770
|
+
* @param title_id The UUID of the title.
|
|
771
|
+
* @param params Optional query parameters for pagination.
|
|
772
|
+
*/
|
|
773
|
+
public static listLandingPages<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
774
|
+
return Requests.processRoute(TitlesRoute.routes.listLandingPages, {}, { title_id }, params);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* Create a new landing page for a title.
|
|
779
|
+
* @param title_id The UUID of the title.
|
|
780
|
+
* @param data The data for the new landing page.
|
|
781
|
+
*/
|
|
782
|
+
public static createLandingPage<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
783
|
+
return Requests.processRoute(TitlesRoute.routes.createLandingPage, data, { title_id }, params);
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* View a specific landing page by its ID.
|
|
788
|
+
* @param landing_page_id The UUID of the landing page.
|
|
789
|
+
*/
|
|
790
|
+
public static viewLandingPage<T>(landing_page_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
791
|
+
return Requests.processRoute(TitlesRoute.routes.viewLandingPage, {}, { landing_page_id }, params);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Update an existing landing page.
|
|
796
|
+
* @param landing_page_id The UUID of the landing page to update.
|
|
797
|
+
* @param data The new data for the landing page.
|
|
798
|
+
*/
|
|
799
|
+
public static updateLandingPage<T>(landing_page_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
800
|
+
return Requests.processRoute(TitlesRoute.routes.updateLandingPage, data, { landing_page_id }, params);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Delete a landing page.
|
|
805
|
+
* @param landing_page_id The UUID of the landing page to delete.
|
|
806
|
+
*/
|
|
807
|
+
public static deleteLandingPage<T>(landing_page_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
808
|
+
return Requests.processRoute(TitlesRoute.routes.deleteLandingPage, {}, { landing_page_id }, params);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Trigger an AI translation for a landing page.
|
|
813
|
+
* @param landing_page_id The UUID of the landing page.
|
|
814
|
+
* @param data An object containing the target language code, e.g., { language_code: 'es' }.
|
|
815
|
+
*/
|
|
816
|
+
public static translateLandingPage<T>(landing_page_id: string, data: { language_code: string }, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
817
|
+
return Requests.processRoute(TitlesRoute.routes.translateLandingPage, data, { landing_page_id }, params);
|
|
818
|
+
}
|
|
819
|
+
|
|
768
820
|
}
|
|
769
821
|
|
|
770
822
|
export default Titles;
|
|
@@ -146,8 +146,14 @@ class TitlesRoute {
|
|
|
146
146
|
retryAdConversionEvent: {
|
|
147
147
|
url: '/titles/{title_id}/ad-conversion-events/{event_id}/retry',
|
|
148
148
|
method: HTTP_METHODS.POST
|
|
149
|
-
}
|
|
149
|
+
},
|
|
150
150
|
|
|
151
|
+
listLandingPages: { url: '/titles/{title_id}/landing-pages', method: HTTP_METHODS.GET },
|
|
152
|
+
createLandingPage: { url: '/titles/{title_id}/landing-pages', method: HTTP_METHODS.POST },
|
|
153
|
+
viewLandingPage: { url: '/landing-pages/{landing_page_id}', method: HTTP_METHODS.GET },
|
|
154
|
+
updateLandingPage: { url: '/landing-pages/{landing_page_id}', method: HTTP_METHODS.PUT },
|
|
155
|
+
deleteLandingPage: { url: '/landing-pages/{landing_page_id}', method: HTTP_METHODS.DELETE },
|
|
156
|
+
translateLandingPage: { url: '/landing-pages/{landing_page_id}/translate', method: HTTP_METHODS.POST },
|
|
151
157
|
|
|
152
158
|
};
|
|
153
159
|
|