glitch-javascript-sdk 0.6.3 → 0.6.5
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 +322 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +159 -0
- package/dist/esm/api/Titles.d.ts +73 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +322 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/CampaignsRoute.d.ts +7 -0
- package/dist/esm/routes/TitlesRoute.d.ts +7 -0
- package/dist/index.d.ts +230 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +224 -0
- package/src/api/SocialPosts.ts +1 -1
- package/src/api/Titles.ts +105 -0
- package/src/api/index.ts +5 -1
- package/src/index.ts +4 -0
- package/src/routes/CampaignsRoute.ts +27 -0
- package/src/routes/TitlesRoute.ts +18 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class Campaigns {
|
|
4
|
+
/**
|
|
5
|
+
* List all the Campaigns.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/edab2e3b061347b06c82258622d239e2
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new campaign.
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/createCampaign
|
|
16
|
+
*
|
|
17
|
+
* @param data The data to be passed when creating a campaign.
|
|
18
|
+
*
|
|
19
|
+
* @returns Promise
|
|
20
|
+
*/
|
|
21
|
+
static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a campaign.
|
|
24
|
+
*
|
|
25
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/updateCampaign
|
|
26
|
+
*
|
|
27
|
+
* @param campaign_id The id of the campaign to update.
|
|
28
|
+
* @param data The data to update.
|
|
29
|
+
*
|
|
30
|
+
* @returns promise
|
|
31
|
+
*/
|
|
32
|
+
static update<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve the information for a single campaign.
|
|
35
|
+
*
|
|
36
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignByUuid
|
|
37
|
+
*
|
|
38
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
39
|
+
*
|
|
40
|
+
* @returns promise
|
|
41
|
+
*/
|
|
42
|
+
static view<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
43
|
+
/**
|
|
44
|
+
* Deletes a campaign.
|
|
45
|
+
*
|
|
46
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/deleteCampaign
|
|
47
|
+
*
|
|
48
|
+
* @param campaign_id The id of the campaign to delete.
|
|
49
|
+
* @returns promise
|
|
50
|
+
*/
|
|
51
|
+
static delete<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* List all the campaign links.
|
|
54
|
+
*
|
|
55
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLinks
|
|
56
|
+
*
|
|
57
|
+
* @returns promise
|
|
58
|
+
*/
|
|
59
|
+
static listCampaignLinks<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
60
|
+
/**
|
|
61
|
+
* Create a new campaign link.
|
|
62
|
+
*
|
|
63
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/storeCampaignLink
|
|
64
|
+
*
|
|
65
|
+
* @param data The data to be passed when creating a campaign.
|
|
66
|
+
*
|
|
67
|
+
* @returns Promise
|
|
68
|
+
*/
|
|
69
|
+
static createCampaignLink<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
70
|
+
/**
|
|
71
|
+
* Update a campaign.
|
|
72
|
+
*
|
|
73
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/1bb1492981b4529693604b03aade8bf6
|
|
74
|
+
*
|
|
75
|
+
* @param campaign_id The id of the campaign to update.
|
|
76
|
+
* @param data The data to update.
|
|
77
|
+
*
|
|
78
|
+
* @returns promise
|
|
79
|
+
*/
|
|
80
|
+
static updateCampaignLink<T>(campaign_id: string, link_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
81
|
+
/**
|
|
82
|
+
* Retrieve the information for a single campaign.
|
|
83
|
+
*
|
|
84
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLink
|
|
85
|
+
*
|
|
86
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
87
|
+
*
|
|
88
|
+
* @returns promise
|
|
89
|
+
*/
|
|
90
|
+
static getCampaignLink<T>(campaign_id: string, link_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
91
|
+
/**
|
|
92
|
+
* List all the influencers associated with a campaign.
|
|
93
|
+
*
|
|
94
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getInfluencerCampaigns
|
|
95
|
+
*
|
|
96
|
+
* @returns promise
|
|
97
|
+
*/
|
|
98
|
+
static listInfluencerCampaigns<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
99
|
+
/**
|
|
100
|
+
* Create an influencer campaign
|
|
101
|
+
*
|
|
102
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/6d834c837c5f330d6a4cef5786c45c90
|
|
103
|
+
*
|
|
104
|
+
* @param data The data to be passed when creating a campaign.
|
|
105
|
+
*
|
|
106
|
+
* @returns Promise
|
|
107
|
+
*/
|
|
108
|
+
static createInfluencerCampaign<T>(campaign_id: string, user_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
109
|
+
/**
|
|
110
|
+
* Update an influencer campaign.
|
|
111
|
+
*
|
|
112
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/updateInfluencerCampaign
|
|
113
|
+
*
|
|
114
|
+
* @param campaign_id The id of the campaign to update.
|
|
115
|
+
* @param data The data to update.
|
|
116
|
+
*
|
|
117
|
+
* @returns promise
|
|
118
|
+
*/
|
|
119
|
+
static updateInfluencerCampaign<T>(campaign_id: string, user_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
120
|
+
/**
|
|
121
|
+
* Retrieve the information for a single campaign.
|
|
122
|
+
*
|
|
123
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/showInfluencerCampaign
|
|
124
|
+
*
|
|
125
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
126
|
+
*
|
|
127
|
+
* @returns promise
|
|
128
|
+
*/
|
|
129
|
+
static viewInfluencerCampaign<T>(campaign_id: string, user_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
130
|
+
/**
|
|
131
|
+
* Mark an influencer campaign as completed.
|
|
132
|
+
*
|
|
133
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/markCompleted
|
|
134
|
+
*
|
|
135
|
+
* @param data The data to be passed when creating a campaign.
|
|
136
|
+
*
|
|
137
|
+
* @returns Promise
|
|
138
|
+
*/
|
|
139
|
+
static markInfluencerCampaignComplete<T>(campaign_id: string, user_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
140
|
+
/**
|
|
141
|
+
* Mark an influencer campaign as incomplete.
|
|
142
|
+
*
|
|
143
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/afffdc7a0c7fc4d9740f10517c53933e
|
|
144
|
+
*
|
|
145
|
+
* @param data The data to be passed when creating a campaign.
|
|
146
|
+
*
|
|
147
|
+
* @returns Promise
|
|
148
|
+
*/
|
|
149
|
+
static markInfluencerCampaignIncomplete<T>(campaign_id: string, user_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
150
|
+
/**
|
|
151
|
+
* Get all the links associated with an influencer's campaign.
|
|
152
|
+
*
|
|
153
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/edab2e3b061347b06c82258622d239e2
|
|
154
|
+
*
|
|
155
|
+
* @returns promise
|
|
156
|
+
*/
|
|
157
|
+
static listInfluencerCampaignLinks<T>(campaign_id: string, user_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
158
|
+
}
|
|
159
|
+
export default Campaigns;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class Titles {
|
|
4
|
+
/**
|
|
5
|
+
* List all the Titles.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/edab2e3b061347b06c82258622d239e2
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new title.
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/storeTitle
|
|
16
|
+
*
|
|
17
|
+
* @param data The data to be passed when creating a title.
|
|
18
|
+
*
|
|
19
|
+
* @returns Promise
|
|
20
|
+
*/
|
|
21
|
+
static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a title.
|
|
24
|
+
*
|
|
25
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/updateTitle
|
|
26
|
+
*
|
|
27
|
+
* @param title_id The id of the title to update.
|
|
28
|
+
* @param data The data to update.
|
|
29
|
+
*
|
|
30
|
+
* @returns promise
|
|
31
|
+
*/
|
|
32
|
+
static update<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve the information for a single title.
|
|
35
|
+
*
|
|
36
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/getTitleByUUID
|
|
37
|
+
*
|
|
38
|
+
* @param title_id The id fo the title to retrieve.
|
|
39
|
+
*
|
|
40
|
+
* @returns promise
|
|
41
|
+
*/
|
|
42
|
+
static view<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
43
|
+
/**
|
|
44
|
+
* Deletes a title.
|
|
45
|
+
*
|
|
46
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/deleteTitle
|
|
47
|
+
*
|
|
48
|
+
* @param title_id The id of the title to delete.
|
|
49
|
+
* @returns promise
|
|
50
|
+
*/
|
|
51
|
+
static delete<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* Approve a title
|
|
54
|
+
*
|
|
55
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/approveTitle
|
|
56
|
+
*
|
|
57
|
+
* @param data The data to be passed when creating a title.
|
|
58
|
+
*
|
|
59
|
+
* @returns Promise
|
|
60
|
+
*/
|
|
61
|
+
static approve<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
62
|
+
/**
|
|
63
|
+
* Reject a title
|
|
64
|
+
*
|
|
65
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/rejectTitle
|
|
66
|
+
*
|
|
67
|
+
* @param data The data to be passed when creating a title.
|
|
68
|
+
*
|
|
69
|
+
* @returns Promise
|
|
70
|
+
*/
|
|
71
|
+
static reject<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
72
|
+
}
|
|
73
|
+
export default Titles;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ import TipEmojis from "./TipEmojis";
|
|
|
14
14
|
import TipPackages from "./TipPackages";
|
|
15
15
|
import TipPackagePurchases from "./TipPackagePurchases";
|
|
16
16
|
import SocialPosts from "./SocialPosts";
|
|
17
|
+
import Titles from "./Titles";
|
|
18
|
+
import Campaigns from "./Campaigns";
|
|
17
19
|
export { Auth };
|
|
18
20
|
export { Competitions };
|
|
19
21
|
export { Communities };
|
|
@@ -30,3 +32,5 @@ export { TipEmojis };
|
|
|
30
32
|
export { TipPackages };
|
|
31
33
|
export { TipPackagePurchases };
|
|
32
34
|
export { SocialPosts };
|
|
35
|
+
export { Titles };
|
|
36
|
+
export { Campaigns };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ import { TipPackages } from "./api";
|
|
|
14
14
|
import { TipEmojis } from "./api";
|
|
15
15
|
import { TipPackagePurchases } from "./api";
|
|
16
16
|
import { SocialPosts } from "./api";
|
|
17
|
+
import { Titles } from "./api";
|
|
18
|
+
import { Campaigns } from "./api";
|
|
17
19
|
import Requests from "./util/Requests";
|
|
18
20
|
import Parser from "./util/Parser";
|
|
19
21
|
import Session from "./util/Session";
|
|
@@ -34,6 +36,7 @@ declare class Glitch {
|
|
|
34
36
|
};
|
|
35
37
|
static api: {
|
|
36
38
|
Auth: typeof Auth;
|
|
39
|
+
Campaigns: typeof Campaigns;
|
|
37
40
|
Competitions: typeof Competitions;
|
|
38
41
|
Communities: typeof Communities;
|
|
39
42
|
Users: typeof Users;
|
|
@@ -44,6 +47,7 @@ declare class Glitch {
|
|
|
44
47
|
Waitlists: typeof Waitlists;
|
|
45
48
|
Utility: typeof Utility;
|
|
46
49
|
Tips: typeof Tips;
|
|
50
|
+
Titles: typeof Titles;
|
|
47
51
|
Social: typeof Social;
|
|
48
52
|
SocialPosts: typeof SocialPosts;
|
|
49
53
|
TipPackages: typeof TipPackages;
|
package/dist/esm/index.js
CHANGED
|
@@ -35498,7 +35498,7 @@ var SocialPosts = /** @class */ (function () {
|
|
|
35498
35498
|
* @returns A promise
|
|
35499
35499
|
*/
|
|
35500
35500
|
SocialPosts.create = function (data, params) {
|
|
35501
|
-
return Requests.processRoute(SocialPostsRoute.routes.
|
|
35501
|
+
return Requests.processRoute(SocialPostsRoute.routes.createPost, data, {}, params);
|
|
35502
35502
|
};
|
|
35503
35503
|
/**
|
|
35504
35504
|
* Retrieve the information for a single post.
|
|
@@ -35515,6 +35515,325 @@ var SocialPosts = /** @class */ (function () {
|
|
|
35515
35515
|
return SocialPosts;
|
|
35516
35516
|
}());
|
|
35517
35517
|
|
|
35518
|
+
var TitlesRoute = /** @class */ (function () {
|
|
35519
|
+
function TitlesRoute() {
|
|
35520
|
+
}
|
|
35521
|
+
TitlesRoute.routes = {
|
|
35522
|
+
list: { url: '/titles', method: HTTP_METHODS.GET },
|
|
35523
|
+
create: { url: '/titles', method: HTTP_METHODS.POST },
|
|
35524
|
+
view: { url: '/titles/{title_id}', method: HTTP_METHODS.GET },
|
|
35525
|
+
update: { url: '/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
35526
|
+
delete: { url: '/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
35527
|
+
approve: { url: '/titles/{title_id}/approve', method: HTTP_METHODS.POST },
|
|
35528
|
+
reject: { url: '//titles/{title_id}/reject', method: HTTP_METHODS.POST },
|
|
35529
|
+
};
|
|
35530
|
+
return TitlesRoute;
|
|
35531
|
+
}());
|
|
35532
|
+
|
|
35533
|
+
var Titles = /** @class */ (function () {
|
|
35534
|
+
function Titles() {
|
|
35535
|
+
}
|
|
35536
|
+
/**
|
|
35537
|
+
* List all the Titles.
|
|
35538
|
+
*
|
|
35539
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/edab2e3b061347b06c82258622d239e2
|
|
35540
|
+
*
|
|
35541
|
+
* @returns promise
|
|
35542
|
+
*/
|
|
35543
|
+
Titles.list = function (params) {
|
|
35544
|
+
return Requests.processRoute(TitlesRoute.routes.list, undefined, undefined, params);
|
|
35545
|
+
};
|
|
35546
|
+
/**
|
|
35547
|
+
* Create a new title.
|
|
35548
|
+
*
|
|
35549
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/storeTitle
|
|
35550
|
+
*
|
|
35551
|
+
* @param data The data to be passed when creating a title.
|
|
35552
|
+
*
|
|
35553
|
+
* @returns Promise
|
|
35554
|
+
*/
|
|
35555
|
+
Titles.create = function (data, params) {
|
|
35556
|
+
return Requests.processRoute(TitlesRoute.routes.create, data, undefined, params);
|
|
35557
|
+
};
|
|
35558
|
+
/**
|
|
35559
|
+
* Update a title.
|
|
35560
|
+
*
|
|
35561
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/updateTitle
|
|
35562
|
+
*
|
|
35563
|
+
* @param title_id The id of the title to update.
|
|
35564
|
+
* @param data The data to update.
|
|
35565
|
+
*
|
|
35566
|
+
* @returns promise
|
|
35567
|
+
*/
|
|
35568
|
+
Titles.update = function (title_id, data, params) {
|
|
35569
|
+
return Requests.processRoute(TitlesRoute.routes.update, data, { title_id: title_id }, params);
|
|
35570
|
+
};
|
|
35571
|
+
/**
|
|
35572
|
+
* Retrieve the information for a single title.
|
|
35573
|
+
*
|
|
35574
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/getTitleByUUID
|
|
35575
|
+
*
|
|
35576
|
+
* @param title_id The id fo the title to retrieve.
|
|
35577
|
+
*
|
|
35578
|
+
* @returns promise
|
|
35579
|
+
*/
|
|
35580
|
+
Titles.view = function (title_id, params) {
|
|
35581
|
+
return Requests.processRoute(TitlesRoute.routes.view, {}, { title_id: title_id }, params);
|
|
35582
|
+
};
|
|
35583
|
+
/**
|
|
35584
|
+
* Deletes a title.
|
|
35585
|
+
*
|
|
35586
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/deleteTitle
|
|
35587
|
+
*
|
|
35588
|
+
* @param title_id The id of the title to delete.
|
|
35589
|
+
* @returns promise
|
|
35590
|
+
*/
|
|
35591
|
+
Titles.delete = function (title_id, params) {
|
|
35592
|
+
return Requests.processRoute(TitlesRoute.routes.delete, {}, { title_id: title_id }, params);
|
|
35593
|
+
};
|
|
35594
|
+
/**
|
|
35595
|
+
* Approve a title
|
|
35596
|
+
*
|
|
35597
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/approveTitle
|
|
35598
|
+
*
|
|
35599
|
+
* @param data The data to be passed when creating a title.
|
|
35600
|
+
*
|
|
35601
|
+
* @returns Promise
|
|
35602
|
+
*/
|
|
35603
|
+
Titles.approve = function (title_id, data, params) {
|
|
35604
|
+
return Requests.processRoute(TitlesRoute.routes.approve, data, { title_id: title_id }, params);
|
|
35605
|
+
};
|
|
35606
|
+
/**
|
|
35607
|
+
* Reject a title
|
|
35608
|
+
*
|
|
35609
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/rejectTitle
|
|
35610
|
+
*
|
|
35611
|
+
* @param data The data to be passed when creating a title.
|
|
35612
|
+
*
|
|
35613
|
+
* @returns Promise
|
|
35614
|
+
*/
|
|
35615
|
+
Titles.reject = function (title_id, data, params) {
|
|
35616
|
+
return Requests.processRoute(TitlesRoute.routes.reject, data, { title_id: title_id }, params);
|
|
35617
|
+
};
|
|
35618
|
+
return Titles;
|
|
35619
|
+
}());
|
|
35620
|
+
|
|
35621
|
+
var CampaignsRoute = /** @class */ (function () {
|
|
35622
|
+
function CampaignsRoute() {
|
|
35623
|
+
}
|
|
35624
|
+
CampaignsRoute.routes = {
|
|
35625
|
+
listCampaigns: { url: '/campaigns', method: HTTP_METHODS.GET },
|
|
35626
|
+
createCampaign: { url: '/campaigns', method: HTTP_METHODS.POST },
|
|
35627
|
+
viewCampaign: { url: '/campaigns/{campaign_id}', method: HTTP_METHODS.GET },
|
|
35628
|
+
updateCampaign: { url: '/campaigns/{campaign_id}', method: HTTP_METHODS.PUT },
|
|
35629
|
+
deleteCampaign: { url: '/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
|
|
35630
|
+
listCampaignLinks: { url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.DELETE },
|
|
35631
|
+
createCampaignLink: { url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.POST },
|
|
35632
|
+
getCampaignLink: { url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.GET },
|
|
35633
|
+
updateCampaignLink: { url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.PUT },
|
|
35634
|
+
createInfluencerCampaign: { url: '/campaigns/{campaign_id}/influencers', method: HTTP_METHODS.POST },
|
|
35635
|
+
listInfluencerCampaigns: { url: '/campaigns/influencers', method: HTTP_METHODS.GET },
|
|
35636
|
+
viewInfluencerCampaign: { url: '/campaigns/{campaign_id}/influencers/{user_id}', method: HTTP_METHODS.GET },
|
|
35637
|
+
updateInfluencerCampaign: { url: '/campaigns/{campaign_id}/influencers/{user_id}', method: HTTP_METHODS.PUT },
|
|
35638
|
+
markInfluencerCampaignComplete: { url: '/campaigns/{campaign_id}/influencers/{user_id}/setComplete', method: HTTP_METHODS.POST },
|
|
35639
|
+
markInfluencerCampaignIncomplete: { url: '/campaigns/{campaign_id}/influencers/{user_id}/setIncomplete', method: HTTP_METHODS.POST },
|
|
35640
|
+
listInfluencerCampaignLinks: { url: '/campaigns/{campaign_id}/influencers/{user_id}/links', method: HTTP_METHODS.GET },
|
|
35641
|
+
};
|
|
35642
|
+
return CampaignsRoute;
|
|
35643
|
+
}());
|
|
35644
|
+
|
|
35645
|
+
var Campaigns = /** @class */ (function () {
|
|
35646
|
+
function Campaigns() {
|
|
35647
|
+
}
|
|
35648
|
+
/**
|
|
35649
|
+
* List all the Campaigns.
|
|
35650
|
+
*
|
|
35651
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/edab2e3b061347b06c82258622d239e2
|
|
35652
|
+
*
|
|
35653
|
+
* @returns promise
|
|
35654
|
+
*/
|
|
35655
|
+
Campaigns.list = function (params) {
|
|
35656
|
+
return Requests.processRoute(CampaignsRoute.routes.listCampaigns, undefined, undefined, params);
|
|
35657
|
+
};
|
|
35658
|
+
/**
|
|
35659
|
+
* Create a new campaign.
|
|
35660
|
+
*
|
|
35661
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/createCampaign
|
|
35662
|
+
*
|
|
35663
|
+
* @param data The data to be passed when creating a campaign.
|
|
35664
|
+
*
|
|
35665
|
+
* @returns Promise
|
|
35666
|
+
*/
|
|
35667
|
+
Campaigns.create = function (data, params) {
|
|
35668
|
+
return Requests.processRoute(CampaignsRoute.routes.createCampaign, data, undefined, params);
|
|
35669
|
+
};
|
|
35670
|
+
/**
|
|
35671
|
+
* Update a campaign.
|
|
35672
|
+
*
|
|
35673
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/updateCampaign
|
|
35674
|
+
*
|
|
35675
|
+
* @param campaign_id The id of the campaign to update.
|
|
35676
|
+
* @param data The data to update.
|
|
35677
|
+
*
|
|
35678
|
+
* @returns promise
|
|
35679
|
+
*/
|
|
35680
|
+
Campaigns.update = function (campaign_id, data, params) {
|
|
35681
|
+
return Requests.processRoute(CampaignsRoute.routes.updateCampaign, data, { campaign_id: campaign_id }, params);
|
|
35682
|
+
};
|
|
35683
|
+
/**
|
|
35684
|
+
* Retrieve the information for a single campaign.
|
|
35685
|
+
*
|
|
35686
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignByUuid
|
|
35687
|
+
*
|
|
35688
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
35689
|
+
*
|
|
35690
|
+
* @returns promise
|
|
35691
|
+
*/
|
|
35692
|
+
Campaigns.view = function (campaign_id, params) {
|
|
35693
|
+
return Requests.processRoute(CampaignsRoute.routes.viewCampaign, {}, { campaign_id: campaign_id }, params);
|
|
35694
|
+
};
|
|
35695
|
+
/**
|
|
35696
|
+
* Deletes a campaign.
|
|
35697
|
+
*
|
|
35698
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/deleteCampaign
|
|
35699
|
+
*
|
|
35700
|
+
* @param campaign_id The id of the campaign to delete.
|
|
35701
|
+
* @returns promise
|
|
35702
|
+
*/
|
|
35703
|
+
Campaigns.delete = function (campaign_id, params) {
|
|
35704
|
+
return Requests.processRoute(CampaignsRoute.routes.deleteCampaign, {}, { campaign_id: campaign_id }, params);
|
|
35705
|
+
};
|
|
35706
|
+
/**
|
|
35707
|
+
* List all the campaign links.
|
|
35708
|
+
*
|
|
35709
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLinks
|
|
35710
|
+
*
|
|
35711
|
+
* @returns promise
|
|
35712
|
+
*/
|
|
35713
|
+
Campaigns.listCampaignLinks = function (campaign_id, params) {
|
|
35714
|
+
return Requests.processRoute(CampaignsRoute.routes.listCampaignLinks, undefined, { campaign_id: campaign_id }, params);
|
|
35715
|
+
};
|
|
35716
|
+
/**
|
|
35717
|
+
* Create a new campaign link.
|
|
35718
|
+
*
|
|
35719
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/storeCampaignLink
|
|
35720
|
+
*
|
|
35721
|
+
* @param data The data to be passed when creating a campaign.
|
|
35722
|
+
*
|
|
35723
|
+
* @returns Promise
|
|
35724
|
+
*/
|
|
35725
|
+
Campaigns.createCampaignLink = function (campaign_id, data, params) {
|
|
35726
|
+
return Requests.processRoute(CampaignsRoute.routes.createCampaign, data, { campaign_id: campaign_id }, params);
|
|
35727
|
+
};
|
|
35728
|
+
/**
|
|
35729
|
+
* Update a campaign.
|
|
35730
|
+
*
|
|
35731
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/1bb1492981b4529693604b03aade8bf6
|
|
35732
|
+
*
|
|
35733
|
+
* @param campaign_id The id of the campaign to update.
|
|
35734
|
+
* @param data The data to update.
|
|
35735
|
+
*
|
|
35736
|
+
* @returns promise
|
|
35737
|
+
*/
|
|
35738
|
+
Campaigns.updateCampaignLink = function (campaign_id, link_id, data, params) {
|
|
35739
|
+
return Requests.processRoute(CampaignsRoute.routes.updateCampaign, data, { campaign_id: campaign_id, link_id: link_id }, params);
|
|
35740
|
+
};
|
|
35741
|
+
/**
|
|
35742
|
+
* Retrieve the information for a single campaign.
|
|
35743
|
+
*
|
|
35744
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLink
|
|
35745
|
+
*
|
|
35746
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
35747
|
+
*
|
|
35748
|
+
* @returns promise
|
|
35749
|
+
*/
|
|
35750
|
+
Campaigns.getCampaignLink = function (campaign_id, link_id, params) {
|
|
35751
|
+
return Requests.processRoute(CampaignsRoute.routes.getCampaignLink, {}, { campaign_id: campaign_id, link_id: link_id }, params);
|
|
35752
|
+
};
|
|
35753
|
+
/**
|
|
35754
|
+
* List all the influencers associated with a campaign.
|
|
35755
|
+
*
|
|
35756
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getInfluencerCampaigns
|
|
35757
|
+
*
|
|
35758
|
+
* @returns promise
|
|
35759
|
+
*/
|
|
35760
|
+
Campaigns.listInfluencerCampaigns = function (campaign_id, params) {
|
|
35761
|
+
return Requests.processRoute(CampaignsRoute.routes.listInfluencerCampaigns, undefined, { campaign_id: campaign_id }, params);
|
|
35762
|
+
};
|
|
35763
|
+
/**
|
|
35764
|
+
* Create an influencer campaign
|
|
35765
|
+
*
|
|
35766
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/6d834c837c5f330d6a4cef5786c45c90
|
|
35767
|
+
*
|
|
35768
|
+
* @param data The data to be passed when creating a campaign.
|
|
35769
|
+
*
|
|
35770
|
+
* @returns Promise
|
|
35771
|
+
*/
|
|
35772
|
+
Campaigns.createInfluencerCampaign = function (campaign_id, user_id, data, params) {
|
|
35773
|
+
return Requests.processRoute(CampaignsRoute.routes.createInfluencerCampaign, data, { campaign_id: campaign_id }, params);
|
|
35774
|
+
};
|
|
35775
|
+
/**
|
|
35776
|
+
* Update an influencer campaign.
|
|
35777
|
+
*
|
|
35778
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/updateInfluencerCampaign
|
|
35779
|
+
*
|
|
35780
|
+
* @param campaign_id The id of the campaign to update.
|
|
35781
|
+
* @param data The data to update.
|
|
35782
|
+
*
|
|
35783
|
+
* @returns promise
|
|
35784
|
+
*/
|
|
35785
|
+
Campaigns.updateInfluencerCampaign = function (campaign_id, user_id, data, params) {
|
|
35786
|
+
return Requests.processRoute(CampaignsRoute.routes.updateInfluencerCampaign, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35787
|
+
};
|
|
35788
|
+
/**
|
|
35789
|
+
* Retrieve the information for a single campaign.
|
|
35790
|
+
*
|
|
35791
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/showInfluencerCampaign
|
|
35792
|
+
*
|
|
35793
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
35794
|
+
*
|
|
35795
|
+
* @returns promise
|
|
35796
|
+
*/
|
|
35797
|
+
Campaigns.viewInfluencerCampaign = function (campaign_id, user_id, params) {
|
|
35798
|
+
return Requests.processRoute(CampaignsRoute.routes.viewInfluencerCampaign, {}, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35799
|
+
};
|
|
35800
|
+
/**
|
|
35801
|
+
* Mark an influencer campaign as completed.
|
|
35802
|
+
*
|
|
35803
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/markCompleted
|
|
35804
|
+
*
|
|
35805
|
+
* @param data The data to be passed when creating a campaign.
|
|
35806
|
+
*
|
|
35807
|
+
* @returns Promise
|
|
35808
|
+
*/
|
|
35809
|
+
Campaigns.markInfluencerCampaignComplete = function (campaign_id, user_id, data, params) {
|
|
35810
|
+
return Requests.processRoute(CampaignsRoute.routes.markInfluencerCampaignComplete, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35811
|
+
};
|
|
35812
|
+
/**
|
|
35813
|
+
* Mark an influencer campaign as incomplete.
|
|
35814
|
+
*
|
|
35815
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/afffdc7a0c7fc4d9740f10517c53933e
|
|
35816
|
+
*
|
|
35817
|
+
* @param data The data to be passed when creating a campaign.
|
|
35818
|
+
*
|
|
35819
|
+
* @returns Promise
|
|
35820
|
+
*/
|
|
35821
|
+
Campaigns.markInfluencerCampaignIncomplete = function (campaign_id, user_id, data, params) {
|
|
35822
|
+
return Requests.processRoute(CampaignsRoute.routes.markInfluencerCampaignIncomplete, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35823
|
+
};
|
|
35824
|
+
/**
|
|
35825
|
+
* Get all the links associated with an influencer's campaign.
|
|
35826
|
+
*
|
|
35827
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/edab2e3b061347b06c82258622d239e2
|
|
35828
|
+
*
|
|
35829
|
+
* @returns promise
|
|
35830
|
+
*/
|
|
35831
|
+
Campaigns.listInfluencerCampaignLinks = function (campaign_id, user_id, params) {
|
|
35832
|
+
return Requests.processRoute(CampaignsRoute.routes.listInfluencerCampaignLinks, undefined, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
35833
|
+
};
|
|
35834
|
+
return Campaigns;
|
|
35835
|
+
}());
|
|
35836
|
+
|
|
35518
35837
|
var Parser = /** @class */ (function () {
|
|
35519
35838
|
function Parser() {
|
|
35520
35839
|
}
|
|
@@ -35885,6 +36204,7 @@ var Glitch = /** @class */ (function () {
|
|
|
35885
36204
|
};
|
|
35886
36205
|
Glitch.api = {
|
|
35887
36206
|
Auth: Auth,
|
|
36207
|
+
Campaigns: Campaigns,
|
|
35888
36208
|
Competitions: Competitions,
|
|
35889
36209
|
Communities: Communities,
|
|
35890
36210
|
Users: Users,
|
|
@@ -35895,6 +36215,7 @@ var Glitch = /** @class */ (function () {
|
|
|
35895
36215
|
Waitlists: Waitlists,
|
|
35896
36216
|
Utility: Utility,
|
|
35897
36217
|
Tips: Tips,
|
|
36218
|
+
Titles: Titles,
|
|
35898
36219
|
Social: Social,
|
|
35899
36220
|
SocialPosts: SocialPosts,
|
|
35900
36221
|
TipPackages: TipPackages,
|