glitch-javascript-sdk 2.0.2 → 2.0.3
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 +35 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Users.d.ts +25 -0
- package/dist/esm/index.js +35 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +25 -0
- package/package.json +1 -1
- package/src/api/Users.ts +34 -0
- package/src/routes/UserRoutes.ts +6 -1
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -366,5 +366,30 @@ declare class Users {
|
|
|
366
366
|
* @returns promise
|
|
367
367
|
*/
|
|
368
368
|
static search<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
369
|
+
/**
|
|
370
|
+
* Resends the verification email to the authenticated user.
|
|
371
|
+
*
|
|
372
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/resendVerificationEmail
|
|
373
|
+
*
|
|
374
|
+
* @returns Promise
|
|
375
|
+
*/
|
|
376
|
+
static resendVerificationEmail<T>(): AxiosPromise<Response<T>>;
|
|
377
|
+
/**
|
|
378
|
+
* Clear Instagram authentication information from the current user.
|
|
379
|
+
*
|
|
380
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearInstagramAuth
|
|
381
|
+
*
|
|
382
|
+
* @returns promise
|
|
383
|
+
*/
|
|
384
|
+
static clearInstagramAuth<T>(): AxiosPromise<Response<T>>;
|
|
385
|
+
/**
|
|
386
|
+
* Gets the rules for a specific subreddit.
|
|
387
|
+
*
|
|
388
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditRules
|
|
389
|
+
*
|
|
390
|
+
* @param subreddit The name of the subreddit to get rules for.
|
|
391
|
+
* @returns Promise resolving to the list of rules
|
|
392
|
+
*/
|
|
393
|
+
static getSubredditRules<T>(subreddit: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
369
394
|
}
|
|
370
395
|
export default Users;
|
package/dist/esm/index.js
CHANGED
|
@@ -8593,13 +8593,16 @@ var UserRoutes = /** @class */ (function () {
|
|
|
8593
8593
|
addType: { url: '/users/addType', method: HTTP_METHODS.POST },
|
|
8594
8594
|
removeType: { url: '/users/removeType/{type_id}', method: HTTP_METHODS.DELETE },
|
|
8595
8595
|
getCampaignInvites: { url: '/users/getCampaignInvites', method: HTTP_METHODS.GET },
|
|
8596
|
-
getPayouts: { url: '/users/
|
|
8596
|
+
getPayouts: { url: '/users/getCampaignPayouts', method: HTTP_METHODS.GET },
|
|
8597
8597
|
verifyAccount: { url: '/users/verify', method: HTTP_METHODS.POST },
|
|
8598
8598
|
getInstagramAccounts: { url: '/users/instagramAccounts', method: HTTP_METHODS.GET },
|
|
8599
8599
|
getFacebookPages: { url: "/users/facebookPages", method: HTTP_METHODS.GET },
|
|
8600
8600
|
getSubreddits: { url: "/users/reddit/subreddits", method: HTTP_METHODS.GET },
|
|
8601
8601
|
getSubredditFlairs: { url: "/users/reddit/redditflairs/{subreddit}", method: HTTP_METHODS.GET },
|
|
8602
8602
|
search: { url: '/users/search', method: HTTP_METHODS.GET },
|
|
8603
|
+
resendVerificationEmail: { url: '/users/resendVerificationEmail', method: HTTP_METHODS.POST },
|
|
8604
|
+
clearInstagramAuth: { url: '/users/clearInstagramAuth', method: HTTP_METHODS.DELETE },
|
|
8605
|
+
getSubredditRules: { url: "/users/reddit/redditrules/{subreddit}", method: HTTP_METHODS.GET },
|
|
8603
8606
|
};
|
|
8604
8607
|
return UserRoutes;
|
|
8605
8608
|
}());
|
|
@@ -9052,6 +9055,37 @@ var Users = /** @class */ (function () {
|
|
|
9052
9055
|
Users.search = function (params) {
|
|
9053
9056
|
return Requests.processRoute(UserRoutes.routes.search, undefined, undefined, params);
|
|
9054
9057
|
};
|
|
9058
|
+
/**
|
|
9059
|
+
* Resends the verification email to the authenticated user.
|
|
9060
|
+
*
|
|
9061
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/resendVerificationEmail
|
|
9062
|
+
*
|
|
9063
|
+
* @returns Promise
|
|
9064
|
+
*/
|
|
9065
|
+
Users.resendVerificationEmail = function () {
|
|
9066
|
+
return Requests.processRoute(UserRoutes.routes.resendVerificationEmail, {});
|
|
9067
|
+
};
|
|
9068
|
+
/**
|
|
9069
|
+
* Clear Instagram authentication information from the current user.
|
|
9070
|
+
*
|
|
9071
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearInstagramAuth
|
|
9072
|
+
*
|
|
9073
|
+
* @returns promise
|
|
9074
|
+
*/
|
|
9075
|
+
Users.clearInstagramAuth = function () {
|
|
9076
|
+
return Requests.processRoute(UserRoutes.routes.clearInstagramAuth, {});
|
|
9077
|
+
};
|
|
9078
|
+
/**
|
|
9079
|
+
* Gets the rules for a specific subreddit.
|
|
9080
|
+
*
|
|
9081
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditRules
|
|
9082
|
+
*
|
|
9083
|
+
* @param subreddit The name of the subreddit to get rules for.
|
|
9084
|
+
* @returns Promise resolving to the list of rules
|
|
9085
|
+
*/
|
|
9086
|
+
Users.getSubredditRules = function (subreddit, params) {
|
|
9087
|
+
return Requests.processRoute(UserRoutes.routes.getSubredditRules, undefined, { subreddit: subreddit }, params);
|
|
9088
|
+
};
|
|
9055
9089
|
return Users;
|
|
9056
9090
|
}());
|
|
9057
9091
|
|