glitch-javascript-sdk 0.7.5 → 0.7.7
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 +259 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +11 -11
- package/dist/esm/api/Messages.d.ts +38 -0
- package/dist/esm/api/Subscriptions.d.ts +69 -0
- package/dist/esm/api/Titles.d.ts +64 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +259 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/MessagesRoute.d.ts +7 -0
- package/dist/esm/routes/SubscriptionsRoute.d.ts +7 -0
- package/dist/index.d.ts +180 -11
- package/package.json +1 -1
- package/src/api/Events.ts +3 -3
- package/src/api/Messages.ts +57 -0
- package/src/api/Subscriptions.ts +99 -0
- package/src/api/Titles.ts +96 -0
- package/src/api/index.ts +5 -1
- package/src/index.ts +4 -0
- package/src/routes/MessagesRoute.ts +15 -0
- package/src/routes/SubscriptionsRoute.ts +20 -0
- package/src/routes/TitlesRoute.ts +5 -1
package/dist/esm/api/Events.d.ts
CHANGED
|
@@ -138,15 +138,15 @@ declare class Events {
|
|
|
138
138
|
*/
|
|
139
139
|
static syncAsLive<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
140
140
|
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
141
|
+
* Updates the main image for the event using a File object.
|
|
142
|
+
*
|
|
143
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
|
|
144
|
+
*
|
|
145
|
+
* @param file The file object to upload.
|
|
146
|
+
* @param data Any additional data to pass along to the upload.
|
|
147
|
+
*
|
|
148
|
+
* @returns promise
|
|
149
|
+
*/
|
|
150
150
|
static uploadMainImageFile<T>(event_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
151
151
|
/**
|
|
152
152
|
* Updates the main image for the event using a Blob.
|
|
@@ -160,7 +160,7 @@ declare class Events {
|
|
|
160
160
|
*/
|
|
161
161
|
static uploadMainImageBlob<T>(event_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
162
162
|
/**
|
|
163
|
-
* Updates the banner image for the
|
|
163
|
+
* Updates the banner image for the event using a File object.
|
|
164
164
|
*
|
|
165
165
|
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
|
|
166
166
|
*
|
|
@@ -171,7 +171,7 @@ declare class Events {
|
|
|
171
171
|
*/
|
|
172
172
|
static uploadBannerImageFile<T>(event_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
173
173
|
/**
|
|
174
|
-
* Updates the banner image for the
|
|
174
|
+
* Updates the banner image for the event using a Blob.
|
|
175
175
|
*
|
|
176
176
|
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
|
|
177
177
|
*
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class Messages {
|
|
4
|
+
/**
|
|
5
|
+
* Get all the message threads that a user has particpated in.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Messages/getConversations
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static listMessageThreads<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Send a new message that will be added to a thread
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/Messages/storeMessage
|
|
16
|
+
*
|
|
17
|
+
* @returns A promise
|
|
18
|
+
*/
|
|
19
|
+
static sendMessage<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
20
|
+
/**
|
|
21
|
+
* Deletes a message.
|
|
22
|
+
*
|
|
23
|
+
* @see https://api.glitch.fun/api/documentation#/Messages/destroyMessage
|
|
24
|
+
*
|
|
25
|
+
* @returns A promise
|
|
26
|
+
*/
|
|
27
|
+
static deleteMessage<T>(message_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
28
|
+
/**
|
|
29
|
+
* A message thread is a thread between multiple users. Pass the user ids in the thread and it will either
|
|
30
|
+
* get the current thread or create a new thread.
|
|
31
|
+
*
|
|
32
|
+
* @see https://api.glitch.fun/api/documentation#/Messages/conversations
|
|
33
|
+
*
|
|
34
|
+
* @returns A promise
|
|
35
|
+
*/
|
|
36
|
+
static createOrGetThread<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
37
|
+
}
|
|
38
|
+
export default Messages;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class Subscriptions {
|
|
4
|
+
/**
|
|
5
|
+
* Get a creator subscription for the creator program.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/getCreatorSubscription
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static getCreatorSubscription<T>(stripe_subscription_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a s subscription plan that a community has to talk with influencers
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/getCommunityInfluencerSubscription
|
|
16
|
+
*
|
|
17
|
+
* @returns promise
|
|
18
|
+
*/
|
|
19
|
+
static getCommunityInfluencerSubscription<T>(community_id: string, stripe_subscription_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
20
|
+
/**
|
|
21
|
+
* List all the subscription plans that a creator has.
|
|
22
|
+
*
|
|
23
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/getCreatorSubscriptions
|
|
24
|
+
*
|
|
25
|
+
* @returns promise
|
|
26
|
+
*/
|
|
27
|
+
static listCreatorSubscriptions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
28
|
+
/**
|
|
29
|
+
* List all the subscription plans that a community has.
|
|
30
|
+
*
|
|
31
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/getCommunityInfluencerSubscriptions
|
|
32
|
+
*
|
|
33
|
+
* @returns promise
|
|
34
|
+
*/
|
|
35
|
+
static listCommunityInfluencerSubscriptions<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
36
|
+
/**
|
|
37
|
+
* Create a new subscription of a content creator
|
|
38
|
+
*
|
|
39
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/createCreatorSubscription
|
|
40
|
+
*
|
|
41
|
+
* @returns A promise
|
|
42
|
+
*/
|
|
43
|
+
static createCreatorSubscription<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
44
|
+
/**
|
|
45
|
+
* Create a new subscription of a community engaging in influencer marketing
|
|
46
|
+
*
|
|
47
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/createCommunityInfluencerSubscription
|
|
48
|
+
*
|
|
49
|
+
* @returns A promise
|
|
50
|
+
*/
|
|
51
|
+
static createCommunityInfluencerSubscription<T>(community_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* Cancels a creator subscription
|
|
54
|
+
*
|
|
55
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelCreatorSubscription
|
|
56
|
+
*
|
|
57
|
+
* @returns A promise
|
|
58
|
+
*/
|
|
59
|
+
static cancelCreatorSubscription<T>(stripe_subscription_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
60
|
+
/**
|
|
61
|
+
* Cancels a community subscription
|
|
62
|
+
*
|
|
63
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelCommunityInfluencerSubscription
|
|
64
|
+
*
|
|
65
|
+
* @returns A promise
|
|
66
|
+
*/
|
|
67
|
+
static cancelCommunityInfluencerSubscription<T>(community_id: string, stripe_subscription_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
68
|
+
}
|
|
69
|
+
export default Subscriptions;
|
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -69,5 +69,69 @@ declare class Titles {
|
|
|
69
69
|
* @returns Promise
|
|
70
70
|
*/
|
|
71
71
|
static reject<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
72
|
+
/**
|
|
73
|
+
* Add a user as an administrator to a title
|
|
74
|
+
*
|
|
75
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/addTitleAdministrator
|
|
76
|
+
*
|
|
77
|
+
* @param data The data to be passed when creating a title.
|
|
78
|
+
*
|
|
79
|
+
* @returns Promise
|
|
80
|
+
*/
|
|
81
|
+
static addAdministrator<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
82
|
+
/**
|
|
83
|
+
* Remove a user as an administrator toa tile
|
|
84
|
+
*
|
|
85
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/removeTitleAdministrator
|
|
86
|
+
*
|
|
87
|
+
* @param data The data to be passed when creating a title.
|
|
88
|
+
*
|
|
89
|
+
* @returns Promise
|
|
90
|
+
*/
|
|
91
|
+
static removeAdministrator<T>(title_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
92
|
+
/**
|
|
93
|
+
* Updates the main image for the title using a File object.
|
|
94
|
+
*
|
|
95
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
|
|
96
|
+
*
|
|
97
|
+
* @param file The file object to upload.
|
|
98
|
+
* @param data Any additional data to pass along to the upload.
|
|
99
|
+
*
|
|
100
|
+
* @returns promise
|
|
101
|
+
*/
|
|
102
|
+
static uploadMainImageFile<T>(title_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
103
|
+
/**
|
|
104
|
+
* Updates the main image for the title using a Blob.
|
|
105
|
+
*
|
|
106
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
|
|
107
|
+
*
|
|
108
|
+
* @param blob The blob to upload.
|
|
109
|
+
* @param data Any additional data to pass along to the upload
|
|
110
|
+
*
|
|
111
|
+
* @returns promise
|
|
112
|
+
*/
|
|
113
|
+
static uploadMainImageBlob<T>(title_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
114
|
+
/**
|
|
115
|
+
* Updates the banner image for the title using a File object.
|
|
116
|
+
*
|
|
117
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
|
|
118
|
+
*
|
|
119
|
+
* @param file The file object to upload.
|
|
120
|
+
* @param data Any additional data to pass along to the upload.
|
|
121
|
+
*
|
|
122
|
+
* @returns promise
|
|
123
|
+
*/
|
|
124
|
+
static uploadBannerImageFile<T>(title_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
125
|
+
/**
|
|
126
|
+
* Updates the banner image for the title using a Blob.
|
|
127
|
+
*
|
|
128
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
|
|
129
|
+
*
|
|
130
|
+
* @param blob The blob to upload.
|
|
131
|
+
* @param data Any additional data to pass along to the upload
|
|
132
|
+
*
|
|
133
|
+
* @returns promise
|
|
134
|
+
*/
|
|
135
|
+
static uploadBannerImageBlob<T>(title_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
72
136
|
}
|
|
73
137
|
export default Titles;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import TipPackagePurchases from "./TipPackagePurchases";
|
|
|
16
16
|
import SocialPosts from "./SocialPosts";
|
|
17
17
|
import Titles from "./Titles";
|
|
18
18
|
import Campaigns from "./Campaigns";
|
|
19
|
+
import Subscriptions from "./Subscriptions";
|
|
20
|
+
import Messages from "./Messages";
|
|
19
21
|
export { Auth };
|
|
20
22
|
export { Competitions };
|
|
21
23
|
export { Communities };
|
|
@@ -34,3 +36,5 @@ export { TipPackagePurchases };
|
|
|
34
36
|
export { SocialPosts };
|
|
35
37
|
export { Titles };
|
|
36
38
|
export { Campaigns };
|
|
39
|
+
export { Subscriptions };
|
|
40
|
+
export { Messages };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import { TipPackagePurchases } from "./api";
|
|
|
16
16
|
import { SocialPosts } from "./api";
|
|
17
17
|
import { Titles } from "./api";
|
|
18
18
|
import { Campaigns } from "./api";
|
|
19
|
+
import { Subscriptions } from "./api";
|
|
20
|
+
import { Messages } from "./api";
|
|
19
21
|
import Requests from "./util/Requests";
|
|
20
22
|
import Parser from "./util/Parser";
|
|
21
23
|
import Session from "./util/Session";
|
|
@@ -43,6 +45,7 @@ declare class Glitch {
|
|
|
43
45
|
Events: typeof Events;
|
|
44
46
|
Teams: typeof Teams;
|
|
45
47
|
Posts: typeof Posts;
|
|
48
|
+
Messages: typeof Messages;
|
|
46
49
|
Templates: typeof Templates;
|
|
47
50
|
Waitlists: typeof Waitlists;
|
|
48
51
|
Utility: typeof Utility;
|
|
@@ -50,6 +53,7 @@ declare class Glitch {
|
|
|
50
53
|
Titles: typeof Titles;
|
|
51
54
|
Social: typeof Social;
|
|
52
55
|
SocialPosts: typeof SocialPosts;
|
|
56
|
+
Subscriptions: typeof Subscriptions;
|
|
53
57
|
TipPackages: typeof TipPackages;
|
|
54
58
|
TipEmojis: typeof TipEmojis;
|
|
55
59
|
TipPackagePurchases: typeof TipPackagePurchases;
|
package/dist/esm/index.js
CHANGED
|
@@ -7307,15 +7307,15 @@ var Events = /** @class */ (function () {
|
|
|
7307
7307
|
return Requests.processRoute(EventsRoutes.routes.syncAsLive, data, { event_id: event_id }, params);
|
|
7308
7308
|
};
|
|
7309
7309
|
/**
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7310
|
+
* Updates the main image for the event using a File object.
|
|
7311
|
+
*
|
|
7312
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
|
|
7313
|
+
*
|
|
7314
|
+
* @param file The file object to upload.
|
|
7315
|
+
* @param data Any additional data to pass along to the upload.
|
|
7316
|
+
*
|
|
7317
|
+
* @returns promise
|
|
7318
|
+
*/
|
|
7319
7319
|
Events.uploadMainImageFile = function (event_id, file, data, params) {
|
|
7320
7320
|
var url = EventsRoutes.routes.uploadMainImage.url.replace('{event_id}', event_id);
|
|
7321
7321
|
return Requests.uploadFile(url, 'image', file, data);
|
|
@@ -7335,7 +7335,7 @@ var Events = /** @class */ (function () {
|
|
|
7335
7335
|
return Requests.uploadBlob(url, 'image', blob, data);
|
|
7336
7336
|
};
|
|
7337
7337
|
/**
|
|
7338
|
-
* Updates the banner image for the
|
|
7338
|
+
* Updates the banner image for the event using a File object.
|
|
7339
7339
|
*
|
|
7340
7340
|
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
|
|
7341
7341
|
*
|
|
@@ -7349,7 +7349,7 @@ var Events = /** @class */ (function () {
|
|
|
7349
7349
|
return Requests.uploadFile(url, 'image', file, data);
|
|
7350
7350
|
};
|
|
7351
7351
|
/**
|
|
7352
|
-
* Updates the banner image for the
|
|
7352
|
+
* Updates the banner image for the event using a Blob.
|
|
7353
7353
|
*
|
|
7354
7354
|
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
|
|
7355
7355
|
*
|
|
@@ -8590,7 +8590,11 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
8590
8590
|
update: { url: '/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
8591
8591
|
delete: { url: '/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
8592
8592
|
approve: { url: '/titles/{title_id}/approve', method: HTTP_METHODS.POST },
|
|
8593
|
-
reject: { url: '
|
|
8593
|
+
reject: { url: '/titles/{title_id}/reject', method: HTTP_METHODS.POST },
|
|
8594
|
+
uploadMainImage: { url: '/titles/{title_id}/uploadMainImage', method: HTTP_METHODS.POST },
|
|
8595
|
+
uploadBannerImage: { url: '/titles/{title_id}/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
8596
|
+
addAdministrator: { url: '/titles/{title_id}/addAdministrator', method: HTTP_METHODS.POST },
|
|
8597
|
+
removeAdministrator: { url: '/titles/{title_id}/removeAdministrator/{user_id}', method: HTTP_METHODS.DELETE },
|
|
8594
8598
|
};
|
|
8595
8599
|
return TitlesRoute;
|
|
8596
8600
|
}());
|
|
@@ -8680,6 +8684,86 @@ var Titles = /** @class */ (function () {
|
|
|
8680
8684
|
Titles.reject = function (title_id, data, params) {
|
|
8681
8685
|
return Requests.processRoute(TitlesRoute.routes.reject, data, { title_id: title_id }, params);
|
|
8682
8686
|
};
|
|
8687
|
+
/**
|
|
8688
|
+
* Add a user as an administrator to a title
|
|
8689
|
+
*
|
|
8690
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/addTitleAdministrator
|
|
8691
|
+
*
|
|
8692
|
+
* @param data The data to be passed when creating a title.
|
|
8693
|
+
*
|
|
8694
|
+
* @returns Promise
|
|
8695
|
+
*/
|
|
8696
|
+
Titles.addAdministrator = function (title_id, data, params) {
|
|
8697
|
+
return Requests.processRoute(TitlesRoute.routes.addAdministrator, data, { title_id: title_id }, params);
|
|
8698
|
+
};
|
|
8699
|
+
/**
|
|
8700
|
+
* Remove a user as an administrator toa tile
|
|
8701
|
+
*
|
|
8702
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/removeTitleAdministrator
|
|
8703
|
+
*
|
|
8704
|
+
* @param data The data to be passed when creating a title.
|
|
8705
|
+
*
|
|
8706
|
+
* @returns Promise
|
|
8707
|
+
*/
|
|
8708
|
+
Titles.removeAdministrator = function (title_id, user_id, data, params) {
|
|
8709
|
+
return Requests.processRoute(TitlesRoute.routes.removeAdministrator, data, { title_id: title_id, user_id: user_id }, params);
|
|
8710
|
+
};
|
|
8711
|
+
/**
|
|
8712
|
+
* Updates the main image for the title using a File object.
|
|
8713
|
+
*
|
|
8714
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
|
|
8715
|
+
*
|
|
8716
|
+
* @param file The file object to upload.
|
|
8717
|
+
* @param data Any additional data to pass along to the upload.
|
|
8718
|
+
*
|
|
8719
|
+
* @returns promise
|
|
8720
|
+
*/
|
|
8721
|
+
Titles.uploadMainImageFile = function (title_id, file, data, params) {
|
|
8722
|
+
var url = TitlesRoute.routes.uploadMainImage.url.replace('{title_id}', title_id);
|
|
8723
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
8724
|
+
};
|
|
8725
|
+
/**
|
|
8726
|
+
* Updates the main image for the title using a Blob.
|
|
8727
|
+
*
|
|
8728
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
|
|
8729
|
+
*
|
|
8730
|
+
* @param blob The blob to upload.
|
|
8731
|
+
* @param data Any additional data to pass along to the upload
|
|
8732
|
+
*
|
|
8733
|
+
* @returns promise
|
|
8734
|
+
*/
|
|
8735
|
+
Titles.uploadMainImageBlob = function (title_id, blob, data, params) {
|
|
8736
|
+
var url = TitlesRoute.routes.uploadMainImage.url.replace('{title_id}', title_id);
|
|
8737
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
8738
|
+
};
|
|
8739
|
+
/**
|
|
8740
|
+
* Updates the banner image for the title using a File object.
|
|
8741
|
+
*
|
|
8742
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
|
|
8743
|
+
*
|
|
8744
|
+
* @param file The file object to upload.
|
|
8745
|
+
* @param data Any additional data to pass along to the upload.
|
|
8746
|
+
*
|
|
8747
|
+
* @returns promise
|
|
8748
|
+
*/
|
|
8749
|
+
Titles.uploadBannerImageFile = function (title_id, file, data, params) {
|
|
8750
|
+
var url = TitlesRoute.routes.uploadBannerImage.url.replace('{title_id}', title_id);
|
|
8751
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
8752
|
+
};
|
|
8753
|
+
/**
|
|
8754
|
+
* Updates the banner image for the title using a Blob.
|
|
8755
|
+
*
|
|
8756
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
|
|
8757
|
+
*
|
|
8758
|
+
* @param blob The blob to upload.
|
|
8759
|
+
* @param data Any additional data to pass along to the upload
|
|
8760
|
+
*
|
|
8761
|
+
* @returns promise
|
|
8762
|
+
*/
|
|
8763
|
+
Titles.uploadBannerImageBlob = function (title_id, blob, data, params) {
|
|
8764
|
+
var url = TitlesRoute.routes.uploadBannerImage.url.replace('{title_id}', title_id);
|
|
8765
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
8766
|
+
};
|
|
8683
8767
|
return Titles;
|
|
8684
8768
|
}());
|
|
8685
8769
|
|
|
@@ -8899,6 +8983,167 @@ var Campaigns = /** @class */ (function () {
|
|
|
8899
8983
|
return Campaigns;
|
|
8900
8984
|
}());
|
|
8901
8985
|
|
|
8986
|
+
var SubscriptionsRoute = /** @class */ (function () {
|
|
8987
|
+
function SubscriptionsRoute() {
|
|
8988
|
+
}
|
|
8989
|
+
SubscriptionsRoute.routes = {
|
|
8990
|
+
createCreatorSubscription: { url: '/subscriptions/creators/subscribe', method: HTTP_METHODS.POST },
|
|
8991
|
+
getCreatorSubscription: { url: '/subscriptions/creators/{stripe_subscription_id}', method: HTTP_METHODS.GET },
|
|
8992
|
+
cancelCreatorSubscription: { url: '/subscriptions/creators/{stripe_subscription_id}', method: HTTP_METHODS.DELETE },
|
|
8993
|
+
listCreatorSubscriptions: { url: '/subscriptions/creators', method: HTTP_METHODS.GET },
|
|
8994
|
+
createCommunityInfluencerSubscription: { url: '/subscriptions/communities/influencers/subscribe/{community_id}', method: HTTP_METHODS.POST },
|
|
8995
|
+
getCommunityInfluencerSubscription: { url: '/subscriptions/communities/influencers/{community_id}/{stripe_subscription_id}', method: HTTP_METHODS.GET },
|
|
8996
|
+
cancelCommunityInfluencerSubscription: { url: '/subscriptions/communities/influencers/{community_id}/{stripe_subscription_id}', method: HTTP_METHODS.DELETE },
|
|
8997
|
+
listCommunityInfluencerSubscriptions: { url: '/subscriptions/communities/influencers/{community_id}', method: HTTP_METHODS.GET },
|
|
8998
|
+
};
|
|
8999
|
+
return SubscriptionsRoute;
|
|
9000
|
+
}());
|
|
9001
|
+
|
|
9002
|
+
var Subscriptions = /** @class */ (function () {
|
|
9003
|
+
function Subscriptions() {
|
|
9004
|
+
}
|
|
9005
|
+
/**
|
|
9006
|
+
* Get a creator subscription for the creator program.
|
|
9007
|
+
*
|
|
9008
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/getCreatorSubscription
|
|
9009
|
+
*
|
|
9010
|
+
* @returns promise
|
|
9011
|
+
*/
|
|
9012
|
+
Subscriptions.getCreatorSubscription = function (stripe_subscription_id, params) {
|
|
9013
|
+
return Requests.processRoute(SubscriptionsRoute.routes.getCreatorSubscription, undefined, { stripe_subscription_id: stripe_subscription_id }, params);
|
|
9014
|
+
};
|
|
9015
|
+
/**
|
|
9016
|
+
* Get a s subscription plan that a community has to talk with influencers
|
|
9017
|
+
*
|
|
9018
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/getCommunityInfluencerSubscription
|
|
9019
|
+
*
|
|
9020
|
+
* @returns promise
|
|
9021
|
+
*/
|
|
9022
|
+
Subscriptions.getCommunityInfluencerSubscription = function (community_id, stripe_subscription_id, params) {
|
|
9023
|
+
return Requests.processRoute(SubscriptionsRoute.routes.getCommunityInfluencerSubscription, undefined, { community_id: community_id, stripe_subscription_id: stripe_subscription_id }, params);
|
|
9024
|
+
};
|
|
9025
|
+
/**
|
|
9026
|
+
* List all the subscription plans that a creator has.
|
|
9027
|
+
*
|
|
9028
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/getCreatorSubscriptions
|
|
9029
|
+
*
|
|
9030
|
+
* @returns promise
|
|
9031
|
+
*/
|
|
9032
|
+
Subscriptions.listCreatorSubscriptions = function (params) {
|
|
9033
|
+
return Requests.processRoute(SubscriptionsRoute.routes.listCreatorSubscriptions, undefined, undefined, params);
|
|
9034
|
+
};
|
|
9035
|
+
/**
|
|
9036
|
+
* List all the subscription plans that a community has.
|
|
9037
|
+
*
|
|
9038
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/getCommunityInfluencerSubscriptions
|
|
9039
|
+
*
|
|
9040
|
+
* @returns promise
|
|
9041
|
+
*/
|
|
9042
|
+
Subscriptions.listCommunityInfluencerSubscriptions = function (community_id, params) {
|
|
9043
|
+
return Requests.processRoute(SubscriptionsRoute.routes.listCommunityInfluencerSubscriptions, undefined, { community_id: community_id }, params);
|
|
9044
|
+
};
|
|
9045
|
+
/**
|
|
9046
|
+
* Create a new subscription of a content creator
|
|
9047
|
+
*
|
|
9048
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/createCreatorSubscription
|
|
9049
|
+
*
|
|
9050
|
+
* @returns A promise
|
|
9051
|
+
*/
|
|
9052
|
+
Subscriptions.createCreatorSubscription = function (data, params) {
|
|
9053
|
+
return Requests.processRoute(SubscriptionsRoute.routes.createCreatorSubscription, data, {}, params);
|
|
9054
|
+
};
|
|
9055
|
+
/**
|
|
9056
|
+
* Create a new subscription of a community engaging in influencer marketing
|
|
9057
|
+
*
|
|
9058
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/createCommunityInfluencerSubscription
|
|
9059
|
+
*
|
|
9060
|
+
* @returns A promise
|
|
9061
|
+
*/
|
|
9062
|
+
Subscriptions.createCommunityInfluencerSubscription = function (community_id, data, params) {
|
|
9063
|
+
return Requests.processRoute(SubscriptionsRoute.routes.createCommunityInfluencerSubscription, data, { community_id: community_id }, params);
|
|
9064
|
+
};
|
|
9065
|
+
/**
|
|
9066
|
+
* Cancels a creator subscription
|
|
9067
|
+
*
|
|
9068
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelCreatorSubscription
|
|
9069
|
+
*
|
|
9070
|
+
* @returns A promise
|
|
9071
|
+
*/
|
|
9072
|
+
Subscriptions.cancelCreatorSubscription = function (stripe_subscription_id, data, params) {
|
|
9073
|
+
return Requests.processRoute(SubscriptionsRoute.routes.cancelCreatorSubscription, data, { stripe_subscription_id: stripe_subscription_id }, params);
|
|
9074
|
+
};
|
|
9075
|
+
/**
|
|
9076
|
+
* Cancels a community subscription
|
|
9077
|
+
*
|
|
9078
|
+
* @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelCommunityInfluencerSubscription
|
|
9079
|
+
*
|
|
9080
|
+
* @returns A promise
|
|
9081
|
+
*/
|
|
9082
|
+
Subscriptions.cancelCommunityInfluencerSubscription = function (community_id, stripe_subscription_id, data, params) {
|
|
9083
|
+
return Requests.processRoute(SubscriptionsRoute.routes.cancelCreatorSubscription, data, { community_id: community_id, stripe_subscription_id: stripe_subscription_id }, params);
|
|
9084
|
+
};
|
|
9085
|
+
return Subscriptions;
|
|
9086
|
+
}());
|
|
9087
|
+
|
|
9088
|
+
var MessagesRoute = /** @class */ (function () {
|
|
9089
|
+
function MessagesRoute() {
|
|
9090
|
+
}
|
|
9091
|
+
MessagesRoute.routes = {
|
|
9092
|
+
listMessageThreads: { url: '/messages', method: HTTP_METHODS.GET },
|
|
9093
|
+
sendMessage: { url: '/message', method: HTTP_METHODS.POST },
|
|
9094
|
+
deleteMessage: { url: '/message/{message_id}', method: HTTP_METHODS.DELETE },
|
|
9095
|
+
createOrGetThread: { url: '/messages/makeThread', method: HTTP_METHODS.POST },
|
|
9096
|
+
};
|
|
9097
|
+
return MessagesRoute;
|
|
9098
|
+
}());
|
|
9099
|
+
|
|
9100
|
+
var Messages = /** @class */ (function () {
|
|
9101
|
+
function Messages() {
|
|
9102
|
+
}
|
|
9103
|
+
/**
|
|
9104
|
+
* Get all the message threads that a user has particpated in.
|
|
9105
|
+
*
|
|
9106
|
+
* @see https://api.glitch.fun/api/documentation#/Messages/getConversations
|
|
9107
|
+
*
|
|
9108
|
+
* @returns promise
|
|
9109
|
+
*/
|
|
9110
|
+
Messages.listMessageThreads = function (params) {
|
|
9111
|
+
return Requests.processRoute(MessagesRoute.routes.listMessageThreads, undefined, undefined, params);
|
|
9112
|
+
};
|
|
9113
|
+
/**
|
|
9114
|
+
* Send a new message that will be added to a thread
|
|
9115
|
+
*
|
|
9116
|
+
* @see https://api.glitch.fun/api/documentation#/Messages/storeMessage
|
|
9117
|
+
*
|
|
9118
|
+
* @returns A promise
|
|
9119
|
+
*/
|
|
9120
|
+
Messages.sendMessage = function (data, params) {
|
|
9121
|
+
return Requests.processRoute(MessagesRoute.routes.sendMessage, data, {}, params);
|
|
9122
|
+
};
|
|
9123
|
+
/**
|
|
9124
|
+
* Deletes a message.
|
|
9125
|
+
*
|
|
9126
|
+
* @see https://api.glitch.fun/api/documentation#/Messages/destroyMessage
|
|
9127
|
+
*
|
|
9128
|
+
* @returns A promise
|
|
9129
|
+
*/
|
|
9130
|
+
Messages.deleteMessage = function (message_id, data, params) {
|
|
9131
|
+
return Requests.processRoute(MessagesRoute.routes.deleteMessage, data, { message_id: message_id }, params);
|
|
9132
|
+
};
|
|
9133
|
+
/**
|
|
9134
|
+
* A message thread is a thread between multiple users. Pass the user ids in the thread and it will either
|
|
9135
|
+
* get the current thread or create a new thread.
|
|
9136
|
+
*
|
|
9137
|
+
* @see https://api.glitch.fun/api/documentation#/Messages/conversations
|
|
9138
|
+
*
|
|
9139
|
+
* @returns A promise
|
|
9140
|
+
*/
|
|
9141
|
+
Messages.createOrGetThread = function (data, params) {
|
|
9142
|
+
return Requests.processRoute(MessagesRoute.routes.createOrGetThread, data, {}, params);
|
|
9143
|
+
};
|
|
9144
|
+
return Messages;
|
|
9145
|
+
}());
|
|
9146
|
+
|
|
8902
9147
|
var Parser = /** @class */ (function () {
|
|
8903
9148
|
function Parser() {
|
|
8904
9149
|
}
|
|
@@ -9304,6 +9549,7 @@ var Glitch = /** @class */ (function () {
|
|
|
9304
9549
|
Events: Events,
|
|
9305
9550
|
Teams: Teams,
|
|
9306
9551
|
Posts: Posts,
|
|
9552
|
+
Messages: Messages,
|
|
9307
9553
|
Templates: Templates,
|
|
9308
9554
|
Waitlists: Waitlists,
|
|
9309
9555
|
Utility: Utility,
|
|
@@ -9311,6 +9557,7 @@ var Glitch = /** @class */ (function () {
|
|
|
9311
9557
|
Titles: Titles,
|
|
9312
9558
|
Social: Social,
|
|
9313
9559
|
SocialPosts: SocialPosts,
|
|
9560
|
+
Subscriptions: Subscriptions,
|
|
9314
9561
|
TipPackages: TipPackages,
|
|
9315
9562
|
TipEmojis: TipEmojis,
|
|
9316
9563
|
TipPackagePurchases: TipPackagePurchases
|