import * as Utils from '@datocms/rest-client-utils'; import BaseResource from '../../BaseResource.js'; import type * as ApiTypes from '../ApiTypes.js'; import type * as RawApiTypes from '../RawApiTypes.js'; export default class SubscriptionLimit extends BaseResource { static readonly TYPE = 'subscription_limit' as const; /** * Get all the subscription limits * * @throws {ApiError} * @throws {TimeoutError} */ list(siteId: string | ApiTypes.SiteData) { return this.rawList(Utils.toId(siteId)).then((body) => Utils.deserializeResponseBody( body, ), ); } /** * Get all the subscription limits * * @throws {ApiError} * @throws {TimeoutError} */ rawList( siteId: string, ): Promise { return this.client.request( { method: 'GET', url: `/sites/${siteId}/subscription-limits`, }, ); } }