import type { AxiosInstance } from 'contentful-sdk-core' ; import { CollectionProp , QueryParams } from '../../../common-types' ; import { CreatePersonalAccessTokenProps , PersonalAccessTokenProp , } from '../../../entities/personal-access-token' ; import { RestEndpoint } from '../types' ; import * as raw from './raw' ; export const get = ( http , params ) => { return raw . get < PersonalAccessTokenProp > ( http , `/users/me/access_tokens/${ params . tokenId }` ) ; } ; export const getMany = ( http , params ) => { return raw . get < CollectionProp < PersonalAccessTokenProp > > ( http , '/users/me/access_tokens' , { params : params . query , } ) ; } ; export const create = ( http , _params , rawData , headers ? ) => { return raw . post < PersonalAccessTokenProp > ( http , '/users/me/access_tokens' , rawData , { headers , } ) ; } ; export const revoke = ( http , params ) => { return raw . put < PersonalAccessTokenProp > ( http , `/users/me/access_tokens/${ params . tokenId }/revoked` , null ) ; } ;