glitch-javascript-sdk 2.1.7 → 2.1.9
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 +15 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Media.d.ts +1 -1
- package/dist/esm/api/Titles.d.ts +12 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +13 -1
- package/package.json +1 -1
- package/src/api/Media.ts +1 -1
- package/src/api/Titles.ts +171 -157
- package/src/routes/TitlesRoute.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -3937,6 +3937,18 @@ declare class Titles {
|
|
|
3937
3937
|
* @returns AxiosPromise
|
|
3938
3938
|
*/
|
|
3939
3939
|
static importKeys<T>(title_id: string, file: File | Blob, data?: Record<string, any>, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3940
|
+
/**
|
|
3941
|
+
* Update administrator email preferences for a title.
|
|
3942
|
+
*
|
|
3943
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/updateTitleAdministrator
|
|
3944
|
+
*
|
|
3945
|
+
* @param title_id The id of the title.
|
|
3946
|
+
* @param user_id The id of the user/administrator.
|
|
3947
|
+
* @param data The preference data to update (notify_promotion_schedule_reminder_email, notify_weekly_promotion_performance_email).
|
|
3948
|
+
*
|
|
3949
|
+
* @returns Promise
|
|
3950
|
+
*/
|
|
3951
|
+
static updateAdministrator<T>(title_id: string, user_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3940
3952
|
}
|
|
3941
3953
|
|
|
3942
3954
|
declare class Campaigns {
|
|
@@ -5179,7 +5191,7 @@ declare class PlayTests {
|
|
|
5179
5191
|
|
|
5180
5192
|
interface SteamCapsuleCropRequest {
|
|
5181
5193
|
media_id: string;
|
|
5182
|
-
capsule_type: 'header' | 'small' | 'main' | 'vertical' | 'library' | 'library_header' | 'library_hero' | 'page_background';
|
|
5194
|
+
capsule_type: 'header' | 'small' | 'main' | 'vertical' | 'library' | 'library_header' | 'library_hero' | 'page_background' | 'screenshot' | 'app_icon' | 'shortcut_icon';
|
|
5183
5195
|
crop_x?: number;
|
|
5184
5196
|
crop_y?: number;
|
|
5185
5197
|
crop_width?: number;
|
package/package.json
CHANGED
package/src/api/Media.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { AxiosProgressEvent, AxiosPromise } from "axios";
|
|
|
5
5
|
|
|
6
6
|
export interface SteamCapsuleCropRequest {
|
|
7
7
|
media_id: string;
|
|
8
|
-
capsule_type: 'header' | 'small' | 'main' | 'vertical' | 'library' | 'library_header' | 'library_hero' | 'page_background';
|
|
8
|
+
capsule_type: 'header' | 'small' | 'main' | 'vertical' | 'library' | 'library_header' | 'library_hero' | 'page_background' | 'screenshot' | 'app_icon' | 'shortcut_icon';
|
|
9
9
|
crop_x?: number;
|
|
10
10
|
crop_y?: number;
|
|
11
11
|
crop_width?: number;
|
package/src/api/Titles.ts
CHANGED
|
@@ -552,164 +552,164 @@ class Titles {
|
|
|
552
552
|
);
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
*/
|
|
689
|
-
public static itemAndPurchaseTypeStats<T>(
|
|
690
|
-
title_id: string,
|
|
691
|
-
params?: Record<string, any>
|
|
692
|
-
): AxiosPromise<Response<T>> {
|
|
693
|
-
return Requests.processRoute(
|
|
694
|
-
TitlesRoute.routes.purchasesItemTypeStats,
|
|
695
|
-
{},
|
|
696
|
-
{ title_id },
|
|
697
|
-
params
|
|
698
|
-
);
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* Bulk import access keys for a title from a CSV or Excel file.
|
|
703
|
-
* The file must contain 'platform' and 'code' columns.
|
|
704
|
-
*
|
|
705
|
-
* @see https://api.glitch.fun/api/documentation#/Titles/importTitleKeys
|
|
706
|
-
*
|
|
707
|
-
* @param title_id The UUID of the title.
|
|
708
|
-
* @param file The CSV or Excel file to upload.
|
|
709
|
-
* @param data Optional additional form data.
|
|
710
|
-
* @param params Optional query parameters.
|
|
711
|
-
* @returns AxiosPromise
|
|
555
|
+
/**
|
|
556
|
+
* List all purchase events for a specific title.
|
|
557
|
+
* Matches GET /titles/{title_id}/purchases
|
|
558
|
+
*/
|
|
559
|
+
public static listPurchases<T>(
|
|
560
|
+
title_id: string,
|
|
561
|
+
params?: Record<string, any>
|
|
562
|
+
): AxiosPromise<Response<T>> {
|
|
563
|
+
return Requests.processRoute(
|
|
564
|
+
TitlesRoute.routes.purchasesList,
|
|
565
|
+
{},
|
|
566
|
+
{ title_id },
|
|
567
|
+
params
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Retrieve a single purchase record by ID.
|
|
573
|
+
* Matches GET /titles/{title_id}/purchases/{purchase_id}
|
|
574
|
+
*/
|
|
575
|
+
public static viewPurchase<T>(
|
|
576
|
+
title_id: string,
|
|
577
|
+
purchase_id: string,
|
|
578
|
+
params?: Record<string, any>
|
|
579
|
+
): AxiosPromise<Response<T>> {
|
|
580
|
+
return Requests.processRoute(
|
|
581
|
+
TitlesRoute.routes.purchasesShow,
|
|
582
|
+
{},
|
|
583
|
+
{ title_id, purchase_id },
|
|
584
|
+
params
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Create a new purchase record.
|
|
590
|
+
* Matches POST /titles/{title_id}/purchases
|
|
591
|
+
*/
|
|
592
|
+
public static createPurchase<T>(
|
|
593
|
+
title_id: string,
|
|
594
|
+
data: object,
|
|
595
|
+
params?: Record<string, any>
|
|
596
|
+
): AxiosPromise<Response<T>> {
|
|
597
|
+
return Requests.processRoute(
|
|
598
|
+
TitlesRoute.routes.purchasesCreate,
|
|
599
|
+
data,
|
|
600
|
+
{ title_id },
|
|
601
|
+
params
|
|
602
|
+
);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Get a summary of total revenue, grouped by day or purchase_type.
|
|
607
|
+
* Matches GET /titles/{title_id}/purchases/summary
|
|
608
|
+
*/
|
|
609
|
+
public static purchaseSummary<T>(
|
|
610
|
+
title_id: string,
|
|
611
|
+
params?: Record<string, any>
|
|
612
|
+
): AxiosPromise<Response<T>> {
|
|
613
|
+
return Requests.processRoute(
|
|
614
|
+
TitlesRoute.routes.purchasesSummary,
|
|
615
|
+
{},
|
|
616
|
+
{ title_id },
|
|
617
|
+
params
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Revenue by time (daily, weekly, or monthly).
|
|
623
|
+
* Matches GET /titles/{title_id}/purchases/reports/time
|
|
624
|
+
*/
|
|
625
|
+
public static purchaseRevenueByTime<T>(
|
|
626
|
+
title_id: string,
|
|
627
|
+
params?: Record<string, any>
|
|
628
|
+
): AxiosPromise<Response<T>> {
|
|
629
|
+
return Requests.processRoute(
|
|
630
|
+
TitlesRoute.routes.purchasesTimeReport,
|
|
631
|
+
{},
|
|
632
|
+
{ title_id },
|
|
633
|
+
params
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* 30-day LTV (Lifetime Value) per install.
|
|
639
|
+
* Matches GET /titles/{title_id}/purchases/reports/ltv30
|
|
640
|
+
*/
|
|
641
|
+
public static purchaseLtv30<T>(
|
|
642
|
+
title_id: string,
|
|
643
|
+
params?: Record<string, any>
|
|
644
|
+
): AxiosPromise<Response<T>> {
|
|
645
|
+
return Requests.processRoute(
|
|
646
|
+
TitlesRoute.routes.purchasesLtv30Report,
|
|
647
|
+
{},
|
|
648
|
+
{ title_id },
|
|
649
|
+
params
|
|
650
|
+
);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Show breakdown of revenue per currency, with optional USD conversion.
|
|
655
|
+
* Matches GET /titles/{title_id}/purchases/reports/currency
|
|
656
|
+
*/
|
|
657
|
+
public static purchaseCurrencyBreakdown<T>(
|
|
658
|
+
title_id: string,
|
|
659
|
+
params?: Record<string, any>
|
|
660
|
+
): AxiosPromise<Response<T>> {
|
|
661
|
+
return Requests.processRoute(
|
|
662
|
+
TitlesRoute.routes.purchasesCurrencyBreakdown,
|
|
663
|
+
{},
|
|
664
|
+
{ title_id },
|
|
665
|
+
params
|
|
666
|
+
);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Distribution of installs by total revenue, plus a histogram array.
|
|
671
|
+
* Matches GET /titles/{title_id}/purchases/reports/install-distribution
|
|
672
|
+
*/
|
|
673
|
+
public static installRevenueDistribution<T>(
|
|
674
|
+
title_id: string,
|
|
675
|
+
params?: Record<string, any>
|
|
676
|
+
): AxiosPromise<Response<T>> {
|
|
677
|
+
return Requests.processRoute(
|
|
678
|
+
TitlesRoute.routes.purchasesInstallDistribution,
|
|
679
|
+
{},
|
|
680
|
+
{ title_id },
|
|
681
|
+
params
|
|
682
|
+
);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Stats by item SKU, purchase type, and repeat purchase analysis.
|
|
687
|
+
* Matches GET /titles/{title_id}/purchases/reports/item-type-stats
|
|
712
688
|
*/
|
|
689
|
+
public static itemAndPurchaseTypeStats<T>(
|
|
690
|
+
title_id: string,
|
|
691
|
+
params?: Record<string, any>
|
|
692
|
+
): AxiosPromise<Response<T>> {
|
|
693
|
+
return Requests.processRoute(
|
|
694
|
+
TitlesRoute.routes.purchasesItemTypeStats,
|
|
695
|
+
{},
|
|
696
|
+
{ title_id },
|
|
697
|
+
params
|
|
698
|
+
);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Bulk import access keys for a title from a CSV or Excel file.
|
|
703
|
+
* The file must contain 'platform' and 'code' columns.
|
|
704
|
+
*
|
|
705
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/importTitleKeys
|
|
706
|
+
*
|
|
707
|
+
* @param title_id The UUID of the title.
|
|
708
|
+
* @param file The CSV or Excel file to upload.
|
|
709
|
+
* @param data Optional additional form data.
|
|
710
|
+
* @param params Optional query parameters.
|
|
711
|
+
* @returns AxiosPromise
|
|
712
|
+
*/
|
|
713
713
|
public static importKeys<T>(
|
|
714
714
|
title_id: string,
|
|
715
715
|
file: File | Blob,
|
|
@@ -721,6 +721,20 @@ class Titles {
|
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
|
|
724
|
+
/**
|
|
725
|
+
* Update administrator email preferences for a title.
|
|
726
|
+
*
|
|
727
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/updateTitleAdministrator
|
|
728
|
+
*
|
|
729
|
+
* @param title_id The id of the title.
|
|
730
|
+
* @param user_id The id of the user/administrator.
|
|
731
|
+
* @param data The preference data to update (notify_promotion_schedule_reminder_email, notify_weekly_promotion_performance_email).
|
|
732
|
+
*
|
|
733
|
+
* @returns Promise
|
|
734
|
+
*/
|
|
735
|
+
public static updateAdministrator<T>(title_id: string, user_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
736
|
+
return Requests.processRoute(TitlesRoute.routes.updateAdministrator, data, { title_id: title_id, user_id: user_id }, params);
|
|
737
|
+
}
|
|
724
738
|
|
|
725
739
|
}
|
|
726
740
|
|
|
@@ -32,6 +32,7 @@ class TitlesRoute {
|
|
|
32
32
|
activeRetentions: { url: '/titles/{title_id}/retentions/active', method: HTTP_METHODS.GET },
|
|
33
33
|
retentionAnalysis: { url: '/titles/{title_id}/retentions/analysis', method: HTTP_METHODS.GET },
|
|
34
34
|
distinctDimensions: { url: '/titles/{title_id}/installs/distinctDimensions', method: HTTP_METHODS.GET },
|
|
35
|
+
updateAdministrator: { url: '/titles/{title_id}/updateAdministrator/{user_id}', method: HTTP_METHODS.PUT },
|
|
35
36
|
listSessions: {
|
|
36
37
|
url: '/titles/{title_id}/installs/sessions',
|
|
37
38
|
method: HTTP_METHODS.GET
|