PluginProbe
Code Snippets / trunk
Code Snippets vtrunk
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
← All changes | js/types/Snippet.ts +16 -2 3.9.6 → trunk View file →
@@ -6,17 +6,31 @@
6 6 readonly tags: string[]
7 7 readonly scope: SnippetScope
8 8 readonly priority: number
9 9 readonly active: boolean
10 + readonly locked: boolean
11 + readonly trashed: boolean
10 12 readonly network: boolean
11 13 readonly shared_network?: boolean | null
12 14 readonly modified?: string
13 15 readonly conditionId: number
16 + readonly lastActive?: number
14 17 readonly code_error?: readonly [string, number] | null
18 + readonly code_error_trace?: string | null
19 + readonly createdBy?: SnippetAuthor | null
20 + readonly updatedBy?: SnippetAuthor | null
15 21 }
16 22
23 +export interface SnippetAuthor {
24 + readonly id: number
25 + readonly displayName: string
26 + readonly avatarUrl: string
27 +}
28 +
29 +export const SNIPPET_TYPES = <const> ['php', 'html', 'css', 'js', 'cond']
30 +export type SnippetType = typeof SNIPPET_TYPES[number]
31 +
17 32 export type SnippetCodeType = 'php' | 'html' | 'css' | 'js'
18 -export type SnippetType = SnippetCodeType | 'cond'
19 33
20 34 export type SnippetCodeScope = typeof SNIPPET_TYPE_SCOPES[SnippetCodeType][number]
21 35 export type SnippetScope = typeof SNIPPET_TYPE_SCOPES[SnippetType][number]
22 36
@@ -21,9 +35,9 @@
21 35 export type SnippetScope = typeof SNIPPET_TYPE_SCOPES[SnippetType][number]
22 36
23 37 export const SNIPPET_TYPE_SCOPES = <const> {
24 38 php: ['global', 'admin', 'front-end', 'single-use'],
25 - html: ['content', 'head-content', 'footer-content'],
39 + html: ['content', 'head-content', 'body-content', 'footer-content'],
26 40 css: ['admin-css', 'site-css'],
27 41 js: ['site-head-js', 'site-footer-js'],
28 42 cond: ['condition']
29 43 }