@globalscoutme/api-client 1.2.6 → 1.3.0
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/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/sdk.gen.d.ts +74 -2
- package/dist/sdk.gen.js +169 -0
- package/dist/types.gen.d.ts +528 -1
- package/index.ts +85 -0
- package/package.json +1 -1
- package/sdk.gen.ts +320 -1
- package/types.gen.ts +634 -1
package/sdk.gen.ts
CHANGED
|
@@ -36,6 +36,26 @@ import type {
|
|
|
36
36
|
GetApiAchievementsMeErrors,
|
|
37
37
|
GetApiAchievementsMeResponses,
|
|
38
38
|
GetApiAchievementsResponses,
|
|
39
|
+
GetApiAdminAccessCodesByIdRedemptionsData,
|
|
40
|
+
GetApiAdminAccessCodesByIdRedemptionsResponses,
|
|
41
|
+
GetApiAdminAccessCodesData,
|
|
42
|
+
GetApiAdminAccessCodesPlansData,
|
|
43
|
+
GetApiAdminAccessCodesPlansResponses,
|
|
44
|
+
GetApiAdminAccessCodesResponses,
|
|
45
|
+
GetApiAdminDashboardData,
|
|
46
|
+
GetApiAdminDashboardErrors,
|
|
47
|
+
GetApiAdminDashboardResponses,
|
|
48
|
+
GetApiAdminKycData,
|
|
49
|
+
GetApiAdminKycResponses,
|
|
50
|
+
GetApiAdminSubscriptionsData,
|
|
51
|
+
GetApiAdminSubscriptionsResponses,
|
|
52
|
+
GetApiAdminUsersByIdAccessData,
|
|
53
|
+
GetApiAdminUsersByIdAccessResponses,
|
|
54
|
+
GetApiAdminUsersByIdData,
|
|
55
|
+
GetApiAdminUsersByIdErrors,
|
|
56
|
+
GetApiAdminUsersByIdResponses,
|
|
57
|
+
GetApiAdminUsersData,
|
|
58
|
+
GetApiAdminUsersResponses,
|
|
39
59
|
GetApiAuthMeData,
|
|
40
60
|
GetApiAuthMeErrors,
|
|
41
61
|
GetApiAuthMeResponses,
|
|
@@ -166,6 +186,8 @@ import type {
|
|
|
166
186
|
GetApiVideosMeData,
|
|
167
187
|
GetApiVideosMeErrors,
|
|
168
188
|
GetApiVideosMeResponses,
|
|
189
|
+
PatchApiAdminAccessCodesByIdData,
|
|
190
|
+
PatchApiAdminAccessCodesByIdResponses,
|
|
169
191
|
PatchApiClubsMeByIdData,
|
|
170
192
|
PatchApiClubsMeByIdErrors,
|
|
171
193
|
PatchApiClubsMeByIdResponses,
|
|
@@ -184,7 +206,22 @@ import type {
|
|
|
184
206
|
PatchApiTrainingAdminContentByIdData,
|
|
185
207
|
PatchApiTrainingAdminContentByIdErrors,
|
|
186
208
|
PatchApiTrainingAdminContentByIdResponses,
|
|
209
|
+
PostApiAdminAccessCodesData,
|
|
210
|
+
PostApiAdminAccessCodesResponses,
|
|
211
|
+
PostApiAdminUsersByIdAccessGrantsByGrantIdRevokeData,
|
|
212
|
+
PostApiAdminUsersByIdAccessGrantsByGrantIdRevokeResponses,
|
|
213
|
+
PostApiAdminUsersByIdAccessGrantsData,
|
|
214
|
+
PostApiAdminUsersByIdAccessGrantsResponses,
|
|
215
|
+
PostApiAdminUsersByIdDeactivateData,
|
|
216
|
+
PostApiAdminUsersByIdDeactivateResponses,
|
|
217
|
+
PostApiAdminUsersByIdReactivateData,
|
|
218
|
+
PostApiAdminUsersByIdReactivateResponses,
|
|
219
|
+
PostApiAdminUsersByIdResetPasswordData,
|
|
220
|
+
PostApiAdminUsersByIdResetPasswordResponses,
|
|
221
|
+
PostApiAdminUsersByIdSuspendData,
|
|
222
|
+
PostApiAdminUsersByIdSuspendResponses,
|
|
187
223
|
PostApiBillingAccessCodesRedeemData,
|
|
224
|
+
PostApiBillingAccessCodesRedeemErrors,
|
|
188
225
|
PostApiBillingAccessCodesRedeemResponses,
|
|
189
226
|
PostApiBillingAppleSyncPurchaseData,
|
|
190
227
|
PostApiBillingAppleSyncPurchaseResponses,
|
|
@@ -573,7 +610,7 @@ export class Billing extends HeyApiClient {
|
|
|
573
610
|
) {
|
|
574
611
|
return (options.client ?? this.client).post<
|
|
575
612
|
PostApiBillingAccessCodesRedeemResponses,
|
|
576
|
-
|
|
613
|
+
PostApiBillingAccessCodesRedeemErrors,
|
|
577
614
|
ThrowOnError
|
|
578
615
|
>({
|
|
579
616
|
url: '/api/billing/access-codes/redeem',
|
|
@@ -1882,6 +1919,283 @@ export class GlobalChat extends HeyApiClient {
|
|
|
1882
1919
|
}
|
|
1883
1920
|
}
|
|
1884
1921
|
|
|
1922
|
+
export class Admin extends HeyApiClient {
|
|
1923
|
+
/**
|
|
1924
|
+
* Get Super Admin platform metrics
|
|
1925
|
+
*/
|
|
1926
|
+
public getAdminDashboard<ThrowOnError extends boolean = false>(
|
|
1927
|
+
options?: Options<GetApiAdminDashboardData, ThrowOnError>
|
|
1928
|
+
) {
|
|
1929
|
+
return (options?.client ?? this.client).get<
|
|
1930
|
+
GetApiAdminDashboardResponses,
|
|
1931
|
+
GetApiAdminDashboardErrors,
|
|
1932
|
+
ThrowOnError
|
|
1933
|
+
>({ url: '/api/admin/dashboard', ...options });
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* List registered users for Super Admin
|
|
1938
|
+
*/
|
|
1939
|
+
public getAdminUsers<ThrowOnError extends boolean = false>(
|
|
1940
|
+
options?: Options<GetApiAdminUsersData, ThrowOnError>
|
|
1941
|
+
) {
|
|
1942
|
+
return (options?.client ?? this.client).get<GetApiAdminUsersResponses, unknown, ThrowOnError>({
|
|
1943
|
+
url: '/api/admin/users',
|
|
1944
|
+
...options,
|
|
1945
|
+
});
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Get registered user detail
|
|
1950
|
+
*/
|
|
1951
|
+
public getAdminUserById<ThrowOnError extends boolean = false>(
|
|
1952
|
+
options: Options<GetApiAdminUsersByIdData, ThrowOnError>
|
|
1953
|
+
) {
|
|
1954
|
+
return (options.client ?? this.client).get<
|
|
1955
|
+
GetApiAdminUsersByIdResponses,
|
|
1956
|
+
GetApiAdminUsersByIdErrors,
|
|
1957
|
+
ThrowOnError
|
|
1958
|
+
>({ url: '/api/admin/users/{id}', ...options });
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* List platform subscriptions
|
|
1963
|
+
*/
|
|
1964
|
+
public getAdminSubscriptions<ThrowOnError extends boolean = false>(
|
|
1965
|
+
options?: Options<GetApiAdminSubscriptionsData, ThrowOnError>
|
|
1966
|
+
) {
|
|
1967
|
+
return (options?.client ?? this.client).get<
|
|
1968
|
+
GetApiAdminSubscriptionsResponses,
|
|
1969
|
+
unknown,
|
|
1970
|
+
ThrowOnError
|
|
1971
|
+
>({ url: '/api/admin/subscriptions', ...options });
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* List latest KYC verifications
|
|
1976
|
+
*/
|
|
1977
|
+
public getAdminKycQueue<ThrowOnError extends boolean = false>(
|
|
1978
|
+
options?: Options<GetApiAdminKycData, ThrowOnError>
|
|
1979
|
+
) {
|
|
1980
|
+
return (options?.client ?? this.client).get<GetApiAdminKycResponses, unknown, ThrowOnError>({
|
|
1981
|
+
url: '/api/admin/kyc',
|
|
1982
|
+
...options,
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
/**
|
|
1987
|
+
* List plans available to access codes
|
|
1988
|
+
*/
|
|
1989
|
+
public getAdminAccessCodePlans<ThrowOnError extends boolean = false>(
|
|
1990
|
+
options?: Options<GetApiAdminAccessCodesPlansData, ThrowOnError>
|
|
1991
|
+
) {
|
|
1992
|
+
return (options?.client ?? this.client).get<
|
|
1993
|
+
GetApiAdminAccessCodesPlansResponses,
|
|
1994
|
+
unknown,
|
|
1995
|
+
ThrowOnError
|
|
1996
|
+
>({ url: '/api/admin/access-codes/plans', ...options });
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* List access-code campaigns
|
|
2001
|
+
*/
|
|
2002
|
+
public getAdminAccessCodes<ThrowOnError extends boolean = false>(
|
|
2003
|
+
options?: Options<GetApiAdminAccessCodesData, ThrowOnError>
|
|
2004
|
+
) {
|
|
2005
|
+
return (options?.client ?? this.client).get<
|
|
2006
|
+
GetApiAdminAccessCodesResponses,
|
|
2007
|
+
unknown,
|
|
2008
|
+
ThrowOnError
|
|
2009
|
+
>({ url: '/api/admin/access-codes', ...options });
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
/**
|
|
2013
|
+
* Create an access-code campaign
|
|
2014
|
+
*/
|
|
2015
|
+
public createAdminAccessCode<ThrowOnError extends boolean = false>(
|
|
2016
|
+
options: Options<PostApiAdminAccessCodesData, ThrowOnError>
|
|
2017
|
+
) {
|
|
2018
|
+
return (options.client ?? this.client).post<
|
|
2019
|
+
PostApiAdminAccessCodesResponses,
|
|
2020
|
+
unknown,
|
|
2021
|
+
ThrowOnError
|
|
2022
|
+
>({
|
|
2023
|
+
url: '/api/admin/access-codes',
|
|
2024
|
+
...options,
|
|
2025
|
+
headers: {
|
|
2026
|
+
'Content-Type': 'application/json',
|
|
2027
|
+
...options.headers,
|
|
2028
|
+
},
|
|
2029
|
+
});
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* Activate or deactivate an access code
|
|
2034
|
+
*/
|
|
2035
|
+
public setAdminAccessCodeState<ThrowOnError extends boolean = false>(
|
|
2036
|
+
options: Options<PatchApiAdminAccessCodesByIdData, ThrowOnError>
|
|
2037
|
+
) {
|
|
2038
|
+
return (options.client ?? this.client).patch<
|
|
2039
|
+
PatchApiAdminAccessCodesByIdResponses,
|
|
2040
|
+
unknown,
|
|
2041
|
+
ThrowOnError
|
|
2042
|
+
>({
|
|
2043
|
+
url: '/api/admin/access-codes/{id}',
|
|
2044
|
+
...options,
|
|
2045
|
+
headers: {
|
|
2046
|
+
'Content-Type': 'application/json',
|
|
2047
|
+
...options.headers,
|
|
2048
|
+
},
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* List access-code redemptions
|
|
2054
|
+
*/
|
|
2055
|
+
public getAdminAccessCodeRedemptions<ThrowOnError extends boolean = false>(
|
|
2056
|
+
options: Options<GetApiAdminAccessCodesByIdRedemptionsData, ThrowOnError>
|
|
2057
|
+
) {
|
|
2058
|
+
return (options.client ?? this.client).get<
|
|
2059
|
+
GetApiAdminAccessCodesByIdRedemptionsResponses,
|
|
2060
|
+
unknown,
|
|
2061
|
+
ThrowOnError
|
|
2062
|
+
>({ url: '/api/admin/access-codes/{id}/redemptions', ...options });
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
/**
|
|
2066
|
+
* Get effective billing access for a user
|
|
2067
|
+
*/
|
|
2068
|
+
public getAdminUserAccess<ThrowOnError extends boolean = false>(
|
|
2069
|
+
options: Options<GetApiAdminUsersByIdAccessData, ThrowOnError>
|
|
2070
|
+
) {
|
|
2071
|
+
return (options.client ?? this.client).get<
|
|
2072
|
+
GetApiAdminUsersByIdAccessResponses,
|
|
2073
|
+
unknown,
|
|
2074
|
+
ThrowOnError
|
|
2075
|
+
>({ url: '/api/admin/users/{id}/access', ...options });
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
/**
|
|
2079
|
+
* Grant temporary manual access to a user
|
|
2080
|
+
*/
|
|
2081
|
+
public grantAdminUserAccess<ThrowOnError extends boolean = false>(
|
|
2082
|
+
options: Options<PostApiAdminUsersByIdAccessGrantsData, ThrowOnError>
|
|
2083
|
+
) {
|
|
2084
|
+
return (options.client ?? this.client).post<
|
|
2085
|
+
PostApiAdminUsersByIdAccessGrantsResponses,
|
|
2086
|
+
unknown,
|
|
2087
|
+
ThrowOnError
|
|
2088
|
+
>({
|
|
2089
|
+
url: '/api/admin/users/{id}/access-grants',
|
|
2090
|
+
...options,
|
|
2091
|
+
headers: {
|
|
2092
|
+
'Content-Type': 'application/json',
|
|
2093
|
+
...options.headers,
|
|
2094
|
+
},
|
|
2095
|
+
});
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* Revoke an Admin-managed access grant
|
|
2100
|
+
*/
|
|
2101
|
+
public revokeAdminUserAccess<ThrowOnError extends boolean = false>(
|
|
2102
|
+
options: Options<PostApiAdminUsersByIdAccessGrantsByGrantIdRevokeData, ThrowOnError>
|
|
2103
|
+
) {
|
|
2104
|
+
return (options.client ?? this.client).post<
|
|
2105
|
+
PostApiAdminUsersByIdAccessGrantsByGrantIdRevokeResponses,
|
|
2106
|
+
unknown,
|
|
2107
|
+
ThrowOnError
|
|
2108
|
+
>({
|
|
2109
|
+
url: '/api/admin/users/{id}/access-grants/{grantId}/revoke',
|
|
2110
|
+
...options,
|
|
2111
|
+
headers: {
|
|
2112
|
+
'Content-Type': 'application/json',
|
|
2113
|
+
...options.headers,
|
|
2114
|
+
},
|
|
2115
|
+
});
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
/**
|
|
2119
|
+
* Suspend a user account
|
|
2120
|
+
*/
|
|
2121
|
+
public suspendAdminUser<ThrowOnError extends boolean = false>(
|
|
2122
|
+
options: Options<PostApiAdminUsersByIdSuspendData, ThrowOnError>
|
|
2123
|
+
) {
|
|
2124
|
+
return (options.client ?? this.client).post<
|
|
2125
|
+
PostApiAdminUsersByIdSuspendResponses,
|
|
2126
|
+
unknown,
|
|
2127
|
+
ThrowOnError
|
|
2128
|
+
>({
|
|
2129
|
+
url: '/api/admin/users/{id}/suspend',
|
|
2130
|
+
...options,
|
|
2131
|
+
headers: {
|
|
2132
|
+
'Content-Type': 'application/json',
|
|
2133
|
+
...options.headers,
|
|
2134
|
+
},
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
/**
|
|
2139
|
+
* Reactivate a suspended account
|
|
2140
|
+
*/
|
|
2141
|
+
public reactivateAdminUser<ThrowOnError extends boolean = false>(
|
|
2142
|
+
options: Options<PostApiAdminUsersByIdReactivateData, ThrowOnError>
|
|
2143
|
+
) {
|
|
2144
|
+
return (options.client ?? this.client).post<
|
|
2145
|
+
PostApiAdminUsersByIdReactivateResponses,
|
|
2146
|
+
unknown,
|
|
2147
|
+
ThrowOnError
|
|
2148
|
+
>({
|
|
2149
|
+
url: '/api/admin/users/{id}/reactivate',
|
|
2150
|
+
...options,
|
|
2151
|
+
headers: {
|
|
2152
|
+
'Content-Type': 'application/json',
|
|
2153
|
+
...options.headers,
|
|
2154
|
+
},
|
|
2155
|
+
});
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
/**
|
|
2159
|
+
* Send a password recovery email
|
|
2160
|
+
*/
|
|
2161
|
+
public resetAdminUserPassword<ThrowOnError extends boolean = false>(
|
|
2162
|
+
options: Options<PostApiAdminUsersByIdResetPasswordData, ThrowOnError>
|
|
2163
|
+
) {
|
|
2164
|
+
return (options.client ?? this.client).post<
|
|
2165
|
+
PostApiAdminUsersByIdResetPasswordResponses,
|
|
2166
|
+
unknown,
|
|
2167
|
+
ThrowOnError
|
|
2168
|
+
>({
|
|
2169
|
+
url: '/api/admin/users/{id}/reset-password',
|
|
2170
|
+
...options,
|
|
2171
|
+
headers: {
|
|
2172
|
+
'Content-Type': 'application/json',
|
|
2173
|
+
...options.headers,
|
|
2174
|
+
},
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* Soft-deactivate a user account
|
|
2180
|
+
*/
|
|
2181
|
+
public deactivateAdminUser<ThrowOnError extends boolean = false>(
|
|
2182
|
+
options: Options<PostApiAdminUsersByIdDeactivateData, ThrowOnError>
|
|
2183
|
+
) {
|
|
2184
|
+
return (options.client ?? this.client).post<
|
|
2185
|
+
PostApiAdminUsersByIdDeactivateResponses,
|
|
2186
|
+
unknown,
|
|
2187
|
+
ThrowOnError
|
|
2188
|
+
>({
|
|
2189
|
+
url: '/api/admin/users/{id}/deactivate',
|
|
2190
|
+
...options,
|
|
2191
|
+
headers: {
|
|
2192
|
+
'Content-Type': 'application/json',
|
|
2193
|
+
...options.headers,
|
|
2194
|
+
},
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
|
|
1885
2199
|
export class GlobalScoutMeClient extends HeyApiClient {
|
|
1886
2200
|
public static readonly __registry = new HeyApiRegistry<GlobalScoutMeClient>();
|
|
1887
2201
|
|
|
@@ -2019,4 +2333,9 @@ export class GlobalScoutMeClient extends HeyApiClient {
|
|
|
2019
2333
|
get globalChat(): GlobalChat {
|
|
2020
2334
|
return (this._globalChat ??= new GlobalChat({ client: this.client }));
|
|
2021
2335
|
}
|
|
2336
|
+
|
|
2337
|
+
private _admin?: Admin;
|
|
2338
|
+
get admin(): Admin {
|
|
2339
|
+
return (this._admin ??= new Admin({ client: this.client }));
|
|
2340
|
+
}
|
|
2022
2341
|
}
|