FileMaker Data API Tools API - v1.2.0
Preparing search index...
services/fmWebProjectService
FmWebProjectService
Class FmWebProjectService
Index
Constructors
constructor
Methods
get
Workspace
Root
is
Workspace
Trusted
get
Project
Root
initialize
Project
ensure
Project
Initialized
read
Project
Config
set
Active
Profile
load
Metadata
Cache
sync
Metadata
load
Or
Create
Layout
save
Layout
get
Available
Fields
get
Project
Config
Path
get
Metadata
Index
Path
get
Metadata
Layouts
Dir
Path
get
Layouts
Dir
Path
get
Generated
Dir
Path
Constructors
constructor
new
FmWebProjectService
(
profileStore
:
ProfileStore
,
fmClient
:
FMClient
,
schemaService
:
SchemaService
,
logger
:
Pick
<
Logger
,
"debug"
|
"info"
|
"warn"
|
"error"
>
,
)
:
FmWebProjectService
Parameters
profileStore
:
ProfileStore
fmClient
:
FMClient
schemaService
:
SchemaService
logger
:
Pick
<
Logger
,
"debug"
|
"info"
|
"warn"
|
"error"
>
Returns
FmWebProjectService
Methods
get
Workspace
Root
getWorkspaceRoot
()
:
string
|
undefined
Returns
string
|
undefined
is
Workspace
Trusted
isWorkspaceTrusted
()
:
boolean
Returns
boolean
get
Project
Root
getProjectRoot
()
:
string
Returns
string
initialize
Project
initializeProject
(
projectName
?:
string
)
:
Promise
<
FmWebProjectConfig
>
Parameters
Optional
projectName
:
string
Returns
Promise
<
FmWebProjectConfig
>
ensure
Project
Initialized
ensureProjectInitialized
()
:
Promise
<
FmWebProjectConfig
>
Returns
Promise
<
FmWebProjectConfig
>
read
Project
Config
readProjectConfig
()
:
Promise
<
FmWebProjectConfig
|
undefined
>
Returns
Promise
<
FmWebProjectConfig
|
undefined
>
set
Active
Profile
setActiveProfile
(
profileId
:
string
)
:
Promise
<
void
>
Parameters
profileId
:
string
Returns
Promise
<
void
>
load
Metadata
Cache
loadMetadataCache
()
:
Promise
<
FmWebMetadataCache
|
undefined
>
Returns
Promise
<
FmWebMetadataCache
|
undefined
>
sync
Metadata
syncMetadata
(
profile
:
ConnectionProfile
)
:
Promise
<
FmWebSyncSummary
>
Parameters
profile
:
ConnectionProfile
Returns
Promise
<
FmWebSyncSummary
>
load
Or
Create
Layout
loadOrCreateLayout
(
layoutId
?:
string
)
:
Promise
<
FmWebLayoutLoadResult
>
Parameters
Optional
layoutId
:
string
Returns
Promise
<
FmWebLayoutLoadResult
>
save
Layout
saveLayout
(
layout
:
{
schemaVersion
:
1
;
id
:
string
;
name
:
string
;
fmLayoutName
?:
string
;
canvas
:
{
width
:
number
;
height
:
number
;
gridSize
:
number
}
;
objects
:
(
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
;
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"field"
;
fmFieldName
:
string
;
displayType
:
"editBox"
|
"dropdown"
|
"checkbox"
|
"radio"
;
format
:
"number"
|
"text"
|
"date"
;
label
?:
string
;
labelPosition
:
"none"
|
"top"
|
"right"
|
"left"
;
required
:
boolean
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
;
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"text"
;
text
:
string
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
;
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"button"
;
label
:
string
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
;
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"portal"
;
relatedContext
:
string
;
rowCount
:
number
;
columns
:
{
id
:
string
;
fmFieldName
:
string
;
label
:
string
;
width
:
number
;
}
[]
;
scroll
:
boolean
;
selectableRows
:
boolean
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
;
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"rectangle"
;
cornerRadius
:
number
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
;
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"image"
;
src
?:
string
;
alt
?:
string
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
;
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"tabPanel"
;
tabs
:
{
id
:
string
;
label
:
string
}
[]
;
}
)
[]
;
styles
:
{
colors
:
{
canvas
:
string
;
surface
:
string
;
text
:
string
;
accent
:
string
;
}
;
typography
:
{
fontFamily
:
string
;
fontSize
:
number
}
;
}
;
}
,
)
:
Promise
<
string
>
Parameters
layout
:
{
schemaVersion
:
1
;
id
:
string
;
name
:
string
;
fmLayoutName
?:
string
;
canvas
:
{
width
:
number
;
height
:
number
;
gridSize
:
number
}
;
objects
:
(
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"field"
;
fmFieldName
:
string
;
displayType
:
"editBox"
|
"dropdown"
|
"checkbox"
|
"radio"
;
format
:
"number"
|
"text"
|
"date"
;
label
?:
string
;
labelPosition
:
"none"
|
"top"
|
"right"
|
"left"
;
required
:
boolean
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"text"
;
text
:
string
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"button"
;
label
:
string
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"portal"
;
relatedContext
:
string
;
rowCount
:
number
;
columns
:
{
id
:
string
;
fmFieldName
:
string
;
label
:
string
;
width
:
number
;
}
[]
;
scroll
:
boolean
;
selectableRows
:
boolean
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"rectangle"
;
cornerRadius
:
number
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"image"
;
src
?:
string
;
alt
?:
string
;
}
|
{
id
:
string
;
name
:
string
;
x
:
number
;
y
:
number
;
width
:
number
;
height
:
number
;
zIndex
:
number
;
anchors
:
{
top
:
boolean
;
right
:
boolean
;
bottom
:
boolean
;
left
:
boolean
}
;
style
?:
{
token
:
string
}
;
behavior
?:
{
type
?:
|
"runScript"
|
"goToWebLayout"
|
"goToFmLayout"
|
"openUrl"
|
"showDialog"
;
scriptName
?:
string
;
targetLayoutId
?:
string
;
targetFmLayoutName
?:
string
;
url
?:
string
;
dialogId
?:
string
;
parameter
?:
string
;
}
;
type
:
"tabPanel"
;
tabs
:
{
id
:
string
;
label
:
string
}
[]
;
}
)
[]
;
styles
:
{
colors
:
{
canvas
:
string
;
surface
:
string
;
text
:
string
;
accent
:
string
;
}
;
typography
:
{
fontFamily
:
string
;
fontSize
:
number
}
;
}
;
}
Returns
Promise
<
string
>
get
Available
Fields
getAvailableFields
(
layoutName
?:
string
)
:
Promise
<
string
[]
>
Parameters
Optional
layoutName
:
string
Returns
Promise
<
string
[]
>
get
Project
Config
Path
getProjectConfigPath
()
:
string
Returns
string
get
Metadata
Index
Path
getMetadataIndexPath
()
:
string
Returns
string
get
Metadata
Layouts
Dir
Path
getMetadataLayoutsDirPath
()
:
string
Returns
string
get
Layouts
Dir
Path
getLayoutsDirPath
()
:
string
Returns
string
get
Generated
Dir
Path
getGeneratedDirPath
()
:
string
Returns
string
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
get
Workspace
Root
is
Workspace
Trusted
get
Project
Root
initialize
Project
ensure
Project
Initialized
read
Project
Config
set
Active
Profile
load
Metadata
Cache
sync
Metadata
load
Or
Create
Layout
save
Layout
get
Available
Fields
get
Project
Config
Path
get
Metadata
Index
Path
get
Metadata
Layouts
Dir
Path
get
Layouts
Dir
Path
get
Generated
Dir
Path
FileMaker Data API Tools API - v1.2.0
Loading...