You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add remote access and connection management to GraphQL API
- Introduced new types and enums for managing remote access configurations, including AccessUrl, RemoteAccess, and Connect settings.
- Added mutations for updating API settings and managing remote access.
- Updated the API configuration to include the new connect plugin.
- Enhanced the pnpm lock file with the addition of the pify package.
- Implemented logic to skip file modifications in development mode.
Copy file name to clipboardExpand all lines: api/generated-schema.graphql
+223Lines changed: 223 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1599,6 +1599,160 @@ type Plugin {
1599
1599
hasCliModule: Boolean
1600
1600
}
1601
1601
1602
+
typeAccessUrl {
1603
+
type: URL_TYPE!
1604
+
name: String
1605
+
ipv4: URL
1606
+
ipv6: URL
1607
+
}
1608
+
1609
+
enumURL_TYPE {
1610
+
LAN
1611
+
WIREGUARD
1612
+
WAN
1613
+
MDNS
1614
+
OTHER
1615
+
DEFAULT
1616
+
}
1617
+
1618
+
"""
1619
+
A field whose value conforms to the standard URL format as specified in RFC3986: https://www.ietf.org/rfc/rfc3986.txt.
1620
+
"""
1621
+
scalarURL
1622
+
1623
+
typeAccessUrlObject {
1624
+
ipv4: String
1625
+
ipv6: String
1626
+
type: URL_TYPE!
1627
+
name: String
1628
+
}
1629
+
1630
+
typeApiKeyResponse {
1631
+
valid: Boolean!
1632
+
error: String
1633
+
}
1634
+
1635
+
typeMinigraphqlResponse {
1636
+
status: MinigraphStatus!
1637
+
timeout: Int
1638
+
error: String
1639
+
}
1640
+
1641
+
"""The status of the minigraph"""
1642
+
enumMinigraphStatus {
1643
+
PRE_INIT
1644
+
CONNECTING
1645
+
CONNECTED
1646
+
PING_FAILURE
1647
+
ERROR_RETRYING
1648
+
}
1649
+
1650
+
typeCloudResponse {
1651
+
status: String!
1652
+
ip: String
1653
+
error: String
1654
+
}
1655
+
1656
+
typeRelayResponse {
1657
+
status: String!
1658
+
timeout: String
1659
+
error: String
1660
+
}
1661
+
1662
+
typeCloud {
1663
+
error: String
1664
+
apiKey: ApiKeyResponse!
1665
+
relay: RelayResponse
1666
+
minigraphql: MinigraphqlResponse!
1667
+
cloud: CloudResponse!
1668
+
allowedOrigins: [String!]!
1669
+
}
1670
+
1671
+
typeRemoteAccess {
1672
+
"""The type of WAN access used for Remote Access"""
1673
+
accessType: WAN_ACCESS_TYPE!
1674
+
1675
+
"""The type of port forwarding used for Remote Access"""
1676
+
forwardType: WAN_FORWARD_TYPE
1677
+
1678
+
"""The port used for Remote Access"""
1679
+
port: Int
1680
+
}
1681
+
1682
+
enumWAN_ACCESS_TYPE {
1683
+
DYNAMIC
1684
+
ALWAYS
1685
+
DISABLED
1686
+
}
1687
+
1688
+
enumWAN_FORWARD_TYPE {
1689
+
UPNP
1690
+
STATIC
1691
+
}
1692
+
1693
+
typeDynamicRemoteAccessStatus {
1694
+
"""The type of dynamic remote access that is enabled"""
1695
+
enabledType: DynamicRemoteAccessType!
1696
+
1697
+
"""The type of dynamic remote access that is currently running"""
1698
+
runningType: DynamicRemoteAccessType!
1699
+
1700
+
"""Any error message associated with the dynamic remote access"""
1701
+
error: String
1702
+
}
1703
+
1704
+
enumDynamicRemoteAccessType {
1705
+
STATIC
1706
+
UPNP
1707
+
DISABLED
1708
+
}
1709
+
1710
+
typeConnectSettingsValues {
1711
+
"""The type of WAN access used for Remote Access"""
1712
+
accessType: WAN_ACCESS_TYPE!
1713
+
1714
+
"""The type of port forwarding used for Remote Access"""
1715
+
forwardType: WAN_FORWARD_TYPE
1716
+
1717
+
"""The port used for Remote Access"""
1718
+
port: Int
1719
+
}
1720
+
1721
+
typeConnectSettingsimplementsNode {
1722
+
id: PrefixedID!
1723
+
1724
+
"""The data schema for the Connect settings"""
1725
+
dataSchema: JSON!
1726
+
1727
+
"""The UI schema for the Connect settings"""
1728
+
uiSchema: JSON!
1729
+
1730
+
"""The values for the Connect settings"""
1731
+
values: ConnectSettingsValues!
1732
+
}
1733
+
1734
+
typeConnectimplementsNode {
1735
+
id: PrefixedID!
1736
+
1737
+
"""The status of dynamic remote access"""
1738
+
dynamicRemoteAccess: DynamicRemoteAccessStatus!
1739
+
1740
+
"""The settings for the Connect instance"""
1741
+
settings: ConnectSettings!
1742
+
}
1743
+
1744
+
typeNetworkimplementsNode {
1745
+
id: PrefixedID!
1746
+
accessUrls: [AccessUrl!]
1747
+
}
1748
+
1749
+
inputAccessUrlObjectInput {
1750
+
ipv4: String
1751
+
ipv6: String
1752
+
type: URL_TYPE!
1753
+
name: String
1754
+
}
1755
+
1602
1756
"\n### Description:\n\nID scalar type that prefixes the underlying ID with the server identifier on output and strips it on input.\n\nWe use this scalar type to ensure that the ID is unique across all servers, allowing the same underlying resource ID to be used across different server instances.\n\n#### Input Behavior:\n\nWhen providing an ID as input (e.g., in arguments or input objects), the server identifier prefix ('<serverId>:') is optional.\n\n- If the prefix is present (e.g., '123:456'), it will be automatically stripped, and only the underlying ID ('456') will be used internally.\n- If the prefix is absent (e.g., '456'), the ID will be used as-is.\n\nThis makes it flexible for clients, as they don't strictly need to know or provide the server ID.\n\n#### Output Behavior:\n\nWhen an ID is returned in the response (output), it will *always* be prefixed with the current server's unique identifier (e.g., '123:456').\n\n#### Example:\n\nNote: The server identifier is '123' in this example.\n\n##### Input (Prefix Optional):\n```graphql\n# Both of these are valid inputs resolving to internal ID '456'\n{\n someQuery(id: \"123:456\") { ... }\n anotherQuery(id: \"456\") { ... }\n}\n```\n\n##### Output (Prefix Always Added):\n```graphql\n# Assuming internal ID is '456'\n{\n \"data\": {\n \"someResource\": {\n \"id\": \"123:456\" \n }\n }\n}\n```\n "
1603
1757
scalarPrefixedID
1604
1758
@@ -1650,6 +1804,10 @@ type Query {
1650
1804
1651
1805
"""List all installed plugins with their metadata"""
1652
1806
plugins: [Plugin!]!
1807
+
remoteAccess: RemoteAccess!
1808
+
connect: Connect!
1809
+
network: Network!
1810
+
cloud: Cloud!
1653
1811
}
1654
1812
1655
1813
typeMutation {
@@ -1693,6 +1851,11 @@ type Mutation {
1693
1851
Remove one or more plugins from the API. Returns false if restart was triggered automatically, true if manual restart is required.
"""The type of WAN access to use for Remote Access"""
1978
+
accessType: WAN_ACCESS_TYPE
1979
+
1980
+
"""The type of port forwarding to use for Remote Access"""
1981
+
forwardType: WAN_FORWARD_TYPE
1982
+
1983
+
"""
1984
+
The port to use for Remote Access. Not required for UPNP forwardType. Required for STATIC forwardType. Ignored if accessType is DISABLED or forwardType is UPNP.
1985
+
"""
1986
+
port: Int
1987
+
}
1988
+
1989
+
inputConnectSignInInput {
1990
+
"""The API key for authentication"""
1991
+
apiKey: String!
1992
+
1993
+
"""User information for the sign-in"""
1994
+
userInfo: ConnectUserInfoInput
1995
+
}
1996
+
1997
+
inputConnectUserInfoInput {
1998
+
"""The preferred username of the user"""
1999
+
preferred_username: String!
2000
+
2001
+
"""The email address of the user"""
2002
+
email: String!
2003
+
2004
+
"""The avatar URL of the user"""
2005
+
avatar: String
2006
+
}
2007
+
2008
+
inputSetupRemoteAccessInput {
2009
+
"""The type of WAN access to use for Remote Access"""
2010
+
accessType: WAN_ACCESS_TYPE!
2011
+
2012
+
"""The type of port forwarding to use for Remote Access"""
2013
+
forwardType: WAN_FORWARD_TYPE
2014
+
2015
+
"""
2016
+
The port to use for Remote Access. Not required for UPNP forwardType. Required for STATIC forwardType. Ignored if accessType is DISABLED or forwardType is UPNP.
2017
+
"""
2018
+
port: Int
2019
+
}
2020
+
2021
+
inputEnableDynamicRemoteAccessInput {
2022
+
"""The AccessURL Input for dynamic remote access"""
2023
+
url: AccessUrlInput!
2024
+
2025
+
"""Whether to enable or disable dynamic remote access"""
0 commit comments