Update scheme

This commit is contained in:
c0re100 2022-03-31 16:54:35 +08:00
parent f70d5bf7e6
commit 36a547a560
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 92 additions and 0 deletions

View file

@ -4761,6 +4761,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
case TypeInternalLinkTypeLanguagePack:
return UnmarshalInternalLinkTypeLanguagePack(result.Data)
case TypeInternalLinkTypeLanguageSettings:
return UnmarshalInternalLinkTypeLanguageSettings(result.Data)
case TypeInternalLinkTypeMessage:
return UnmarshalInternalLinkTypeMessage(result.Data)
@ -4773,6 +4776,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
case TypeInternalLinkTypePhoneNumberConfirmation:
return UnmarshalInternalLinkTypePhoneNumberConfirmation(result.Data)
case TypeInternalLinkTypePrivacyAndSecuritySettings:
return UnmarshalInternalLinkTypePrivacyAndSecuritySettings(result.Data)
case TypeInternalLinkTypeProxy:
return UnmarshalInternalLinkTypeProxy(result.Data)

View file

@ -1090,10 +1090,12 @@ const (
TypeInternalLinkTypeFilterSettings = "internalLinkTypeFilterSettings"
TypeInternalLinkTypeGame = "internalLinkTypeGame"
TypeInternalLinkTypeLanguagePack = "internalLinkTypeLanguagePack"
TypeInternalLinkTypeLanguageSettings = "internalLinkTypeLanguageSettings"
TypeInternalLinkTypeMessage = "internalLinkTypeMessage"
TypeInternalLinkTypeMessageDraft = "internalLinkTypeMessageDraft"
TypeInternalLinkTypePassportDataRequest = "internalLinkTypePassportDataRequest"
TypeInternalLinkTypePhoneNumberConfirmation = "internalLinkTypePhoneNumberConfirmation"
TypeInternalLinkTypePrivacyAndSecuritySettings = "internalLinkTypePrivacyAndSecuritySettings"
TypeInternalLinkTypeProxy = "internalLinkTypeProxy"
TypeInternalLinkTypePublicChat = "internalLinkTypePublicChat"
TypeInternalLinkTypeQrCodeAuthentication = "internalLinkTypeQrCodeAuthentication"
@ -26553,6 +26555,31 @@ func (*InternalLinkTypeLanguagePack) InternalLinkTypeType() string {
return TypeInternalLinkTypeLanguagePack
}
// The link is a link to the language settings section of the app
type InternalLinkTypeLanguageSettings struct{
meta
}
func (entity *InternalLinkTypeLanguageSettings) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub InternalLinkTypeLanguageSettings
return json.Marshal((*stub)(entity))
}
func (*InternalLinkTypeLanguageSettings) GetClass() string {
return ClassInternalLinkType
}
func (*InternalLinkTypeLanguageSettings) GetType() string {
return TypeInternalLinkTypeLanguageSettings
}
func (*InternalLinkTypeLanguageSettings) InternalLinkTypeType() string {
return TypeInternalLinkTypeLanguageSettings
}
// The link is a link to a Telegram message. Call getMessageLinkInfo with the given URL to process the link
type InternalLinkTypeMessage struct {
meta
@ -26673,6 +26700,31 @@ func (*InternalLinkTypePhoneNumberConfirmation) InternalLinkTypeType() string {
return TypeInternalLinkTypePhoneNumberConfirmation
}
// The link is a link to the privacy and security settings section of the app
type InternalLinkTypePrivacyAndSecuritySettings struct{
meta
}
func (entity *InternalLinkTypePrivacyAndSecuritySettings) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub InternalLinkTypePrivacyAndSecuritySettings
return json.Marshal((*stub)(entity))
}
func (*InternalLinkTypePrivacyAndSecuritySettings) GetClass() string {
return ClassInternalLinkType
}
func (*InternalLinkTypePrivacyAndSecuritySettings) GetType() string {
return TypeInternalLinkTypePrivacyAndSecuritySettings
}
func (*InternalLinkTypePrivacyAndSecuritySettings) InternalLinkTypeType() string {
return TypeInternalLinkTypePrivacyAndSecuritySettings
}
// The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy
type InternalLinkTypeProxy struct {
meta

View file

@ -3699,6 +3699,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
case TypeInternalLinkTypeLanguagePack:
return UnmarshalInternalLinkTypeLanguagePack(data)
case TypeInternalLinkTypeLanguageSettings:
return UnmarshalInternalLinkTypeLanguageSettings(data)
case TypeInternalLinkTypeMessage:
return UnmarshalInternalLinkTypeMessage(data)
@ -3711,6 +3714,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
case TypeInternalLinkTypePhoneNumberConfirmation:
return UnmarshalInternalLinkTypePhoneNumberConfirmation(data)
case TypeInternalLinkTypePrivacyAndSecuritySettings:
return UnmarshalInternalLinkTypePrivacyAndSecuritySettings(data)
case TypeInternalLinkTypeProxy:
return UnmarshalInternalLinkTypeProxy(data)
@ -10764,6 +10770,14 @@ func UnmarshalInternalLinkTypeLanguagePack(data json.RawMessage) (*InternalLinkT
return &resp, err
}
func UnmarshalInternalLinkTypeLanguageSettings(data json.RawMessage) (*InternalLinkTypeLanguageSettings, error) {
var resp InternalLinkTypeLanguageSettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInternalLinkTypeMessage(data json.RawMessage) (*InternalLinkTypeMessage, error) {
var resp InternalLinkTypeMessage
@ -10796,6 +10810,14 @@ func UnmarshalInternalLinkTypePhoneNumberConfirmation(data json.RawMessage) (*In
return &resp, err
}
func UnmarshalInternalLinkTypePrivacyAndSecuritySettings(data json.RawMessage) (*InternalLinkTypePrivacyAndSecuritySettings, error) {
var resp InternalLinkTypePrivacyAndSecuritySettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInternalLinkTypeProxy(data json.RawMessage) (*InternalLinkTypeProxy, error) {
var resp InternalLinkTypeProxy
@ -14813,6 +14835,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInternalLinkTypeLanguagePack:
return UnmarshalInternalLinkTypeLanguagePack(data)
case TypeInternalLinkTypeLanguageSettings:
return UnmarshalInternalLinkTypeLanguageSettings(data)
case TypeInternalLinkTypeMessage:
return UnmarshalInternalLinkTypeMessage(data)
@ -14825,6 +14850,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInternalLinkTypePhoneNumberConfirmation:
return UnmarshalInternalLinkTypePhoneNumberConfirmation(data)
case TypeInternalLinkTypePrivacyAndSecuritySettings:
return UnmarshalInternalLinkTypePrivacyAndSecuritySettings(data)
case TypeInternalLinkTypeProxy:
return UnmarshalInternalLinkTypeProxy(data)

View file

@ -3323,6 +3323,9 @@ internalLinkTypeGame bot_username:string game_short_name:string = InternalLinkTy
//@description The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link @language_pack_id Language pack identifier
internalLinkTypeLanguagePack language_pack_id:string = InternalLinkType;
//@description The link is a link to the language settings section of the app
internalLinkTypeLanguageSettings = InternalLinkType;
//@description The link is a link to a Telegram message. Call getMessageLinkInfo with the given URL to process the link @url URL to be passed to getMessageLinkInfo
internalLinkTypeMessage url:string = InternalLinkType;
@ -3339,6 +3342,9 @@ internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:st
//@hash Hash value from the link @phone_number Phone number value from the link
internalLinkTypePhoneNumberConfirmation hash:string phone_number:string = InternalLinkType;
//@description The link is a link to the privacy and security settings section of the app
internalLinkTypePrivacyAndSecuritySettings = InternalLinkType;
//@description The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy
//@server Proxy server IP address @port Proxy server port @type Type of the proxy
internalLinkTypeProxy server:string port:int32 type:ProxyType = InternalLinkType;