glitch-javascript-sdk 1.0.6 → 1.0.8
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 +24 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +18 -0
- package/dist/esm/index.js +24 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +18 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +25 -0
- package/src/routes/CampaignsRoute.ts +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -2457,6 +2457,14 @@ declare class Campaigns {
|
|
|
2457
2457
|
* @returns promise
|
|
2458
2458
|
*/
|
|
2459
2459
|
static getLedger<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2460
|
+
/**
|
|
2461
|
+
* Get the post associated with the campaign.
|
|
2462
|
+
*
|
|
2463
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLedger
|
|
2464
|
+
*
|
|
2465
|
+
* @returns promise
|
|
2466
|
+
*/
|
|
2467
|
+
static getPosts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2460
2468
|
/**
|
|
2461
2469
|
* Retrieve recommended influencers for a campaign.
|
|
2462
2470
|
*
|
|
@@ -2808,6 +2816,16 @@ declare class Campaigns {
|
|
|
2808
2816
|
* @returns promise
|
|
2809
2817
|
*/
|
|
2810
2818
|
static reviewInfluencerRequest<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2819
|
+
/**
|
|
2820
|
+
* Generate post content for the influencer to help them with their content creation.
|
|
2821
|
+
*
|
|
2822
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generatePostContent
|
|
2823
|
+
*
|
|
2824
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
2825
|
+
*
|
|
2826
|
+
* @returns promise
|
|
2827
|
+
*/
|
|
2828
|
+
static generateContentForInfluencer<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2811
2829
|
}
|
|
2812
2830
|
|
|
2813
2831
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -83,6 +83,17 @@ class Campaigns {
|
|
|
83
83
|
return Requests.processRoute(CampaignsRoute.routes.getLedger, undefined, { campaign_id: campaign_id }, params);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Get the post associated with the campaign.
|
|
88
|
+
*
|
|
89
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLedger
|
|
90
|
+
*
|
|
91
|
+
* @returns promise
|
|
92
|
+
*/
|
|
93
|
+
public static getPosts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
94
|
+
return Requests.processRoute(CampaignsRoute.routes.getPosts, undefined, { campaign_id: campaign_id }, params);
|
|
95
|
+
}
|
|
96
|
+
|
|
86
97
|
/**
|
|
87
98
|
* Retrieve recommended influencers for a campaign.
|
|
88
99
|
*
|
|
@@ -583,6 +594,20 @@ class Campaigns {
|
|
|
583
594
|
return Requests.processRoute(CampaignsRoute.routes.reviewInfluencerRequest, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
584
595
|
}
|
|
585
596
|
|
|
597
|
+
/**
|
|
598
|
+
* Generate post content for the influencer to help them with their content creation.
|
|
599
|
+
*
|
|
600
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generatePostContent
|
|
601
|
+
*
|
|
602
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
603
|
+
*
|
|
604
|
+
* @returns promise
|
|
605
|
+
*/
|
|
606
|
+
public static generateContentForInfluencer<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
607
|
+
|
|
608
|
+
return Requests.processRoute(CampaignsRoute.routes.generateContentForInfluencer, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
609
|
+
}
|
|
610
|
+
|
|
586
611
|
|
|
587
612
|
}
|
|
588
613
|
|
|
@@ -10,6 +10,7 @@ class CampaignsRoute {
|
|
|
10
10
|
updateCampaign :{ url: '/campaigns/{campaign_id}', method: HTTP_METHODS.PUT },
|
|
11
11
|
deleteCampaign :{ url: '/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
|
|
12
12
|
getLedger : { url: '/campaigns/{campaign_id}/ledger', method: HTTP_METHODS.GET },
|
|
13
|
+
getPosts : { url: '/campaigns/{campaign_id}/posts', method: HTTP_METHODS.GET },
|
|
13
14
|
listCampaignLinks :{ url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.GET },
|
|
14
15
|
createCampaignLink :{ url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.POST },
|
|
15
16
|
getCampaignLink :{ url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.GET },
|
|
@@ -46,7 +47,8 @@ class CampaignsRoute {
|
|
|
46
47
|
acceptInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/accept', method: HTTP_METHODS.POST },
|
|
47
48
|
declineInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/deny', method: HTTP_METHODS.POST },
|
|
48
49
|
reviewInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/review', method: HTTP_METHODS.POST },
|
|
49
|
-
getRecommendedInfluencers : { url: '/campaigns/{campaign_id}/recommendInfluencers', method: HTTP_METHODS.GET },
|
|
50
|
+
getRecommendedInfluencers : { url: '/campaigns/{campaign_id}/recommendInfluencers', method: HTTP_METHODS.GET },
|
|
51
|
+
generateContentForInfluencer : { url: '/campaigns/{campaign_id}/influencers/{user_id}/generatePostContent', method: HTTP_METHODS.POST },
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
}
|