glitch-javascript-sdk 1.9.7 → 1.9.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 +114 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +57 -0
- package/dist/esm/api/Communities.d.ts +24 -0
- package/dist/esm/index.js +114 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +81 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +80 -0
- package/src/api/Communities.ts +33 -0
- package/src/routes/CampaignsRoute.ts +8 -0
- package/src/routes/CommunitiesRoute.ts +11 -6
package/dist/index.d.ts
CHANGED
|
@@ -1706,6 +1706,30 @@ declare class Communities {
|
|
|
1706
1706
|
static importGameInstalls<T>(community_id: string, newsletter_id: string, data: {
|
|
1707
1707
|
format: 'csv' | 'xlsx';
|
|
1708
1708
|
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1709
|
+
/**
|
|
1710
|
+
* Retrieve the current user's pending community invitations across all communities.
|
|
1711
|
+
*
|
|
1712
|
+
* @returns promise
|
|
1713
|
+
*/
|
|
1714
|
+
static myInvites<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1715
|
+
/**
|
|
1716
|
+
* Resends an invitation to a user.
|
|
1717
|
+
*
|
|
1718
|
+
* @param community_id The id of the community.
|
|
1719
|
+
* @param invite_id The id of the invite to resend.
|
|
1720
|
+
*
|
|
1721
|
+
* @returns promise
|
|
1722
|
+
*/
|
|
1723
|
+
static resendInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1724
|
+
/**
|
|
1725
|
+
* Revokes/deletes a community invitation.
|
|
1726
|
+
*
|
|
1727
|
+
* @param community_id The id of the community.
|
|
1728
|
+
* @param invite_id The id of the invite to delete.
|
|
1729
|
+
*
|
|
1730
|
+
* @returns promise
|
|
1731
|
+
*/
|
|
1732
|
+
static deleteInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1709
1733
|
}
|
|
1710
1734
|
|
|
1711
1735
|
declare class Users {
|
|
@@ -4205,6 +4229,63 @@ declare class Campaigns {
|
|
|
4205
4229
|
* @returns promise
|
|
4206
4230
|
*/
|
|
4207
4231
|
static sendCampaignContractWithDocusign<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4232
|
+
/**
|
|
4233
|
+
* Search IGDB for the campaign's game.
|
|
4234
|
+
* @param campaign_id The UUID of the campaign.
|
|
4235
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
4236
|
+
* @returns promise
|
|
4237
|
+
*/
|
|
4238
|
+
static sourcingSearchIgdbForCampaignGame<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4239
|
+
/**
|
|
4240
|
+
* Find popular similar games from IGDB.
|
|
4241
|
+
* @param campaign_id The UUID of the campaign.
|
|
4242
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
4243
|
+
* @returns promise
|
|
4244
|
+
*/
|
|
4245
|
+
static sourcingGetSimilarIgdbGames<T>(campaign_id: string, params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4246
|
+
/**
|
|
4247
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
4248
|
+
* @param campaign_id The UUID of the campaign.
|
|
4249
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
4250
|
+
* @returns promise
|
|
4251
|
+
*/
|
|
4252
|
+
static sourcingFindCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4253
|
+
/**
|
|
4254
|
+
* Update campaign sourcing settings.
|
|
4255
|
+
* @param campaign_id The UUID of the campaign.
|
|
4256
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
4257
|
+
* @returns promise
|
|
4258
|
+
*/
|
|
4259
|
+
static updateSourcingSettings<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4260
|
+
/**
|
|
4261
|
+
* Find and save content creators for selected games to the database.
|
|
4262
|
+
* @param campaign_id The UUID of the campaign.
|
|
4263
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
4264
|
+
* @returns promise
|
|
4265
|
+
*/
|
|
4266
|
+
static sourcingFindAndSaveCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4267
|
+
/**
|
|
4268
|
+
* Get sourced creators for a campaign from the database.
|
|
4269
|
+
* @param campaign_id The UUID of the campaign.
|
|
4270
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
4271
|
+
* @returns promise
|
|
4272
|
+
*/
|
|
4273
|
+
static getSourcedCreators<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4274
|
+
/**
|
|
4275
|
+
* Get a single sourced creator.
|
|
4276
|
+
* @param campaign_id The UUID of the campaign.
|
|
4277
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
4278
|
+
* @returns promise
|
|
4279
|
+
*/
|
|
4280
|
+
static getSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>>;
|
|
4281
|
+
/**
|
|
4282
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
4283
|
+
* @param campaign_id The UUID of the campaign.
|
|
4284
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
4285
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
4286
|
+
* @returns promise
|
|
4287
|
+
*/
|
|
4288
|
+
static updateSourcedCreator<T>(campaign_id: string, sourced_creator_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4208
4289
|
}
|
|
4209
4290
|
|
|
4210
4291
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -766,6 +766,86 @@ class Campaigns {
|
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
|
|
769
|
+
/**
|
|
770
|
+
* Search IGDB for the campaign's game.
|
|
771
|
+
* @param campaign_id The UUID of the campaign.
|
|
772
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
773
|
+
* @returns promise
|
|
774
|
+
*/
|
|
775
|
+
public static sourcingSearchIgdbForCampaignGame<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
776
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingSearchIgdbForCampaignGame, undefined, { campaign_id }, params);
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Find popular similar games from IGDB.
|
|
781
|
+
* @param campaign_id The UUID of the campaign.
|
|
782
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
783
|
+
* @returns promise
|
|
784
|
+
*/
|
|
785
|
+
public static sourcingGetSimilarIgdbGames<T>(campaign_id: string, params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
786
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingGetSimilarIgdbGames, undefined, { campaign_id }, params);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
791
|
+
* @param campaign_id The UUID of the campaign.
|
|
792
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
793
|
+
* @returns promise
|
|
794
|
+
*/
|
|
795
|
+
public static sourcingFindCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
|
|
796
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindCreators, data, { campaign_id });
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Update campaign sourcing settings.
|
|
801
|
+
* @param campaign_id The UUID of the campaign.
|
|
802
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
803
|
+
* @returns promise
|
|
804
|
+
*/
|
|
805
|
+
public static updateSourcingSettings<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
|
|
806
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcingSettings, data, { campaign_id });
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Find and save content creators for selected games to the database.
|
|
811
|
+
* @param campaign_id The UUID of the campaign.
|
|
812
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
813
|
+
* @returns promise
|
|
814
|
+
*/
|
|
815
|
+
public static sourcingFindAndSaveCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
|
|
816
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveCreators, data, { campaign_id });
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Get sourced creators for a campaign from the database.
|
|
821
|
+
* @param campaign_id The UUID of the campaign.
|
|
822
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
823
|
+
* @returns promise
|
|
824
|
+
*/
|
|
825
|
+
public static getSourcedCreators<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
826
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreators, undefined, { campaign_id }, params);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Get a single sourced creator.
|
|
831
|
+
* @param campaign_id The UUID of the campaign.
|
|
832
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
833
|
+
* @returns promise
|
|
834
|
+
*/
|
|
835
|
+
public static getSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>> {
|
|
836
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreator, undefined, { campaign_id, sourced_creator_id });
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
841
|
+
* @param campaign_id The UUID of the campaign.
|
|
842
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
843
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
844
|
+
* @returns promise
|
|
845
|
+
*/
|
|
846
|
+
public static updateSourcedCreator<T>(campaign_id: string, sourced_creator_id: string, data: object): AxiosPromise<Response<T>> {
|
|
847
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcedCreator, data, { campaign_id, sourced_creator_id });
|
|
848
|
+
}
|
|
769
849
|
}
|
|
770
850
|
|
|
771
851
|
export default Campaigns;
|
package/src/api/Communities.ts
CHANGED
|
@@ -896,6 +896,39 @@ class Communities {
|
|
|
896
896
|
);
|
|
897
897
|
}
|
|
898
898
|
|
|
899
|
+
/**
|
|
900
|
+
* Retrieve the current user's pending community invitations across all communities.
|
|
901
|
+
*
|
|
902
|
+
* @returns promise
|
|
903
|
+
*/
|
|
904
|
+
public static myInvites<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
905
|
+
return Requests.processRoute(CommunitiesRoute.routes.myInvites, {}, undefined, params);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Resends an invitation to a user.
|
|
910
|
+
*
|
|
911
|
+
* @param community_id The id of the community.
|
|
912
|
+
* @param invite_id The id of the invite to resend.
|
|
913
|
+
*
|
|
914
|
+
* @returns promise
|
|
915
|
+
*/
|
|
916
|
+
public static resendInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
917
|
+
return Requests.processRoute(CommunitiesRoute.routes.resendInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Revokes/deletes a community invitation.
|
|
922
|
+
*
|
|
923
|
+
* @param community_id The id of the community.
|
|
924
|
+
* @param invite_id The id of the invite to delete.
|
|
925
|
+
*
|
|
926
|
+
* @returns promise
|
|
927
|
+
*/
|
|
928
|
+
public static deleteInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
929
|
+
return Requests.processRoute(CommunitiesRoute.routes.deleteInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
|
|
930
|
+
}
|
|
931
|
+
|
|
899
932
|
|
|
900
933
|
}
|
|
901
934
|
|
|
@@ -61,6 +61,14 @@ class CampaignsRoute {
|
|
|
61
61
|
listPayouts :{ url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
|
|
62
62
|
generateCampaignContract : { url: '/campaigns/{campaign_id}/influencers/{user_id}/contract', method: HTTP_METHODS.POST },
|
|
63
63
|
sendCampaignContractWithDocusign : { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
|
|
64
|
+
sourcingSearchIgdbForCampaignGame: { url: '/campaigns/{campaign_id}/sourcing/search-game', method: HTTP_METHODS.GET },
|
|
65
|
+
sourcingGetSimilarIgdbGames: { url: '/campaigns/{campaign_id}/sourcing/similar-games', method: HTTP_METHODS.GET },
|
|
66
|
+
sourcingFindCreators: { url: '/campaigns/{campaign_id}/sourcing/find-creators', method: HTTP_METHODS.POST },
|
|
67
|
+
updateSourcingSettings: { url: '/campaigns/{campaign_id}/sourcing/settings', method: HTTP_METHODS.PUT },
|
|
68
|
+
sourcingFindAndSaveCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-creators', method: HTTP_METHODS.POST },
|
|
69
|
+
getSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators', method: HTTP_METHODS.GET },
|
|
70
|
+
getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
|
|
71
|
+
updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
|
|
64
72
|
|
|
65
73
|
|
|
66
74
|
};
|
|
@@ -17,6 +17,9 @@ class CommunitiesRoute {
|
|
|
17
17
|
acceptInvite: { url: '/communities/{community_id}/acceptInvite', method: HTTP_METHODS.POST },
|
|
18
18
|
retrieveInvite: { url: '/communities/{community_id}/invites/{token}', method: HTTP_METHODS.GET },
|
|
19
19
|
listUsers: { url: '/communities/{community_id}/users', method: HTTP_METHODS.GET },
|
|
20
|
+
myInvites: { url: '/communities/invites/mine', method: HTTP_METHODS.GET },
|
|
21
|
+
resendInvite: { url: '/communities/{community_id}/invites/{invite_id}/resend', method: HTTP_METHODS.POST },
|
|
22
|
+
deleteInvite: { url: '/communities/{community_id}/invites/{invite_id}', method: HTTP_METHODS.DELETE },
|
|
20
23
|
addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
|
|
21
24
|
showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
|
|
22
25
|
updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
|
|
@@ -59,13 +62,13 @@ class CommunitiesRoute {
|
|
|
59
62
|
method: HTTP_METHODS.GET
|
|
60
63
|
},
|
|
61
64
|
|
|
62
|
-
exportNewsletterSubscribers: {
|
|
63
|
-
url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
|
|
64
|
-
method: HTTP_METHODS.POST
|
|
65
|
+
exportNewsletterSubscribers: {
|
|
66
|
+
url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
|
|
67
|
+
method: HTTP_METHODS.POST
|
|
65
68
|
},
|
|
66
|
-
importGameInstalls: {
|
|
67
|
-
url: '/communities/{community_id}/newsletters/{newsletter_id}/import_game_installs',
|
|
68
|
-
method: HTTP_METHODS.POST
|
|
69
|
+
importGameInstalls: {
|
|
70
|
+
url: '/communities/{community_id}/newsletters/{newsletter_id}/import_game_installs',
|
|
71
|
+
method: HTTP_METHODS.POST
|
|
69
72
|
},
|
|
70
73
|
|
|
71
74
|
// Campaigns
|
|
@@ -92,6 +95,8 @@ class CommunitiesRoute {
|
|
|
92
95
|
registerNewsletterSubscriber: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers', method: HTTP_METHODS.POST },
|
|
93
96
|
};
|
|
94
97
|
|
|
98
|
+
|
|
99
|
+
|
|
95
100
|
}
|
|
96
101
|
|
|
97
102
|
export default CommunitiesRoute;
|