glitch-javascript-sdk 2.1.9 → 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 +83 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +8 -0
- package/dist/esm/api/Titles.d.ts +44 -0
- package/dist/esm/index.js +83 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +52 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +11 -0
- package/src/api/Titles.ts +81 -0
- package/src/routes/CampaignsRoute.ts +2 -0
- package/src/routes/TitlesRoute.ts +53 -38
package/dist/index.d.ts
CHANGED
|
@@ -3949,6 +3949,50 @@ declare class Titles {
|
|
|
3949
3949
|
* @returns Promise
|
|
3950
3950
|
*/
|
|
3951
3951
|
static updateAdministrator<T>(title_id: string, user_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3952
|
+
/**
|
|
3953
|
+
* List ad conversion events for a title with filtering
|
|
3954
|
+
*/
|
|
3955
|
+
static listAdConversionEvents<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3956
|
+
/**
|
|
3957
|
+
* Retry a failed or pending ad conversion event
|
|
3958
|
+
*/
|
|
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>>;
|
|
3952
3996
|
}
|
|
3953
3997
|
|
|
3954
3998
|
declare class Campaigns {
|
|
@@ -4625,6 +4669,14 @@ declare class Campaigns {
|
|
|
4625
4669
|
static sourcingGetGamesByIds<T>(campaign_id: string, data: {
|
|
4626
4670
|
igdb_ids: number[];
|
|
4627
4671
|
}): AxiosPromise<Response<T>>;
|
|
4672
|
+
/**
|
|
4673
|
+
* Get full game details from a list of IGDB IDs.
|
|
4674
|
+
* @param campaign_id The UUID of the campaign.
|
|
4675
|
+
* @param data An object containing the array of IGDB IDs.
|
|
4676
|
+
* @param data.igdb_ids An array of IGDB game IDs.
|
|
4677
|
+
* @returns promise
|
|
4678
|
+
*/
|
|
4679
|
+
static updateAutoInviteCriteria<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4628
4680
|
}
|
|
4629
4681
|
|
|
4630
4682
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -937,6 +937,17 @@ class Campaigns {
|
|
|
937
937
|
return Requests.processRoute(CampaignsRoute.routes.sourcingGetGamesByIds, data, { campaign_id });
|
|
938
938
|
}
|
|
939
939
|
|
|
940
|
+
/**
|
|
941
|
+
* Get full game details from a list of IGDB IDs.
|
|
942
|
+
* @param campaign_id The UUID of the campaign.
|
|
943
|
+
* @param data An object containing the array of IGDB IDs.
|
|
944
|
+
* @param data.igdb_ids An array of IGDB game IDs.
|
|
945
|
+
* @returns promise
|
|
946
|
+
*/
|
|
947
|
+
public static updateAutoInviteCriteria<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
|
|
948
|
+
return Requests.processRoute(CampaignsRoute.routes.updateAutoInviteCriteria, data, { campaign_id });
|
|
949
|
+
}
|
|
950
|
+
|
|
940
951
|
|
|
941
952
|
}
|
|
942
953
|
|
package/src/api/Titles.ts
CHANGED
|
@@ -736,6 +736,87 @@ class Titles {
|
|
|
736
736
|
return Requests.processRoute(TitlesRoute.routes.updateAdministrator, data, { title_id: title_id, user_id: user_id }, params);
|
|
737
737
|
}
|
|
738
738
|
|
|
739
|
+
/**
|
|
740
|
+
* List ad conversion events for a title with filtering
|
|
741
|
+
*/
|
|
742
|
+
public static listAdConversionEvents<T>(
|
|
743
|
+
title_id: string,
|
|
744
|
+
params?: Record<string, any>
|
|
745
|
+
): AxiosPromise<Response<T>> {
|
|
746
|
+
return Requests.processRoute(
|
|
747
|
+
TitlesRoute.routes.listAdConversionEvents,
|
|
748
|
+
{},
|
|
749
|
+
{ title_id },
|
|
750
|
+
params
|
|
751
|
+
);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Retry a failed or pending ad conversion event
|
|
756
|
+
*/
|
|
757
|
+
public static retryAdConversionEvent<T>(
|
|
758
|
+
title_id: string,
|
|
759
|
+
event_id: string
|
|
760
|
+
): AxiosPromise<Response<T>> {
|
|
761
|
+
return Requests.processRoute(
|
|
762
|
+
TitlesRoute.routes.retryAdConversionEvent,
|
|
763
|
+
{},
|
|
764
|
+
{ title_id, event_id }
|
|
765
|
+
);
|
|
766
|
+
}
|
|
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
|
+
|
|
739
820
|
}
|
|
740
821
|
|
|
741
822
|
export default Titles;
|
|
@@ -76,6 +76,8 @@ class CampaignsRoute {
|
|
|
76
76
|
exportSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators/export', method: HTTP_METHODS.GET },
|
|
77
77
|
sourcingSearchAnyIgdbGame: { url: '/campaigns/{campaign_id}/sourcing/search-any-game', method: HTTP_METHODS.GET },
|
|
78
78
|
sourcingGetGamesByIds: { url: '/campaigns/{campaign_id}/sourcing/games-by-ids', method: HTTP_METHODS.POST },
|
|
79
|
+
updateAutoInviteCriteria: { url: '/campaigns/{campaign_id}/sourcing/auto-invite-criteria', method: HTTP_METHODS.PUT },
|
|
80
|
+
|
|
79
81
|
|
|
80
82
|
};
|
|
81
83
|
|
|
@@ -100,45 +100,60 @@ class TitlesRoute {
|
|
|
100
100
|
// ─────────────────────────────────────────────────────────────────
|
|
101
101
|
// Purchase/Revenue Endpoints
|
|
102
102
|
// ─────────────────────────────────────────────────────────────────
|
|
103
|
-
purchasesList: {
|
|
104
|
-
url: "/titles/{title_id}/purchases",
|
|
105
|
-
method: HTTP_METHODS.GET,
|
|
106
|
-
},
|
|
107
|
-
purchasesShow: {
|
|
108
|
-
url: "/titles/{title_id}/purchases/{purchase_id}",
|
|
109
|
-
method: HTTP_METHODS.GET,
|
|
110
|
-
},
|
|
111
|
-
purchasesCreate: {
|
|
112
|
-
url: "/titles/{title_id}/purchases",
|
|
113
|
-
method: HTTP_METHODS.POST,
|
|
114
|
-
},
|
|
115
|
-
purchasesSummary: {
|
|
116
|
-
url: "/titles/{title_id}/purchases/summary",
|
|
117
|
-
method: HTTP_METHODS.GET,
|
|
118
|
-
},
|
|
119
|
-
|
|
103
|
+
purchasesList: {
|
|
104
|
+
url: "/titles/{title_id}/purchases",
|
|
105
|
+
method: HTTP_METHODS.GET,
|
|
106
|
+
},
|
|
107
|
+
purchasesShow: {
|
|
108
|
+
url: "/titles/{title_id}/purchases/{purchase_id}",
|
|
109
|
+
method: HTTP_METHODS.GET,
|
|
110
|
+
},
|
|
111
|
+
purchasesCreate: {
|
|
112
|
+
url: "/titles/{title_id}/purchases",
|
|
113
|
+
method: HTTP_METHODS.POST,
|
|
114
|
+
},
|
|
115
|
+
purchasesSummary: {
|
|
116
|
+
url: "/titles/{title_id}/purchases/summary",
|
|
117
|
+
method: HTTP_METHODS.GET,
|
|
118
|
+
},
|
|
119
|
+
|
|
120
120
|
// Advanced analytics sub-routes
|
|
121
|
-
purchasesTimeReport: {
|
|
122
|
-
url: "/titles/{title_id}/purchases/reports/time",
|
|
123
|
-
method: HTTP_METHODS.GET,
|
|
124
|
-
},
|
|
125
|
-
purchasesLtv30Report: {
|
|
126
|
-
url: "/titles/{title_id}/purchases/reports/ltv30",
|
|
127
|
-
method: HTTP_METHODS.GET,
|
|
128
|
-
},
|
|
129
|
-
purchasesCurrencyBreakdown: {
|
|
130
|
-
url: "/titles/{title_id}/purchases/reports/currency",
|
|
131
|
-
method: HTTP_METHODS.GET,
|
|
132
|
-
},
|
|
133
|
-
purchasesInstallDistribution: {
|
|
134
|
-
url: "/titles/{title_id}/purchases/reports/install-distribution",
|
|
135
|
-
method: HTTP_METHODS.GET,
|
|
136
|
-
},
|
|
137
|
-
purchasesItemTypeStats: {
|
|
138
|
-
url: "/titles/{title_id}/purchases/reports/item-type-stats",
|
|
139
|
-
method: HTTP_METHODS.GET,
|
|
140
|
-
},
|
|
141
|
-
|
|
121
|
+
purchasesTimeReport: {
|
|
122
|
+
url: "/titles/{title_id}/purchases/reports/time",
|
|
123
|
+
method: HTTP_METHODS.GET,
|
|
124
|
+
},
|
|
125
|
+
purchasesLtv30Report: {
|
|
126
|
+
url: "/titles/{title_id}/purchases/reports/ltv30",
|
|
127
|
+
method: HTTP_METHODS.GET,
|
|
128
|
+
},
|
|
129
|
+
purchasesCurrencyBreakdown: {
|
|
130
|
+
url: "/titles/{title_id}/purchases/reports/currency",
|
|
131
|
+
method: HTTP_METHODS.GET,
|
|
132
|
+
},
|
|
133
|
+
purchasesInstallDistribution: {
|
|
134
|
+
url: "/titles/{title_id}/purchases/reports/install-distribution",
|
|
135
|
+
method: HTTP_METHODS.GET,
|
|
136
|
+
},
|
|
137
|
+
purchasesItemTypeStats: {
|
|
138
|
+
url: "/titles/{title_id}/purchases/reports/item-type-stats",
|
|
139
|
+
method: HTTP_METHODS.GET,
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
listAdConversionEvents: {
|
|
143
|
+
url: '/titles/{title_id}/ad-conversion-events',
|
|
144
|
+
method: HTTP_METHODS.GET
|
|
145
|
+
},
|
|
146
|
+
retryAdConversionEvent: {
|
|
147
|
+
url: '/titles/{title_id}/ad-conversion-events/{event_id}/retry',
|
|
148
|
+
method: HTTP_METHODS.POST
|
|
149
|
+
},
|
|
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 },
|
|
142
157
|
|
|
143
158
|
};
|
|
144
159
|
|