blocks
2 years ago
extended-blocks
2 years ago
plugins
2 years ago
shared
2 years ago
store
2 years ago
types.ts
2 years ago
types.ts
33 lines
| 1 | /** |
| 2 | * Types for the AI Assistant feature. |
| 3 | */ |
| 4 | import type { TierProp, UpgradeTypeProp } from './store/wordpress-com/types'; |
| 5 | |
| 6 | /* |
| 7 | * `sites/$site/ai-assistant-feature` endpoint response body props |
| 8 | */ |
| 9 | export type SiteAIAssistantFeatureEndpointResponseProps = { |
| 10 | 'is-enabled': boolean; |
| 11 | 'has-feature': boolean; |
| 12 | 'is-over-limit': boolean; |
| 13 | 'requests-count': number; |
| 14 | 'requests-limit': number; |
| 15 | 'usage-period': { |
| 16 | 'current-start': string; |
| 17 | 'next-start': string; |
| 18 | 'requests-count': number; |
| 19 | }; |
| 20 | 'site-require-upgrade': boolean; |
| 21 | 'error-message'?: string; |
| 22 | 'error-code'?: string; |
| 23 | 'upgrade-type': UpgradeTypeProp; |
| 24 | 'current-tier': TierProp; |
| 25 | 'tier-plans': Array< TierProp >; |
| 26 | 'next-tier'?: TierProp | null; |
| 27 | costs?: { |
| 28 | [ key: string ]: { |
| 29 | [ key: string ]: number; |
| 30 | }; |
| 31 | }; |
| 32 | }; |
| 33 |