Compare commits
16 commits
c7c674f2ae
...
590da2bc7c
| Author | SHA1 | Date | |
|---|---|---|---|
| 590da2bc7c | |||
| 90adff9e39 | |||
| 755b2fdeec | |||
| 0ff60d11a7 | |||
| 7a79ec9716 | |||
| 291db7ccfd | |||
| f5fbf42c8b | |||
| cd3ef2527f | |||
| 76b3069362 | |||
| fb6afc03a7 | |||
| 138e1452d6 | |||
| 26d2897976 | |||
| a3e59cd899 | |||
| a023d0612e | |||
| e6c50b876e | |||
| 9566da52a6 |
120 changed files with 754 additions and 782 deletions
|
|
@ -87,6 +87,23 @@ func (ac *AuthUserController) ChangePassword(c *gin.Context) {
|
|||
ac.lc.Logout(c)
|
||||
}
|
||||
|
||||
// IsAuthUser checks if the currently authenticated session matches the given user identifier.
|
||||
//
|
||||
// @Summary Check if current user
|
||||
// @Schemes
|
||||
// @Description Check if the currently authenticated session matches the given user identifier.
|
||||
// @Tags users
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security securitydefinitions.basic
|
||||
// @Param userId path string true "User identifier"
|
||||
// @Success 204 {null} null
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Router /users/{userId}/is_auth_user [get]
|
||||
func (ac *AuthUserController) IsAuthUser(c *gin.Context) {
|
||||
c.Status(http.StatusNoContent)
|
||||
}
|
||||
|
||||
// DeleteAuthUser delete the account related to the given user.
|
||||
//
|
||||
// @Summary Drop account
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ func (dc *DomainController) GetDomain(c *gin.Context) {
|
|||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param domainId path string true "Domain identifier"
|
||||
// @Param body body happydns.Domain true "The new object overriding the current domain"
|
||||
// @Param body body happydns.DomainUpdateInput true "The fields to update"
|
||||
// @Security securitydefinitions.basic
|
||||
// @Success 200 {object} happydns.Domain
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Invalid input"
|
||||
|
|
@ -167,7 +167,7 @@ func (dc *DomainController) UpdateDomain(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
var domain happydns.Domain
|
||||
var domain happydns.DomainUpdateInput
|
||||
err := c.ShouldBindJSON(&domain)
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"errmsg": err.Error()})
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ func NewDomainLogController(domainLogService happydns.DomainLogUsecase) *DomainL
|
|||
// @Produce json
|
||||
// @Param domainId path string true "Domain identifier"
|
||||
// @Security securitydefinitions.basic
|
||||
// @Success 200 {object} []happydns.DomainLog
|
||||
// @Success 200 {array} happydns.DomainLog
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Failure 404 {object} happydns.ErrorResponse "Domain not found"
|
||||
// @Router /domains/{domainId}/logs [get]
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ func (pc *ProviderController) AddProvider(c *gin.Context) {
|
|||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param providerId path string true "Provider identifier"
|
||||
// @Param body body happydns.Provider true "The new object overriding the current provider"
|
||||
// @Param body body happydns.ProviderMinimal true "The new object overriding the current provider"
|
||||
// @Security securitydefinitions.basic
|
||||
// @Success 200 {object} happydns.Provider
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Invalid input"
|
||||
|
|
@ -197,7 +197,7 @@ func (pc *ProviderController) DeleteProvider(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusNoContent, nil)
|
||||
c.Status(http.StatusNoContent)
|
||||
}
|
||||
|
||||
// GetDomainsHostedByProvider lists domains available to management from the given Provider.
|
||||
|
|
@ -210,7 +210,7 @@ func (pc *ProviderController) DeleteProvider(c *gin.Context) {
|
|||
// @Produce json
|
||||
// @Param providerId path string true "Provider identifier"
|
||||
// @Security securitydefinitions.basic
|
||||
// @Success 200 {object} happydns.Provider
|
||||
// @Success 200 {array} string
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Unable to instantiate the provider"
|
||||
// @Failure 400 {object} happydns.ErrorResponse "The provider doesn't support domain listing"
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Provider error"
|
||||
|
|
@ -238,8 +238,9 @@ func (pc *ProviderController) GetDomainsHostedByProvider(c *gin.Context) {
|
|||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param providerId path string true "Provider identifier"
|
||||
// @Param fqdn path string true "Fully qualified domain name"
|
||||
// @Security securitydefinitions.basic
|
||||
// @Success 200 {object} happydns.Provider
|
||||
// @Success 204 "Domain created successfully"
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Unable to instantiate the provider"
|
||||
// @Failure 400 {object} happydns.ErrorResponse "The provider doesn't support domain listing"
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Provider error"
|
||||
|
|
@ -255,5 +256,5 @@ func (pc *ProviderController) CreateDomainOnProvider(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, true)
|
||||
c.Status(http.StatusNoContent)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ func NewProviderSettingsController(pSettingsServices happydns.ProviderSettingsUs
|
|||
// @Param body body happydns.ProviderSettingsState true "The current state of the Provider's settings, possibly empty (but not null)"
|
||||
// @Security securitydefinitions.basic
|
||||
// @Success 200 {object} happydns.Provider "The Provider has been created with the given settings"
|
||||
// @Success 202 {object} happydns.ProviderSettingsResponse "The settings need more rafinement"
|
||||
// @Success 202 {object} happydns.ProviderSettingsResponse "The settings need more refinement"
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Invalid input"
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Failure 404 {object} happydns.ErrorResponse "Provider not found"
|
||||
|
|
|
|||
|
|
@ -42,32 +42,6 @@ func NewResolverController(resolverService happydns.ResolverUsecase) *ResolverCo
|
|||
}
|
||||
}
|
||||
|
||||
// DNSMsg is the documentation struct corresponding to dns.Msg
|
||||
type DNSMsg struct {
|
||||
// Question is the Question section of the DNS response.
|
||||
Question []DNSQuestion
|
||||
|
||||
// Answer is the list of Answer records in the DNS response.
|
||||
Answer []any `swaggertype:"object"`
|
||||
|
||||
// Ns is the list of Authoritative records in the DNS response.
|
||||
Ns []any `swaggertype:"object"`
|
||||
|
||||
// Extra is the list of extra records in the DNS response.
|
||||
Extra []any `swaggertype:"object"`
|
||||
}
|
||||
|
||||
type DNSQuestion struct {
|
||||
// Name is the domain name researched.
|
||||
Name string
|
||||
|
||||
// Qtype is the type of record researched.
|
||||
Qtype uint16
|
||||
|
||||
// Qclass is the class of record researched.
|
||||
Qclass uint16
|
||||
}
|
||||
|
||||
// RunResolver performs a NS resolution for a given domain, with options.
|
||||
//
|
||||
// @Summary Perform a DNS resolution.
|
||||
|
|
@ -77,8 +51,7 @@ type DNSQuestion struct {
|
|||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body happydns.ResolverRequest true "Options to the resolution"
|
||||
// @Success 200 {object} DNSMsg
|
||||
// @Success 204 {object} happydns.ErrorResponse "No content"
|
||||
// @Success 200 {object} happydns.ResolverResponse
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Invalid input"
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Failure 403 {object} happydns.ErrorResponse "The resolver refused to treat our request"
|
||||
|
|
@ -100,5 +73,5 @@ func (rc *ResolverController) RunResolver(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, r)
|
||||
c.JSON(http.StatusOK, happydns.NewResolverResponseFromMsg(r))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,9 +56,10 @@ func NewServiceController(duService happydns.ZoneServiceUsecase, suService happy
|
|||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security securitydefinitions.basic
|
||||
// @Param domainId path string true "Domain identifier"
|
||||
// @Param zoneId path string true "Zone identifier"
|
||||
// @Param subdomain path string true "Part of the subdomain considered for the service (@ for the root of the zone ; subdomain is relative to the root, do not include it)"
|
||||
// @Param domainId path string true "Domain identifier"
|
||||
// @Param zoneId path string true "Zone identifier"
|
||||
// @Param subdomain path string true "Part of the subdomain considered for the service (@ for the root of the zone ; subdomain is relative to the root, do not include it)"
|
||||
// @Param body body happydns.Service true "Service to add"
|
||||
// @Success 200 {object} happydns.Zone
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Invalid input"
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ func (ssc *ServiceSpecsController) InitializeServiceSpec(c *gin.Context) {
|
|||
// @Param serviceType path string true "The service's type"
|
||||
// @Param domain query string true "The domain to use to generate the records"
|
||||
// @Param ttl query int false "The TTL used by the generated records"
|
||||
// @Param body body happydns.Service true "The service configuration to generate records for"
|
||||
// @Success 200 {array} happydns.Record
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Invalid request body"
|
||||
// @Failure 404 {object} happydns.ErrorResponse "Service type does not exist"
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ func (sc *SessionController) SessionHandler(c *gin.Context) {
|
|||
// @Description Get the content of the current user's session.
|
||||
// @Tags users
|
||||
// @Accept json
|
||||
// @Prodsce json
|
||||
// @Produce json
|
||||
// @Security securitydefinitions.basic
|
||||
// @Ssccess 200 {object} happydns.Session
|
||||
// @Success 200 {object} happydns.Session
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Router /session [get]
|
||||
func (sc *SessionController) GetSession(c *gin.Context) {
|
||||
|
|
@ -97,9 +97,9 @@ func (sc *SessionController) GetSession(c *gin.Context) {
|
|||
// @Description Remove the content of the current user's session.
|
||||
// @Tags users
|
||||
// @Accept json
|
||||
// @Prodsce json
|
||||
// @Produce json
|
||||
// @Security securitydefinitions.basic
|
||||
// @Ssccess 204
|
||||
// @Success 204
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Router /session [delete]
|
||||
func (sc *SessionController) ClearSession(c *gin.Context) {
|
||||
|
|
@ -117,9 +117,9 @@ func (sc *SessionController) ClearSession(c *gin.Context) {
|
|||
// @Description Closes all sessions for a given user.
|
||||
// @Tags users
|
||||
// @Accept json
|
||||
// @Prodsce json
|
||||
// @Produce json
|
||||
// @Security securitydefinitions.basic
|
||||
// @Ssccess 204 {null} null
|
||||
// @Success 204
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Router /sessions [delete]
|
||||
func (sc *SessionController) ClearUserSessions(c *gin.Context) {
|
||||
|
|
@ -145,9 +145,9 @@ func (sc *SessionController) ClearUserSessions(c *gin.Context) {
|
|||
// @Description List the sessions open for the current user
|
||||
// @Tags users
|
||||
// @Accept json
|
||||
// @Prodsce json
|
||||
// @Produce json
|
||||
// @Security securitydefinitions.basic
|
||||
// @Ssccess 200 {object} happydns.Session
|
||||
// @Success 200 {array} happydns.Session
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Router /sessions [get]
|
||||
func (sc *SessionController) GetSessions(c *gin.Context) {
|
||||
|
|
@ -173,13 +173,14 @@ func (sc *SessionController) GetSessions(c *gin.Context) {
|
|||
// @Description Create a new session for the current user.
|
||||
// @Tags users
|
||||
// @Accept json
|
||||
// @Prodsce json
|
||||
// @Produce json
|
||||
// @Security securitydefinitions.basic
|
||||
// @Ssccess 200 {object} happydns.Session
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Param body body happydns.SessionInput true "Session to create"
|
||||
// @Success 200 {object} happydns.Session
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Router /sessions [post]
|
||||
func (sc *SessionController) CreateSession(c *gin.Context) {
|
||||
var us happydns.Session
|
||||
var us happydns.SessionInput
|
||||
err := c.ShouldBindJSON(&us)
|
||||
if err != nil {
|
||||
log.Printf("%s sends invalid Session JSON: %s", c.ClientIP(), err.Error())
|
||||
|
|
@ -199,7 +200,7 @@ func (sc *SessionController) CreateSession(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{"id": sess.Id})
|
||||
c.JSON(http.StatusOK, sess)
|
||||
}
|
||||
|
||||
// UpdateSession update a session owned by the current user
|
||||
|
|
@ -209,14 +210,15 @@ func (sc *SessionController) CreateSession(c *gin.Context) {
|
|||
// @Description Update a session owned by the current user.
|
||||
// @Tags users
|
||||
// @Accept json
|
||||
// @Param sessionId path string true "Session identifier"
|
||||
// @Prodsce json
|
||||
// @Produce json
|
||||
// @Security securitydefinitions.basic
|
||||
// @Ssccess 200 {object} happydns.Session
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Param sessionId path string true "Session identifier"
|
||||
// @Param body body happydns.SessionInput true "Session fields to update"
|
||||
// @Success 200 {object} happydns.Session
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Router /sessions/{sessionId} [put]
|
||||
func (sc *SessionController) UpdateSession(c *gin.Context) {
|
||||
var us happydns.Session
|
||||
var us happydns.SessionInput
|
||||
err := c.ShouldBindJSON(&us)
|
||||
if err != nil {
|
||||
log.Printf("%s sends invalid Session JSON: %s", c.ClientIP(), err.Error())
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ func NewUserController(userService happydns.UserUsecase, lc *LoginController) *U
|
|||
// @Tags users
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} happydns.User "The created user"
|
||||
// @Param userId path string true "User identifier"
|
||||
// @Success 200 {object} happydns.User "The user"
|
||||
// @Failure 500 {object} happydns.ErrorResponse
|
||||
// @Router /users/{userId} [get]
|
||||
func (uc *UserController) GetUser(c *gin.Context) {
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ func (zc *ZoneController) DiffZonesHandler(c *gin.Context) {
|
|||
// @Param domainId path string true "Domain identifier"
|
||||
// @Param zoneId path string true "Zone identifier to use as the new one."
|
||||
// @Param oldZoneId path string true "Zone identifier to use as the old one. Currently only @ are expected, to use the currently deployed zone."
|
||||
// @Success 200 {object} []happydns.Correction "Differences, reported as text, one diff per item"
|
||||
// @Success 200 {array} happydns.Correction "Differences, reported as text, one diff per item"
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Invalid input"
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
// @Failure 404 {object} happydns.ErrorResponse "Domain not found"
|
||||
|
|
@ -194,7 +194,7 @@ func (zc *ZoneController) DiffZonesSummary(c *gin.Context) {
|
|||
// @Security securitydefinitions.basic
|
||||
// @Param domainId path string true "Domain identifier"
|
||||
// @Param zoneId path string true "Zone identifier"
|
||||
// @Param body body []string true "Differences (from /diff_zones) to apply"
|
||||
// @Param body body happydns.ApplyZoneForm true "Differences to apply with commit message"
|
||||
// @Success 200 {object} happydns.ZoneMeta "The new Zone metadata containing the current zone"
|
||||
// @Failure 400 {object} happydns.ErrorResponse "Invalid input"
|
||||
// @Failure 401 {object} happydns.ErrorResponse "Authentication failure"
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
package route
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"git.happydns.org/happyDomain/internal/api/controller"
|
||||
|
|
@ -36,9 +34,7 @@ func DeclareAuthUserRoutes(router *gin.RouterGroup, authUserUC happydns.AuthUser
|
|||
|
||||
apiUserAuthRoutes := router.Group("/users/:uid")
|
||||
apiUserAuthRoutes.Use(middleware.AuthUserHandler(authUserUC))
|
||||
apiUserAuthRoutes.GET("/is_auth_user", func(c *gin.Context) {
|
||||
c.Status(http.StatusNoContent)
|
||||
})
|
||||
apiUserAuthRoutes.GET("/is_auth_user", ac.IsAuthUser)
|
||||
apiUserAuthRoutes.POST("/delete", ac.DeleteAuthUser)
|
||||
apiUserAuthRoutes.POST("/new_password", ac.ChangePassword)
|
||||
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ import (
|
|||
// UserAuth represents an account used for authentication (not used in case of external auth).
|
||||
type UserAuth struct {
|
||||
// Id is the User's identifier.
|
||||
Id Identifier `json:"id" swaggertype:"string"`
|
||||
Id Identifier `json:"id" swaggertype:"string" readonly:"true"`
|
||||
|
||||
// Email is the User's login and mean of contact.
|
||||
Email string `json:"email"`
|
||||
|
||||
// EmailVerification is the time when the User verify its email address.
|
||||
EmailVerification *time.Time `json:"emailVerification,omitempty"`
|
||||
EmailVerification *time.Time `json:"emailVerification,omitempty" format:"date-time"`
|
||||
|
||||
// Password is hashed.
|
||||
Password []byte `json:"password,omitempty"`
|
||||
|
|
@ -45,10 +45,10 @@ type UserAuth struct {
|
|||
PasswordRecoveryKey []byte `json:"passwordRecoveryKey,omitempty"`
|
||||
|
||||
// CreatedAt is the time when the User has register is account.
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
CreatedAt time.Time `json:"createdAt" format:"date-time" readonly:"true"`
|
||||
|
||||
// LastLoggedIn is the time when the User has logged in for the last time.
|
||||
LastLoggedIn *time.Time `json:"lastLoggedIn,omitempty"`
|
||||
LastLoggedIn *time.Time `json:"lastLoggedIn,omitempty" format:"date-time"`
|
||||
|
||||
// AllowCommercials stores the user preference regarding email contacts.
|
||||
AllowCommercials bool `json:"allowCommercials"`
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ const (
|
|||
type Correction struct {
|
||||
F func() error `json:"-"`
|
||||
Id Identifier `json:"id,omitempty" swaggertype:"string"`
|
||||
Msg string `json:"msg"`
|
||||
Kind CorrectionKind `json:"kind,omitempty"`
|
||||
Msg string `json:"msg" binding:"required"`
|
||||
Kind CorrectionKind `json:"kind" binding:"required"`
|
||||
OldRecords []Record `json:"-"`
|
||||
NewRecords []Record `json:"-"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,24 +42,30 @@ type DomainCreationInput struct {
|
|||
// Domain holds information about a domain name own by a User.
|
||||
type Domain struct {
|
||||
// Id is the Domain's identifier in the database.
|
||||
Id Identifier `json:"id" swaggertype:"string"`
|
||||
Id Identifier `json:"id" swaggertype:"string" binding:"required" readonly:"true"`
|
||||
|
||||
// Owner is the identifier of the Domain's Owner.
|
||||
Owner Identifier `json:"id_owner" swaggertype:"string"`
|
||||
Owner Identifier `json:"id_owner" swaggertype:"string" binding:"required"`
|
||||
|
||||
// ProviderId is the identifier of the Provider used to access and edit the
|
||||
// Domain.
|
||||
ProviderId Identifier `json:"id_provider" swaggertype:"string"`
|
||||
ProviderId Identifier `json:"id_provider" swaggertype:"string" binding:"required"`
|
||||
|
||||
// DomainName is the FQDN of the managed Domain.
|
||||
DomainName string `json:"domain"`
|
||||
DomainName string `json:"domain" binding:"required"`
|
||||
|
||||
// Group is a hint string aims to group domains.
|
||||
Group string `json:"group,omitempty"`
|
||||
|
||||
// ZoneHistory are the identifiers to the Zone attached to the current
|
||||
// Domain.
|
||||
ZoneHistory []Identifier `json:"zone_history" swaggertype:"array,string"`
|
||||
ZoneHistory []Identifier `json:"zone_history" swaggertype:"array,string" binding:"required" readonly:"true"`
|
||||
}
|
||||
|
||||
// DomainUpdateInput is used for swagger documentation as Domain update.
|
||||
type DomainUpdateInput struct {
|
||||
// Group is a hint string aims to group domains.
|
||||
Group string `json:"group,omitempty"`
|
||||
}
|
||||
|
||||
func NewDomain(user *User, name string, providerID Identifier) (*Domain, error) {
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ type CustomForm struct {
|
|||
// Field
|
||||
type Field struct {
|
||||
// Id is the field identifier.
|
||||
Id string `json:"id"`
|
||||
Id string `json:"id" binding:"required"`
|
||||
|
||||
// Type is the string representation of the field's type.
|
||||
Type string `json:"type"`
|
||||
Type string `json:"type" binding:"required"`
|
||||
|
||||
// Label is the title given to the field, displayed as <label> tag on the interface.
|
||||
Label string `json:"label,omitempty"`
|
||||
|
|
|
|||
|
|
@ -41,19 +41,19 @@ const (
|
|||
|
||||
type DomainLog struct {
|
||||
// Id is the Log's identifier in the database.
|
||||
Id Identifier `json:"id" swaggertype:"string"`
|
||||
Id Identifier `json:"id" swaggertype:"string" binding:"required" readonly:"true"`
|
||||
|
||||
// IdUser is the identifier of the person responsible for the action.
|
||||
IdUser Identifier `json:"id_user" swaggertype:"string"`
|
||||
IdUser Identifier `json:"id_user" swaggertype:"string" binding:"required" readonly:"true"`
|
||||
|
||||
// Date is the date of the action.
|
||||
Date time.Time `json:"date"`
|
||||
Date time.Time `json:"date" binding:"required" format:"date-time" readonly:"true"`
|
||||
|
||||
// Content is the description of the action logged.
|
||||
Content string `json:"content"`
|
||||
Content string `json:"content" binding:"required" readonly:"true"`
|
||||
|
||||
// Level reports the criticity level of the action logged.
|
||||
Level int8 `json:"level"`
|
||||
Level int8 `json:"level" binding:"required" readonly:"true"`
|
||||
}
|
||||
|
||||
type DomainLogWithDomainId struct {
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ type ProviderBody interface {
|
|||
// ProviderInfos describes the purpose of a user usable provider.
|
||||
type ProviderInfos struct {
|
||||
// Name is the name displayed.
|
||||
Name string `json:"name"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
|
||||
// Description is a brief description of what the provider is.
|
||||
Description string `json:"description"`
|
||||
Description string `json:"description" binding:"required"`
|
||||
|
||||
// Capabilites is a list of special ability of the provider (automatically filled).
|
||||
Capabilities []string `json:"capabilities,omitempty"`
|
||||
|
|
@ -72,13 +72,13 @@ type ProviderMinimal struct {
|
|||
// ProviderMeta holds the metadata associated to a Provider.
|
||||
type ProviderMeta struct {
|
||||
// Type is the string representation of the Provider's type.
|
||||
Type string `json:"_srctype"`
|
||||
Type string `json:"_srctype" binding:"required"`
|
||||
|
||||
// Id is the Provider's identifier.
|
||||
Id Identifier `json:"_id" swaggertype:"string"`
|
||||
Id Identifier `json:"_id" swaggertype:"string" binding:"required" readonly:"true"`
|
||||
|
||||
// Owner is the User's identifier for the current Provider.
|
||||
Owner Identifier `json:"_ownerid" swaggertype:"string"`
|
||||
Owner Identifier `json:"_ownerid" swaggertype:"string" binding:"required" readonly:"true"`
|
||||
|
||||
// Comment is a string that helps user to distinguish the Provider.
|
||||
Comment string `json:"_comment,omitempty"`
|
||||
|
|
|
|||
|
|
@ -40,30 +40,48 @@ type ResolverRequest struct {
|
|||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// DNSQuestion holds a single DNS question entry.
|
||||
type DNSQuestion struct {
|
||||
// Name is the domain name researched.
|
||||
Name string
|
||||
Name string `json:"name"`
|
||||
|
||||
// Qtype is the type of record researched.
|
||||
Qtype uint16
|
||||
Qtype uint16 `json:"qtype"`
|
||||
|
||||
// Qclass is the class of record researched.
|
||||
Qclass uint16
|
||||
Qclass uint16 `json:"qclass"`
|
||||
}
|
||||
|
||||
// DNSMsg is the documentation struct corresponding to dns.Msg
|
||||
type DNSMsg struct {
|
||||
// ResolverResponse is the API response for a DNS resolution.
|
||||
type ResolverResponse struct {
|
||||
// Question is the Question section of the DNS response.
|
||||
Question []DNSQuestion
|
||||
Question []DNSQuestion `json:"question"`
|
||||
|
||||
// Answer is the list of Answer records in the DNS response.
|
||||
Answer []any `swaggertype:"object"`
|
||||
Answer []dns.RR `json:"answer" swaggertype:"object"`
|
||||
|
||||
// Ns is the list of Authoritative records in the DNS response.
|
||||
Ns []any `swaggertype:"object"`
|
||||
Ns []dns.RR `json:"ns" swaggertype:"object"`
|
||||
|
||||
// Extra is the list of extra records in the DNS response.
|
||||
Extra []any `swaggertype:"object"`
|
||||
Extra []dns.RR `json:"extra" swaggertype:"object"`
|
||||
}
|
||||
|
||||
// NewResolverResponseFromMsg converts a dns.Msg to a ResolverResponse.
|
||||
func NewResolverResponseFromMsg(msg *dns.Msg) *ResolverResponse {
|
||||
resp := &ResolverResponse{
|
||||
Answer: msg.Answer,
|
||||
Ns: msg.Ns,
|
||||
Extra: msg.Extra,
|
||||
}
|
||||
for _, q := range msg.Question {
|
||||
resp.Question = append(resp.Question, DNSQuestion{
|
||||
Name: q.Name,
|
||||
Qtype: q.Qtype,
|
||||
Qclass: q.Qclass,
|
||||
})
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
type ResolverUsecase interface {
|
||||
|
|
|
|||
|
|
@ -84,19 +84,19 @@ type SPFContributor interface {
|
|||
// ServiceMeta holds the metadata associated to a Service.
|
||||
type ServiceMeta struct {
|
||||
// Type is the string representation of the Service's type.
|
||||
Type string `json:"_svctype"`
|
||||
Type string `json:"_svctype" binding:"required" readonly:"true"`
|
||||
|
||||
// Id is the Service's identifier.
|
||||
Id Identifier `json:"_id,omitempty" swaggertype:"string"`
|
||||
Id Identifier `json:"_id,omitempty" swaggertype:"string" readonly:"true"`
|
||||
|
||||
// OwnerId is the User's identifier for the current Service.
|
||||
OwnerId Identifier `json:"_ownerid,omitempty" swaggertype:"string"`
|
||||
|
||||
// Domain contains the abstract domain where this Service relates.
|
||||
Domain string `json:"_domain"`
|
||||
Domain string `json:"_domain" binding:"required"`
|
||||
|
||||
// Ttl contains the specific TTL for the underlying Resources.
|
||||
Ttl uint32 `json:"_ttl"`
|
||||
Ttl uint32 `json:"_ttl" binding:"required"`
|
||||
|
||||
// Comment is a string that helps user to distinguish the Service.
|
||||
Comment string `json:"_comment,omitempty"`
|
||||
|
|
@ -109,11 +109,11 @@ type ServiceMeta struct {
|
|||
Aliases []string `json:"_aliases,omitempty"`
|
||||
|
||||
// NbResources holds the number of Resources stored inside this Service.
|
||||
NbResources int `json:"_tmp_hint_nb"`
|
||||
NbResources int `json:"_tmp_hint_nb" binding:"required"`
|
||||
|
||||
// PropagatedAt is the estimated time at which the last published changes
|
||||
// for this service will be fully propagated (old cached records expired).
|
||||
PropagatedAt *time.Time `json:"_propagated_at,omitempty"`
|
||||
PropagatedAt *time.Time `json:"_propagated_at,omitempty" format:"date-time"`
|
||||
}
|
||||
|
||||
// ServiceCombined combined ServiceMeta + Service
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ type ServiceRestrictions struct {
|
|||
}
|
||||
|
||||
type ServiceInfos struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"_svctype"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Type string `json:"_svctype" binding:"required"`
|
||||
Icon string `json:"_svcicon,omitempty"`
|
||||
Description string `json:"description"`
|
||||
Family string `json:"family"`
|
||||
Categories []string `json:"categories"`
|
||||
RecordTypes []uint16 `json:"record_types"`
|
||||
Description string `json:"description" binding:"required"`
|
||||
Family string `json:"family" binding:"required"`
|
||||
Categories []string `json:"categories" binding:"required"`
|
||||
RecordTypes []uint16 `json:"record_types" binding:"required"`
|
||||
Tabs bool `json:"tabs,omitempty"`
|
||||
Restrictions ServiceRestrictions `json:"restrictions,omitempty"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,30 +25,39 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// Session holds informatin about a User's currently connected.
|
||||
// Session holds information about a User's currently connected.
|
||||
type Session struct {
|
||||
// Id is the Session's identifier.
|
||||
Id string `json:"id"`
|
||||
Id string `json:"id" binding:"required" readonly:"true"`
|
||||
|
||||
// IdUser is the User's identifier of the Session.
|
||||
IdUser Identifier `json:"login" swaggertype:"string"`
|
||||
IdUser Identifier `json:"login" swaggertype:"string" binding:"required" readonly:"true"`
|
||||
|
||||
// Description is a user defined string aims to identify each session.
|
||||
Description string `json:"description"`
|
||||
Description string `json:"description" binding:"required"`
|
||||
|
||||
// IssuedAt holds the creation date of the Session.
|
||||
IssuedAt time.Time `json:"time"`
|
||||
IssuedAt time.Time `json:"time" binding:"required" format:"date-time" readonly:"true"`
|
||||
|
||||
// ExpiresOn holds the expirate date of the Session.
|
||||
ExpiresOn time.Time `json:"exp"`
|
||||
ExpiresOn time.Time `json:"exp" binding:"required" format:"date-time"`
|
||||
|
||||
// ModifiedOn is the last time the session has been updated.
|
||||
ModifiedOn time.Time `json:"upd"`
|
||||
ModifiedOn time.Time `json:"upd" binding:"required" format:"date-time"`
|
||||
|
||||
// Content stores data filled by other modules.
|
||||
Content string `json:"content,omitempty"`
|
||||
}
|
||||
|
||||
// SessionInput is used for creating or updating a session.
|
||||
type SessionInput struct {
|
||||
// Description is a user defined string aims to identify each session.
|
||||
Description string `json:"description"`
|
||||
|
||||
// ExpiresOn holds the expirate date of the Session.
|
||||
ExpiresOn time.Time `json:"exp" format:"date-time"`
|
||||
}
|
||||
|
||||
// ClearSession removes all content from the Session.
|
||||
func (s *Session) ClearSession() {
|
||||
s.Content = ""
|
||||
|
|
|
|||
|
|
@ -29,19 +29,19 @@ import (
|
|||
// User represents an account.
|
||||
type User struct {
|
||||
// Id is the User's identifier.
|
||||
Id Identifier `json:"id" swaggertype:"string"`
|
||||
Id Identifier `json:"id" swaggertype:"string" binding:"required" readonly:"true"`
|
||||
|
||||
// Email is the User's login and means of contact.
|
||||
Email string `json:"email"`
|
||||
Email string `json:"email" binding:"required"`
|
||||
|
||||
// CreatedAt is the time when the User logs in for the first time.
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at" format:"date-time" binding:"required" readonly:"true"`
|
||||
|
||||
// LastSeen is the time when the User used happyDNS for the last time (in a 12h frame).
|
||||
LastSeen time.Time `json:"last_seen,omitempty"`
|
||||
LastSeen time.Time `json:"last_seen" format:"date-time" binding:"required" readonly:"true"`
|
||||
|
||||
// Settings holds the settings for an account.
|
||||
Settings UserSettings `json:"settings,omitempty"`
|
||||
Settings UserSettings `json:"settings" binding:"required"`
|
||||
}
|
||||
|
||||
func (u *User) GetUserId() Identifier {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
type UserProfile struct {
|
||||
UserId []byte `json:"userid"`
|
||||
Name string `json:"username"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
CreatedAt time.Time `json:"created_at" format:"date-time"`
|
||||
}
|
||||
|
||||
func (u *UserProfile) GetUserId() Identifier {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ package happydns
|
|||
import ()
|
||||
|
||||
type VersionResponse struct {
|
||||
Version string `json:"version"`
|
||||
LastCommit string `json:"last-commit"`
|
||||
DirtyBuild bool `json:"dirty-build"`
|
||||
Version string `json:"version" binding:"required"`
|
||||
LastCommit string `json:"last-commit" binding:"required"`
|
||||
DirtyBuild bool `json:"dirty-build,omitempty"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,28 +30,28 @@ import (
|
|||
// ZoneMeta holds the metadata associated to a Zone.
|
||||
type ZoneMeta struct {
|
||||
// Id is the Zone's identifier.
|
||||
Id Identifier `json:"id" swaggertype:"string"`
|
||||
Id Identifier `json:"id" swaggertype:"string" binding:"required"`
|
||||
|
||||
// IdAuthor is the User's identifier for the current Zone.
|
||||
IdAuthor Identifier `json:"id_author" swaggertype:"string"`
|
||||
IdAuthor Identifier `json:"id_author" swaggertype:"string" binding:"required"`
|
||||
|
||||
// ParentZone identifies the parental zone of this one.
|
||||
ParentZone *Identifier `json:"parent,omitempty" swaggertype:"string"`
|
||||
|
||||
// DefaultTTL is the TTL to use when no TTL has been defined for a record in this Zone.
|
||||
DefaultTTL uint32 `json:"default_ttl"`
|
||||
DefaultTTL uint32 `json:"default_ttl" binding:"required"`
|
||||
|
||||
// LastModified holds the time when the last modification has been made on this Zone.
|
||||
LastModified time.Time `json:"last_modified,omitempty"`
|
||||
LastModified time.Time `json:"last_modified" format:"date-time" binding:"required"`
|
||||
|
||||
// CommitMsg is a message defined by the User to give a label to this Zone revision.
|
||||
CommitMsg *string `json:"commit_message,omitempty"`
|
||||
|
||||
// CommitDate is the time when the commit has been made.
|
||||
CommitDate *time.Time `json:"commit_date,omitempty"`
|
||||
CommitDate *time.Time `json:"commit_date,omitempty" format:"date-time"`
|
||||
|
||||
// Published indicates whether the Zone has already been published or not.
|
||||
Published *time.Time `json:"published,omitempty"`
|
||||
Published *time.Time `json:"published,omitempty" format:"date-time"`
|
||||
}
|
||||
|
||||
// ZoneMessage is the intermediate struct for parsing zones.
|
||||
|
|
@ -63,7 +63,7 @@ type ZoneMessage struct {
|
|||
// Zone contains ZoneMeta + map of services by subdomains.
|
||||
type Zone struct {
|
||||
ZoneMeta
|
||||
Services map[Subdomain][]*Service `json:"services"`
|
||||
Services map[Subdomain][]*Service `json:"services" binding:"required"`
|
||||
}
|
||||
|
||||
// DerivateNew creates a new Zone from the current one, by copying all fields.
|
||||
|
|
@ -169,15 +169,15 @@ type ZoneUsecase interface {
|
|||
}
|
||||
|
||||
type ApplyZoneForm struct {
|
||||
WantedCorrections []Identifier `json:"wantedCorrections"`
|
||||
WantedCorrections []Identifier `json:"wantedCorrections" swaggertype:"array,string"`
|
||||
CommitMsg string `json:"commitMessage"`
|
||||
}
|
||||
|
||||
type PrepareZoneForm struct {
|
||||
WantedCorrections []Identifier `json:"wantedCorrections"`
|
||||
WantedCorrections []Identifier `json:"wantedCorrections" swaggertype:"array,string"`
|
||||
}
|
||||
|
||||
type PrepareZoneResponse struct {
|
||||
Corrections []*Correction `json:"corrections"`
|
||||
NbDiffs int `json:"nbDiffs"`
|
||||
Corrections []*Correction `json:"corrections" binding:"required"`
|
||||
NbDiffs int `json:"nbDiffs" binding:"required"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@
|
|||
body: {
|
||||
domain: domainName,
|
||||
group: group || undefined,
|
||||
id_owner: id_owner || undefined,
|
||||
id_provider: id_provider || undefined,
|
||||
id_owner: id_owner,
|
||||
id_provider: id_provider,
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@
|
|||
body: {
|
||||
domain: domain,
|
||||
group: group || undefined,
|
||||
id_owner: id_owner || undefined,
|
||||
id_provider: id_provider || undefined,
|
||||
id_owner: id_owner,
|
||||
id_provider: id_provider,
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -8,5 +8,13 @@ export default defineConfig({
|
|||
name: "@hey-api/client-fetch",
|
||||
runtimeConfigPath: "$lib/hey-api.ts",
|
||||
},
|
||||
{
|
||||
name: "@hey-api/sdk",
|
||||
transformer: true,
|
||||
},
|
||||
{
|
||||
name: "@hey-api/transformers",
|
||||
dates: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
|
|||
480
web/package-lock.json
generated
480
web/package-lock.json
generated
|
|
@ -8,7 +8,7 @@
|
|||
"name": "happyDomain",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@hey-api/openapi-ts": "^0.90.6",
|
||||
"@hey-api/openapi-ts": "^0.95.0",
|
||||
"@sveltestrap/sveltestrap": "^7.0.0",
|
||||
"bootstrap": "^5.3.0",
|
||||
"bootstrap-icons": "^1.13.0",
|
||||
|
|
@ -42,22 +42,22 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@emnapi/core": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.1.tgz",
|
||||
"integrity": "sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA==",
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.2.tgz",
|
||||
"integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "1.2.0",
|
||||
"@emnapi/wasi-threads": "1.2.1",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.1.tgz",
|
||||
"integrity": "sha512-VYi5+ZVLhpgK4hQ0TAjiQiZ6ol0oe4mBx7mVv7IflsiEp0OWoVsp/+f9Vc1hOhE0TtkORVrI1GvzyreqpgWtkA==",
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz",
|
||||
"integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
|
|
@ -67,9 +67,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz",
|
||||
"integrity": "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
|
||||
"integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
|
|
@ -121,13 +121,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint/compat": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-2.0.3.tgz",
|
||||
"integrity": "sha512-SjIJhGigp8hmd1YGIBwh7Ovri7Kisl42GYFjrOyHhtfYGGoLW6teYi/5p8W50KSsawUPpuLOSmsq1bD0NGQLBw==",
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-2.0.4.tgz",
|
||||
"integrity": "sha512-o598tCGstJv9Kk4XapwP+oDij9HD9Qr3V37ABzTfdzVvbFciV+sfg9zSW6olj6G/IXj7p89SwSzPnZ+JUEPIPg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^1.1.1"
|
||||
"@eslint/core": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
|
|
@ -142,13 +142,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array": {
|
||||
"version": "0.23.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.3.tgz",
|
||||
"integrity": "sha512-j+eEWmB6YYLwcNOdlwQ6L2OsptI/LO6lNBuLIqe5R7RetD658HLoF+Mn7LzYmAWWNNzdC6cqP+L6r8ujeYXWLw==",
|
||||
"version": "0.23.4",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.4.tgz",
|
||||
"integrity": "sha512-lf19F24LSMfF8weXvW5QEtnLqW70u7kgit5e9PSx0MsHAFclGd1T9ynvWEMDT1w5J4Qt54tomGeAhdoAku1Xow==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/object-schema": "^3.0.3",
|
||||
"@eslint/object-schema": "^3.0.4",
|
||||
"debug": "^4.3.1",
|
||||
"minimatch": "^10.2.4"
|
||||
},
|
||||
|
|
@ -157,22 +157,22 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint/config-helpers": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.3.tgz",
|
||||
"integrity": "sha512-lzGN0onllOZCGroKJmRwY6QcEHxbjBw1gwB8SgRSqK8YbbtEXMvKynsXc3553ckIEBxsbMBU7oOZXKIPGZNeZw==",
|
||||
"version": "0.5.4",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.4.tgz",
|
||||
"integrity": "sha512-jJhqiY3wPMlWWO3370M86CPJ7pt8GmEwSLglMfQhjXal07RCvhmU0as4IuUEW5SJeunfItiEetHmSxCCe9lDBg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^1.1.1"
|
||||
"@eslint/core": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/core": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.1.tgz",
|
||||
"integrity": "sha512-QUPblTtE51/7/Zhfv8BDwO0qkkzQL7P/aWWbqcf4xWLEYn1oKjdO0gglQBB4GAsu7u6wjijbCmzsUTy6mnk6oQ==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.0.tgz",
|
||||
"integrity": "sha512-8FTGbNzTvmSlc4cZBaShkC6YvFMG0riksYWRFKXztqVdXaQbcZLXlFbSpC05s70sGEsXAw0qwhx69JiW7hQS7A==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
|
@ -204,9 +204,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint/object-schema": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.3.tgz",
|
||||
"integrity": "sha512-iM869Pugn9Nsxbh/YHRqYiqd23AmIbxJOcpUMOuWCVNdoQJ5ZtwL6h3t0bcZzJUlC3Dq9jCFCESBZnX0GTv7iQ==",
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.4.tgz",
|
||||
"integrity": "sha512-55lO/7+Yp0ISKRP0PsPtNTeNGapXaO085aELZmWCVc5SH3jfrqpuU6YgOdIxMS99ZHkQN1cXKE+cdIqwww9ptw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
|
|
@ -214,13 +214,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint/plugin-kit": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.1.tgz",
|
||||
"integrity": "sha512-iH1B076HoAshH1mLpHMgwdGeTs0CYwL0SPMkGuSebZrwBp16v415e9NZXg2jtrqPVQjf6IANe2Vtlr5KswtcZQ==",
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.0.tgz",
|
||||
"integrity": "sha512-ejvBr8MQCbVsWNZnCwDXjUKq40MDmHalq7cJ6e9s/qzTUFIIo/afzt1Vui9T97FM/V/pN4YsFVoed5NIa96RDg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^1.1.1",
|
||||
"@eslint/core": "^1.2.0",
|
||||
"levn": "^0.4.1"
|
||||
},
|
||||
"engines": {
|
||||
|
|
@ -228,12 +228,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@hey-api/codegen-core": {
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/codegen-core/-/codegen-core-0.5.5.tgz",
|
||||
"integrity": "sha512-f2ZHucnA2wBGAY8ipB4wn/mrEYW+WUxU2huJmUvfDO6AE2vfILSHeF3wCO39Pz4wUYPoAWZByaauftLrOfC12Q==",
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/codegen-core/-/codegen-core-0.7.4.tgz",
|
||||
"integrity": "sha512-DGd9yeSQzflOWO3Y5mt1GRXkXH9O/yIMgbxPjwLI3jwu/3nAjoXXD26lEeFb6tclYlg0JAqTIs5d930G/qxHeA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@hey-api/types": "0.1.2",
|
||||
"@hey-api/types": "0.1.4",
|
||||
"ansi-colors": "4.1.3",
|
||||
"c12": "3.3.3",
|
||||
"color-support": "1.1.3"
|
||||
|
|
@ -243,43 +243,40 @@
|
|||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/hey-api"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=5.5.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@hey-api/json-schema-ref-parser": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.2.2.tgz",
|
||||
"integrity": "sha512-oS+5yAdwnK20lSeFO1d53Ku+yaGCsY8PcrmSq2GtSs3bsBfRnHAbpPKSVzQcaxAOrzj5NB+f34WhZglVrNayBA==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.3.1.tgz",
|
||||
"integrity": "sha512-7atnpUkT8TyUPHYPLk91j/GyaqMuwTEHanLOe50Dlx0EEvNuQqFD52Yjg8x4KU0UFL1mWlyhE+sUE/wAtQ1N2A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jsdevtools/ono": "^7.1.3",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"js-yaml": "^4.1.1",
|
||||
"lodash": "^4.17.21"
|
||||
"@jsdevtools/ono": "7.1.3",
|
||||
"@types/json-schema": "7.0.15",
|
||||
"js-yaml": "4.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/hey-api"
|
||||
}
|
||||
},
|
||||
"node_modules/@hey-api/openapi-ts": {
|
||||
"version": "0.90.10",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.90.10.tgz",
|
||||
"integrity": "sha512-o0wlFxuLt1bcyIV/ZH8DQ1wrgODTnUYj/VfCHOOYgXUQlLp9Dm2PjihOz+WYrZLowhqUhSKeJRArOGzvLuOTsg==",
|
||||
"version": "0.95.0",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.95.0.tgz",
|
||||
"integrity": "sha512-lk5C+WKl5yqEmliQihEyhX/jNcWlAykTSEqkDeKa9xSq5YDAzOFvx7oos8YTqiIzdc4TemtlEaB8Rns7+8A0qg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@hey-api/codegen-core": "^0.5.5",
|
||||
"@hey-api/json-schema-ref-parser": "1.2.2",
|
||||
"@hey-api/types": "0.1.2",
|
||||
"@hey-api/codegen-core": "0.7.4",
|
||||
"@hey-api/json-schema-ref-parser": "1.3.1",
|
||||
"@hey-api/shared": "0.3.0",
|
||||
"@hey-api/spec-types": "0.1.0",
|
||||
"@hey-api/types": "0.1.4",
|
||||
"ansi-colors": "4.1.3",
|
||||
"color-support": "1.1.3",
|
||||
"commander": "14.0.2",
|
||||
"open": "11.0.0",
|
||||
"semver": "7.7.3"
|
||||
"commander": "14.0.3",
|
||||
"get-tsconfig": "4.13.6"
|
||||
},
|
||||
"bin": {
|
||||
"openapi-ts": "bin/run.js"
|
||||
|
|
@ -291,13 +288,47 @@
|
|||
"url": "https://github.com/sponsors/hey-api"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=5.5.3"
|
||||
"typescript": ">=5.5.3 || >=6.0.0 || 6.0.1-rc"
|
||||
}
|
||||
},
|
||||
"node_modules/@hey-api/shared": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/shared/-/shared-0.3.0.tgz",
|
||||
"integrity": "sha512-G+4GPojdLEh9bUwRG88teMPM1HdqMm/IsJ38cbnNxhyDu1FkFGwilkA1EqnULCzfTam/ZoZkaLdmAd8xEh4Xsw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@hey-api/codegen-core": "0.7.4",
|
||||
"@hey-api/json-schema-ref-parser": "1.3.1",
|
||||
"@hey-api/spec-types": "0.1.0",
|
||||
"@hey-api/types": "0.1.4",
|
||||
"ansi-colors": "4.1.3",
|
||||
"cross-spawn": "7.0.6",
|
||||
"open": "11.0.0",
|
||||
"semver": "7.7.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/hey-api"
|
||||
}
|
||||
},
|
||||
"node_modules/@hey-api/spec-types": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/spec-types/-/spec-types-0.1.0.tgz",
|
||||
"integrity": "sha512-StS4RrAO5pyJCBwe6uF9MAuPflkztriW+FPnVb7oEjzDYv1sxPwP+f7fL6u6D+UVrKpZ/9bPNx/xXVdkeWPU6A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@hey-api/types": "0.1.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/hey-api"
|
||||
}
|
||||
},
|
||||
"node_modules/@hey-api/types": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/types/-/types-0.1.2.tgz",
|
||||
"integrity": "sha512-uNNtiVAWL7XNrV/tFXx7GLY9lwaaDazx1173cGW3+UEaw4RUPsHEmiB4DSpcjNxMIcrctfz2sGKLnVx5PBG2RA==",
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@hey-api/types/-/types-0.1.4.tgz",
|
||||
"integrity": "sha512-thWfawrDIP7wSI9ioT13I5soaaqB5vAPIiZmgD8PbeEVKNrkonc0N/Sjj97ezl7oQgusZmaNphGdMKipPO6IBg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@humanfs/core": {
|
||||
|
|
@ -555,9 +586,6 @@
|
|||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -578,9 +606,6 @@
|
|||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -601,9 +626,6 @@
|
|||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -624,9 +646,6 @@
|
|||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -647,9 +666,6 @@
|
|||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -670,9 +686,6 @@
|
|||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -856,9 +869,6 @@
|
|||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -876,9 +886,6 @@
|
|||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -896,9 +903,6 @@
|
|||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -916,9 +920,6 @@
|
|||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -936,9 +937,6 @@
|
|||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -956,9 +954,6 @@
|
|||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -1070,9 +1065,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@sveltejs/kit": {
|
||||
"version": "2.55.0",
|
||||
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.55.0.tgz",
|
||||
"integrity": "sha512-MdFRjevVxmAknf2NbaUkDF16jSIzXMWd4Nfah0Qp8TtQVoSp3bV4jKt8mX7z7qTUTWvgSaxtR0EG5WJf53gcuA==",
|
||||
"version": "2.56.1",
|
||||
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.56.1.tgz",
|
||||
"integrity": "sha512-9hDOl3yUh8UXWt+mN29dbcdrW0vNwPvMqi01y2Mw+ceErNIISh8MeEY7fXT2Dx1CjC/kfsVqrbxw7DifYr4hsg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -1099,7 +1094,7 @@
|
|||
"@opentelemetry/api": "^1.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0 || ^7.0.0",
|
||||
"svelte": "^4.0.0 || ^5.0.0-next.0",
|
||||
"typescript": "^5.3.3",
|
||||
"typescript": "^5.3.3 || ^6.0.0",
|
||||
"vite": "^5.0.3 || ^6.0.0 || ^7.0.0-beta.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
|
|
@ -1214,9 +1209,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "25.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
|
||||
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
|
||||
"version": "25.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.2.tgz",
|
||||
"integrity": "sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -1230,20 +1225,20 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.2.tgz",
|
||||
"integrity": "sha512-NZZgp0Fm2IkD+La5PR81sd+g+8oS6JwJje+aRWsDocxHkjyRw0J5L5ZTlN3LI1LlOcGL7ph3eaIUmTXMIjLk0w==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.58.0.tgz",
|
||||
"integrity": "sha512-RLkVSiNuUP1C2ROIWfqX+YcUfLaSnxGE/8M+Y57lopVwg9VTYYfhuz15Yf1IzCKgZj6/rIbYTmJCUSqr76r0Wg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@typescript-eslint/scope-manager": "8.57.2",
|
||||
"@typescript-eslint/type-utils": "8.57.2",
|
||||
"@typescript-eslint/utils": "8.57.2",
|
||||
"@typescript-eslint/visitor-keys": "8.57.2",
|
||||
"@typescript-eslint/scope-manager": "8.58.0",
|
||||
"@typescript-eslint/type-utils": "8.58.0",
|
||||
"@typescript-eslint/utils": "8.58.0",
|
||||
"@typescript-eslint/visitor-keys": "8.58.0",
|
||||
"ignore": "^7.0.5",
|
||||
"natural-compare": "^1.4.0",
|
||||
"ts-api-utils": "^2.4.0"
|
||||
"ts-api-utils": "^2.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
|
|
@ -1253,9 +1248,9 @@
|
|||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.57.2",
|
||||
"@typescript-eslint/parser": "^8.58.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
|
||||
|
|
@ -1269,16 +1264,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.2.tgz",
|
||||
"integrity": "sha512-30ScMRHIAD33JJQkgfGW1t8CURZtjc2JpTrq5n2HFhOefbAhb7ucc7xJwdWcrEtqUIYJ73Nybpsggii6GtAHjA==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.58.0.tgz",
|
||||
"integrity": "sha512-rLoGZIf9afaRBYsPUMtvkDWykwXwUPL60HebR4JgTI8mxfFe2cQTu3AGitANp4b9B2QlVru6WzjgB2IzJKiCSA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.57.2",
|
||||
"@typescript-eslint/types": "8.57.2",
|
||||
"@typescript-eslint/typescript-estree": "8.57.2",
|
||||
"@typescript-eslint/visitor-keys": "8.57.2",
|
||||
"@typescript-eslint/scope-manager": "8.58.0",
|
||||
"@typescript-eslint/types": "8.58.0",
|
||||
"@typescript-eslint/typescript-estree": "8.58.0",
|
||||
"@typescript-eslint/visitor-keys": "8.58.0",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
|
|
@ -1290,18 +1285,18 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.2.tgz",
|
||||
"integrity": "sha512-FuH0wipFywXRTHf+bTTjNyuNQQsQC3qh/dYzaM4I4W0jrCqjCVuUh99+xd9KamUfmCGPvbO8NDngo/vsnNVqgw==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.58.0.tgz",
|
||||
"integrity": "sha512-8Q/wBPWLQP1j16NxoPNIKpDZFMaxl7yWIoqXWYeWO+Bbd2mjgvoF0dxP2jKZg5+x49rgKdf7Ck473M8PC3V9lg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.57.2",
|
||||
"@typescript-eslint/types": "^8.57.2",
|
||||
"@typescript-eslint/tsconfig-utils": "^8.58.0",
|
||||
"@typescript-eslint/types": "^8.58.0",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
|
|
@ -1312,18 +1307,18 @@
|
|||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.2.tgz",
|
||||
"integrity": "sha512-snZKH+W4WbWkrBqj4gUNRIGb/jipDW3qMqVJ4C9rzdFc+wLwruxk+2a5D+uoFcKPAqyqEnSb4l2ULuZf95eSkw==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.58.0.tgz",
|
||||
"integrity": "sha512-W1Lur1oF50FxSnNdGp3Vs6P+yBRSmZiw4IIjEeYxd8UQJwhUF0gDgDD/W/Tgmh73mxgEU3qX0Bzdl/NGuSPEpQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.57.2",
|
||||
"@typescript-eslint/visitor-keys": "8.57.2"
|
||||
"@typescript-eslint/types": "8.58.0",
|
||||
"@typescript-eslint/visitor-keys": "8.58.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
|
|
@ -1334,9 +1329,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.2.tgz",
|
||||
"integrity": "sha512-3Lm5DSM+DCowsUOJC+YqHHnKEfFh5CoGkj5Z31NQSNF4l5wdOwqGn99wmwN/LImhfY3KJnmordBq/4+VDe2eKw==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.58.0.tgz",
|
||||
"integrity": "sha512-doNSZEVJsWEu4htiVC+PR6NpM+pa+a4ClH9INRWOWCUzMst/VA9c4gXq92F8GUD1rwhNvRLkgjfYtFXegXQF7A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
|
@ -1347,21 +1342,21 @@
|
|||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.2.tgz",
|
||||
"integrity": "sha512-Co6ZCShm6kIbAM/s+oYVpKFfW7LBc6FXoPXjTRQ449PPNBY8U0KZXuevz5IFuuUj2H9ss40atTaf9dlGLzbWZg==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.58.0.tgz",
|
||||
"integrity": "sha512-aGsCQImkDIqMyx1u4PrVlbi/krmDsQUs4zAcCV6M7yPcPev+RqVlndsJy9kJ8TLihW9TZ0kbDAzctpLn5o+lOg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.57.2",
|
||||
"@typescript-eslint/typescript-estree": "8.57.2",
|
||||
"@typescript-eslint/utils": "8.57.2",
|
||||
"@typescript-eslint/types": "8.58.0",
|
||||
"@typescript-eslint/typescript-estree": "8.58.0",
|
||||
"@typescript-eslint/utils": "8.58.0",
|
||||
"debug": "^4.4.3",
|
||||
"ts-api-utils": "^2.4.0"
|
||||
"ts-api-utils": "^2.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
|
|
@ -1372,13 +1367,13 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.2.tgz",
|
||||
"integrity": "sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.58.0.tgz",
|
||||
"integrity": "sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
|
|
@ -1389,21 +1384,21 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.2.tgz",
|
||||
"integrity": "sha512-2MKM+I6g8tJxfSmFKOnHv2t8Sk3T6rF20A1Puk0svLK+uVapDZB/4pfAeB7nE83uAZrU6OxW+HmOd5wHVdXwXA==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.58.0.tgz",
|
||||
"integrity": "sha512-7vv5UWbHqew/dvs+D3e1RvLv1v2eeZ9txRHPnEEBUgSNLx5ghdzjHa0sgLWYVKssH+lYmV0JaWdoubo0ncGYLA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.57.2",
|
||||
"@typescript-eslint/tsconfig-utils": "8.57.2",
|
||||
"@typescript-eslint/types": "8.57.2",
|
||||
"@typescript-eslint/visitor-keys": "8.57.2",
|
||||
"@typescript-eslint/project-service": "8.58.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.58.0",
|
||||
"@typescript-eslint/types": "8.58.0",
|
||||
"@typescript-eslint/visitor-keys": "8.58.0",
|
||||
"debug": "^4.4.3",
|
||||
"minimatch": "^10.2.2",
|
||||
"semver": "^7.7.3",
|
||||
"tinyglobby": "^0.2.15",
|
||||
"ts-api-utils": "^2.4.0"
|
||||
"ts-api-utils": "^2.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
|
|
@ -1413,20 +1408,20 @@
|
|||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.2.tgz",
|
||||
"integrity": "sha512-krRIbvPK1ju1WBKIefiX+bngPs+odIQUtR7kymzPfo1POVw3jlF+nLkmexdSSd4UCbDcQn+wMBATOOmpBbqgKg==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.58.0.tgz",
|
||||
"integrity": "sha512-RfeSqcFeHMHlAWzt4TBjWOAtoW9lnsAGiP3GbaX9uVgTYYrMbVnGONEfUCiSss+xMHFl+eHZiipmA8WkQ7FuNA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.9.1",
|
||||
"@typescript-eslint/scope-manager": "8.57.2",
|
||||
"@typescript-eslint/types": "8.57.2",
|
||||
"@typescript-eslint/typescript-estree": "8.57.2"
|
||||
"@typescript-eslint/scope-manager": "8.58.0",
|
||||
"@typescript-eslint/types": "8.58.0",
|
||||
"@typescript-eslint/typescript-estree": "8.58.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
|
|
@ -1437,17 +1432,17 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.2.tgz",
|
||||
"integrity": "sha512-zhahknjobV2FiD6Ee9iLbS7OV9zi10rG26odsQdfBO/hjSzUQbkIYgda+iNKK1zNiW2ey+Lf8MU5btN17V3dUw==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.58.0.tgz",
|
||||
"integrity": "sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.57.2",
|
||||
"@typescript-eslint/types": "8.58.0",
|
||||
"eslint-visitor-keys": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
|
|
@ -1807,9 +1802,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "14.0.2",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz",
|
||||
"integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==",
|
||||
"version": "14.0.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",
|
||||
"integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
|
|
@ -1851,7 +1846,6 @@
|
|||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
|
|
@ -1951,9 +1945,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/defu": {
|
||||
"version": "6.1.4",
|
||||
"resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
|
||||
"integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==",
|
||||
"version": "6.1.6",
|
||||
"resolved": "https://registry.npmjs.org/defu/-/defu-6.1.6.tgz",
|
||||
"integrity": "sha512-f8mefEW4WIVg4LckePx3mALjQSPQgFlg9U8yaPdlsbdYcHQyj9n2zL2LJEA52smeYxOvmd/nB7TpMtHGMTHcug==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/destr": {
|
||||
|
|
@ -1979,9 +1973,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "17.3.1",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.3.1.tgz",
|
||||
"integrity": "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==",
|
||||
"version": "17.4.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.0.tgz",
|
||||
"integrity": "sha512-kCKF62fwtzwYm0IGBNjRUjtJgMfGapII+FslMHIjMR5KTnwEmBmWLDRSnc3XSNP8bNy34tekgQyDT0hr7pERRQ==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
|
|
@ -2011,18 +2005,18 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.1.0.tgz",
|
||||
"integrity": "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA==",
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.2.0.tgz",
|
||||
"integrity": "sha512-+L0vBFYGIpSNIt/KWTpFonPrqYvgKw1eUI5Vn7mEogrQcWtWYtNQ7dNqC+px/J0idT3BAkiWrhfS7k+Tum8TUA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.8.0",
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@eslint/config-array": "^0.23.3",
|
||||
"@eslint/config-helpers": "^0.5.3",
|
||||
"@eslint/core": "^1.1.1",
|
||||
"@eslint/plugin-kit": "^0.6.1",
|
||||
"@eslint/config-array": "^0.23.4",
|
||||
"@eslint/config-helpers": "^0.5.4",
|
||||
"@eslint/core": "^1.2.0",
|
||||
"@eslint/plugin-kit": "^0.7.0",
|
||||
"@humanfs/node": "^0.16.6",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@humanwhocodes/retry": "^0.4.2",
|
||||
|
|
@ -2083,9 +2077,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-svelte": {
|
||||
"version": "3.16.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-3.16.0.tgz",
|
||||
"integrity": "sha512-DJXxqpYZUxcE0SfYo8EJzV2ZC+zAD7fJp1n1HwcEMRR1cOEUYvjT9GuzJeNghMjgb7uxuK3IJAzI+x6zzUxO5A==",
|
||||
"version": "3.17.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-3.17.0.tgz",
|
||||
"integrity": "sha512-sF6wgd5FLS2P8CCaOy2HdYYYEcZ6TwL251dLHUkNmtLnWECk1Dwc+j6VeulmmnFxr7Xs0WNtjweOA+bJ0PnaFw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -2372,6 +2366,18 @@
|
|||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/get-tsconfig": {
|
||||
"version": "4.13.6",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz",
|
||||
"integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"resolve-pkg-maps": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/giget": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz",
|
||||
|
|
@ -2552,7 +2558,6 @@
|
|||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/jiti": {
|
||||
|
|
@ -2781,9 +2786,6 @@
|
|||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MPL-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -2805,9 +2807,6 @@
|
|||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MPL-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -2829,9 +2828,6 @@
|
|||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MPL-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -2853,9 +2849,6 @@
|
|||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MPL-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
|
@ -2943,12 +2936,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.23",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "0.30.21",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
|
||||
|
|
@ -2959,13 +2946,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "10.2.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",
|
||||
"integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",
|
||||
"version": "10.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
|
||||
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^5.0.2"
|
||||
"brace-expansion": "^5.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
|
|
@ -3064,9 +3051,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/nypm/node_modules/citty": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/citty/-/citty-0.2.1.tgz",
|
||||
"integrity": "sha512-kEV95lFBhQgtogAPlQfJJ0WGVSokvLr/UEoFPiKKOXF7pl98HfUVUD0ejsuTCld/9xH9vogSywZ5KqHzXrZpqg==",
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/citty/-/citty-0.2.2.tgz",
|
||||
"integrity": "sha512-+6vJA3L98yv+IdfKGZHBNiGW5KHn22e/JwID0Strsz8h4S/csAu/OuICwxrg44k5MRiZHWIo8XXuJgQTriRP4w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/obug": {
|
||||
|
|
@ -3170,7 +3157,6 @@
|
|||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
|
|
@ -3438,6 +3424,15 @@
|
|||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve-pkg-maps": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
|
||||
"integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/rolldown": {
|
||||
"version": "1.0.0-rc.12",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.12.tgz",
|
||||
|
|
@ -3498,9 +3493,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.98.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.98.0.tgz",
|
||||
"integrity": "sha512-+4N/u9dZ4PrgzGgPlKnaaRQx64RO0JBKs9sDhQ2pLgN6JQZ25uPQZKQYaBJU48Kd5BxgXoJ4e09Dq7nMcOUW3A==",
|
||||
"version": "1.99.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.99.0.tgz",
|
||||
"integrity": "sha512-kgW13M54DUB7IsIRM5LvJkNlpH+WhMpooUcaWGFARkF1Tc82v9mIWkCbCYf+MBvpIUBSeSOTilpZjEPr2VYE6Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.0",
|
||||
|
|
@ -3608,7 +3603,6 @@
|
|||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"shebang-regex": "^3.0.0"
|
||||
|
|
@ -3621,7 +3615,6 @@
|
|||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
|
|
@ -3700,9 +3693,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/svelte-check": {
|
||||
"version": "4.4.5",
|
||||
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.4.5.tgz",
|
||||
"integrity": "sha512-1bSwIRCvvmSHrlK52fOlZmVtUZgil43jNL/2H18pRpa+eQjzGt6e3zayxhp1S7GajPFKNM/2PMCG+DZFHlG9fw==",
|
||||
"version": "4.4.6",
|
||||
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.4.6.tgz",
|
||||
"integrity": "sha512-kP1zG81EWaFe9ZyTv4ZXv44Csi6Pkdpb7S3oj6m+K2ec/IcDg/a8LsFsnVLqm2nxtkSwsd5xPj/qFkTBgXHXjg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -4004,16 +3997,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
"version": "8.57.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.57.2.tgz",
|
||||
"integrity": "sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A==",
|
||||
"version": "8.58.0",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.58.0.tgz",
|
||||
"integrity": "sha512-e2TQzKfaI85fO+F3QywtX+tCTsu/D3WW5LVU6nz8hTFKFZ8yBJ6mSYRpXqdR3mFjPWmO0eWsTa5f+UpAOe/FMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "8.57.2",
|
||||
"@typescript-eslint/parser": "8.57.2",
|
||||
"@typescript-eslint/typescript-estree": "8.57.2",
|
||||
"@typescript-eslint/utils": "8.57.2"
|
||||
"@typescript-eslint/eslint-plugin": "8.58.0",
|
||||
"@typescript-eslint/parser": "8.58.0",
|
||||
"@typescript-eslint/typescript-estree": "8.58.0",
|
||||
"@typescript-eslint/utils": "8.58.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
|
|
@ -4024,7 +4017,7 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
|
|
@ -4130,9 +4123,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vitefu": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.2.tgz",
|
||||
"integrity": "sha512-zpKATdUbzbsycPFBN71nS2uzBUQiVnFoOrr2rvqv34S1lcAgMKKkjWleLGeiJlZ8lwCXvtWaRn7R3ZC16SYRuw==",
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.3.tgz",
|
||||
"integrity": "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"workspaces": [
|
||||
|
|
@ -4141,7 +4134,7 @@
|
|||
"tests/projects/workspace/packages/*"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-beta.0"
|
||||
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"vite": {
|
||||
|
|
@ -4235,7 +4228,6 @@
|
|||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"isexe": "^2.0.0"
|
||||
|
|
@ -4290,22 +4282,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
|
||||
"integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
|
||||
"extraneous": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/eemeli"
|
||||
}
|
||||
},
|
||||
"node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@hey-api/openapi-ts": "^0.90.6",
|
||||
"@hey-api/openapi-ts": "^0.95.0",
|
||||
"@sveltestrap/sveltestrap": "^7.0.0",
|
||||
"bootstrap": "^5.3.0",
|
||||
"bootstrap-icons": "^1.13.0",
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import {
|
|||
deleteDomainsByDomainId,
|
||||
getDomainsByDomainIdLogs,
|
||||
} from "$lib/api-base/sdk.gen";
|
||||
import type { HappydnsDomainUpdateInput } from "$lib/api-base/types.gen";
|
||||
import type { Domain, DomainLog } from "$lib/model/domain";
|
||||
import type { Provider } from "$lib/model/provider";
|
||||
import { unwrapSdkResponse, unwrapEmptyResponse } from "./errors";
|
||||
|
|
@ -51,26 +52,18 @@ export async function addDomain(domain: string, provider: Provider | undefined):
|
|||
body: {
|
||||
domain,
|
||||
id_provider,
|
||||
} as any,
|
||||
},
|
||||
}),
|
||||
) as Domain;
|
||||
}
|
||||
|
||||
export async function updateDomain(domain: Domain): Promise<Domain> {
|
||||
if (domain.id) {
|
||||
return unwrapSdkResponse(
|
||||
await putDomainsByDomainId({
|
||||
path: { domainId: domain.id },
|
||||
body: domain as any,
|
||||
}),
|
||||
) as Domain;
|
||||
} else {
|
||||
return unwrapSdkResponse(
|
||||
await postDomains({
|
||||
body: domain as any,
|
||||
}),
|
||||
) as Domain;
|
||||
}
|
||||
export async function updateDomain(id: string, body: HappydnsDomainUpdateInput): Promise<Domain> {
|
||||
return unwrapSdkResponse(
|
||||
await putDomainsByDomainId({
|
||||
path: { domainId: id },
|
||||
body,
|
||||
}),
|
||||
) as Domain;
|
||||
}
|
||||
|
||||
export async function deleteDomain(id: string): Promise<boolean> {
|
||||
|
|
@ -86,5 +79,5 @@ export async function getDomainLogs(id: string): Promise<Array<DomainLog>> {
|
|||
await getDomainsByDomainIdLogs({
|
||||
path: { domainId: id },
|
||||
}),
|
||||
) as unknown as Array<DomainLog>;
|
||||
) as Array<DomainLog>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import {
|
|||
putProvidersByProviderId,
|
||||
deleteProvidersByProviderId,
|
||||
} from "$lib/api-base/sdk.gen";
|
||||
import type { HappydnsProviderMinimal } from "$lib/api-base/types.gen";
|
||||
import type { Provider } from "$lib/model/provider";
|
||||
import { unwrapSdkResponse, unwrapEmptyResponse } from "./errors";
|
||||
|
||||
|
|
@ -51,17 +52,12 @@ export async function listImportableDomains(provider: Provider): Promise<Array<s
|
|||
) as Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a domain at the provider.
|
||||
* Note: The old API used POST, but the current OpenAPI spec has GET endpoint.
|
||||
* This might need investigation if it doesn't work as expected.
|
||||
*/
|
||||
export async function createDomain(provider: Provider, fqdn: string): Promise<boolean> {
|
||||
return unwrapSdkResponse(
|
||||
return unwrapEmptyResponse(
|
||||
await getProvidersByProviderIdDomainsByFqdn({
|
||||
path: { providerId: provider._id, fqdn } as any,
|
||||
path: { providerId: provider._id, fqdn },
|
||||
}),
|
||||
) as unknown as boolean;
|
||||
);
|
||||
}
|
||||
|
||||
export async function updateProvider(provider: Provider): Promise<Provider> {
|
||||
|
|
@ -69,13 +65,13 @@ export async function updateProvider(provider: Provider): Promise<Provider> {
|
|||
return unwrapSdkResponse(
|
||||
await putProvidersByProviderId({
|
||||
path: { providerId: provider._id },
|
||||
body: provider as any,
|
||||
body: provider as unknown as HappydnsProviderMinimal,
|
||||
}),
|
||||
) as Provider;
|
||||
} else {
|
||||
return unwrapSdkResponse(
|
||||
await postProviders({
|
||||
body: provider as any,
|
||||
body: provider as unknown as HappydnsProviderMinimal,
|
||||
}),
|
||||
) as Provider;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,33 +20,37 @@
|
|||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import { postProvidersSpecsByProviderTypeSettings } from "$lib/api-base/sdk.gen";
|
||||
import type { Provider } from "$lib/model/provider";
|
||||
import type { ProviderSettingsResponse } from "$lib/model/provider_settings";
|
||||
import { isProvider, type Provider } from "$lib/model/provider";
|
||||
import type { ProviderSettingsResponse, ProviderSettingsState } from "$lib/model/provider_settings";
|
||||
import { unwrapSdkResponse } from "./errors";
|
||||
|
||||
export async function getProviderSettings(
|
||||
psid: string,
|
||||
state: number,
|
||||
settings: any,
|
||||
settings: ProviderSettingsState,
|
||||
recallid: number | undefined = undefined,
|
||||
): Promise<ProviderSettingsResponse> {
|
||||
if (!state) state = 0;
|
||||
if (!settings) settings = {};
|
||||
if (!settings) settings = { state };
|
||||
settings.state = state;
|
||||
if (recallid) settings.recall = recallid;
|
||||
if (recallid) settings.recall = String(recallid);
|
||||
|
||||
const data = unwrapSdkResponse(
|
||||
await postProvidersSpecsByProviderTypeSettings({
|
||||
path: { providerType: psid },
|
||||
body: settings as any,
|
||||
body: {
|
||||
_comment: settings._comment,
|
||||
_id: settings._id,
|
||||
state: settings.state,
|
||||
recall: settings.recall,
|
||||
Provider: settings.Provider ? { ...settings.Provider } : undefined,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
// If the response has _id, it means the provider setup is complete
|
||||
// Throw the Provider object to match old API behavior
|
||||
if ((data as any)._id) {
|
||||
if (isProvider(data)) {
|
||||
throw data as Provider;
|
||||
} else if ((data as any).form) {
|
||||
} else if ("form" in data) {
|
||||
return data as ProviderSettingsResponse;
|
||||
} else {
|
||||
throw new Error("Not implemented");
|
||||
|
|
|
|||
|
|
@ -20,13 +20,14 @@
|
|||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import { postResolver } from "$lib/api-base/sdk.gen";
|
||||
import type { ControllerDnsMsg } from "$lib/api-base/types.gen";
|
||||
import type { ResolverForm } from "$lib/model/resolver";
|
||||
import { unwrapSdkResponse } from "./errors";
|
||||
|
||||
export async function resolve(form: ResolverForm): Promise<any> {
|
||||
export async function resolve(form: ResolverForm): Promise<ControllerDnsMsg> {
|
||||
return unwrapSdkResponse(
|
||||
await postResolver({
|
||||
body: form as any,
|
||||
body: form,
|
||||
}),
|
||||
);
|
||||
) as ControllerDnsMsg;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import { getDomainsByDomainIdZoneByZoneIdBySubdomainServicesByServiceId } from "$lib/api-base/sdk.gen";
|
||||
import type { HappydnsService } from "$lib/api-base/types.gen";
|
||||
import type { Domain } from "$lib/model/domain";
|
||||
import type { ServiceCombined } from "$lib/model/service.svelte";
|
||||
import { unwrapSdkResponse } from "./errors";
|
||||
|
||||
export async function getService(
|
||||
|
|
@ -29,7 +29,7 @@ export async function getService(
|
|||
zoneid: string,
|
||||
subdomain: string,
|
||||
svcid: string,
|
||||
): Promise<ServiceCombined> {
|
||||
): Promise<HappydnsService> {
|
||||
return unwrapSdkResponse(
|
||||
await getDomainsByDomainIdZoneByZoneIdBySubdomainServicesByServiceId({
|
||||
path: {
|
||||
|
|
@ -39,5 +39,5 @@ export async function getService(
|
|||
serviceId: svcid,
|
||||
},
|
||||
}),
|
||||
) as ServiceCombined;
|
||||
) as HappydnsService;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import {
|
|||
postServiceSpecsByServiceTypeInit,
|
||||
postServiceSpecsByServiceTypeRecords,
|
||||
} from "$lib/api-base/sdk.gen";
|
||||
import type { HappydnsService } from "$lib/api-base/types.gen";
|
||||
import type { dnsRR } from "$lib/dns_rr";
|
||||
import type { ServiceInfos, ServiceSpec } from "$lib/model/service_specs.svelte";
|
||||
import { unwrapSdkResponse } from "./errors";
|
||||
|
|
@ -46,22 +47,20 @@ export async function getServiceSpec(ssid: string): Promise<ServiceSpec> {
|
|||
}
|
||||
}
|
||||
|
||||
export async function initializeService(ssid: string): Promise<any> {
|
||||
export async function initializeService(ssid: string): Promise<Record<string, unknown>> {
|
||||
return unwrapSdkResponse(
|
||||
await postServiceSpecsByServiceTypeInit({
|
||||
path: { serviceType: ssid },
|
||||
}),
|
||||
);
|
||||
) as Record<string, unknown>;
|
||||
}
|
||||
|
||||
export async function generateServiceRecords(ssid: string, value: any, domain?: string): Promise<dnsRR[]> {
|
||||
const query: Record<string, string> = {};
|
||||
if (domain) query.domain = domain;
|
||||
export async function generateServiceRecords(ssid: string, value: Record<string, unknown>, domain?: string): Promise<dnsRR[]> {
|
||||
return unwrapSdkResponse(
|
||||
await postServiceSpecsByServiceTypeRecords({
|
||||
path: { serviceType: ssid },
|
||||
body: value,
|
||||
query: query as any,
|
||||
body: value as HappydnsService,
|
||||
query: { domain: domain || "" },
|
||||
})
|
||||
) as dnsRR[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import {
|
||||
getSessions,
|
||||
getSession as getSdkSession,
|
||||
getSession,
|
||||
postSessions,
|
||||
putSessionsBySessionId,
|
||||
deleteSessionsBySessionId,
|
||||
|
|
@ -34,43 +34,32 @@ export async function listSessions(): Promise<Array<Session>> {
|
|||
return unwrapSdkResponse(await getSessions()) as Array<Session>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific session by ID.
|
||||
* Note: This endpoint does not exist in the current OpenAPI spec.
|
||||
* This function will throw an error for now.
|
||||
*/
|
||||
export async function getSession(id: string): Promise<Session> {
|
||||
// TODO: This endpoint (GET /sessions/{sessionId}) is not in the OpenAPI spec
|
||||
// For now, we'll have to use a direct fetch or wait for the spec to be updated
|
||||
throw new Error("getSession by ID is not implemented in the current API");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current session.
|
||||
* Uses the /session endpoint (singular).
|
||||
*/
|
||||
export async function getCurrentSession(): Promise<Session> {
|
||||
return unwrapSdkResponse(await getSdkSession()) as Session;
|
||||
return unwrapSdkResponse(await getSession()) as Session;
|
||||
}
|
||||
|
||||
export async function addSession(description: string): Promise<Session> {
|
||||
return unwrapSdkResponse(
|
||||
await postSessions({
|
||||
body: {
|
||||
description,
|
||||
} as any,
|
||||
body: { description },
|
||||
}),
|
||||
) as Session;
|
||||
}
|
||||
|
||||
export async function updateSession(session: Session): Promise<Session> {
|
||||
if (!session.id) {
|
||||
throw new Error("updateSession requires an existing session id; use addSession to create a new one");
|
||||
throw new Error(
|
||||
"updateSession requires an existing session id; use addSession to create a new one",
|
||||
);
|
||||
}
|
||||
return unwrapSdkResponse(
|
||||
await putSessionsBySessionId({
|
||||
path: { sessionId: session.id },
|
||||
body: session as any,
|
||||
body: { description: session.description, exp: session.exp },
|
||||
}),
|
||||
) as Session;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ import {
|
|||
postUsersByUserIdDelete,
|
||||
postUsersByUserIdSettings,
|
||||
getUsersByUserId,
|
||||
getUsersByUserIdIsAuthUser,
|
||||
} from "$lib/api-base/sdk.gen";
|
||||
import { client } from "$lib/api-base/client.gen";
|
||||
import type { UserSettings } from "$lib/model/usersettings";
|
||||
import type { User, SignUpForm, LoginForm } from "$lib/model/user";
|
||||
import { unwrapSdkResponse, unwrapEmptyResponse } from "./errors";
|
||||
|
|
@ -42,7 +42,7 @@ export async function registerUser(form: SignUpForm): Promise<boolean> {
|
|||
}
|
||||
|
||||
export async function authUser(form: LoginForm): Promise<User> {
|
||||
return unwrapSdkResponse(await postAuth({ body: form })) as unknown as User;
|
||||
return unwrapSdkResponse(await postAuth({ body: form })) as User;
|
||||
}
|
||||
|
||||
export async function logout(): Promise<boolean> {
|
||||
|
|
@ -150,17 +150,17 @@ export function cleanUserSession(): void {
|
|||
}
|
||||
|
||||
export async function isAuthUser(user: User): Promise<boolean> {
|
||||
const result = await client.get({
|
||||
url: "/users/{userId}/is_auth_user",
|
||||
path: { userId: user.id },
|
||||
} as any);
|
||||
return result.response?.status === 204;
|
||||
return unwrapEmptyResponse(
|
||||
await getUsersByUserIdIsAuthUser({
|
||||
path: { userId: user.id },
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
export async function getUser(id: string): Promise<User> {
|
||||
return unwrapSdkResponse(
|
||||
await getUsersByUserId({
|
||||
path: { userId: id },
|
||||
} as any),
|
||||
) as unknown as User;
|
||||
}),
|
||||
) as User;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ import {
|
|||
postDomainsByDomainIdZoneByZoneIdRecordsDelete,
|
||||
patchDomainsByDomainIdZoneByZoneIdRecords,
|
||||
} from "$lib/api-base/sdk.gen";
|
||||
import type { HappydnsService } from "$lib/api-base/types.gen";
|
||||
import { printRR } from "$lib/dns";
|
||||
import type { dnsRR } from "$lib/dns_rr";
|
||||
import type { Correction, FullCorrection } from "$lib/model/correction";
|
||||
import type { Domain } from "$lib/model/domain";
|
||||
import type { ServiceCombined, ServiceMeta } from "$lib/model/service.svelte";
|
||||
import type { Zone, ZoneMeta } from "$lib/model/zone";
|
||||
import { unwrapSdkResponse } from "./errors";
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ export async function getZone(domain: Domain, id: string): Promise<Zone> {
|
|||
await getDomainsByDomainIdZoneByZoneId({
|
||||
path: { domainId: domain.id, zoneId: id },
|
||||
}),
|
||||
) as unknown as Zone;
|
||||
) as Zone;
|
||||
}
|
||||
|
||||
export async function viewZone(domain: Domain, id: string): Promise<string> {
|
||||
|
|
@ -64,7 +64,7 @@ export async function retrieveZone(domain: Domain): Promise<ZoneMeta> {
|
|||
await postDomainsByDomainIdRetrieveZone({
|
||||
path: { domainId: domain.id },
|
||||
}),
|
||||
) as unknown as ZoneMeta;
|
||||
);
|
||||
}
|
||||
|
||||
export async function applyZone(
|
||||
|
|
@ -76,9 +76,9 @@ export async function applyZone(
|
|||
return unwrapSdkResponse(
|
||||
await postDomainsByDomainIdZoneByZoneIdApplyChanges({
|
||||
path: { domainId: domain.id, zoneId: id },
|
||||
body: { wantedCorrections, commitMessage } as any,
|
||||
body: { wantedCorrections, commitMessage },
|
||||
}),
|
||||
) as unknown as ZoneMeta;
|
||||
);
|
||||
}
|
||||
|
||||
export async function prepareZone(
|
||||
|
|
@ -89,21 +89,18 @@ export async function prepareZone(
|
|||
return unwrapSdkResponse(
|
||||
await postDomainsByDomainIdZoneByZoneIdPrepareChanges({
|
||||
path: { domainId: domain.id, zoneId: id },
|
||||
body: { wantedCorrections } as any,
|
||||
body: { wantedCorrections },
|
||||
}),
|
||||
) as { corrections: Array<FullCorrection>; nbDiffs: number };
|
||||
}
|
||||
|
||||
export async function importZone(domain: Domain, id: string, file: any): Promise<ZoneMeta> {
|
||||
const formData = new FormData();
|
||||
formData.append("zone", file);
|
||||
|
||||
export async function importZone(domain: Domain, file: File | Blob): Promise<ZoneMeta> {
|
||||
return unwrapSdkResponse(
|
||||
await postDomainsByDomainIdZone({
|
||||
path: { domainId: domain.id },
|
||||
body: formData as any,
|
||||
body: { zone: file },
|
||||
}),
|
||||
) as unknown as ZoneMeta;
|
||||
) as ZoneMeta;
|
||||
}
|
||||
|
||||
export async function diffZone(
|
||||
|
|
@ -133,7 +130,7 @@ export async function diffZoneSummary(
|
|||
export async function addZoneService(
|
||||
domain: Domain,
|
||||
id: string,
|
||||
service: ServiceCombined,
|
||||
service: HappydnsService,
|
||||
): Promise<Zone> {
|
||||
let subdomain = service._domain;
|
||||
if (subdomain === "") subdomain = "@";
|
||||
|
|
@ -141,28 +138,28 @@ export async function addZoneService(
|
|||
return unwrapSdkResponse(
|
||||
await postDomainsByDomainIdZoneByZoneIdBySubdomainServices({
|
||||
path: { domainId: domain.id, zoneId: id, subdomain },
|
||||
body: service as any,
|
||||
body: service,
|
||||
}),
|
||||
) as unknown as Zone;
|
||||
) as Zone;
|
||||
}
|
||||
|
||||
export async function updateZoneService(
|
||||
domain: Domain,
|
||||
id: string,
|
||||
service: ServiceCombined,
|
||||
service: HappydnsService,
|
||||
): Promise<Zone> {
|
||||
return unwrapSdkResponse(
|
||||
await patchDomainsByDomainIdZoneByZoneId({
|
||||
path: { domainId: domain.id, zoneId: id },
|
||||
body: service as any,
|
||||
body: service,
|
||||
}),
|
||||
) as unknown as Zone;
|
||||
) as Zone;
|
||||
}
|
||||
|
||||
export async function deleteZoneService(
|
||||
domain: Domain,
|
||||
id: string,
|
||||
service: ServiceMeta,
|
||||
service: HappydnsService,
|
||||
): Promise<Zone> {
|
||||
let subdomain = service._domain;
|
||||
if (subdomain === "") subdomain = "@";
|
||||
|
|
@ -173,7 +170,7 @@ export async function deleteZoneService(
|
|||
await deleteDomainsByDomainIdZoneByZoneIdBySubdomainServicesByServiceId({
|
||||
path: { domainId: domain.id, zoneId: id, subdomain, serviceId: svcid },
|
||||
}),
|
||||
) as unknown as Zone;
|
||||
) as Zone;
|
||||
}
|
||||
|
||||
export async function addZoneRecord(
|
||||
|
|
@ -185,9 +182,9 @@ export async function addZoneRecord(
|
|||
return unwrapSdkResponse(
|
||||
await postDomainsByDomainIdZoneByZoneIdRecords({
|
||||
path: { domainId: domain.id, zoneId: id },
|
||||
body: [printRR(record, subdomain)] as any,
|
||||
body: [printRR(record, subdomain)],
|
||||
}),
|
||||
) as unknown as Zone;
|
||||
) as Zone;
|
||||
}
|
||||
|
||||
export async function deleteZoneRecord(
|
||||
|
|
@ -199,9 +196,9 @@ export async function deleteZoneRecord(
|
|||
return unwrapSdkResponse(
|
||||
await postDomainsByDomainIdZoneByZoneIdRecordsDelete({
|
||||
path: { domainId: domain.id, zoneId: id },
|
||||
body: [printRR(record, subdomain)] as any,
|
||||
body: [printRR(record, subdomain)],
|
||||
}),
|
||||
) as unknown as Zone;
|
||||
) as Zone;
|
||||
}
|
||||
|
||||
export async function updateZoneRecord(
|
||||
|
|
@ -214,7 +211,7 @@ export async function updateZoneRecord(
|
|||
return unwrapSdkResponse(
|
||||
await patchDomainsByDomainIdZoneByZoneIdRecords({
|
||||
path: { domainId: domain.id, zoneId: id },
|
||||
body: { oldrr: printRR(oldrr, subdomain), newrr: printRR(newrr, subdomain) } as any,
|
||||
body: { oldrr: printRR(oldrr, subdomain), newrr: printRR(newrr, subdomain) },
|
||||
}),
|
||||
) as unknown as Zone;
|
||||
) as Zone;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@
|
|||
class?: string;
|
||||
color?: Color | "link" | string;
|
||||
size?: "sm" | "lg" | string;
|
||||
title?: string | null;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
let { class: className = "", color = "primary", size = "", title = null }: Props = $props();
|
||||
let { class: className = "", color = "primary", size = "", title }: Props = $props();
|
||||
|
||||
function getHelpPathFromProvider(ptype: string): string {
|
||||
if ($providersSpecs && $providersSpecs[ptype]) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
loading?: import('svelte').Snippet;
|
||||
empty?: import('svelte').Snippet;
|
||||
children?: import('svelte').Snippet<[any]>;
|
||||
[key: string]: any
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
import { toasts } from "$lib/stores/toasts";
|
||||
import { t } from "$lib/translations";
|
||||
interface Props {
|
||||
[key: string]: any
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
let { ...rest }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
interface Props {
|
||||
class?: ClassValue;
|
||||
items: Array<Domain>;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let { class: className, items, ...rest }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
const dispatch = createEventDispatcher();
|
||||
|
||||
interface Props {
|
||||
service?: any;
|
||||
service?: { [key: string]: any } | null;
|
||||
}
|
||||
|
||||
let { service = null }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
interface Props {
|
||||
form: CustomForm;
|
||||
value: any;
|
||||
value: Record<string, any> | undefined;
|
||||
children?: import("svelte").Snippet;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let { form, value = $bindable(), children, ...rest }: Props = $props();
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
index={"" + index}
|
||||
specs={field}
|
||||
type={field.type}
|
||||
bind:value={value[field.id]}
|
||||
bind:value={value![field.id]}
|
||||
/>
|
||||
{/each}
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@
|
|||
<CustomForm
|
||||
form={form.form}
|
||||
bind:value={form.value.Provider}
|
||||
on:input={(event) => (form.value.Provider = event.detail)}
|
||||
>
|
||||
{#if form.state === 0}
|
||||
<ResourceInput
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
interface Props {
|
||||
value?: string | null;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let { value = $bindable(null), ...rest }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -47,18 +47,18 @@
|
|||
addingNewDomain?: boolean;
|
||||
autofocus?: boolean;
|
||||
noButton?: boolean;
|
||||
preAddFunc?: null | ((arg0: string) => Promise<boolean>);
|
||||
provider?: Provider | null;
|
||||
preAddFunc?: (arg0: string) => Promise<boolean>;
|
||||
provider?: Provider;
|
||||
value?: string;
|
||||
[key: string]: any
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
let {
|
||||
addingNewDomain = $bindable(false),
|
||||
autofocus = false,
|
||||
noButton = false,
|
||||
preAddFunc = null,
|
||||
provider = null,
|
||||
preAddFunc,
|
||||
provider,
|
||||
value = $bindable(""),
|
||||
...rest
|
||||
}: Props = $props();
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
import ObjectInput from "$lib/components/inputs/object.svelte";
|
||||
import RawInput from "$lib/components/inputs/raw.svelte";
|
||||
import TableInput from "$lib/components/inputs/table.svelte";
|
||||
import type { Field } from "$lib/model/custom_form.svelte";
|
||||
import type { ServiceInfos } from "$lib/model/service_specs.svelte";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
|
|
@ -39,7 +41,7 @@
|
|||
noDecorate?: boolean;
|
||||
readonly?: boolean;
|
||||
showDescription?: boolean;
|
||||
specs?: any;
|
||||
specs?: Field | ServiceInfos;
|
||||
type: string;
|
||||
value: any;
|
||||
}
|
||||
|
|
@ -53,7 +55,7 @@
|
|||
showDescription = true,
|
||||
specs = undefined,
|
||||
type,
|
||||
value = $bindable()
|
||||
value = $bindable(),
|
||||
}: Props = $props();
|
||||
|
||||
function sanitizeType(t: string) {
|
||||
|
|
@ -63,7 +65,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
{#if specs && specs.hide}
|
||||
{#if specs && "hide" in specs && specs.hide}
|
||||
<!-- hidden input -->
|
||||
{:else if type.substring(0, 2) === "[]" && type !== "[]byte" && type !== "[]uint8"}
|
||||
<TableInput
|
||||
|
|
@ -71,7 +73,7 @@
|
|||
{index}
|
||||
{noDecorate}
|
||||
{readonly}
|
||||
{specs}
|
||||
specs={specs as Field}
|
||||
type={sanitizeType(type)}
|
||||
bind:value
|
||||
/>
|
||||
|
|
@ -80,7 +82,7 @@
|
|||
edit={edit || editToolbar}
|
||||
{index}
|
||||
{readonly}
|
||||
{specs}
|
||||
specs={specs as Field}
|
||||
type={sanitizeType(type)}
|
||||
bind:value
|
||||
/>
|
||||
|
|
@ -90,7 +92,7 @@
|
|||
{editToolbar}
|
||||
{index}
|
||||
{readonly}
|
||||
{specs}
|
||||
specs={specs as ServiceInfos}
|
||||
type={sanitizeType(type)}
|
||||
bind:value
|
||||
on:delete-this-service={(event) => dispatch("delete-this-service", event.detail)}
|
||||
|
|
@ -101,7 +103,7 @@
|
|||
edit={edit || editToolbar}
|
||||
{index}
|
||||
{readonly}
|
||||
{specs}
|
||||
specs={specs as Field}
|
||||
type={sanitizeType(type)}
|
||||
bind:value
|
||||
/>
|
||||
|
|
@ -111,7 +113,7 @@
|
|||
{index}
|
||||
{readonly}
|
||||
{showDescription}
|
||||
{specs}
|
||||
specs={specs as Field}
|
||||
type={sanitizeType(type)}
|
||||
bind:value
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
specs: Field;
|
||||
readonly?: boolean;
|
||||
value: any;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
readonly?: boolean;
|
||||
specs: Field;
|
||||
type: string;
|
||||
value: any;
|
||||
value: Record<string, unknown>;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
readonly?: boolean;
|
||||
specs: Field;
|
||||
valuetype: string;
|
||||
value: any;
|
||||
value: unknown;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
readonly?: boolean;
|
||||
specs: ServiceInfos;
|
||||
type: string;
|
||||
value: any;
|
||||
value: Record<string, unknown>;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
specs?: Field;
|
||||
readonly?: boolean;
|
||||
value: any;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
let inputmax: number | undefined = $derived(computeInputmax(specs));
|
||||
let inputmin: number | undefined = $derived(computeInputmin(specs));
|
||||
|
||||
function computeInputmax(specs: any) {
|
||||
function computeInputmax(specs: Field) {
|
||||
if (specs.type) {
|
||||
if (specs.type == "int8" || specs.type == "uint8") return 255;
|
||||
else if (specs.type == "int16" || specs.type == "uint16") return 65536;
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
}
|
||||
return undefined;
|
||||
}
|
||||
function computeInputmin(specs: any) {
|
||||
function computeInputmin(specs: Field) {
|
||||
if (inputmax) {
|
||||
if (specs.type && specs.type.startsWith("uint")) return 0;
|
||||
else return -inputmax - 1;
|
||||
|
|
@ -117,12 +117,16 @@
|
|||
}
|
||||
|
||||
let feedback: string | undefined = $derived(computeFeedback(value));
|
||||
function computeFeedback(val: any) {
|
||||
if (inputmax && val > inputmax) {
|
||||
return t.get("errors.too-high", { max: inputmax });
|
||||
} else if (inputmin && val < inputmin) {
|
||||
return t.get("errors.too-low", { min: inputmin });
|
||||
} else if (
|
||||
function computeFeedback(val: unknown) {
|
||||
if (typeof val === "number") {
|
||||
if (inputmax && val > inputmax) {
|
||||
return t.get("errors.too-high", { max: inputmax });
|
||||
} else if (inputmin && val < inputmin) {
|
||||
return t.get("errors.too-low", { min: inputmin });
|
||||
}
|
||||
}
|
||||
if (
|
||||
typeof val === "string" &&
|
||||
specs.type &&
|
||||
(specs.type === "[]uint8" || specs.type === "[]byte") &&
|
||||
!checkBase64(val)
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@
|
|||
index: string;
|
||||
noDecorate?: boolean;
|
||||
readonly?: boolean;
|
||||
specs: any;
|
||||
specs: Field;
|
||||
type: string;
|
||||
value: any;
|
||||
value: Array<Record<string, any>>;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
readonly = false,
|
||||
specs,
|
||||
type,
|
||||
value = $bindable()
|
||||
value = $bindable(),
|
||||
}: Props = $props();
|
||||
|
||||
let linespecs: Array<Field> | null | undefined = $state(undefined);
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
function addLine() {
|
||||
if (!value) value = [];
|
||||
value.push(linespecs ? {} : "");
|
||||
value.push(linespecs ? {} : ("" as any));
|
||||
value = value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { untrack } from 'svelte';
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
|
|
@ -46,6 +45,7 @@
|
|||
import type { Domain } from "$lib/model/domain";
|
||||
import { groups, domains, newlyGroups, refreshDomains } from "$lib/stores/domains";
|
||||
import { t } from "$lib/translations";
|
||||
import type { HappydnsDomainUpdateInput } from "$lib/api-base";
|
||||
|
||||
interface Props {
|
||||
isOpen?: boolean;
|
||||
|
|
@ -66,15 +66,15 @@
|
|||
if (newgroup.length && mygroups.indexOf(newgroup) < 0) {
|
||||
mygroups.push(newgroup);
|
||||
mygroups = mygroups;
|
||||
newlyGroups.update((gs) => gs.includes(newgroup) ? gs : [...gs, newgroup]);
|
||||
newlyGroups.update((gs) => (gs.includes(newgroup) ? gs : [...gs, newgroup]));
|
||||
}
|
||||
newgroup = "";
|
||||
}
|
||||
|
||||
async function changeGroup(event: Event, domain: Domain) {
|
||||
async function changeGroup(event: Event, id: string, domain: HappydnsDomainUpdateInput) {
|
||||
if (event.currentTarget && event.currentTarget instanceof HTMLSelectElement) {
|
||||
domain.group = event.currentTarget.value;
|
||||
domain = await updateDomain(domain);
|
||||
await updateDomain(id, domain);
|
||||
refreshDomains();
|
||||
}
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
<Input
|
||||
type="select"
|
||||
value={domain.group}
|
||||
on:change={(event) => changeGroup(event, domain)}
|
||||
on:change={(event) => changeGroup(event, domain.id, domain)}
|
||||
>
|
||||
<option value="">{$t("domaingroups.no-group")}</option>
|
||||
{#each mygroups as group}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
interface Props {
|
||||
toggle: () => void;
|
||||
step: number;
|
||||
service?: ServiceCombined | null;
|
||||
service?: ServiceCombined;
|
||||
form?: string;
|
||||
origin?: Domain | undefined;
|
||||
update?: boolean;
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
let {
|
||||
toggle,
|
||||
step,
|
||||
service = $bindable(null),
|
||||
service = $bindable(),
|
||||
form = "addSvcForm",
|
||||
origin = undefined,
|
||||
update = false,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
import { filterServices } from "$lib/components/services/service-filter";
|
||||
import { fqdn } from "$lib/dns";
|
||||
import type { Domain } from "$lib/model/domain";
|
||||
import type { ServiceCombined } from "$lib/model/service.svelte";
|
||||
import type { HappydnsService } from "$lib/api-base/types.gen";
|
||||
import { providers_idx } from "$lib/stores/providers";
|
||||
import { servicesSpecsList, servicesSpecsLoaded } from "$lib/stores/services";
|
||||
import { filteredName } from "$lib/stores/serviceSelector";
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
isOpen?: boolean;
|
||||
origin: Domain;
|
||||
value?: string | null;
|
||||
zservices: Record<string, Array<ServiceCombined>>;
|
||||
zservices: Record<string, Array<HappydnsService>>;
|
||||
}
|
||||
let {
|
||||
isOpen = $bindable(false),
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@
|
|||
edit?: boolean;
|
||||
ptype: string;
|
||||
state: number;
|
||||
providerId?: string | null;
|
||||
value?: ProviderSettingsState | null;
|
||||
providerId?: string;
|
||||
value?: ProviderSettingsState;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
@ -52,12 +52,12 @@
|
|||
edit = false,
|
||||
ptype,
|
||||
state: formstate,
|
||||
providerId = null,
|
||||
value = $bindable(null)
|
||||
providerId,
|
||||
value = $bindable()
|
||||
}: Props = $props();
|
||||
|
||||
//
|
||||
function createProviderForm(ptype: string, providerId: string | null, value: ProviderSettingsState | null, edit: boolean): ProviderForm {
|
||||
function createProviderForm(ptype: string, providerId: string | undefined, value: ProviderSettingsState | undefined, edit: boolean): ProviderForm {
|
||||
const pf = new ProviderForm(
|
||||
ptype,
|
||||
() => refreshProviders().then(() => navigate("/?newProvider")),
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
interface Props {
|
||||
autofocus?: boolean;
|
||||
noButton?: boolean;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let { autofocus = false, noButton = false, ...rest }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
interface Props {
|
||||
filteredProvider?: Provider | null;
|
||||
[key: string]: any
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
let { filteredProvider = $bindable(null), ...rest }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
interface Props {
|
||||
provider: Provider;
|
||||
noDomainsList?: boolean;
|
||||
[key: string]: any
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
let { provider, noDomainsList = $bindable(false), ...rest }: Props = $props();
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
title: $t("domains.attached-new"),
|
||||
message: $t("domains.added-success", { domain: mydomain.domain }),
|
||||
href: "/domains/" + mydomain.domain,
|
||||
color: "success",
|
||||
type: "success",
|
||||
timeout: 5000,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
id_provider?: string | undefined;
|
||||
ptype?: string | undefined;
|
||||
style?: string;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@
|
|||
noLabel?: boolean;
|
||||
noDropdown?: boolean;
|
||||
selectedProvider?: Provider | null;
|
||||
items: Array<any>;
|
||||
items: Array<Provider>;
|
||||
toolbar?: boolean;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
|
|||
|
|
@ -34,20 +34,20 @@
|
|||
interface Props {
|
||||
canDoNext?: boolean;
|
||||
edit?: boolean;
|
||||
form?: CustomForm | null;
|
||||
form?: CustomForm;
|
||||
nextInProgress?: boolean;
|
||||
previousInProgress?: boolean;
|
||||
submitForm?: string | null;
|
||||
[key: string]: any
|
||||
submitForm?: string;
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
let {
|
||||
canDoNext = true,
|
||||
edit = false,
|
||||
form = null,
|
||||
form,
|
||||
nextInProgress = false,
|
||||
previousInProgress = false,
|
||||
submitForm = null,
|
||||
submitForm,
|
||||
...rest
|
||||
}: Props = $props();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@
|
|||
|
||||
interface Props {
|
||||
class?: ClassValue;
|
||||
items: Array<any>;
|
||||
[key: string]: any;
|
||||
items: Array<Provider>;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let { class: className = "", items, ...rest }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
import { filteredName } from "$lib/stores/serviceSelector";
|
||||
import { t } from "$lib/translations";
|
||||
interface Props {
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let { ...rest }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
interface Props {
|
||||
isPropagating?: boolean;
|
||||
localeString?: string;
|
||||
propagatedAt?: string | null;
|
||||
propagatedAt?: Date;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
@ -39,8 +39,6 @@
|
|||
localeString = "service.propagation-remaining",
|
||||
}: Props = $props();
|
||||
|
||||
let _propagatedAt = $derived(propagatedAt ? new Date(propagatedAt) : null);
|
||||
|
||||
let countdown = $state("");
|
||||
let interval: ReturnType<typeof setInterval>;
|
||||
|
||||
|
|
@ -49,15 +47,15 @@
|
|||
});
|
||||
|
||||
$effect(() => {
|
||||
if (_propagatedAt) {
|
||||
isPropagating = _propagatedAt > new Date();
|
||||
if (propagatedAt) {
|
||||
isPropagating = propagatedAt > new Date();
|
||||
|
||||
if (interval) clearInterval(interval);
|
||||
|
||||
countdown = formatCountdown(_propagatedAt);
|
||||
countdown = formatCountdown(propagatedAt);
|
||||
interval = setInterval(() => {
|
||||
countdown = formatCountdown(_propagatedAt);
|
||||
if (_propagatedAt <= new Date()) {
|
||||
countdown = formatCountdown(propagatedAt!);
|
||||
if (propagatedAt! <= new Date()) {
|
||||
isPropagating = false;
|
||||
clearInterval(interval);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,14 +28,12 @@
|
|||
import PropagationCountdown from "./PropagationCountdown.svelte";
|
||||
|
||||
interface Props {
|
||||
propagatedAt?: string | null;
|
||||
propagatedAt?: Date;
|
||||
}
|
||||
|
||||
let { propagatedAt }: Props = $props();
|
||||
|
||||
let _propagatedAt = $derived(propagatedAt ? new Date(propagatedAt) : null);
|
||||
|
||||
let isPropagating = $derived(_propagatedAt && _propagatedAt > new Date());
|
||||
let isPropagating = $derived(propagatedAt && propagatedAt > new Date());
|
||||
</script>
|
||||
|
||||
{#if isPropagating}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
|
||||
interface Props {
|
||||
specs: ServiceSpec;
|
||||
value: any;
|
||||
aservice: Snippet<[string, any]>;
|
||||
value: Record<string, any>;
|
||||
aservice: Snippet<[string, unknown]>;
|
||||
}
|
||||
|
||||
let { specs, value = $bindable(), aservice }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
dn: string;
|
||||
origin: Domain;
|
||||
type: string;
|
||||
value: any;
|
||||
value: Record<string, any>;
|
||||
}
|
||||
|
||||
let { dn, origin, type, value = $bindable({}) }: Props = $props();
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
const path = `./editors/${filename}`;
|
||||
|
||||
if (editorModules[path]) {
|
||||
const module = await editorModules[path]() as { default: any };
|
||||
const module = await editorModules[path]() as { default: typeof OrphanEditor };
|
||||
return module.default;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
export let type: string;
|
||||
export let value: any;
|
||||
export let aservice: Snippet<[string, any]>;
|
||||
export let aservice: Snippet<[string, unknown]>;
|
||||
</script>
|
||||
|
||||
{#if type.startsWith("[]")}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
import { filterServices } from "./service-filter";
|
||||
import type { Domain } from "$lib/model/domain";
|
||||
import type { ProviderInfos } from "$lib/model/provider";
|
||||
import type { ServiceCombined } from "$lib/model/service.svelte";
|
||||
import type { HappydnsService } from "$lib/api-base/types.gen";
|
||||
import { providers_idx } from "$lib/stores/providers";
|
||||
import { servicesSpecsList, servicesSpecsLoaded } from "$lib/stores/services";
|
||||
import { filteredName } from "$lib/stores/serviceSelector";
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
dn: string;
|
||||
origin: Domain;
|
||||
value?: string | null;
|
||||
zservices: Record<string, Array<ServiceCombined>>;
|
||||
zservices: Record<string, Array<HappydnsService>>;
|
||||
}
|
||||
|
||||
let { dn, origin, value = $bindable(null), zservices }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
interface Props {
|
||||
dn: string;
|
||||
origin: Domain;
|
||||
value: any;
|
||||
value: Record<string, any>;
|
||||
}
|
||||
|
||||
let { dn, origin, value = $bindable({}) }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
interface Props {
|
||||
dn: string;
|
||||
origin: Domain;
|
||||
value: any;
|
||||
value: Record<string, any>;
|
||||
}
|
||||
|
||||
let { dn, origin, value = $bindable({}) }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
dn: string;
|
||||
origin: Domain;
|
||||
readonly?: boolean;
|
||||
value: dnsResource;
|
||||
value: Record<string, any>;
|
||||
}
|
||||
|
||||
let { dn, origin, readonly = false, value = $bindable({}) }: Props = $props();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
f: fields.slice(1),
|
||||
};
|
||||
}
|
||||
function stringifySPF(val: any) {
|
||||
function stringifySPF(val: { v?: string; f: string[] }) {
|
||||
return "v=" + (val["v"] ? val["v"] : "spf1") + " " + val.f.join(" ");
|
||||
}
|
||||
let val = $state(parseSPF(value["txt"]?.Txt || "v=spf1 -all"));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { nsrrtype } from "$lib/dns";
|
||||
import type { ServiceCombined } from "$lib/model/service.svelte";
|
||||
import type { HappydnsService } from "$lib/api-base/types.gen";
|
||||
import { passRestrictions, type ServiceInfos } from "$lib/model/service_specs.svelte";
|
||||
import type { ProviderInfos } from "$lib/model/provider";
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ export interface FilteredServices {
|
|||
export function filterServices(
|
||||
servicesList: ServiceInfos[],
|
||||
providerSpecs: ProviderInfos,
|
||||
zservices: Record<string, Array<ServiceCombined>>,
|
||||
zservices: Record<string, Array<HappydnsService>>,
|
||||
dn: string,
|
||||
filteredName: string,
|
||||
filteredFamily: string | null = null
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
});
|
||||
dispatchSelectionSummary();
|
||||
},
|
||||
(err: any) => {
|
||||
(err: unknown) => {
|
||||
dispatch("error", err);
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { createEventDispatcher, type Snippet } from "svelte";
|
||||
|
||||
import { Badge } from "@sveltestrap/sveltestrap";
|
||||
import { ListGroup } from "@sveltestrap/sveltestrap";
|
||||
|
|
@ -47,9 +47,9 @@
|
|||
display_by_groups?: boolean;
|
||||
show_empty_groups?: boolean;
|
||||
domains?: Array<ZoneListDomain>;
|
||||
no_domain?: import("svelte").Snippet;
|
||||
badges?: import("svelte").Snippet<[any]>;
|
||||
[key: string]: any;
|
||||
no_domain?: Snippet;
|
||||
badges?: Snippet<[{ domain: ZoneListDomain }]>;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
@ -63,7 +63,12 @@
|
|||
...rest
|
||||
}: Props = $props();
|
||||
|
||||
function genGroups(domains: Array<ZoneListDomain>, display_by_groups: boolean, show_empty_groups: boolean, extraGroups: Array<string>) {
|
||||
function genGroups(
|
||||
domains: Array<ZoneListDomain>,
|
||||
display_by_groups: boolean,
|
||||
show_empty_groups: boolean,
|
||||
extraGroups: Array<string>,
|
||||
) {
|
||||
if (!display_by_groups) {
|
||||
return { "": domains };
|
||||
}
|
||||
|
|
@ -86,10 +91,7 @@
|
|||
return groups;
|
||||
}
|
||||
|
||||
let localDomains: Array<ZoneListDomain> = $state([...domains]);
|
||||
$effect(() => {
|
||||
localDomains = [...domains];
|
||||
});
|
||||
let localDomains: Array<ZoneListDomain> = $derived([...domains]);
|
||||
|
||||
let groups: Record<string, Array<ZoneListDomain>> = $derived(
|
||||
genGroups(localDomains, display_by_groups, show_empty_groups, $newlyGroups),
|
||||
|
|
@ -116,7 +118,7 @@
|
|||
|
||||
fullDomain.group = targetGroup;
|
||||
try {
|
||||
await updateDomain(fullDomain);
|
||||
await updateDomain(fullDomain.id, { group: targetGroup });
|
||||
refreshDomains();
|
||||
} catch {
|
||||
// Revert on error
|
||||
|
|
@ -150,14 +152,15 @@
|
|||
{@render no_domain?.()}
|
||||
{:else}
|
||||
{#each Object.keys(groups).sort((a, b) => {
|
||||
const aEmpty = groups[a].length === 0;
|
||||
const bEmpty = groups[b].length === 0;
|
||||
if (aEmpty !== bEmpty) return aEmpty ? 1 : -1;
|
||||
if (!a || !b) return !a ? 1 : -1;
|
||||
return a.toLowerCase().localeCompare(b.toLowerCase());
|
||||
}) as gname}
|
||||
const aEmpty = groups[a].length === 0;
|
||||
const bEmpty = groups[b].length === 0;
|
||||
if (aEmpty !== bEmpty) return aEmpty ? 1 : -1;
|
||||
if (!a || !b) return !a ? 1 : -1;
|
||||
return a.toLowerCase().localeCompare(b.toLowerCase());
|
||||
}) as gname}
|
||||
{@const gdomains = groups[gname]}
|
||||
<div
|
||||
role="list"
|
||||
class:mb-2={Object.keys(groups).length != 1}
|
||||
class:drag-over={display_by_groups && dragOverGroup === gname}
|
||||
ondragover={display_by_groups
|
||||
|
|
@ -253,9 +256,6 @@
|
|||
</div>
|
||||
|
||||
<style>
|
||||
.draggable-item {
|
||||
cursor: grab;
|
||||
}
|
||||
.drag-over {
|
||||
background-color: var(--bs-primary-bg-subtle, #cfe2ff);
|
||||
border-radius: 0.25rem;
|
||||
|
|
|
|||
|
|
@ -502,7 +502,7 @@ function collectFieldRRs(type: string, value: any, rrs: dnsRR[]) {
|
|||
type === "happydns.TXT" ||
|
||||
type === "happydns.SPF"
|
||||
) {
|
||||
rrs.push(value);
|
||||
rrs.push(value as dnsRR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -517,7 +517,7 @@ function collectFieldRRs(type: string, value: any, rrs: dnsRR[]) {
|
|||
* @param value - The service instance value (ServiceCombined.Service).
|
||||
* @returns An array of dnsRR objects contained in the service.
|
||||
*/
|
||||
export function collectRRs(fields: Array<{ type: string; id: string }> | null, value: any): dnsRR[] {
|
||||
export function collectRRs(fields: Array<{ type: string; id: string }> | null, value: Record<string, unknown> | null | undefined): dnsRR[] {
|
||||
if (!fields || !value) return [];
|
||||
const rrs: dnsRR[] = [];
|
||||
for (const field of fields) {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,8 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export interface Correction {
|
||||
id?: string;
|
||||
msg: string;
|
||||
kind?: number;
|
||||
}
|
||||
import type { HappydnsCorrection } from "$lib/api-base/types.gen";
|
||||
|
||||
export interface FullCorrection {
|
||||
id: string;
|
||||
msg: string;
|
||||
kind: number;
|
||||
}
|
||||
export type Correction = Omit<HappydnsCorrection, 'kind'> & { kind?: number };
|
||||
|
||||
export type FullCorrection = Required<Omit<HappydnsCorrection, 'kind'>> & { kind: number };
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export class CustomForm {
|
|||
}
|
||||
|
||||
export class FormState {
|
||||
_id? = $state<any>();
|
||||
_id? = $state<string>();
|
||||
_comment? = $state<string>();
|
||||
state = $state<number>(0);
|
||||
recall? = $state<string>();
|
||||
|
|
|
|||
|
|
@ -19,15 +19,10 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export interface ZoneHistory {
|
||||
id: string;
|
||||
id_author: string;
|
||||
default_ttl: number;
|
||||
last_modified: Date;
|
||||
commit_message: string;
|
||||
commit_date: Date;
|
||||
published?: Date;
|
||||
}
|
||||
import type { HappydnsDomainLog, HappydnsDomainWithZoneMetadata, HappydnsZoneMeta } from "$lib/api-base/types.gen";
|
||||
|
||||
export type ZoneHistory = Omit<HappydnsZoneMeta, 'commit_message' | 'commit_date' | 'parent'>
|
||||
& { commit_message: string; commit_date: Date };
|
||||
|
||||
export interface MiniDomain {
|
||||
id_provider: string;
|
||||
|
|
@ -37,18 +32,10 @@ export interface MiniDomain {
|
|||
wait?: boolean;
|
||||
}
|
||||
|
||||
export interface Domain extends MiniDomain {
|
||||
id: string;
|
||||
id_owner: string;
|
||||
export interface Domain extends Omit<HappydnsDomainWithZoneMetadata, 'zone_meta' | 'group'> {
|
||||
group: string;
|
||||
zone_history: Array<string>;
|
||||
wait?: boolean;
|
||||
zone_meta?: Record<string, ZoneHistory>;
|
||||
}
|
||||
|
||||
export interface DomainLog {
|
||||
id: string;
|
||||
id_user: string;
|
||||
date: Date;
|
||||
content: string;
|
||||
level: number;
|
||||
}
|
||||
export type DomainLog = HappydnsDomainLog;
|
||||
|
|
|
|||
|
|
@ -19,12 +19,9 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export interface ProviderInfos {
|
||||
name: string;
|
||||
description: string;
|
||||
capabilities: Array<string>;
|
||||
helplink: string;
|
||||
}
|
||||
import type { HappydnsProviderInfos, HappydnsProviderMeta } from "$lib/api-base/types.gen";
|
||||
|
||||
export type ProviderInfos = Required<HappydnsProviderInfos>;
|
||||
|
||||
export function getAvailableResourceTypes(pi: ProviderInfos): Array<number> {
|
||||
const availableResourceTypes = [];
|
||||
|
|
@ -40,19 +37,12 @@ export function getAvailableResourceTypes(pi: ProviderInfos): Array<number> {
|
|||
|
||||
export type ProviderList = Record<string, ProviderInfos>;
|
||||
|
||||
export interface ProviderMeta {
|
||||
_srctype: string;
|
||||
_id: string;
|
||||
_ownerid: string;
|
||||
export interface ProviderMeta extends Omit<HappydnsProviderMeta, '_comment'> {
|
||||
_comment: string;
|
||||
}
|
||||
|
||||
export interface ProviderData extends ProviderMeta {
|
||||
Provider: any;
|
||||
}
|
||||
|
||||
export interface Provider extends ProviderMeta {
|
||||
Provider: any;
|
||||
Provider: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export function isProvider(e: unknown): e is Provider {
|
||||
|
|
|
|||
|
|
@ -19,9 +19,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export interface ResolverForm {
|
||||
domain: string;
|
||||
type: string;
|
||||
resolver: string;
|
||||
custom?: string;
|
||||
}
|
||||
import type { HappydnsResolverRequest } from "$lib/api-base/types.gen";
|
||||
|
||||
export type ResolverForm = Required<Pick<HappydnsResolverRequest, 'domain' | 'type' | 'resolver'>>
|
||||
& Pick<HappydnsResolverRequest, 'custom'>;
|
||||
|
|
|
|||
|
|
@ -19,17 +19,28 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import type { HappydnsService } from "$lib/api-base/types.gen";
|
||||
|
||||
/**
|
||||
* Narrows the generated HappydnsService.Service from `unknown` to its
|
||||
* actual runtime shape so callers can bind and index into it safely.
|
||||
*/
|
||||
export interface ServiceWithValue extends HappydnsService {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- dynamic service value from Go backend
|
||||
Service: Record<string, any>;
|
||||
}
|
||||
|
||||
export class ServiceMeta {
|
||||
_svctype = $state<string>('');
|
||||
_svctype = $state<string>("");
|
||||
_id? = $state<string | undefined>(undefined);
|
||||
_ownerid? = $state<string | undefined>(undefined);
|
||||
_domain = $state<string>('');
|
||||
_ttl? = $state<number | undefined>(undefined);
|
||||
_domain = $state<string>("");
|
||||
_ttl = $state<number>(0);
|
||||
_comment? = $state<string | undefined>(undefined);
|
||||
_mycomment? = $state<string | undefined>(undefined);
|
||||
_aliases? = $state<Array<string> | undefined>(undefined);
|
||||
_tmp_hint_nb? = $state<number | undefined>(undefined);
|
||||
_propagated_at? = $state<string | undefined>(undefined);
|
||||
_tmp_hint_nb = $state<number>(0);
|
||||
_propagated_at? = $state<Date | undefined>(undefined);
|
||||
|
||||
constructor(init?: {
|
||||
_svctype: string;
|
||||
|
|
@ -41,7 +52,7 @@ export class ServiceMeta {
|
|||
_mycomment?: string;
|
||||
_aliases?: Array<string>;
|
||||
_tmp_hint_nb?: number;
|
||||
_propagated_at?: string;
|
||||
_propagated_at?: Date;
|
||||
}) {
|
||||
if (init) {
|
||||
this._svctype = init._svctype;
|
||||
|
|
@ -74,7 +85,7 @@ export class ServiceMeta {
|
|||
}
|
||||
|
||||
export class ServiceCombined extends ServiceMeta {
|
||||
Service = $state<any>(null);
|
||||
Service = $state<Record<string, any>>({});
|
||||
|
||||
constructor(init?: {
|
||||
_svctype: string;
|
||||
|
|
@ -86,8 +97,8 @@ export class ServiceCombined extends ServiceMeta {
|
|||
_mycomment?: string;
|
||||
_aliases?: Array<string>;
|
||||
_tmp_hint_nb?: number;
|
||||
_propagated_at?: string;
|
||||
Service?: any;
|
||||
_propagated_at?: Date;
|
||||
Service?: Record<string, any>;
|
||||
}) {
|
||||
super(init);
|
||||
if (init?.Service !== undefined) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import { get } from "svelte/store";
|
|||
import { getRrtype, newRR } from "$lib/dns_rr";
|
||||
import type { Field } from "$lib/model/custom_form.svelte";
|
||||
import { getAvailableResourceTypes, type ProviderInfos } from "$lib/model/provider";
|
||||
import type { ServiceCombined } from "$lib/model/service.svelte";
|
||||
import type { HappydnsService } from "$lib/api-base/types.gen";
|
||||
import { servicesSpecs, servicesSpecsLoaded } from "$lib/stores/services";
|
||||
|
||||
export const SERVICE_FAMILY_ABSTRACT = "abstract";
|
||||
|
|
@ -94,7 +94,7 @@ export class ServiceSpec {
|
|||
export function passRestrictions(
|
||||
svcinfo: ServiceInfos,
|
||||
provider_specs: ProviderInfos,
|
||||
zservices: Record<string, Array<ServiceCombined>>,
|
||||
zservices: Record<string, Array<HappydnsService>>,
|
||||
dn: string,
|
||||
): null | string {
|
||||
if (svcinfo.restrictions) {
|
||||
|
|
|
|||
|
|
@ -19,15 +19,6 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
export interface Session {
|
||||
id: string;
|
||||
login: string;
|
||||
description: string;
|
||||
time: Date;
|
||||
exp: Date;
|
||||
upd: Date;
|
||||
content: string;
|
||||
import type { HappydnsSession } from "$lib/api-base/types.gen";
|
||||
|
||||
// Used by the interface
|
||||
delete_in_progress: boolean;
|
||||
}
|
||||
export type Session = Omit<HappydnsSession, 'content'> & { content: string };
|
||||
|
|
|
|||
|
|
@ -20,11 +20,13 @@
|
|||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import type { Color } from "@sveltestrap/sveltestrap";
|
||||
import { navigate } from "$lib/stores/config";
|
||||
|
||||
export interface NewToast {
|
||||
type?: "info" | "success" | "warning" | "error";
|
||||
title?: string;
|
||||
message?: string;
|
||||
href?: string;
|
||||
timeout?: number | undefined;
|
||||
onclick?: () => void;
|
||||
}
|
||||
|
|
@ -46,6 +48,16 @@ export class Toast implements NewToast {
|
|||
if (obj.title !== undefined) this.title = obj.title;
|
||||
if (obj.message !== undefined) this.message = obj.message;
|
||||
if (obj.onclick !== undefined) this.onclick = obj.onclick;
|
||||
if (obj.href !== undefined && this.onclick === undefined) {
|
||||
const href = obj.href;
|
||||
this.onclick = () => {
|
||||
if (href.startsWith('/')) {
|
||||
navigate(href);
|
||||
} else {
|
||||
window.location.href = href;
|
||||
}
|
||||
};
|
||||
}
|
||||
this.timeout = obj.timeout;
|
||||
|
||||
this.dismissFunc = dismiss;
|
||||
|
|
@ -61,7 +73,9 @@ export class Toast implements NewToast {
|
|||
if (this.timeoutInterval === undefined) return;
|
||||
clearTimeout(this.timeoutInterval);
|
||||
this.timeoutInterval = undefined;
|
||||
this.remainingTime = (this.remainingTime ?? this.timeout ?? 0) - (Date.now() - (this.startTime ?? Date.now()));
|
||||
this.remainingTime =
|
||||
(this.remainingTime ?? this.timeout ?? 0) -
|
||||
(Date.now() - (this.startTime ?? Date.now()));
|
||||
}
|
||||
|
||||
resume() {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import type { HappydnsUser } from "$lib/api-base/types.gen";
|
||||
import type { UserSettings } from "./usersettings";
|
||||
|
||||
export interface SignUpForm {
|
||||
|
|
@ -35,10 +36,4 @@ export interface LoginForm {
|
|||
captcha_token?: string;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
created_at: Date;
|
||||
last_seen: Date;
|
||||
settings: UserSettings;
|
||||
}
|
||||
export type User = Omit<HappydnsUser, 'settings'> & { settings: UserSettings };
|
||||
|
|
|
|||
|
|
@ -32,11 +32,6 @@ export const ApplyConfirmUnexpected = 0;
|
|||
export const ApplyConfirmAlways = 1;
|
||||
export const ApplyConfirmNever = 2;
|
||||
|
||||
export interface UserSettings {
|
||||
language: string;
|
||||
newsletter: boolean;
|
||||
fieldhint: number;
|
||||
zoneview: number;
|
||||
applyconfirm: number;
|
||||
showrrtypes: boolean;
|
||||
}
|
||||
import type { HappydnsUserSettings } from "$lib/api-base/types.gen";
|
||||
|
||||
export type UserSettings = Required<HappydnsUserSettings>;
|
||||
|
|
|
|||
|
|
@ -19,26 +19,19 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import type { ServiceCombined } from "$lib/model/service.svelte";
|
||||
import type { HappydnsZoneMeta } from "$lib/api-base/types.gen";
|
||||
import type { ServiceWithValue } from "$lib/model/service.svelte";
|
||||
|
||||
export interface ServiceRecord {
|
||||
str: string;
|
||||
rr: any; // dns.RR
|
||||
rr: Record<string, unknown>; // dns.RR
|
||||
|
||||
// ui
|
||||
edit?: boolean;
|
||||
}
|
||||
|
||||
export interface ZoneMeta {
|
||||
id: string;
|
||||
id_author: string;
|
||||
default_ttl: Number;
|
||||
last_modified: Date;
|
||||
commit_message?: string;
|
||||
commit_date?: Date;
|
||||
published?: Date;
|
||||
}
|
||||
export type ZoneMeta = HappydnsZoneMeta;
|
||||
|
||||
export interface Zone extends ZoneMeta {
|
||||
services: Record<string, Array<ServiceCombined>>;
|
||||
services: Record<string, Array<ServiceWithValue>>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,11 +31,11 @@ export interface DKIMValue {
|
|||
s?: string[];
|
||||
t?: string[];
|
||||
f?: string[];
|
||||
[key: string]: any;
|
||||
[key: string]: string | string[] | undefined;
|
||||
}
|
||||
|
||||
export function parseDKIM(val: string): DKIMValue {
|
||||
const kv = parseKeyValueTxt(val) as any;
|
||||
const kv = parseKeyValueTxt(val);
|
||||
|
||||
return {
|
||||
...kv,
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ export const thisAliases = derived(thisZone, ($thisZone) => {
|
|||
|
||||
Object.entries($thisZone.services).forEach(([dn, services]) => {
|
||||
services?.forEach((svc) => {
|
||||
if (svc._svctype === "svcs.CNAME") {
|
||||
const target = svc.Service.Target;
|
||||
if (svc._svctype === "svcs.CNAME" && svc.Service && typeof svc.Service === "object") {
|
||||
const target = (svc.Service as Record<string, unknown>).Target as string;
|
||||
aliases[target] = [...(aliases[target] || []), dn];
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -55,4 +55,4 @@ function createToastsStore() {
|
|||
};
|
||||
}
|
||||
|
||||
export const toasts: any = createToastsStore();
|
||||
export const toasts = createToastsStore();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
* @returns A mock Response object
|
||||
*/
|
||||
export function createMockResponse(
|
||||
data: any,
|
||||
data: unknown,
|
||||
status: number = 200,
|
||||
statusText: string = "OK"
|
||||
): Response {
|
||||
|
|
@ -57,6 +57,6 @@ export function createMockResponse(
|
|||
* @param status HTTP status code (default: 200)
|
||||
* @returns A mock fetch function
|
||||
*/
|
||||
export function createMockFetch(data: any, status: number = 200) {
|
||||
export function createMockFetch(data: unknown, status: number = 200) {
|
||||
return () => Promise.resolve(createMockResponse(data, status));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import type { Field } from "$lib/model/custom_form.svelte";
|
||||
|
||||
export function fillUndefinedValues(value: any, spec: Field) {
|
||||
export function fillUndefinedValues(value: Record<string, unknown>, spec: Field) {
|
||||
if (value[spec.id] === undefined && spec.type.length) {
|
||||
let vartype = spec.type;
|
||||
if (vartype[0] == "*") vartype = vartype.substring(1);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
title: $t("domains.attached-new"),
|
||||
message: $t("domains.added-success", { domain: domain.domain }),
|
||||
href: "/domains/" + domain.domain,
|
||||
color: "success",
|
||||
type: "success",
|
||||
timeout: 5000,
|
||||
});
|
||||
refreshDomains();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue