Add skill for gameplay entry type workflows
This commit is contained in:
@@ -2,16 +2,22 @@ import type {
|
||||
AdminDebugHttpRequest,
|
||||
AdminDebugHttpResponse,
|
||||
AdminDisableProfileRedeemCodeRequest,
|
||||
AdminDisableProfileTaskConfigRequest,
|
||||
AdminLoginResponse,
|
||||
AdminMeResponse,
|
||||
AdminOverviewResponse,
|
||||
AdminUpsertProfileInviteCodeRequest,
|
||||
AdminUpsertProfileRedeemCodeRequest,
|
||||
AdminUpsertProfileTaskConfigRequest,
|
||||
ApiErrorEnvelope,
|
||||
ApiMeta,
|
||||
ApiSuccessEnvelope,
|
||||
ProfileInviteCodeAdminListResponse,
|
||||
ProfileInviteCodeAdminResponse,
|
||||
ProfileRedeemCodeAdminListResponse,
|
||||
ProfileRedeemCodeAdminResponse,
|
||||
ProfileTaskConfigAdminListResponse,
|
||||
ProfileTaskConfigAdminResponse,
|
||||
} from './adminApiTypes';
|
||||
|
||||
const API_RESPONSE_ENVELOPE_HEADER = 'x-genarrative-response-envelope';
|
||||
@@ -129,6 +135,13 @@ export function debugAdminHttp(token: string, payload: AdminDebugHttpRequest) {
|
||||
});
|
||||
}
|
||||
|
||||
export function listProfileRedeemCodes(token: string) {
|
||||
return request<ProfileRedeemCodeAdminListResponse>(
|
||||
'/admin/api/profile/redeem-codes',
|
||||
{token},
|
||||
);
|
||||
}
|
||||
|
||||
export function upsertProfileRedeemCode(
|
||||
token: string,
|
||||
payload: AdminUpsertProfileRedeemCodeRequest,
|
||||
@@ -143,6 +156,13 @@ export function upsertProfileRedeemCode(
|
||||
);
|
||||
}
|
||||
|
||||
export function listProfileInviteCodes(token: string) {
|
||||
return request<ProfileInviteCodeAdminListResponse>(
|
||||
'/admin/api/profile/invite-codes',
|
||||
{token},
|
||||
);
|
||||
}
|
||||
|
||||
export function upsertProfileInviteCode(
|
||||
token: string,
|
||||
payload: AdminUpsertProfileInviteCodeRequest,
|
||||
@@ -171,6 +191,38 @@ export function disableProfileRedeemCode(
|
||||
);
|
||||
}
|
||||
|
||||
export function listProfileTaskConfigs(token: string) {
|
||||
return request<ProfileTaskConfigAdminListResponse>(
|
||||
'/admin/api/profile/tasks',
|
||||
{token},
|
||||
);
|
||||
}
|
||||
|
||||
export function upsertProfileTaskConfig(
|
||||
token: string,
|
||||
payload: AdminUpsertProfileTaskConfigRequest,
|
||||
) {
|
||||
return request<ProfileTaskConfigAdminResponse>('/admin/api/profile/tasks', {
|
||||
method: 'POST',
|
||||
token,
|
||||
body: payload,
|
||||
});
|
||||
}
|
||||
|
||||
export function disableProfileTaskConfig(
|
||||
token: string,
|
||||
payload: AdminDisableProfileTaskConfigRequest,
|
||||
) {
|
||||
return request<ProfileTaskConfigAdminResponse>(
|
||||
'/admin/api/profile/tasks/disable',
|
||||
{
|
||||
method: 'POST',
|
||||
token,
|
||||
body: payload,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function normalizeBaseUrl(value: string) {
|
||||
return value.trim().replace(/\/+$/, '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user