glitch-javascript-sdk 1.2.4 → 1.2.6
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 +66 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +20 -0
- package/dist/esm/api/Publications.d.ts +23 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +66 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/PublicationsRoutes.d.ts +7 -0
- package/dist/index.d.ts +42 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +28 -0
- package/src/api/Publications.ts +38 -0
- package/src/api/index.ts +3 -1
- package/src/index.ts +3 -1
- package/src/routes/CampaignsRoute.ts +2 -1
- package/src/routes/PublicationsRoutes.ts +13 -0
|
@@ -518,5 +518,25 @@ declare class Campaigns {
|
|
|
518
518
|
* @returns promise
|
|
519
519
|
*/
|
|
520
520
|
static listPayouts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
521
|
+
/**
|
|
522
|
+
* Generate a contract for the influencer based on the values in the campaign.
|
|
523
|
+
*
|
|
524
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generateCampaignContract
|
|
525
|
+
*
|
|
526
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
527
|
+
*
|
|
528
|
+
* @returns promise
|
|
529
|
+
*/
|
|
530
|
+
static generateCampaignContract<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
531
|
+
/**
|
|
532
|
+
* Send a contract with Docusign.
|
|
533
|
+
*
|
|
534
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/sendCampaignContractWithDocusign
|
|
535
|
+
*
|
|
536
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
537
|
+
*
|
|
538
|
+
* @returns promise
|
|
539
|
+
*/
|
|
540
|
+
static sendCampaignContractWithDocusign<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
521
541
|
}
|
|
522
542
|
export default Campaigns;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class Publications {
|
|
4
|
+
/**
|
|
5
|
+
* Get a list of all publictions, podcasts and blogs.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/getPublications
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Download the list of publictions, podcasts and blogs.
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/downloadPublications
|
|
16
|
+
*
|
|
17
|
+
* @param data The data to be passed when creating a team.
|
|
18
|
+
*
|
|
19
|
+
* @returns Promise
|
|
20
|
+
*/
|
|
21
|
+
static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
|
+
}
|
|
23
|
+
export default Publications;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import Messages from "./Messages";
|
|
|
21
21
|
import Feedback from "./Feedback";
|
|
22
22
|
import Influencers from "./Influencers";
|
|
23
23
|
import Games from "./Games";
|
|
24
|
+
import Publications from "./Publications";
|
|
24
25
|
export { Auth };
|
|
25
26
|
export { Competitions };
|
|
26
27
|
export { Communities };
|
|
@@ -44,3 +45,4 @@ export { Messages };
|
|
|
44
45
|
export { Feedback };
|
|
45
46
|
export { Influencers };
|
|
46
47
|
export { Games };
|
|
48
|
+
export { Publications };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { Messages } from "./api";
|
|
|
21
21
|
import { Feedback } from "./api";
|
|
22
22
|
import { Influencers } from "./api";
|
|
23
23
|
import { Games } from "./api";
|
|
24
|
+
import { Publications } from "./api";
|
|
24
25
|
import Requests from "./util/Requests";
|
|
25
26
|
import Parser from "./util/Parser";
|
|
26
27
|
import Session from "./util/Session";
|
|
@@ -63,6 +64,7 @@ declare class Glitch {
|
|
|
63
64
|
TipPackages: typeof TipPackages;
|
|
64
65
|
TipEmojis: typeof TipEmojis;
|
|
65
66
|
TipPackagePurchases: typeof TipPackagePurchases;
|
|
67
|
+
Publications: typeof Publications;
|
|
66
68
|
};
|
|
67
69
|
static util: {
|
|
68
70
|
Requests: typeof Requests;
|
package/dist/esm/index.js
CHANGED
|
@@ -9312,6 +9312,8 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
9312
9312
|
resendAcceptanceEmail: { url: '/campaigns/{campaign_id}/influencers/{user_id}/resendInvite', method: HTTP_METHODS.POST },
|
|
9313
9313
|
payInfluencer: { url: '/campaigns/{campaign_id}/influencers/{user_id}/payInfluencer', method: HTTP_METHODS.POST },
|
|
9314
9314
|
listPayouts: { url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
|
|
9315
|
+
generateCampaignContract: { url: '/campaigns/{campaign_id}/influencers/{user_id}/contract', method: HTTP_METHODS.POST },
|
|
9316
|
+
sendCampaignContractWithDocusign: { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
|
|
9315
9317
|
};
|
|
9316
9318
|
return CampaignsRoute;
|
|
9317
9319
|
}());
|
|
@@ -9946,6 +9948,30 @@ var Campaigns = /** @class */ (function () {
|
|
|
9946
9948
|
Campaigns.listPayouts = function (campaign_id, params) {
|
|
9947
9949
|
return Requests.processRoute(CampaignsRoute.routes.getLedger, undefined, { campaign_id: campaign_id }, params);
|
|
9948
9950
|
};
|
|
9951
|
+
/**
|
|
9952
|
+
* Generate a contract for the influencer based on the values in the campaign.
|
|
9953
|
+
*
|
|
9954
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generateCampaignContract
|
|
9955
|
+
*
|
|
9956
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
9957
|
+
*
|
|
9958
|
+
* @returns promise
|
|
9959
|
+
*/
|
|
9960
|
+
Campaigns.generateCampaignContract = function (campaign_id, user_id, data, params) {
|
|
9961
|
+
return Requests.processRoute(CampaignsRoute.routes.generateCampaignContract, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
9962
|
+
};
|
|
9963
|
+
/**
|
|
9964
|
+
* Send a contract with Docusign.
|
|
9965
|
+
*
|
|
9966
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/sendCampaignContractWithDocusign
|
|
9967
|
+
*
|
|
9968
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
9969
|
+
*
|
|
9970
|
+
* @returns promise
|
|
9971
|
+
*/
|
|
9972
|
+
Campaigns.sendCampaignContractWithDocusign = function (campaign_id, user_id, data, params) {
|
|
9973
|
+
return Requests.processRoute(CampaignsRoute.routes.sendCampaignContractWithDocusign, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
9974
|
+
};
|
|
9949
9975
|
return Campaigns;
|
|
9950
9976
|
}());
|
|
9951
9977
|
|
|
@@ -10378,6 +10404,44 @@ var Games = /** @class */ (function () {
|
|
|
10378
10404
|
return Games;
|
|
10379
10405
|
}());
|
|
10380
10406
|
|
|
10407
|
+
var PublicationsRoutes = /** @class */ (function () {
|
|
10408
|
+
function PublicationsRoutes() {
|
|
10409
|
+
}
|
|
10410
|
+
PublicationsRoutes.routes = {
|
|
10411
|
+
list: { url: '/publications', method: HTTP_METHODS.GET },
|
|
10412
|
+
download: { url: '/publications/download', method: HTTP_METHODS.POST },
|
|
10413
|
+
};
|
|
10414
|
+
return PublicationsRoutes;
|
|
10415
|
+
}());
|
|
10416
|
+
|
|
10417
|
+
var Publications = /** @class */ (function () {
|
|
10418
|
+
function Publications() {
|
|
10419
|
+
}
|
|
10420
|
+
/**
|
|
10421
|
+
* Get a list of all publictions, podcasts and blogs.
|
|
10422
|
+
*
|
|
10423
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/getPublications
|
|
10424
|
+
*
|
|
10425
|
+
* @returns promise
|
|
10426
|
+
*/
|
|
10427
|
+
Publications.list = function (params) {
|
|
10428
|
+
return Requests.processRoute(PublicationsRoutes.routes.list, undefined, undefined, params);
|
|
10429
|
+
};
|
|
10430
|
+
/**
|
|
10431
|
+
* Download the list of publictions, podcasts and blogs.
|
|
10432
|
+
*
|
|
10433
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/downloadPublications
|
|
10434
|
+
*
|
|
10435
|
+
* @param data The data to be passed when creating a team.
|
|
10436
|
+
*
|
|
10437
|
+
* @returns Promise
|
|
10438
|
+
*/
|
|
10439
|
+
Publications.create = function (data, params) {
|
|
10440
|
+
return Requests.processRoute(PublicationsRoutes.routes.download, data, undefined, params);
|
|
10441
|
+
};
|
|
10442
|
+
return Publications;
|
|
10443
|
+
}());
|
|
10444
|
+
|
|
10381
10445
|
var Parser = /** @class */ (function () {
|
|
10382
10446
|
function Parser() {
|
|
10383
10447
|
}
|
|
@@ -10797,7 +10861,8 @@ var Glitch = /** @class */ (function () {
|
|
|
10797
10861
|
Subscriptions: Subscriptions,
|
|
10798
10862
|
TipPackages: TipPackages,
|
|
10799
10863
|
TipEmojis: TipEmojis,
|
|
10800
|
-
TipPackagePurchases: TipPackagePurchases
|
|
10864
|
+
TipPackagePurchases: TipPackagePurchases,
|
|
10865
|
+
Publications: Publications
|
|
10801
10866
|
};
|
|
10802
10867
|
Glitch.util = {
|
|
10803
10868
|
Requests: Requests,
|