glitch-javascript-sdk 1.1.9 → 1.2.1
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/Communities.d.ts +10 -0
- package/dist/esm/api/Influencers.d.ts +8 -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/Communities.ts +14 -0
- package/src/api/Influencers.ts +11 -0
- package/src/routes/CommunitiesRoute.ts +1 -1
- package/src/routes/InfluencerRoutes.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -980,6 +980,16 @@ declare class Communities {
|
|
|
980
980
|
* @returns promise
|
|
981
981
|
*/
|
|
982
982
|
static deleteEmailTemplate<T>(community_id: string, template_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
983
|
+
/**
|
|
984
|
+
* Populates an email template for the community that will replace the platholders with the data provided.
|
|
985
|
+
*
|
|
986
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
|
|
987
|
+
*
|
|
988
|
+
* @param data The data to be passed when creating a community.
|
|
989
|
+
*
|
|
990
|
+
* @returns Promise
|
|
991
|
+
*/
|
|
992
|
+
static populateEmailTemplate<T>(community_id: string, template_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
983
993
|
}
|
|
984
994
|
|
|
985
995
|
declare class Users {
|
|
@@ -3277,6 +3287,14 @@ declare class Influencers {
|
|
|
3277
3287
|
* @returns promise
|
|
3278
3288
|
*/
|
|
3279
3289
|
static deleteNote<T>(influencer_id: string, note_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3290
|
+
/**
|
|
3291
|
+
* Get a list of contracts associated with an influencer.
|
|
3292
|
+
*
|
|
3293
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencers
|
|
3294
|
+
*
|
|
3295
|
+
* @returns promise
|
|
3296
|
+
*/
|
|
3297
|
+
static listContracts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3280
3298
|
}
|
|
3281
3299
|
|
|
3282
3300
|
declare class Games {
|
package/package.json
CHANGED
package/src/api/Communities.ts
CHANGED
|
@@ -475,6 +475,20 @@ class Communities {
|
|
|
475
475
|
|
|
476
476
|
return Requests.processRoute(CommunitiesRoute.routes.deleteEmailTemplate, {}, {community_id : community_id, template_id : template_id});
|
|
477
477
|
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Populates an email template for the community that will replace the platholders with the data provided.
|
|
481
|
+
*
|
|
482
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
|
|
483
|
+
*
|
|
484
|
+
* @param data The data to be passed when creating a community.
|
|
485
|
+
*
|
|
486
|
+
* @returns Promise
|
|
487
|
+
*/
|
|
488
|
+
public static populateEmailTemplate<T>(community_id : string, template_id : string, data : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
489
|
+
|
|
490
|
+
return Requests.processRoute(CommunitiesRoute.routes.createEmailTemplate, data, {community_id : community_id, template_id : template_id}, params);
|
|
491
|
+
}
|
|
478
492
|
|
|
479
493
|
|
|
480
494
|
|
package/src/api/Influencers.ts
CHANGED
|
@@ -104,6 +104,17 @@ class Influencers {
|
|
|
104
104
|
return Requests.processRoute(InfluencerRoutes.routes.deleteNote, data, {influencer_id : influencer_id, note_id : note_id}, params);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Get a list of contracts associated with an influencer.
|
|
109
|
+
*
|
|
110
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencers
|
|
111
|
+
*
|
|
112
|
+
* @returns promise
|
|
113
|
+
*/
|
|
114
|
+
public static listContracts<T>(params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
115
|
+
return Requests.processRoute(InfluencerRoutes.routes.listContracts, undefined, undefined, params);
|
|
116
|
+
}
|
|
117
|
+
|
|
107
118
|
|
|
108
119
|
}
|
|
109
120
|
|
|
@@ -35,7 +35,7 @@ class CommunitiesRoute {
|
|
|
35
35
|
viewEmailTemplate : { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.GET },
|
|
36
36
|
updateEmailTemplate :{ url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.PUT },
|
|
37
37
|
deleteEmailTemplate : { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.DELETE },
|
|
38
|
-
|
|
38
|
+
populateEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}/populate', method: HTTP_METHODS.POST },
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
}
|
|
@@ -13,6 +13,7 @@ class InfluencerRoutes {
|
|
|
13
13
|
createNote: { url: '/influencers/{influencer_id}/notes', method: HTTP_METHODS.POST },
|
|
14
14
|
updateNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.PUT },
|
|
15
15
|
deleteNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.DELETE },
|
|
16
|
+
listContracts: { url: '/influencers/contracts', method: HTTP_METHODS.GET },
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
}
|