blocks
2 years ago
extended-blocks
3 years ago
plugins
2 years ago
shared
2 years ago
store
2 years ago
global.d.ts
2 years ago
types.ts
2 years ago
global.d.ts
79 lines
| 1 | import { JETPACK_FORM_AI_COMPOSITION_EXTENSION } from './blocks/ai-assistant/extensions/jetpack-contact-form/constants'; |
| 2 | import { JETPACK_CREATE_WITH_VOICE_EXTENSION } from './blocks/create-with-voice/constants'; |
| 3 | import { SiteAIAssistantFeatureEndpointResponseProps } from './types'; |
| 4 | |
| 5 | type AvailableBlockProps = |
| 6 | | { |
| 7 | available?: boolean; |
| 8 | } |
| 9 | | undefined; |
| 10 | |
| 11 | declare global { |
| 12 | interface Window { |
| 13 | JP_CONNECTION_INITIAL_STATE: { |
| 14 | apiRoot: string; |
| 15 | apiNonce: string; |
| 16 | registrationNonce: string; |
| 17 | connectionStatus: { |
| 18 | isActive: boolean; |
| 19 | isStaging: boolean; |
| 20 | isRegistered: boolean; |
| 21 | isUserConnected: boolean; |
| 22 | hasConnectedOwner: boolean; |
| 23 | offlineMode: { |
| 24 | isActive: boolean; |
| 25 | constant: boolean; |
| 26 | url: boolean; |
| 27 | filter: boolean; |
| 28 | wpLocalConstant: boolean; |
| 29 | }; |
| 30 | isPublic: boolean; |
| 31 | }; |
| 32 | userConnectionData: { |
| 33 | currentUser: { |
| 34 | isConnected: boolean; |
| 35 | isMaster: boolean; |
| 36 | username: string; |
| 37 | id: number; |
| 38 | blogId: number; |
| 39 | wpcomUser: { |
| 40 | avatar: boolean; |
| 41 | }; |
| 42 | gravatar: string; |
| 43 | permissions: { |
| 44 | admin_page?: boolean; |
| 45 | connect: boolean; |
| 46 | connect_user: boolean; |
| 47 | disconnect: boolean; |
| 48 | edit_posts?: boolean; |
| 49 | manage_modules?: boolean; |
| 50 | manage_options?: boolean; |
| 51 | manage_plugins?: boolean; |
| 52 | network_admin?: boolean; |
| 53 | network_sites_page?: boolean; |
| 54 | publish_posts?: boolean; |
| 55 | view_stats?: boolean; |
| 56 | }; |
| 57 | }; |
| 58 | connectionOwner: null; |
| 59 | }; |
| 60 | connectedPlugins: object; |
| 61 | wpVersion: string; |
| 62 | siteSuffix: string; |
| 63 | connectionErrors: Array; |
| 64 | }; |
| 65 | Jetpack_Editor_Initial_State: { |
| 66 | available_blocks: { |
| 67 | [ JETPACK_CREATE_WITH_VOICE_EXTENSION ]: AvailableBlockProps; |
| 68 | [ JETPACK_FORM_AI_COMPOSITION_EXTENSION ]: AvailableBlockProps; |
| 69 | }; |
| 70 | adminUrl: string; |
| 71 | siteLocale: string; |
| 72 | 'ai-assistant': SiteAIAssistantFeatureEndpointResponseProps; |
| 73 | screenBase?: string; |
| 74 | wpcomBlogId?: string; |
| 75 | }; |
| 76 | wpcomFetch: function; |
| 77 | } |
| 78 | } |
| 79 |