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/index.d.ts
CHANGED
|
@@ -2117,6 +2117,31 @@ declare class Users {
|
|
|
2117
2117
|
* @returns promise
|
|
2118
2118
|
*/
|
|
2119
2119
|
static search<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2120
|
+
/**
|
|
2121
|
+
* Resends the verification email to the authenticated user.
|
|
2122
|
+
*
|
|
2123
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/resendVerificationEmail
|
|
2124
|
+
*
|
|
2125
|
+
* @returns Promise
|
|
2126
|
+
*/
|
|
2127
|
+
static resendVerificationEmail<T>(): AxiosPromise<Response<T>>;
|
|
2128
|
+
/**
|
|
2129
|
+
* Clear Instagram authentication information from the current user.
|
|
2130
|
+
*
|
|
2131
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearInstagramAuth
|
|
2132
|
+
*
|
|
2133
|
+
* @returns promise
|
|
2134
|
+
*/
|
|
2135
|
+
static clearInstagramAuth<T>(): AxiosPromise<Response<T>>;
|
|
2136
|
+
/**
|
|
2137
|
+
* Gets the rules for a specific subreddit.
|
|
2138
|
+
*
|
|
2139
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditRules
|
|
2140
|
+
*
|
|
2141
|
+
* @param subreddit The name of the subreddit to get rules for.
|
|
2142
|
+
* @returns Promise resolving to the list of rules
|
|
2143
|
+
*/
|
|
2144
|
+
static getSubredditRules<T>(subreddit: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2120
2145
|
}
|
|
2121
2146
|
|
|
2122
2147
|
declare class Events {
|
package/package.json
CHANGED
package/src/api/Users.ts
CHANGED
|
@@ -529,6 +529,40 @@ class Users {
|
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Resends the verification email to the authenticated user.
|
|
534
|
+
*
|
|
535
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/resendVerificationEmail
|
|
536
|
+
*
|
|
537
|
+
* @returns Promise
|
|
538
|
+
*/
|
|
539
|
+
public static resendVerificationEmail<T>(): AxiosPromise<Response<T>> {
|
|
540
|
+
return Requests.processRoute(UserRoutes.routes.resendVerificationEmail, {});
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Clear Instagram authentication information from the current user.
|
|
545
|
+
*
|
|
546
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearInstagramAuth
|
|
547
|
+
*
|
|
548
|
+
* @returns promise
|
|
549
|
+
*/
|
|
550
|
+
public static clearInstagramAuth<T>(): AxiosPromise<Response<T>> {
|
|
551
|
+
return Requests.processRoute(UserRoutes.routes.clearInstagramAuth, {});
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Gets the rules for a specific subreddit.
|
|
556
|
+
*
|
|
557
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditRules
|
|
558
|
+
*
|
|
559
|
+
* @param subreddit The name of the subreddit to get rules for.
|
|
560
|
+
* @returns Promise resolving to the list of rules
|
|
561
|
+
*/
|
|
562
|
+
public static getSubredditRules<T>(subreddit: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
563
|
+
return Requests.processRoute(UserRoutes.routes.getSubredditRules, undefined, { subreddit: subreddit }, params);
|
|
564
|
+
}
|
|
565
|
+
|
|
532
566
|
|
|
533
567
|
|
|
534
568
|
|
package/src/routes/UserRoutes.ts
CHANGED
|
@@ -36,7 +36,7 @@ class UserRoutes {
|
|
|
36
36
|
addType: { url: '/users/addType', method: HTTP_METHODS.POST },
|
|
37
37
|
removeType: { url: '/users/removeType/{type_id}', method: HTTP_METHODS.DELETE },
|
|
38
38
|
getCampaignInvites: { url: '/users/getCampaignInvites', method: HTTP_METHODS.GET },
|
|
39
|
-
getPayouts: { url: '/users/
|
|
39
|
+
getPayouts: { url: '/users/getCampaignPayouts', method: HTTP_METHODS.GET },
|
|
40
40
|
verifyAccount: { url: '/users/verify', method: HTTP_METHODS.POST },
|
|
41
41
|
getInstagramAccounts: { url: '/users/instagramAccounts', method: HTTP_METHODS.GET },
|
|
42
42
|
|
|
@@ -46,6 +46,11 @@ class UserRoutes {
|
|
|
46
46
|
|
|
47
47
|
search: { url: '/users/search', method: HTTP_METHODS.GET },
|
|
48
48
|
|
|
49
|
+
resendVerificationEmail: { url: '/users/resendVerificationEmail', method: HTTP_METHODS.POST },
|
|
50
|
+
clearInstagramAuth: { url: '/users/clearInstagramAuth', method: HTTP_METHODS.DELETE },
|
|
51
|
+
getSubredditRules: { url: "/users/reddit/redditrules/{subreddit}", method: HTTP_METHODS.GET },
|
|
52
|
+
|
|
53
|
+
|
|
49
54
|
};
|
|
50
55
|
|
|
51
56
|
}
|