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
|
@@ -538,5 +538,62 @@ declare class Campaigns {
|
|
|
538
538
|
* @returns promise
|
|
539
539
|
*/
|
|
540
540
|
static sendCampaignContractWithDocusign<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
541
|
+
/**
|
|
542
|
+
* Search IGDB for the campaign's game.
|
|
543
|
+
* @param campaign_id The UUID of the campaign.
|
|
544
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
545
|
+
* @returns promise
|
|
546
|
+
*/
|
|
547
|
+
static sourcingSearchIgdbForCampaignGame<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
548
|
+
/**
|
|
549
|
+
* Find popular similar games from IGDB.
|
|
550
|
+
* @param campaign_id The UUID of the campaign.
|
|
551
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
552
|
+
* @returns promise
|
|
553
|
+
*/
|
|
554
|
+
static sourcingGetSimilarIgdbGames<T>(campaign_id: string, params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
555
|
+
/**
|
|
556
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
557
|
+
* @param campaign_id The UUID of the campaign.
|
|
558
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
559
|
+
* @returns promise
|
|
560
|
+
*/
|
|
561
|
+
static sourcingFindCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
562
|
+
/**
|
|
563
|
+
* Update campaign sourcing settings.
|
|
564
|
+
* @param campaign_id The UUID of the campaign.
|
|
565
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
566
|
+
* @returns promise
|
|
567
|
+
*/
|
|
568
|
+
static updateSourcingSettings<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
569
|
+
/**
|
|
570
|
+
* Find and save content creators for selected games to the database.
|
|
571
|
+
* @param campaign_id The UUID of the campaign.
|
|
572
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
573
|
+
* @returns promise
|
|
574
|
+
*/
|
|
575
|
+
static sourcingFindAndSaveCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
576
|
+
/**
|
|
577
|
+
* Get sourced creators for a campaign from the database.
|
|
578
|
+
* @param campaign_id The UUID of the campaign.
|
|
579
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
580
|
+
* @returns promise
|
|
581
|
+
*/
|
|
582
|
+
static getSourcedCreators<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
583
|
+
/**
|
|
584
|
+
* Get a single sourced creator.
|
|
585
|
+
* @param campaign_id The UUID of the campaign.
|
|
586
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
587
|
+
* @returns promise
|
|
588
|
+
*/
|
|
589
|
+
static getSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>>;
|
|
590
|
+
/**
|
|
591
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
592
|
+
* @param campaign_id The UUID of the campaign.
|
|
593
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
594
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
595
|
+
* @returns promise
|
|
596
|
+
*/
|
|
597
|
+
static updateSourcedCreator<T>(campaign_id: string, sourced_creator_id: string, data: object): AxiosPromise<Response<T>>;
|
|
541
598
|
}
|
|
542
599
|
export default Campaigns;
|
|
@@ -605,5 +605,29 @@ declare class Communities {
|
|
|
605
605
|
static importGameInstalls<T>(community_id: string, newsletter_id: string, data: {
|
|
606
606
|
format: 'csv' | 'xlsx';
|
|
607
607
|
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
608
|
+
/**
|
|
609
|
+
* Retrieve the current user's pending community invitations across all communities.
|
|
610
|
+
*
|
|
611
|
+
* @returns promise
|
|
612
|
+
*/
|
|
613
|
+
static myInvites<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
614
|
+
/**
|
|
615
|
+
* Resends an invitation to a user.
|
|
616
|
+
*
|
|
617
|
+
* @param community_id The id of the community.
|
|
618
|
+
* @param invite_id The id of the invite to resend.
|
|
619
|
+
*
|
|
620
|
+
* @returns promise
|
|
621
|
+
*/
|
|
622
|
+
static resendInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
623
|
+
/**
|
|
624
|
+
* Revokes/deletes a community invitation.
|
|
625
|
+
*
|
|
626
|
+
* @param community_id The id of the community.
|
|
627
|
+
* @param invite_id The id of the invite to delete.
|
|
628
|
+
*
|
|
629
|
+
* @returns promise
|
|
630
|
+
*/
|
|
631
|
+
static deleteInvite<T>(community_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
608
632
|
}
|
|
609
633
|
export default Communities;
|
package/dist/esm/index.js
CHANGED
|
@@ -7686,6 +7686,9 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
7686
7686
|
acceptInvite: { url: '/communities/{community_id}/acceptInvite', method: HTTP_METHODS.POST },
|
|
7687
7687
|
retrieveInvite: { url: '/communities/{community_id}/invites/{token}', method: HTTP_METHODS.GET },
|
|
7688
7688
|
listUsers: { url: '/communities/{community_id}/users', method: HTTP_METHODS.GET },
|
|
7689
|
+
myInvites: { url: '/communities/invites/mine', method: HTTP_METHODS.GET },
|
|
7690
|
+
resendInvite: { url: '/communities/{community_id}/invites/{invite_id}/resend', method: HTTP_METHODS.POST },
|
|
7691
|
+
deleteInvite: { url: '/communities/{community_id}/invites/{invite_id}', method: HTTP_METHODS.DELETE },
|
|
7689
7692
|
addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
|
|
7690
7693
|
showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
|
|
7691
7694
|
updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
|
|
@@ -8502,6 +8505,36 @@ var Communities = /** @class */ (function () {
|
|
|
8502
8505
|
Communities.importGameInstalls = function (community_id, newsletter_id, data, params) {
|
|
8503
8506
|
return Requests.processRoute(CommunitiesRoute.routes.importGameInstalls, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
|
|
8504
8507
|
};
|
|
8508
|
+
/**
|
|
8509
|
+
* Retrieve the current user's pending community invitations across all communities.
|
|
8510
|
+
*
|
|
8511
|
+
* @returns promise
|
|
8512
|
+
*/
|
|
8513
|
+
Communities.myInvites = function (params) {
|
|
8514
|
+
return Requests.processRoute(CommunitiesRoute.routes.myInvites, {}, undefined, params);
|
|
8515
|
+
};
|
|
8516
|
+
/**
|
|
8517
|
+
* Resends an invitation to a user.
|
|
8518
|
+
*
|
|
8519
|
+
* @param community_id The id of the community.
|
|
8520
|
+
* @param invite_id The id of the invite to resend.
|
|
8521
|
+
*
|
|
8522
|
+
* @returns promise
|
|
8523
|
+
*/
|
|
8524
|
+
Communities.resendInvite = function (community_id, invite_id, params) {
|
|
8525
|
+
return Requests.processRoute(CommunitiesRoute.routes.resendInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
|
|
8526
|
+
};
|
|
8527
|
+
/**
|
|
8528
|
+
* Revokes/deletes a community invitation.
|
|
8529
|
+
*
|
|
8530
|
+
* @param community_id The id of the community.
|
|
8531
|
+
* @param invite_id The id of the invite to delete.
|
|
8532
|
+
*
|
|
8533
|
+
* @returns promise
|
|
8534
|
+
*/
|
|
8535
|
+
Communities.deleteInvite = function (community_id, invite_id, params) {
|
|
8536
|
+
return Requests.processRoute(CommunitiesRoute.routes.deleteInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
|
|
8537
|
+
};
|
|
8505
8538
|
return Communities;
|
|
8506
8539
|
}());
|
|
8507
8540
|
|
|
@@ -11448,6 +11481,14 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
11448
11481
|
listPayouts: { url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
|
|
11449
11482
|
generateCampaignContract: { url: '/campaigns/{campaign_id}/influencers/{user_id}/contract', method: HTTP_METHODS.POST },
|
|
11450
11483
|
sendCampaignContractWithDocusign: { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
|
|
11484
|
+
sourcingSearchIgdbForCampaignGame: { url: '/campaigns/{campaign_id}/sourcing/search-game', method: HTTP_METHODS.GET },
|
|
11485
|
+
sourcingGetSimilarIgdbGames: { url: '/campaigns/{campaign_id}/sourcing/similar-games', method: HTTP_METHODS.GET },
|
|
11486
|
+
sourcingFindCreators: { url: '/campaigns/{campaign_id}/sourcing/find-creators', method: HTTP_METHODS.POST },
|
|
11487
|
+
updateSourcingSettings: { url: '/campaigns/{campaign_id}/sourcing/settings', method: HTTP_METHODS.PUT },
|
|
11488
|
+
sourcingFindAndSaveCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-creators', method: HTTP_METHODS.POST },
|
|
11489
|
+
getSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators', method: HTTP_METHODS.GET },
|
|
11490
|
+
getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
|
|
11491
|
+
updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
|
|
11451
11492
|
};
|
|
11452
11493
|
return CampaignsRoute;
|
|
11453
11494
|
}());
|
|
@@ -12106,6 +12147,79 @@ var Campaigns = /** @class */ (function () {
|
|
|
12106
12147
|
Campaigns.sendCampaignContractWithDocusign = function (campaign_id, user_id, data, params) {
|
|
12107
12148
|
return Requests.processRoute(CampaignsRoute.routes.sendCampaignContractWithDocusign, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
12108
12149
|
};
|
|
12150
|
+
/**
|
|
12151
|
+
* Search IGDB for the campaign's game.
|
|
12152
|
+
* @param campaign_id The UUID of the campaign.
|
|
12153
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
12154
|
+
* @returns promise
|
|
12155
|
+
*/
|
|
12156
|
+
Campaigns.sourcingSearchIgdbForCampaignGame = function (campaign_id, params) {
|
|
12157
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingSearchIgdbForCampaignGame, undefined, { campaign_id: campaign_id }, params);
|
|
12158
|
+
};
|
|
12159
|
+
/**
|
|
12160
|
+
* Find popular similar games from IGDB.
|
|
12161
|
+
* @param campaign_id The UUID of the campaign.
|
|
12162
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
12163
|
+
* @returns promise
|
|
12164
|
+
*/
|
|
12165
|
+
Campaigns.sourcingGetSimilarIgdbGames = function (campaign_id, params) {
|
|
12166
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingGetSimilarIgdbGames, undefined, { campaign_id: campaign_id }, params);
|
|
12167
|
+
};
|
|
12168
|
+
/**
|
|
12169
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
12170
|
+
* @param campaign_id The UUID of the campaign.
|
|
12171
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
12172
|
+
* @returns promise
|
|
12173
|
+
*/
|
|
12174
|
+
Campaigns.sourcingFindCreators = function (campaign_id, data) {
|
|
12175
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindCreators, data, { campaign_id: campaign_id });
|
|
12176
|
+
};
|
|
12177
|
+
/**
|
|
12178
|
+
* Update campaign sourcing settings.
|
|
12179
|
+
* @param campaign_id The UUID of the campaign.
|
|
12180
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
12181
|
+
* @returns promise
|
|
12182
|
+
*/
|
|
12183
|
+
Campaigns.updateSourcingSettings = function (campaign_id, data) {
|
|
12184
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcingSettings, data, { campaign_id: campaign_id });
|
|
12185
|
+
};
|
|
12186
|
+
/**
|
|
12187
|
+
* Find and save content creators for selected games to the database.
|
|
12188
|
+
* @param campaign_id The UUID of the campaign.
|
|
12189
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
12190
|
+
* @returns promise
|
|
12191
|
+
*/
|
|
12192
|
+
Campaigns.sourcingFindAndSaveCreators = function (campaign_id, data) {
|
|
12193
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveCreators, data, { campaign_id: campaign_id });
|
|
12194
|
+
};
|
|
12195
|
+
/**
|
|
12196
|
+
* Get sourced creators for a campaign from the database.
|
|
12197
|
+
* @param campaign_id The UUID of the campaign.
|
|
12198
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
12199
|
+
* @returns promise
|
|
12200
|
+
*/
|
|
12201
|
+
Campaigns.getSourcedCreators = function (campaign_id, params) {
|
|
12202
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreators, undefined, { campaign_id: campaign_id }, params);
|
|
12203
|
+
};
|
|
12204
|
+
/**
|
|
12205
|
+
* Get a single sourced creator.
|
|
12206
|
+
* @param campaign_id The UUID of the campaign.
|
|
12207
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
12208
|
+
* @returns promise
|
|
12209
|
+
*/
|
|
12210
|
+
Campaigns.getSourcedCreator = function (campaign_id, sourced_creator_id) {
|
|
12211
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreator, undefined, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
|
|
12212
|
+
};
|
|
12213
|
+
/**
|
|
12214
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
12215
|
+
* @param campaign_id The UUID of the campaign.
|
|
12216
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
12217
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
12218
|
+
* @returns promise
|
|
12219
|
+
*/
|
|
12220
|
+
Campaigns.updateSourcedCreator = function (campaign_id, sourced_creator_id, data) {
|
|
12221
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcedCreator, data, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
|
|
12222
|
+
};
|
|
12109
12223
|
return Campaigns;
|
|
12110
12224
|
}());
|
|
12111
12225
|
|