mirror of
https://github.com/rclone/rclone.git
synced 2025-01-22 14:19:56 +01:00
vendor: update github.com/dropbox/dropbox-sdk-go-unofficial to fix #1806
This commit is contained in:
parent
e00616b016
commit
5061aaaf46
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -89,7 +89,7 @@
|
|||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/dropbox/dropbox-sdk-go-unofficial"
|
name = "github.com/dropbox/dropbox-sdk-go-unofficial"
|
||||||
packages = ["dropbox","dropbox/async","dropbox/file_properties","dropbox/files"]
|
packages = ["dropbox","dropbox/async","dropbox/file_properties","dropbox/files"]
|
||||||
revision = "9a536e3b58ed271dc9d1f21681db990ca601a551"
|
revision = "9befe8c89b6e17667716dedd2f62327bae374bf2"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/go-ini/ini"
|
name = "github.com/go-ini/ini"
|
||||||
@ -309,6 +309,6 @@
|
|||||||
[solve-meta]
|
[solve-meta]
|
||||||
analyzer-name = "dep"
|
analyzer-name = "dep"
|
||||||
analyzer-version = 1
|
analyzer-version = 1
|
||||||
inputs-digest = "9d4dcfb143037fc27aa71f0eb309c9754ba348ff7585a39e575fba28265cac7d"
|
inputs-digest = "4dfe75b3ebfff3e7b40e2983d8c014f9e4d98fed08c3fe454f1dc890589e6960"
|
||||||
solver-name = "gps-cdcl"
|
solver-name = "gps-cdcl"
|
||||||
solver-version = 1
|
solver-version = 1
|
||||||
|
3
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/.gitignore
generated
vendored
3
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/.gitignore
generated
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# jetbrains
|
||||||
|
.idea
|
||||||
|
|
||||||
# swap
|
# swap
|
||||||
[._]*.s[a-w][a-z]
|
[._]*.s[a-w][a-z]
|
||||||
[._]s[a-w][a-z]
|
[._]s[a-w][a-z]
|
||||||
|
6
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth/client.go
generated
vendored
6
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth/client.go
generated
vendored
@ -99,7 +99,7 @@ func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAut
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -158,7 +158,7 @@ func (dbx *apiImpl) TokenRevoke() (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -172,7 +172,7 @@ func (dbx *apiImpl) TokenRevoke() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
165
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/common/types.go
generated
vendored
165
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/common/types.go
generated
vendored
@ -27,26 +27,13 @@ import (
|
|||||||
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
|
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InvalidPathRootError : has no documentation (yet)
|
|
||||||
type InvalidPathRootError struct {
|
|
||||||
// PathRoot : The latest path root id for user's team if the user is still
|
|
||||||
// in a team.
|
|
||||||
PathRoot string `json:"path_root,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewInvalidPathRootError returns a new InvalidPathRootError instance
|
|
||||||
func NewInvalidPathRootError() *InvalidPathRootError {
|
|
||||||
s := new(InvalidPathRootError)
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
// PathRoot : has no documentation (yet)
|
// PathRoot : has no documentation (yet)
|
||||||
type PathRoot struct {
|
type PathRoot struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
// Team : Paths are relative to the given team directory. (This results in
|
// Root : Paths are relative to the authenticating user's root namespace
|
||||||
// `PathRootError.invalid` if the user is not a member of the team
|
// (This results in `PathRootError.invalid_root` if the user's root
|
||||||
// associated with that path root id.).
|
// namespace has changed.).
|
||||||
Team string `json:"team,omitempty"`
|
Root string `json:"root,omitempty"`
|
||||||
// NamespaceId : Paths are relative to given namespace id (This results in
|
// NamespaceId : Paths are relative to given namespace id (This results in
|
||||||
// `PathRootError.no_permission` if you don't have access to this
|
// `PathRootError.no_permission` if you don't have access to this
|
||||||
// namespace.).
|
// namespace.).
|
||||||
@ -56,9 +43,7 @@ type PathRoot struct {
|
|||||||
// Valid tag values for PathRoot
|
// Valid tag values for PathRoot
|
||||||
const (
|
const (
|
||||||
PathRootHome = "home"
|
PathRootHome = "home"
|
||||||
PathRootMemberHome = "member_home"
|
PathRootRoot = "root"
|
||||||
PathRootTeam = "team"
|
|
||||||
PathRootUserHome = "user_home"
|
|
||||||
PathRootNamespaceId = "namespace_id"
|
PathRootNamespaceId = "namespace_id"
|
||||||
PathRootOther = "other"
|
PathRootOther = "other"
|
||||||
)
|
)
|
||||||
@ -75,8 +60,8 @@ func (u *PathRoot) UnmarshalJSON(body []byte) error {
|
|||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
case "team":
|
case "root":
|
||||||
err = json.Unmarshal(body, &u.Team)
|
err = json.Unmarshal(body, &u.Root)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -94,14 +79,14 @@ func (u *PathRoot) UnmarshalJSON(body []byte) error {
|
|||||||
// PathRootError : has no documentation (yet)
|
// PathRootError : has no documentation (yet)
|
||||||
type PathRootError struct {
|
type PathRootError struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
// Invalid : The path root id value in Dropbox-API-Path-Root header is no
|
// InvalidRoot : The root namespace id in Dropbox-API-Path-Root header is
|
||||||
// longer valid.
|
// not valid. The value of this error is use's latest root info.
|
||||||
Invalid *InvalidPathRootError `json:"invalid,omitempty"`
|
InvalidRoot IsRootInfo `json:"invalid_root,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for PathRootError
|
// Valid tag values for PathRootError
|
||||||
const (
|
const (
|
||||||
PathRootErrorInvalid = "invalid"
|
PathRootErrorInvalidRoot = "invalid_root"
|
||||||
PathRootErrorNoPermission = "no_permission"
|
PathRootErrorNoPermission = "no_permission"
|
||||||
PathRootErrorOther = "other"
|
PathRootErrorOther = "other"
|
||||||
)
|
)
|
||||||
@ -110,9 +95,9 @@ const (
|
|||||||
func (u *PathRootError) UnmarshalJSON(body []byte) error {
|
func (u *PathRootError) UnmarshalJSON(body []byte) error {
|
||||||
type wrap struct {
|
type wrap struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
// Invalid : The path root id value in Dropbox-API-Path-Root header is
|
// InvalidRoot : The root namespace id in Dropbox-API-Path-Root header
|
||||||
// no longer valid.
|
// is not valid. The value of this error is use's latest root info.
|
||||||
Invalid json.RawMessage `json:"invalid,omitempty"`
|
InvalidRoot json.RawMessage `json:"invalid_root,omitempty"`
|
||||||
}
|
}
|
||||||
var w wrap
|
var w wrap
|
||||||
var err error
|
var err error
|
||||||
@ -121,8 +106,8 @@ func (u *PathRootError) UnmarshalJSON(body []byte) error {
|
|||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
case "invalid":
|
case "invalid_root":
|
||||||
err = json.Unmarshal(body, &u.Invalid)
|
u.InvalidRoot, err = IsRootInfoFromJSON(body)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -130,3 +115,121 @@ func (u *PathRootError) UnmarshalJSON(body []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RootInfo : Information about current user's root.
|
||||||
|
type RootInfo struct {
|
||||||
|
// RootNamespaceId : The namespace id for user's root namespace. It will be
|
||||||
|
// the namespace id of the shared team root if the user is member of a CDM
|
||||||
|
// team. Otherwise it will be same as `RootInfo.home_namespace_id`.
|
||||||
|
RootNamespaceId string `json:"root_namespace_id"`
|
||||||
|
// HomeNamespaceId : The namespace id for user's home namespace.
|
||||||
|
HomeNamespaceId string `json:"home_namespace_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRootInfo returns a new RootInfo instance
|
||||||
|
func NewRootInfo(RootNamespaceId string, HomeNamespaceId string) *RootInfo {
|
||||||
|
s := new(RootInfo)
|
||||||
|
s.RootNamespaceId = RootNamespaceId
|
||||||
|
s.HomeNamespaceId = HomeNamespaceId
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRootInfo is the interface type for RootInfo and its subtypes
|
||||||
|
type IsRootInfo interface {
|
||||||
|
IsRootInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRootInfo implements the IsRootInfo interface
|
||||||
|
func (u *RootInfo) IsRootInfo() {}
|
||||||
|
|
||||||
|
type rootInfoUnion struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
// Team : has no documentation (yet)
|
||||||
|
Team *TeamRootInfo `json:"team,omitempty"`
|
||||||
|
// User : has no documentation (yet)
|
||||||
|
User *UserRootInfo `json:"user,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for RootInfo
|
||||||
|
const (
|
||||||
|
RootInfoTeam = "team"
|
||||||
|
RootInfoUser = "user"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UnmarshalJSON deserializes into a rootInfoUnion instance
|
||||||
|
func (u *rootInfoUnion) UnmarshalJSON(body []byte) error {
|
||||||
|
type wrap struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
// Team : has no documentation (yet)
|
||||||
|
Team json.RawMessage `json:"team,omitempty"`
|
||||||
|
// User : has no documentation (yet)
|
||||||
|
User json.RawMessage `json:"user,omitempty"`
|
||||||
|
}
|
||||||
|
var w wrap
|
||||||
|
var err error
|
||||||
|
if err = json.Unmarshal(body, &w); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
u.Tag = w.Tag
|
||||||
|
switch u.Tag {
|
||||||
|
case "team":
|
||||||
|
err = json.Unmarshal(body, &u.Team)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
case "user":
|
||||||
|
err = json.Unmarshal(body, &u.User)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRootInfoFromJSON converts JSON to a concrete IsRootInfo instance
|
||||||
|
func IsRootInfoFromJSON(data []byte) (IsRootInfo, error) {
|
||||||
|
var t rootInfoUnion
|
||||||
|
if err := json.Unmarshal(data, &t); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
switch t.Tag {
|
||||||
|
case "team":
|
||||||
|
return t.Team, nil
|
||||||
|
|
||||||
|
case "user":
|
||||||
|
return t.User, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// TeamRootInfo : Root info when user is member of a CDM team.
|
||||||
|
type TeamRootInfo struct {
|
||||||
|
RootInfo
|
||||||
|
// HomePath : The path for user's home directory under the shared team root.
|
||||||
|
HomePath string `json:"home_path"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewTeamRootInfo returns a new TeamRootInfo instance
|
||||||
|
func NewTeamRootInfo(RootNamespaceId string, HomeNamespaceId string, HomePath string) *TeamRootInfo {
|
||||||
|
s := new(TeamRootInfo)
|
||||||
|
s.RootNamespaceId = RootNamespaceId
|
||||||
|
s.HomeNamespaceId = HomeNamespaceId
|
||||||
|
s.HomePath = HomePath
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// UserRootInfo : Root info when user is not member of a CDM team.
|
||||||
|
type UserRootInfo struct {
|
||||||
|
RootInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewUserRootInfo returns a new UserRootInfo instance
|
||||||
|
func NewUserRootInfo(RootNamespaceId string, HomeNamespaceId string) *UserRootInfo {
|
||||||
|
s := new(UserRootInfo)
|
||||||
|
s.RootNamespaceId = RootNamespaceId
|
||||||
|
s.HomeNamespaceId = HomeNamespaceId
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
251
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/client.go
generated
vendored
251
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/client.go
generated
vendored
@ -41,14 +41,17 @@ type Client interface {
|
|||||||
// group, whereas `propertiesUpdate` will only delete fields that are
|
// group, whereas `propertiesUpdate` will only delete fields that are
|
||||||
// explicitly marked for deletion.
|
// explicitly marked for deletion.
|
||||||
PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
|
PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
|
||||||
// PropertiesRemove : Remove the specified property group from the file. To
|
// PropertiesRemove : Permanently removes the specified property group from
|
||||||
// remove specific property field key value pairs, see `propertiesUpdate`.
|
// the file. To remove specific property field key value pairs, see
|
||||||
// To update a template, see `templatesUpdateForUser` or
|
// `propertiesUpdate`. To update a template, see `templatesUpdateForUser` or
|
||||||
// `templatesUpdateForTeam`. Templates can't be removed once created.
|
// `templatesUpdateForTeam`. Templates can't be removed once created.
|
||||||
PropertiesRemove(arg *RemovePropertiesArg) (err error)
|
PropertiesRemove(arg *RemovePropertiesArg) (err error)
|
||||||
// PropertiesSearch : Search across property templates for particular
|
// PropertiesSearch : Search across property templates for particular
|
||||||
// property field values.
|
// property field values.
|
||||||
PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error)
|
PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error)
|
||||||
|
// PropertiesSearchContinue : Once a cursor has been retrieved from
|
||||||
|
// `propertiesSearch`, use this to paginate through all search results.
|
||||||
|
PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error)
|
||||||
// PropertiesUpdate : Add, update or remove properties associated with the
|
// PropertiesUpdate : Add, update or remove properties associated with the
|
||||||
// supplied file and templates. This endpoint should be used instead of
|
// supplied file and templates. This endpoint should be used instead of
|
||||||
// `propertiesOverwrite` when property groups are being updated via a
|
// `propertiesOverwrite` when property groups are being updated via a
|
||||||
@ -58,7 +61,8 @@ type Client interface {
|
|||||||
// property group.
|
// property group.
|
||||||
PropertiesUpdate(arg *UpdatePropertiesArg) (err error)
|
PropertiesUpdate(arg *UpdatePropertiesArg) (err error)
|
||||||
// TemplatesAddForTeam : Add a template associated with a team. See
|
// TemplatesAddForTeam : Add a template associated with a team. See
|
||||||
// `propertiesAdd` to add properties to a file or folder.
|
// `propertiesAdd` to add properties to a file or folder. Note: this
|
||||||
|
// endpoint will create team-owned templates.
|
||||||
TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
|
TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
|
||||||
// TemplatesAddForUser : Add a template associated with a user. See
|
// TemplatesAddForUser : Add a template associated with a user. See
|
||||||
// `propertiesAdd` to add properties to a file. This endpoint can't be
|
// `propertiesAdd` to add properties to a file. This endpoint can't be
|
||||||
@ -76,6 +80,14 @@ type Client interface {
|
|||||||
// the schema of each template use `templatesGetForUser`. This endpoint
|
// the schema of each template use `templatesGetForUser`. This endpoint
|
||||||
// can't be called on a team member or admin's behalf.
|
// can't be called on a team member or admin's behalf.
|
||||||
TemplatesListForUser() (res *ListTemplateResult, err error)
|
TemplatesListForUser() (res *ListTemplateResult, err error)
|
||||||
|
// TemplatesRemoveForTeam : Permanently removes the specified template
|
||||||
|
// created from `templatesAddForUser`. All properties associated with the
|
||||||
|
// template will also be removed. This action cannot be undone.
|
||||||
|
TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error)
|
||||||
|
// TemplatesRemoveForUser : Permanently removes the specified template
|
||||||
|
// created from `templatesAddForUser`. All properties associated with the
|
||||||
|
// template will also be removed. This action cannot be undone.
|
||||||
|
TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error)
|
||||||
// TemplatesUpdateForTeam : Update a template associated with a team. This
|
// TemplatesUpdateForTeam : Update a template associated with a team. This
|
||||||
// route can update the template name, the template description and add
|
// route can update the template name, the template description and add
|
||||||
// optional properties to templates.
|
// optional properties to templates.
|
||||||
@ -143,7 +155,7 @@ func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -210,7 +222,7 @@ func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -277,7 +289,7 @@ func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -349,7 +361,79 @@ func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesS
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
|
apiError.ErrorSummary = string(body)
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//PropertiesSearchContinueAPIError is an error-wrapper for the properties/search/continue route
|
||||||
|
type PropertiesSearchContinueAPIError struct {
|
||||||
|
dropbox.APIError
|
||||||
|
EndpointError *PropertiesSearchContinueError `json:"error"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dbx *apiImpl) PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error) {
|
||||||
|
cli := dbx.Client
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
|
b, err := json.Marshal(arg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
headers := map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
}
|
||||||
|
if dbx.Config.AsMemberID != "" {
|
||||||
|
headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/search/continue", headers, bytes.NewReader(b))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
|
resp, err := cli.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
|
defer resp.Body.Close()
|
||||||
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
|
if resp.StatusCode == http.StatusOK {
|
||||||
|
err = json.Unmarshal(body, &res)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp.StatusCode == http.StatusConflict {
|
||||||
|
var apiError PropertiesSearchContinueAPIError
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var apiError dropbox.APIError
|
||||||
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -416,7 +500,7 @@ func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -485,7 +569,7 @@ func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateRe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -557,7 +641,7 @@ func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateRe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -626,7 +710,7 @@ func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateRe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -698,7 +782,7 @@ func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateRe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -759,7 +843,7 @@ func (dbx *apiImpl) TemplatesListForTeam() (res *ListTemplateResult, err error)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -823,7 +907,138 @@ func (dbx *apiImpl) TemplatesListForUser() (res *ListTemplateResult, err error)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
|
apiError.ErrorSummary = string(body)
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//TemplatesRemoveForTeamAPIError is an error-wrapper for the templates/remove_for_team route
|
||||||
|
type TemplatesRemoveForTeamAPIError struct {
|
||||||
|
dropbox.APIError
|
||||||
|
EndpointError *TemplateError `json:"error"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dbx *apiImpl) TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error) {
|
||||||
|
cli := dbx.Client
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
|
b, err := json.Marshal(arg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
headers := map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/remove_for_team", headers, bytes.NewReader(b))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
|
resp, err := cli.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
|
defer resp.Body.Close()
|
||||||
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
|
if resp.StatusCode == http.StatusOK {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp.StatusCode == http.StatusConflict {
|
||||||
|
var apiError TemplatesRemoveForTeamAPIError
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var apiError dropbox.APIError
|
||||||
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
|
apiError.ErrorSummary = string(body)
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//TemplatesRemoveForUserAPIError is an error-wrapper for the templates/remove_for_user route
|
||||||
|
type TemplatesRemoveForUserAPIError struct {
|
||||||
|
dropbox.APIError
|
||||||
|
EndpointError *TemplateError `json:"error"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dbx *apiImpl) TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error) {
|
||||||
|
cli := dbx.Client
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
|
b, err := json.Marshal(arg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
headers := map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
}
|
||||||
|
if dbx.Config.AsMemberID != "" {
|
||||||
|
headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/remove_for_user", headers, bytes.NewReader(b))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
|
resp, err := cli.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
|
defer resp.Body.Close()
|
||||||
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
|
if resp.StatusCode == http.StatusOK {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp.StatusCode == http.StatusConflict {
|
||||||
|
var apiError TemplatesRemoveForUserAPIError
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var apiError dropbox.APIError
|
||||||
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -892,7 +1107,7 @@ func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateT
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -964,7 +1179,7 @@ func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateT
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -978,7 +1193,7 @@ func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateT
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
102
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/types.go
generated
vendored
102
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/types.go
generated
vendored
@ -30,7 +30,18 @@
|
|||||||
// possible key names and value types are explicitly enumerated using
|
// possible key names and value types are explicitly enumerated using
|
||||||
// `PropertyFieldTemplate` objects. You can think of a property group template
|
// `PropertyFieldTemplate` objects. You can think of a property group template
|
||||||
// as a class definition for a particular key/value metadata object, and the
|
// as a class definition for a particular key/value metadata object, and the
|
||||||
// property groups themselves as the instantiations of these objects.
|
// property groups themselves as the instantiations of these objects. Templates
|
||||||
|
// are owned either by a user/app pair or team/app pair. Templates and their
|
||||||
|
// associated properties can't be accessed by any app other than the app that
|
||||||
|
// created them, and even then, only when the app is linked with the owner of
|
||||||
|
// the template (either a user or team). User-owned templates are accessed via
|
||||||
|
// the user-auth template/*_for_user endpoints, while team-owned templates are
|
||||||
|
// accessed via the team-auth template/*_for_team endpoints. Properties
|
||||||
|
// associated with either type of template can be accessed via the user-auth
|
||||||
|
// properties/* endpoints. Finally, properties can be accessed from a number of
|
||||||
|
// endpoints that return metadata, including `files/get_metadata`, and
|
||||||
|
// `files/list_folder`. Properties can also be added during upload, using
|
||||||
|
// `files/upload`.
|
||||||
package file_properties
|
package file_properties
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -467,6 +478,31 @@ func NewPropertiesSearchArg(Queries []*PropertiesSearchQuery) *PropertiesSearchA
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PropertiesSearchContinueArg : has no documentation (yet)
|
||||||
|
type PropertiesSearchContinueArg struct {
|
||||||
|
// Cursor : The cursor returned by your last call to `propertiesSearch` or
|
||||||
|
// `propertiesSearchContinue`.
|
||||||
|
Cursor string `json:"cursor"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPropertiesSearchContinueArg returns a new PropertiesSearchContinueArg instance
|
||||||
|
func NewPropertiesSearchContinueArg(Cursor string) *PropertiesSearchContinueArg {
|
||||||
|
s := new(PropertiesSearchContinueArg)
|
||||||
|
s.Cursor = Cursor
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// PropertiesSearchContinueError : has no documentation (yet)
|
||||||
|
type PropertiesSearchContinueError struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for PropertiesSearchContinueError
|
||||||
|
const (
|
||||||
|
PropertiesSearchContinueErrorReset = "reset"
|
||||||
|
PropertiesSearchContinueErrorOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
// PropertiesSearchError : has no documentation (yet)
|
// PropertiesSearchError : has no documentation (yet)
|
||||||
type PropertiesSearchError struct {
|
type PropertiesSearchError struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
@ -510,15 +546,18 @@ type PropertiesSearchMatch struct {
|
|||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
// Path : The path for the matched file or folder.
|
// Path : The path for the matched file or folder.
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
|
// IsDeleted : Whether the file or folder is deleted.
|
||||||
|
IsDeleted bool `json:"is_deleted"`
|
||||||
// PropertyGroups : List of custom property groups associated with the file.
|
// PropertyGroups : List of custom property groups associated with the file.
|
||||||
PropertyGroups []*PropertyGroup `json:"property_groups"`
|
PropertyGroups []*PropertyGroup `json:"property_groups"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPropertiesSearchMatch returns a new PropertiesSearchMatch instance
|
// NewPropertiesSearchMatch returns a new PropertiesSearchMatch instance
|
||||||
func NewPropertiesSearchMatch(Id string, Path string, PropertyGroups []*PropertyGroup) *PropertiesSearchMatch {
|
func NewPropertiesSearchMatch(Id string, Path string, IsDeleted bool, PropertyGroups []*PropertyGroup) *PropertiesSearchMatch {
|
||||||
s := new(PropertiesSearchMatch)
|
s := new(PropertiesSearchMatch)
|
||||||
s.Id = Id
|
s.Id = Id
|
||||||
s.Path = Path
|
s.Path = Path
|
||||||
|
s.IsDeleted = IsDeleted
|
||||||
s.PropertyGroups = PropertyGroups
|
s.PropertyGroups = PropertyGroups
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
@ -581,6 +620,10 @@ func NewPropertiesSearchQuery(Query string, Mode *PropertiesSearchMode) *Propert
|
|||||||
type PropertiesSearchResult struct {
|
type PropertiesSearchResult struct {
|
||||||
// Matches : A list (possibly empty) of matches for the query.
|
// Matches : A list (possibly empty) of matches for the query.
|
||||||
Matches []*PropertiesSearchMatch `json:"matches"`
|
Matches []*PropertiesSearchMatch `json:"matches"`
|
||||||
|
// Cursor : Pass the cursor into `propertiesSearchContinue` to continue to
|
||||||
|
// receive search results. Cursor will be null when there are no more
|
||||||
|
// results.
|
||||||
|
Cursor string `json:"cursor,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPropertiesSearchResult returns a new PropertiesSearchResult instance
|
// NewPropertiesSearchResult returns a new PropertiesSearchResult instance
|
||||||
@ -758,6 +801,59 @@ func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RemoveTemplateArg : has no documentation (yet)
|
||||||
|
type RemoveTemplateArg struct {
|
||||||
|
// TemplateId : An identifier for a template created by
|
||||||
|
// `templatesAddForUser` or `templatesAddForTeam`.
|
||||||
|
TemplateId string `json:"template_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRemoveTemplateArg returns a new RemoveTemplateArg instance
|
||||||
|
func NewRemoveTemplateArg(TemplateId string) *RemoveTemplateArg {
|
||||||
|
s := new(RemoveTemplateArg)
|
||||||
|
s.TemplateId = TemplateId
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// TemplateFilterBase : has no documentation (yet)
|
||||||
|
type TemplateFilterBase struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
// FilterSome : Only templates with an ID in the supplied list will be
|
||||||
|
// returned (a subset of templates will be returned).
|
||||||
|
FilterSome []string `json:"filter_some,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for TemplateFilterBase
|
||||||
|
const (
|
||||||
|
TemplateFilterBaseFilterSome = "filter_some"
|
||||||
|
TemplateFilterBaseOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UnmarshalJSON deserializes into a TemplateFilterBase instance
|
||||||
|
func (u *TemplateFilterBase) UnmarshalJSON(body []byte) error {
|
||||||
|
type wrap struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
// FilterSome : Only templates with an ID in the supplied list will be
|
||||||
|
// returned (a subset of templates will be returned).
|
||||||
|
FilterSome json.RawMessage `json:"filter_some,omitempty"`
|
||||||
|
}
|
||||||
|
var w wrap
|
||||||
|
var err error
|
||||||
|
if err = json.Unmarshal(body, &w); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
u.Tag = w.Tag
|
||||||
|
switch u.Tag {
|
||||||
|
case "filter_some":
|
||||||
|
err = json.Unmarshal(body, &u.FilterSome)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// TemplateFilter : has no documentation (yet)
|
// TemplateFilter : has no documentation (yet)
|
||||||
type TemplateFilter struct {
|
type TemplateFilter struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
@ -768,9 +864,9 @@ type TemplateFilter struct {
|
|||||||
|
|
||||||
// Valid tag values for TemplateFilter
|
// Valid tag values for TemplateFilter
|
||||||
const (
|
const (
|
||||||
TemplateFilterFilterNone = "filter_none"
|
|
||||||
TemplateFilterFilterSome = "filter_some"
|
TemplateFilterFilterSome = "filter_some"
|
||||||
TemplateFilterOther = "other"
|
TemplateFilterOther = "other"
|
||||||
|
TemplateFilterFilterNone = "filter_none"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a TemplateFilter instance
|
// UnmarshalJSON deserializes into a TemplateFilter instance
|
||||||
|
10
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/client.go
generated
vendored
10
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/client.go
generated
vendored
@ -104,7 +104,7 @@ func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -176,7 +176,7 @@ func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -240,7 +240,7 @@ func (dbx *apiImpl) List() (res *ListFileRequestsResult, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -312,7 +312,7 @@ func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -326,7 +326,7 @@ func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err er
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
104
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/client.go
generated
vendored
104
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/client.go
generated
vendored
@ -38,12 +38,14 @@ type Client interface {
|
|||||||
// AlphaGetMetadata : Returns the metadata for a file or folder. This is an
|
// AlphaGetMetadata : Returns the metadata for a file or folder. This is an
|
||||||
// alpha endpoint compatible with the properties API. Note: Metadata for the
|
// alpha endpoint compatible with the properties API. Note: Metadata for the
|
||||||
// root folder is unsupported.
|
// root folder is unsupported.
|
||||||
|
// Deprecated: Use `GetMetadata` instead
|
||||||
AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error)
|
AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error)
|
||||||
// AlphaUpload : Create a new file with the contents provided in the
|
// AlphaUpload : Create a new file with the contents provided in the
|
||||||
// request. Note that this endpoint is part of the properties API alpha and
|
// request. Note that this endpoint is part of the properties API alpha and
|
||||||
// is slightly different from `upload`. Do not use this to upload a file
|
// is slightly different from `upload`. Do not use this to upload a file
|
||||||
// larger than 150 MB. Instead, create an upload session with
|
// larger than 150 MB. Instead, create an upload session with
|
||||||
// `uploadSessionStart`.
|
// `uploadSessionStart`.
|
||||||
|
// Deprecated: Use `AlphaUpload` instead
|
||||||
AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error)
|
AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error)
|
||||||
// Copy : Copy a file or folder to a different location in the user's
|
// Copy : Copy a file or folder to a different location in the user's
|
||||||
// Dropbox. If the source path is a folder all its contents will be copied.
|
// Dropbox. If the source path is a folder all its contents will be copied.
|
||||||
@ -280,6 +282,9 @@ type AlphaGetMetadataAPIError struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error) {
|
func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error) {
|
||||||
|
log.Printf("WARNING: API `AlphaGetMetadata` is deprecated")
|
||||||
|
log.Printf("Use API `GetMetadata` instead")
|
||||||
|
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.LogDebug("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
@ -343,7 +348,7 @@ func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -363,6 +368,9 @@ type AlphaUploadAPIError struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (dbx *apiImpl) AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error) {
|
func (dbx *apiImpl) AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error) {
|
||||||
|
log.Printf("WARNING: API `AlphaUpload` is deprecated")
|
||||||
|
log.Printf("Use API `AlphaUpload` instead")
|
||||||
|
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.LogDebug("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
@ -416,7 +424,7 @@ func (dbx *apiImpl) AlphaUpload(arg *CommitInfoWithProperties, content io.Reader
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -502,7 +510,7 @@ func (dbx *apiImpl) Copy(arg *RelocationArg) (res IsMetadata, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -574,7 +582,7 @@ func (dbx *apiImpl) CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaun
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -646,7 +654,7 @@ func (dbx *apiImpl) CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobS
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -718,7 +726,7 @@ func (dbx *apiImpl) CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyRefe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -790,7 +798,7 @@ func (dbx *apiImpl) CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyR
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -862,7 +870,7 @@ func (dbx *apiImpl) CopyV2(arg *RelocationArg) (res *RelocationResult, err error
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -937,7 +945,7 @@ func (dbx *apiImpl) CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1009,7 +1017,7 @@ func (dbx *apiImpl) CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResul
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1095,7 +1103,7 @@ func (dbx *apiImpl) Delete(arg *DeleteArg) (res IsMetadata, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1167,7 +1175,7 @@ func (dbx *apiImpl) DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1239,7 +1247,7 @@ func (dbx *apiImpl) DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobSta
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1311,7 +1319,7 @@ func (dbx *apiImpl) DeleteV2(arg *DeleteArg) (res *DeleteResult, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1387,7 +1395,7 @@ func (dbx *apiImpl) Download(arg *DownloadArg) (res *FileMetadata, content io.Re
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1470,7 +1478,7 @@ func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1543,7 +1551,7 @@ func (dbx *apiImpl) GetPreview(arg *PreviewArg) (res *FileMetadata, content io.R
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1615,7 +1623,7 @@ func (dbx *apiImpl) GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporar
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1688,7 +1696,7 @@ func (dbx *apiImpl) GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1760,7 +1768,7 @@ func (dbx *apiImpl) GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbn
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1832,7 +1840,7 @@ func (dbx *apiImpl) ListFolder(arg *ListFolderArg) (res *ListFolderResult, err e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1904,7 +1912,7 @@ func (dbx *apiImpl) ListFolderContinue(arg *ListFolderContinueArg) (res *ListFol
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1976,7 +1984,7 @@ func (dbx *apiImpl) ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFold
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2045,7 +2053,7 @@ func (dbx *apiImpl) ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFol
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2117,7 +2125,7 @@ func (dbx *apiImpl) ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResu
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2203,7 +2211,7 @@ func (dbx *apiImpl) Move(arg *RelocationArg) (res IsMetadata, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2275,7 +2283,7 @@ func (dbx *apiImpl) MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaun
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2347,7 +2355,7 @@ func (dbx *apiImpl) MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobS
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2419,7 +2427,7 @@ func (dbx *apiImpl) MoveV2(arg *RelocationArg) (res *RelocationResult, err error
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2486,7 +2494,7 @@ func (dbx *apiImpl) PermanentlyDelete(arg *DeleteArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2555,7 +2563,7 @@ func (dbx *apiImpl) PropertiesAdd(arg *file_properties.AddPropertiesArg) (err er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2624,7 +2632,7 @@ func (dbx *apiImpl) PropertiesOverwrite(arg *file_properties.OverwritePropertyGr
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2693,7 +2701,7 @@ func (dbx *apiImpl) PropertiesRemove(arg *file_properties.RemovePropertiesArg) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2767,7 +2775,7 @@ func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2833,7 +2841,7 @@ func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateR
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2902,7 +2910,7 @@ func (dbx *apiImpl) PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2974,7 +2982,7 @@ func (dbx *apiImpl) Restore(arg *RestoreArg) (res *FileMetadata, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3046,7 +3054,7 @@ func (dbx *apiImpl) SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3118,7 +3126,7 @@ func (dbx *apiImpl) SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobSt
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3190,7 +3198,7 @@ func (dbx *apiImpl) Search(arg *SearchArg) (res *SearchResult, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3263,7 +3271,7 @@ func (dbx *apiImpl) Upload(arg *CommitInfo, content io.Reader) (res *FileMetadat
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3334,7 +3342,7 @@ func (dbx *apiImpl) UploadSessionAppend(arg *UploadSessionCursor, content io.Rea
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3402,7 +3410,7 @@ func (dbx *apiImpl) UploadSessionAppendV2(arg *UploadSessionAppendArg, content i
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3475,7 +3483,7 @@ func (dbx *apiImpl) UploadSessionFinish(arg *UploadSessionFinishArg, content io.
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3547,7 +3555,7 @@ func (dbx *apiImpl) UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3619,7 +3627,7 @@ func (dbx *apiImpl) UploadSessionFinishBatchCheck(arg *async.PollArg) (res *Uplo
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3692,7 +3700,7 @@ func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, content io.Re
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3706,7 +3714,7 @@ func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, content io.Re
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
18
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/types.go
generated
vendored
18
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/types.go
generated
vendored
@ -44,6 +44,10 @@ type GetMetadataArg struct {
|
|||||||
// flag for each file indicating whether or not that file has any explicit
|
// flag for each file indicating whether or not that file has any explicit
|
||||||
// members.
|
// members.
|
||||||
IncludeHasExplicitSharedMembers bool `json:"include_has_explicit_shared_members"`
|
IncludeHasExplicitSharedMembers bool `json:"include_has_explicit_shared_members"`
|
||||||
|
// IncludePropertyGroups : If set to a valid list of template IDs,
|
||||||
|
// `FileMetadata.property_groups` is set if there exists property data
|
||||||
|
// associated with the file and each of the listed templates.
|
||||||
|
IncludePropertyGroups *file_properties.TemplateFilterBase `json:"include_property_groups,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewGetMetadataArg returns a new GetMetadataArg instance
|
// NewGetMetadataArg returns a new GetMetadataArg instance
|
||||||
@ -177,6 +181,8 @@ type CommitInfo struct {
|
|||||||
// tells the clients that this modification shouldn't result in a user
|
// tells the clients that this modification shouldn't result in a user
|
||||||
// notification.
|
// notification.
|
||||||
Mute bool `json:"mute"`
|
Mute bool `json:"mute"`
|
||||||
|
// PropertyGroups : List of custom properties to add to file.
|
||||||
|
PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCommitInfo returns a new CommitInfo instance
|
// NewCommitInfo returns a new CommitInfo instance
|
||||||
@ -192,8 +198,6 @@ func NewCommitInfo(Path string) *CommitInfo {
|
|||||||
// CommitInfoWithProperties : has no documentation (yet)
|
// CommitInfoWithProperties : has no documentation (yet)
|
||||||
type CommitInfoWithProperties struct {
|
type CommitInfoWithProperties struct {
|
||||||
CommitInfo
|
CommitInfo
|
||||||
// PropertyGroups : List of custom properties to add to file.
|
|
||||||
PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCommitInfoWithProperties returns a new CommitInfoWithProperties instance
|
// NewCommitInfoWithProperties returns a new CommitInfoWithProperties instance
|
||||||
@ -848,7 +852,9 @@ type FolderMetadata struct {
|
|||||||
// shared folder mount point.
|
// shared folder mount point.
|
||||||
SharingInfo *FolderSharingInfo `json:"sharing_info,omitempty"`
|
SharingInfo *FolderSharingInfo `json:"sharing_info,omitempty"`
|
||||||
// PropertyGroups : Additional information if the file has custom properties
|
// PropertyGroups : Additional information if the file has custom properties
|
||||||
// with the property template specified.
|
// with the property template specified. Note that only properties
|
||||||
|
// associated with user-owned templates, not team-owned templates, can be
|
||||||
|
// attached to folders.
|
||||||
PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
|
PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1172,6 +1178,10 @@ type ListFolderArg struct {
|
|||||||
// present, `ListFolderArg.path` will be relative to root of the shared
|
// present, `ListFolderArg.path` will be relative to root of the shared
|
||||||
// link. Only non-recursive mode is supported for shared link.
|
// link. Only non-recursive mode is supported for shared link.
|
||||||
SharedLink *SharedLink `json:"shared_link,omitempty"`
|
SharedLink *SharedLink `json:"shared_link,omitempty"`
|
||||||
|
// IncludePropertyGroups : If set to a valid list of template IDs,
|
||||||
|
// `FileMetadata.property_groups` is set if there exists property data
|
||||||
|
// associated with the file and each of the listed templates.
|
||||||
|
IncludePropertyGroups *file_properties.TemplateFilterBase `json:"include_property_groups,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewListFolderArg returns a new ListFolderArg instance
|
// NewListFolderArg returns a new ListFolderArg instance
|
||||||
@ -1772,6 +1782,7 @@ const (
|
|||||||
RelocationErrorTooManyFiles = "too_many_files"
|
RelocationErrorTooManyFiles = "too_many_files"
|
||||||
RelocationErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
|
RelocationErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
|
||||||
RelocationErrorCantTransferOwnership = "cant_transfer_ownership"
|
RelocationErrorCantTransferOwnership = "cant_transfer_ownership"
|
||||||
|
RelocationErrorInsufficientQuota = "insufficient_quota"
|
||||||
RelocationErrorOther = "other"
|
RelocationErrorOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1837,6 +1848,7 @@ const (
|
|||||||
RelocationBatchErrorTooManyFiles = "too_many_files"
|
RelocationBatchErrorTooManyFiles = "too_many_files"
|
||||||
RelocationBatchErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
|
RelocationBatchErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
|
||||||
RelocationBatchErrorCantTransferOwnership = "cant_transfer_ownership"
|
RelocationBatchErrorCantTransferOwnership = "cant_transfer_ownership"
|
||||||
|
RelocationBatchErrorInsufficientQuota = "insufficient_quota"
|
||||||
RelocationBatchErrorOther = "other"
|
RelocationBatchErrorOther = "other"
|
||||||
RelocationBatchErrorTooManyWriteOperations = "too_many_write_operations"
|
RelocationBatchErrorTooManyWriteOperations = "too_many_write_operations"
|
||||||
)
|
)
|
||||||
|
34
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/client.go
generated
vendored
34
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/client.go
generated
vendored
@ -153,7 +153,7 @@ func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -226,7 +226,7 @@ func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -299,7 +299,7 @@ func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -371,7 +371,7 @@ func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUs
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -443,7 +443,7 @@ func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueAr
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -515,7 +515,7 @@ func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingP
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -587,7 +587,7 @@ func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -659,7 +659,7 @@ func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListP
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -726,7 +726,7 @@ func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -798,7 +798,7 @@ func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -865,7 +865,7 @@ func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -938,7 +938,7 @@ func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1010,7 +1010,7 @@ func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1082,7 +1082,7 @@ func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersO
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1154,7 +1154,7 @@ func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1221,7 +1221,7 @@ func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1235,7 +1235,7 @@ func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
4
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sdk.go
generated
vendored
4
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sdk.go
generated
vendored
@ -35,8 +35,8 @@ const (
|
|||||||
hostAPI = "api"
|
hostAPI = "api"
|
||||||
hostContent = "content"
|
hostContent = "content"
|
||||||
hostNotify = "notify"
|
hostNotify = "notify"
|
||||||
sdkVersion = "3.3.0"
|
sdkVersion = "4.1.0"
|
||||||
specVersion = "318810d"
|
specVersion = "5389e5b"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version returns the current SDK version and API Spec version
|
// Version returns the current SDK version and API Spec version
|
||||||
|
86
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/client.go
generated
vendored
86
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/client.go
generated
vendored
@ -285,7 +285,7 @@ func (dbx *apiImpl) AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActi
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -352,7 +352,7 @@ func (dbx *apiImpl) AddFolderMember(arg *AddFolderMemberArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -427,7 +427,7 @@ func (dbx *apiImpl) ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -499,7 +499,7 @@ func (dbx *apiImpl) CheckJobStatus(arg *async.PollArg) (res *JobStatus, err erro
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -571,7 +571,7 @@ func (dbx *apiImpl) CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveM
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -643,7 +643,7 @@ func (dbx *apiImpl) CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJob
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -718,7 +718,7 @@ func (dbx *apiImpl) CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMet
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -798,7 +798,7 @@ func (dbx *apiImpl) CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettin
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -870,7 +870,7 @@ func (dbx *apiImpl) GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMet
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -942,7 +942,7 @@ func (dbx *apiImpl) GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*G
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1014,7 +1014,7 @@ func (dbx *apiImpl) GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1095,7 +1095,7 @@ func (dbx *apiImpl) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsShar
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1175,7 +1175,7 @@ func (dbx *apiImpl) GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res Is
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1250,7 +1250,7 @@ func (dbx *apiImpl) GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksR
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1322,7 +1322,7 @@ func (dbx *apiImpl) ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMem
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1394,7 +1394,7 @@ func (dbx *apiImpl) ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*L
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1466,7 +1466,7 @@ func (dbx *apiImpl) ListFileMembersContinue(arg *ListFileMembersContinueArg) (re
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1538,7 +1538,7 @@ func (dbx *apiImpl) ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFo
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1610,7 +1610,7 @@ func (dbx *apiImpl) ListFolderMembersContinue(arg *ListFolderMembersContinueArg)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1682,7 +1682,7 @@ func (dbx *apiImpl) ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1754,7 +1754,7 @@ func (dbx *apiImpl) ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListF
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1826,7 +1826,7 @@ func (dbx *apiImpl) ListMountableFolders(arg *ListFoldersArgs) (res *ListFolders
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1898,7 +1898,7 @@ func (dbx *apiImpl) ListMountableFoldersContinue(arg *ListFoldersContinueArg) (r
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1970,7 +1970,7 @@ func (dbx *apiImpl) ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2042,7 +2042,7 @@ func (dbx *apiImpl) ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *L
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2114,7 +2114,7 @@ func (dbx *apiImpl) ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLin
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2194,7 +2194,7 @@ func (dbx *apiImpl) ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2266,7 +2266,7 @@ func (dbx *apiImpl) MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2333,7 +2333,7 @@ func (dbx *apiImpl) RelinquishFileMembership(arg *RelinquishFileMembershipArg) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2405,7 +2405,7 @@ func (dbx *apiImpl) RelinquishFolderMembership(arg *RelinquishFolderMembershipAr
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2480,7 +2480,7 @@ func (dbx *apiImpl) RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberA
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2552,7 +2552,7 @@ func (dbx *apiImpl) RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMember
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2624,7 +2624,7 @@ func (dbx *apiImpl) RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.L
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2691,7 +2691,7 @@ func (dbx *apiImpl) RevokeSharedLink(arg *RevokeSharedLinkArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2763,7 +2763,7 @@ func (dbx *apiImpl) ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2830,7 +2830,7 @@ func (dbx *apiImpl) TransferFolder(arg *TransferFolderArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2897,7 +2897,7 @@ func (dbx *apiImpl) UnmountFolder(arg *UnmountFolderArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2964,7 +2964,7 @@ func (dbx *apiImpl) UnshareFile(arg *UnshareFileArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3036,7 +3036,7 @@ func (dbx *apiImpl) UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmpty
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3108,7 +3108,7 @@ func (dbx *apiImpl) UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAcce
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3180,7 +3180,7 @@ func (dbx *apiImpl) UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberA
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3252,7 +3252,7 @@ func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedF
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3266,7 +3266,7 @@ func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedF
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
1
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/types.go
generated
vendored
1
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/types.go
generated
vendored
@ -2976,6 +2976,7 @@ const (
|
|||||||
RemoveFolderMemberErrorGroupAccess = "group_access"
|
RemoveFolderMemberErrorGroupAccess = "group_access"
|
||||||
RemoveFolderMemberErrorTeamFolder = "team_folder"
|
RemoveFolderMemberErrorTeamFolder = "team_folder"
|
||||||
RemoveFolderMemberErrorNoPermission = "no_permission"
|
RemoveFolderMemberErrorNoPermission = "no_permission"
|
||||||
|
RemoveFolderMemberErrorTooManyFiles = "too_many_files"
|
||||||
RemoveFolderMemberErrorOther = "other"
|
RemoveFolderMemberErrorOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
414
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/client.go
generated
vendored
414
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/client.go
generated
vendored
@ -118,6 +118,18 @@ type Client interface {
|
|||||||
// LinkedAppsRevokeLinkedAppBatch : Revoke a list of linked applications of
|
// LinkedAppsRevokeLinkedAppBatch : Revoke a list of linked applications of
|
||||||
// the team members.
|
// the team members.
|
||||||
LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error)
|
LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error)
|
||||||
|
// MemberSpaceLimitsExcludedUsersAdd : Add users to member space limits
|
||||||
|
// excluded users list.
|
||||||
|
MemberSpaceLimitsExcludedUsersAdd(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error)
|
||||||
|
// MemberSpaceLimitsExcludedUsersList : List member space limits excluded
|
||||||
|
// users.
|
||||||
|
MemberSpaceLimitsExcludedUsersList(arg *ExcludedUsersListArg) (res *ExcludedUsersListResult, err error)
|
||||||
|
// MemberSpaceLimitsExcludedUsersListContinue : Continue listing member
|
||||||
|
// space limits excluded users.
|
||||||
|
MemberSpaceLimitsExcludedUsersListContinue(arg *ExcludedUsersListContinueArg) (res *ExcludedUsersListResult, err error)
|
||||||
|
// MemberSpaceLimitsExcludedUsersRemove : Remove users from member space
|
||||||
|
// limits excluded users list.
|
||||||
|
MemberSpaceLimitsExcludedUsersRemove(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error)
|
||||||
// MemberSpaceLimitsGetCustomQuota : Get users custom quota. Returns none as
|
// MemberSpaceLimitsGetCustomQuota : Get users custom quota. Returns none as
|
||||||
// the custom quota if none was set. A maximum of 1000 members can be
|
// the custom quota if none was set. A maximum of 1000 members can be
|
||||||
// specified in a single call.
|
// specified in a single call.
|
||||||
@ -126,7 +138,7 @@ type Client interface {
|
|||||||
// of 1000 members can be specified in a single call.
|
// of 1000 members can be specified in a single call.
|
||||||
MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error)
|
MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error)
|
||||||
// MemberSpaceLimitsSetCustomQuota : Set users custom quota. Custom quota
|
// MemberSpaceLimitsSetCustomQuota : Set users custom quota. Custom quota
|
||||||
// has to be at least 25GB. A maximum of 1000 members can be specified in a
|
// has to be at least 15GB. A maximum of 1000 members can be specified in a
|
||||||
// single call.
|
// single call.
|
||||||
MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error)
|
MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error)
|
||||||
// MembersAdd : Adds members to a team. Permission : Team member management
|
// MembersAdd : Adds members to a team. Permission : Team member management
|
||||||
@ -323,7 +335,7 @@ func (dbx *apiImpl) DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *Li
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -392,7 +404,7 @@ func (dbx *apiImpl) DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -464,7 +476,7 @@ func (dbx *apiImpl) DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -528,7 +540,7 @@ func (dbx *apiImpl) DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -597,7 +609,7 @@ func (dbx *apiImpl) DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatc
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -666,7 +678,7 @@ func (dbx *apiImpl) FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *Feat
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -727,7 +739,7 @@ func (dbx *apiImpl) GetInfo() (res *TeamGetInfoResult, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -796,7 +808,7 @@ func (dbx *apiImpl) GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -865,7 +877,7 @@ func (dbx *apiImpl) GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResu
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -934,7 +946,7 @@ func (dbx *apiImpl) GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1003,7 +1015,7 @@ func (dbx *apiImpl) GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmpty
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1072,7 +1084,7 @@ func (dbx *apiImpl) GroupsList(arg *GroupsListArg) (res *GroupsListResult, err e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1141,7 +1153,7 @@ func (dbx *apiImpl) GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsL
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1210,7 +1222,7 @@ func (dbx *apiImpl) GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembers
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1279,7 +1291,7 @@ func (dbx *apiImpl) GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMem
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1348,7 +1360,7 @@ func (dbx *apiImpl) GroupsMembersListContinue(arg *GroupsMembersListContinueArg)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1417,7 +1429,7 @@ func (dbx *apiImpl) GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupM
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1486,7 +1498,7 @@ func (dbx *apiImpl) GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1555,7 +1567,7 @@ func (dbx *apiImpl) GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1624,7 +1636,7 @@ func (dbx *apiImpl) LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1693,7 +1705,7 @@ func (dbx *apiImpl) LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (re
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1765,7 +1777,7 @@ func (dbx *apiImpl) LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *Lis
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1829,7 +1841,7 @@ func (dbx *apiImpl) LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1898,7 +1910,283 @@ func (dbx *apiImpl) LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchA
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
|
apiError.ErrorSummary = string(body)
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//MemberSpaceLimitsExcludedUsersAddAPIError is an error-wrapper for the member_space_limits/excluded_users/add route
|
||||||
|
type MemberSpaceLimitsExcludedUsersAddAPIError struct {
|
||||||
|
dropbox.APIError
|
||||||
|
EndpointError *ExcludedUsersUpdateError `json:"error"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersAdd(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) {
|
||||||
|
cli := dbx.Client
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
|
b, err := json.Marshal(arg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
headers := map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/add", headers, bytes.NewReader(b))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
|
resp, err := cli.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
|
defer resp.Body.Close()
|
||||||
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
|
if resp.StatusCode == http.StatusOK {
|
||||||
|
err = json.Unmarshal(body, &res)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp.StatusCode == http.StatusConflict {
|
||||||
|
var apiError MemberSpaceLimitsExcludedUsersAddAPIError
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var apiError dropbox.APIError
|
||||||
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
|
apiError.ErrorSummary = string(body)
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//MemberSpaceLimitsExcludedUsersListAPIError is an error-wrapper for the member_space_limits/excluded_users/list route
|
||||||
|
type MemberSpaceLimitsExcludedUsersListAPIError struct {
|
||||||
|
dropbox.APIError
|
||||||
|
EndpointError *ExcludedUsersListError `json:"error"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersList(arg *ExcludedUsersListArg) (res *ExcludedUsersListResult, err error) {
|
||||||
|
cli := dbx.Client
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
|
b, err := json.Marshal(arg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
headers := map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/list", headers, bytes.NewReader(b))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
|
resp, err := cli.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
|
defer resp.Body.Close()
|
||||||
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
|
if resp.StatusCode == http.StatusOK {
|
||||||
|
err = json.Unmarshal(body, &res)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp.StatusCode == http.StatusConflict {
|
||||||
|
var apiError MemberSpaceLimitsExcludedUsersListAPIError
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var apiError dropbox.APIError
|
||||||
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
|
apiError.ErrorSummary = string(body)
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//MemberSpaceLimitsExcludedUsersListContinueAPIError is an error-wrapper for the member_space_limits/excluded_users/list/continue route
|
||||||
|
type MemberSpaceLimitsExcludedUsersListContinueAPIError struct {
|
||||||
|
dropbox.APIError
|
||||||
|
EndpointError *ExcludedUsersListContinueError `json:"error"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersListContinue(arg *ExcludedUsersListContinueArg) (res *ExcludedUsersListResult, err error) {
|
||||||
|
cli := dbx.Client
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
|
b, err := json.Marshal(arg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
headers := map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/list/continue", headers, bytes.NewReader(b))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
|
resp, err := cli.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
|
defer resp.Body.Close()
|
||||||
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
|
if resp.StatusCode == http.StatusOK {
|
||||||
|
err = json.Unmarshal(body, &res)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp.StatusCode == http.StatusConflict {
|
||||||
|
var apiError MemberSpaceLimitsExcludedUsersListContinueAPIError
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var apiError dropbox.APIError
|
||||||
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
|
apiError.ErrorSummary = string(body)
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//MemberSpaceLimitsExcludedUsersRemoveAPIError is an error-wrapper for the member_space_limits/excluded_users/remove route
|
||||||
|
type MemberSpaceLimitsExcludedUsersRemoveAPIError struct {
|
||||||
|
dropbox.APIError
|
||||||
|
EndpointError *ExcludedUsersUpdateError `json:"error"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersRemove(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) {
|
||||||
|
cli := dbx.Client
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
|
b, err := json.Marshal(arg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
headers := map[string]string{
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/remove", headers, bytes.NewReader(b))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
|
resp, err := cli.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
|
defer resp.Body.Close()
|
||||||
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
|
if resp.StatusCode == http.StatusOK {
|
||||||
|
err = json.Unmarshal(body, &res)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp.StatusCode == http.StatusConflict {
|
||||||
|
var apiError MemberSpaceLimitsExcludedUsersRemoveAPIError
|
||||||
|
err = json.Unmarshal(body, &apiError)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = apiError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var apiError dropbox.APIError
|
||||||
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -1967,7 +2255,7 @@ func (dbx *apiImpl) MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (r
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2036,7 +2324,7 @@ func (dbx *apiImpl) MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2052,7 +2340,7 @@ func (dbx *apiImpl) MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg)
|
|||||||
//MemberSpaceLimitsSetCustomQuotaAPIError is an error-wrapper for the member_space_limits/set_custom_quota route
|
//MemberSpaceLimitsSetCustomQuotaAPIError is an error-wrapper for the member_space_limits/set_custom_quota route
|
||||||
type MemberSpaceLimitsSetCustomQuotaAPIError struct {
|
type MemberSpaceLimitsSetCustomQuotaAPIError struct {
|
||||||
dropbox.APIError
|
dropbox.APIError
|
||||||
EndpointError *CustomQuotaError `json:"error"`
|
EndpointError *SetCustomQuotaError `json:"error"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dbx *apiImpl) MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error) {
|
func (dbx *apiImpl) MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error) {
|
||||||
@ -2105,7 +2393,7 @@ func (dbx *apiImpl) MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2174,7 +2462,7 @@ func (dbx *apiImpl) MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2243,7 +2531,7 @@ func (dbx *apiImpl) MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJ
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2312,7 +2600,7 @@ func (dbx *apiImpl) MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetIn
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2381,7 +2669,7 @@ func (dbx *apiImpl) MembersList(arg *MembersListArg) (res *MembersListResult, er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2450,7 +2738,7 @@ func (dbx *apiImpl) MembersListContinue(arg *MembersListContinueArg) (res *Membe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2514,7 +2802,7 @@ func (dbx *apiImpl) MembersRecover(arg *MembersRecoverArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2583,7 +2871,7 @@ func (dbx *apiImpl) MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmpty
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2652,7 +2940,7 @@ func (dbx *apiImpl) MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.Po
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2716,7 +3004,7 @@ func (dbx *apiImpl) MembersSendWelcomeEmail(arg *UserSelectorArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2785,7 +3073,7 @@ func (dbx *apiImpl) MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (r
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2854,7 +3142,7 @@ func (dbx *apiImpl) MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMembe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2918,7 +3206,7 @@ func (dbx *apiImpl) MembersSuspend(arg *MembersDeactivateArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -2982,7 +3270,7 @@ func (dbx *apiImpl) MembersUnsuspend(arg *MembersUnsuspendArg) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3051,7 +3339,7 @@ func (dbx *apiImpl) NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespa
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3120,7 +3408,7 @@ func (dbx *apiImpl) NamespacesListContinue(arg *TeamNamespacesListContinueArg) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3191,7 +3479,7 @@ func (dbx *apiImpl) PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3262,7 +3550,7 @@ func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3325,7 +3613,7 @@ func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateR
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3396,7 +3684,7 @@ func (dbx *apiImpl) PropertiesTemplateUpdate(arg *file_properties.UpdateTemplate
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3465,7 +3753,7 @@ func (dbx *apiImpl) ReportsGetActivity(arg *DateRange) (res *GetActivityReport,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3534,7 +3822,7 @@ func (dbx *apiImpl) ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3603,7 +3891,7 @@ func (dbx *apiImpl) ReportsGetMembership(arg *DateRange) (res *GetMembershipRepo
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3672,7 +3960,7 @@ func (dbx *apiImpl) ReportsGetStorage(arg *DateRange) (res *GetStorageReport, er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3741,7 +4029,7 @@ func (dbx *apiImpl) TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMet
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3810,7 +4098,7 @@ func (dbx *apiImpl) TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolde
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3879,7 +4167,7 @@ func (dbx *apiImpl) TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderA
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -3948,7 +4236,7 @@ func (dbx *apiImpl) TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderM
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -4017,7 +4305,7 @@ func (dbx *apiImpl) TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFold
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -4086,7 +4374,7 @@ func (dbx *apiImpl) TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListR
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -4155,7 +4443,7 @@ func (dbx *apiImpl) TeamFolderListContinue(arg *TeamFolderListContinueArg) (res
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -4219,7 +4507,7 @@ func (dbx *apiImpl) TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -4288,7 +4576,7 @@ func (dbx *apiImpl) TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderM
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -4349,7 +4637,7 @@ func (dbx *apiImpl) TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdmi
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -4363,7 +4651,7 @@ func (dbx *apiImpl) TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdmi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
181
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/types.go
generated
vendored
181
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/types.go
generated
vendored
@ -187,7 +187,7 @@ func (u *BaseTeamFolderError) UnmarshalJSON(body []byte) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// CustomQuotaError : Error returned by setting member custom quota.
|
// CustomQuotaError : Error returned when getting member custom quota.
|
||||||
type CustomQuotaError struct {
|
type CustomQuotaError struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
}
|
}
|
||||||
@ -377,6 +377,126 @@ func NewDevicesActive(Windows []uint64, Macos []uint64, Linux []uint64, Ios []ui
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ExcludedUsersListArg : Excluded users list argument.
|
||||||
|
type ExcludedUsersListArg struct {
|
||||||
|
// Limit : Number of results to return per call.
|
||||||
|
Limit uint32 `json:"limit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewExcludedUsersListArg returns a new ExcludedUsersListArg instance
|
||||||
|
func NewExcludedUsersListArg() *ExcludedUsersListArg {
|
||||||
|
s := new(ExcludedUsersListArg)
|
||||||
|
s.Limit = 1000
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExcludedUsersListContinueArg : Excluded users list continue argument.
|
||||||
|
type ExcludedUsersListContinueArg struct {
|
||||||
|
// Cursor : Indicates from what point to get the next set of users.
|
||||||
|
Cursor string `json:"cursor"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewExcludedUsersListContinueArg returns a new ExcludedUsersListContinueArg instance
|
||||||
|
func NewExcludedUsersListContinueArg(Cursor string) *ExcludedUsersListContinueArg {
|
||||||
|
s := new(ExcludedUsersListContinueArg)
|
||||||
|
s.Cursor = Cursor
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExcludedUsersListContinueError : Excluded users list continue error.
|
||||||
|
type ExcludedUsersListContinueError struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for ExcludedUsersListContinueError
|
||||||
|
const (
|
||||||
|
ExcludedUsersListContinueErrorInvalidCursor = "invalid_cursor"
|
||||||
|
ExcludedUsersListContinueErrorOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ExcludedUsersListError : Excluded users list error.
|
||||||
|
type ExcludedUsersListError struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for ExcludedUsersListError
|
||||||
|
const (
|
||||||
|
ExcludedUsersListErrorListError = "list_error"
|
||||||
|
ExcludedUsersListErrorOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ExcludedUsersListResult : Excluded users list result.
|
||||||
|
type ExcludedUsersListResult struct {
|
||||||
|
// Users : has no documentation (yet)
|
||||||
|
Users []*MemberProfile `json:"users"`
|
||||||
|
// Cursor : Pass the cursor into
|
||||||
|
// `memberSpaceLimitsExcludedUsersListContinue` to obtain additional
|
||||||
|
// excluded users.
|
||||||
|
Cursor string `json:"cursor,omitempty"`
|
||||||
|
// HasMore : Is true if there are additional excluded users that have not
|
||||||
|
// been returned yet. An additional call to
|
||||||
|
// `memberSpaceLimitsExcludedUsersListContinue` can retrieve them.
|
||||||
|
HasMore bool `json:"has_more"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewExcludedUsersListResult returns a new ExcludedUsersListResult instance
|
||||||
|
func NewExcludedUsersListResult(Users []*MemberProfile, HasMore bool) *ExcludedUsersListResult {
|
||||||
|
s := new(ExcludedUsersListResult)
|
||||||
|
s.Users = Users
|
||||||
|
s.HasMore = HasMore
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExcludedUsersUpdateArg : Argument of excluded users update operation. Should
|
||||||
|
// include a list of users to add/remove (according to endpoint), Maximum size
|
||||||
|
// of the list is 1000 users.
|
||||||
|
type ExcludedUsersUpdateArg struct {
|
||||||
|
// Users : List of users to be added/removed.
|
||||||
|
Users []*UserSelectorArg `json:"users,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewExcludedUsersUpdateArg returns a new ExcludedUsersUpdateArg instance
|
||||||
|
func NewExcludedUsersUpdateArg() *ExcludedUsersUpdateArg {
|
||||||
|
s := new(ExcludedUsersUpdateArg)
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExcludedUsersUpdateError : Excluded users update error.
|
||||||
|
type ExcludedUsersUpdateError struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for ExcludedUsersUpdateError
|
||||||
|
const (
|
||||||
|
ExcludedUsersUpdateErrorUsersNotInTeam = "users_not_in_team"
|
||||||
|
ExcludedUsersUpdateErrorTooManyUsers = "too_many_users"
|
||||||
|
ExcludedUsersUpdateErrorOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ExcludedUsersUpdateResult : Excluded users update result.
|
||||||
|
type ExcludedUsersUpdateResult struct {
|
||||||
|
// Status : Update status.
|
||||||
|
Status *ExcludedUsersUpdateStatus `json:"status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewExcludedUsersUpdateResult returns a new ExcludedUsersUpdateResult instance
|
||||||
|
func NewExcludedUsersUpdateResult(Status *ExcludedUsersUpdateStatus) *ExcludedUsersUpdateResult {
|
||||||
|
s := new(ExcludedUsersUpdateResult)
|
||||||
|
s.Status = Status
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExcludedUsersUpdateStatus : Excluded users update operation status.
|
||||||
|
type ExcludedUsersUpdateStatus struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for ExcludedUsersUpdateStatus
|
||||||
|
const (
|
||||||
|
ExcludedUsersUpdateStatusSuccess = "success"
|
||||||
|
ExcludedUsersUpdateStatusOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
// Feature : A set of features that Dropbox for Business account support.
|
// Feature : A set of features that Dropbox for Business account support.
|
||||||
type Feature struct {
|
type Feature struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
@ -386,6 +506,7 @@ type Feature struct {
|
|||||||
const (
|
const (
|
||||||
FeatureUploadApiRateLimit = "upload_api_rate_limit"
|
FeatureUploadApiRateLimit = "upload_api_rate_limit"
|
||||||
FeatureHasTeamSharedDropbox = "has_team_shared_dropbox"
|
FeatureHasTeamSharedDropbox = "has_team_shared_dropbox"
|
||||||
|
FeatureHasTeamFileEvents = "has_team_file_events"
|
||||||
FeatureOther = "other"
|
FeatureOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -397,12 +518,15 @@ type FeatureValue struct {
|
|||||||
UploadApiRateLimit *UploadApiRateLimitValue `json:"upload_api_rate_limit,omitempty"`
|
UploadApiRateLimit *UploadApiRateLimitValue `json:"upload_api_rate_limit,omitempty"`
|
||||||
// HasTeamSharedDropbox : has no documentation (yet)
|
// HasTeamSharedDropbox : has no documentation (yet)
|
||||||
HasTeamSharedDropbox *HasTeamSharedDropboxValue `json:"has_team_shared_dropbox,omitempty"`
|
HasTeamSharedDropbox *HasTeamSharedDropboxValue `json:"has_team_shared_dropbox,omitempty"`
|
||||||
|
// HasTeamFileEvents : has no documentation (yet)
|
||||||
|
HasTeamFileEvents *HasTeamFileEventsValue `json:"has_team_file_events,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for FeatureValue
|
// Valid tag values for FeatureValue
|
||||||
const (
|
const (
|
||||||
FeatureValueUploadApiRateLimit = "upload_api_rate_limit"
|
FeatureValueUploadApiRateLimit = "upload_api_rate_limit"
|
||||||
FeatureValueHasTeamSharedDropbox = "has_team_shared_dropbox"
|
FeatureValueHasTeamSharedDropbox = "has_team_shared_dropbox"
|
||||||
|
FeatureValueHasTeamFileEvents = "has_team_file_events"
|
||||||
FeatureValueOther = "other"
|
FeatureValueOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -414,6 +538,8 @@ func (u *FeatureValue) UnmarshalJSON(body []byte) error {
|
|||||||
UploadApiRateLimit json.RawMessage `json:"upload_api_rate_limit,omitempty"`
|
UploadApiRateLimit json.RawMessage `json:"upload_api_rate_limit,omitempty"`
|
||||||
// HasTeamSharedDropbox : has no documentation (yet)
|
// HasTeamSharedDropbox : has no documentation (yet)
|
||||||
HasTeamSharedDropbox json.RawMessage `json:"has_team_shared_dropbox,omitempty"`
|
HasTeamSharedDropbox json.RawMessage `json:"has_team_shared_dropbox,omitempty"`
|
||||||
|
// HasTeamFileEvents : has no documentation (yet)
|
||||||
|
HasTeamFileEvents json.RawMessage `json:"has_team_file_events,omitempty"`
|
||||||
}
|
}
|
||||||
var w wrap
|
var w wrap
|
||||||
var err error
|
var err error
|
||||||
@ -431,6 +557,12 @@ func (u *FeatureValue) UnmarshalJSON(body []byte) error {
|
|||||||
case "has_team_shared_dropbox":
|
case "has_team_shared_dropbox":
|
||||||
err = json.Unmarshal(w.HasTeamSharedDropbox, &u.HasTeamSharedDropbox)
|
err = json.Unmarshal(w.HasTeamSharedDropbox, &u.HasTeamSharedDropbox)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
case "has_team_file_events":
|
||||||
|
err = json.Unmarshal(w.HasTeamFileEvents, &u.HasTeamFileEvents)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -1364,6 +1496,41 @@ func (u *GroupsSelector) UnmarshalJSON(body []byte) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HasTeamFileEventsValue : The value for `Feature.has_team_file_events`.
|
||||||
|
type HasTeamFileEventsValue struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
// Enabled : Does this team have file events.
|
||||||
|
Enabled bool `json:"enabled,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for HasTeamFileEventsValue
|
||||||
|
const (
|
||||||
|
HasTeamFileEventsValueEnabled = "enabled"
|
||||||
|
HasTeamFileEventsValueOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UnmarshalJSON deserializes into a HasTeamFileEventsValue instance
|
||||||
|
func (u *HasTeamFileEventsValue) UnmarshalJSON(body []byte) error {
|
||||||
|
type wrap struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
var w wrap
|
||||||
|
var err error
|
||||||
|
if err = json.Unmarshal(body, &w); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
u.Tag = w.Tag
|
||||||
|
switch u.Tag {
|
||||||
|
case "enabled":
|
||||||
|
err = json.Unmarshal(body, &u.Enabled)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// HasTeamSharedDropboxValue : The value for `Feature.has_team_shared_dropbox`.
|
// HasTeamSharedDropboxValue : The value for `Feature.has_team_shared_dropbox`.
|
||||||
type HasTeamSharedDropboxValue struct {
|
type HasTeamSharedDropboxValue struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
@ -2869,6 +3036,18 @@ func NewSetCustomQuotaArg(UsersAndQuotas []*UserCustomQuotaArg) *SetCustomQuotaA
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetCustomQuotaError : Error returned when setting member custom quota.
|
||||||
|
type SetCustomQuotaError struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for SetCustomQuotaError
|
||||||
|
const (
|
||||||
|
SetCustomQuotaErrorTooManyUsers = "too_many_users"
|
||||||
|
SetCustomQuotaErrorOther = "other"
|
||||||
|
SetCustomQuotaErrorSomeUsersAreExcluded = "some_users_are_excluded"
|
||||||
|
)
|
||||||
|
|
||||||
// StorageBucket : Describes the number of users in a specific storage bucket.
|
// StorageBucket : Describes the number of users in a specific storage bucket.
|
||||||
type StorageBucket struct {
|
type StorageBucket struct {
|
||||||
// Bucket : The name of the storage bucket. For example, '1G' is a bucket of
|
// Bucket : The name of the storage bucket. For example, '1G' is a bucket of
|
||||||
|
6
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/client.go
generated
vendored
6
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/client.go
generated
vendored
@ -96,7 +96,7 @@ func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -165,7 +165,7 @@ func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -179,7 +179,7 @@ func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
421
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/types.go
generated
vendored
421
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/types.go
generated
vendored
@ -554,11 +554,11 @@ type Certificate struct {
|
|||||||
// Sha1Fingerprint : Certificate sha1 fingerprint.
|
// Sha1Fingerprint : Certificate sha1 fingerprint.
|
||||||
Sha1Fingerprint string `json:"sha1_fingerprint"`
|
Sha1Fingerprint string `json:"sha1_fingerprint"`
|
||||||
// CommonName : Certificate common name.
|
// CommonName : Certificate common name.
|
||||||
CommonName string `json:"common_name"`
|
CommonName string `json:"common_name,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCertificate returns a new Certificate instance
|
// NewCertificate returns a new Certificate instance
|
||||||
func NewCertificate(Subject string, Issuer string, IssueDate string, ExpirationDate string, SerialNumber string, Sha1Fingerprint string, CommonName string) *Certificate {
|
func NewCertificate(Subject string, Issuer string, IssueDate string, ExpirationDate string, SerialNumber string, Sha1Fingerprint string) *Certificate {
|
||||||
s := new(Certificate)
|
s := new(Certificate)
|
||||||
s.Subject = Subject
|
s.Subject = Subject
|
||||||
s.Issuer = Issuer
|
s.Issuer = Issuer
|
||||||
@ -566,7 +566,6 @@ func NewCertificate(Subject string, Issuer string, IssueDate string, ExpirationD
|
|||||||
s.ExpirationDate = ExpirationDate
|
s.ExpirationDate = ExpirationDate
|
||||||
s.SerialNumber = SerialNumber
|
s.SerialNumber = SerialNumber
|
||||||
s.Sha1Fingerprint = Sha1Fingerprint
|
s.Sha1Fingerprint = Sha1Fingerprint
|
||||||
s.CommonName = CommonName
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1286,13 +1285,16 @@ func NewEmmCreateUsageReportDetails() *EmmCreateUsageReportDetails {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmmLoginSuccessDetails : Signed in using the Dropbox EMM app.
|
// EmmErrorDetails : Failed to sign in via EMM.
|
||||||
type EmmLoginSuccessDetails struct {
|
type EmmErrorDetails struct {
|
||||||
|
// ErrorDetails : Error details.
|
||||||
|
ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewEmmLoginSuccessDetails returns a new EmmLoginSuccessDetails instance
|
// NewEmmErrorDetails returns a new EmmErrorDetails instance
|
||||||
func NewEmmLoginSuccessDetails() *EmmLoginSuccessDetails {
|
func NewEmmErrorDetails(ErrorDetails *FailureDetailsLogInfo) *EmmErrorDetails {
|
||||||
s := new(EmmLoginSuccessDetails)
|
s := new(EmmErrorDetails)
|
||||||
|
s.ErrorDetails = ErrorDetails
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1534,10 +1536,10 @@ type EventDetails struct {
|
|||||||
FileSaveCopyReferenceDetails *FileSaveCopyReferenceDetails `json:"file_save_copy_reference_details,omitempty"`
|
FileSaveCopyReferenceDetails *FileSaveCopyReferenceDetails `json:"file_save_copy_reference_details,omitempty"`
|
||||||
// FileRequestAddDeadlineDetails : Added a deadline to a file request.
|
// FileRequestAddDeadlineDetails : Added a deadline to a file request.
|
||||||
FileRequestAddDeadlineDetails *FileRequestAddDeadlineDetails `json:"file_request_add_deadline_details,omitempty"`
|
FileRequestAddDeadlineDetails *FileRequestAddDeadlineDetails `json:"file_request_add_deadline_details,omitempty"`
|
||||||
|
// FileRequestChangeDetails : Change a file request.
|
||||||
|
FileRequestChangeDetails *FileRequestChangeDetails `json:"file_request_change_details,omitempty"`
|
||||||
// FileRequestChangeFolderDetails : Changed the file request folder.
|
// FileRequestChangeFolderDetails : Changed the file request folder.
|
||||||
FileRequestChangeFolderDetails *FileRequestChangeFolderDetails `json:"file_request_change_folder_details,omitempty"`
|
FileRequestChangeFolderDetails *FileRequestChangeFolderDetails `json:"file_request_change_folder_details,omitempty"`
|
||||||
// FileRequestChangeTitleDetails : Change the file request title.
|
|
||||||
FileRequestChangeTitleDetails *FileRequestChangeTitleDetails `json:"file_request_change_title_details,omitempty"`
|
|
||||||
// FileRequestCloseDetails : Closed a file request.
|
// FileRequestCloseDetails : Closed a file request.
|
||||||
FileRequestCloseDetails *FileRequestCloseDetails `json:"file_request_close_details,omitempty"`
|
FileRequestCloseDetails *FileRequestCloseDetails `json:"file_request_close_details,omitempty"`
|
||||||
// FileRequestCreateDetails : Created a file request.
|
// FileRequestCreateDetails : Created a file request.
|
||||||
@ -1571,14 +1573,14 @@ type EventDetails struct {
|
|||||||
GroupRemoveMemberDetails *GroupRemoveMemberDetails `json:"group_remove_member_details,omitempty"`
|
GroupRemoveMemberDetails *GroupRemoveMemberDetails `json:"group_remove_member_details,omitempty"`
|
||||||
// GroupRenameDetails : Renamed a group.
|
// GroupRenameDetails : Renamed a group.
|
||||||
GroupRenameDetails *GroupRenameDetails `json:"group_rename_details,omitempty"`
|
GroupRenameDetails *GroupRenameDetails `json:"group_rename_details,omitempty"`
|
||||||
// EmmLoginSuccessDetails : Signed in using the Dropbox EMM app.
|
// EmmErrorDetails : Failed to sign in via EMM.
|
||||||
EmmLoginSuccessDetails *EmmLoginSuccessDetails `json:"emm_login_success_details,omitempty"`
|
EmmErrorDetails *EmmErrorDetails `json:"emm_error_details,omitempty"`
|
||||||
|
// LoginFailDetails : Failed to sign in.
|
||||||
|
LoginFailDetails *LoginFailDetails `json:"login_fail_details,omitempty"`
|
||||||
|
// LoginSuccessDetails : Signed in.
|
||||||
|
LoginSuccessDetails *LoginSuccessDetails `json:"login_success_details,omitempty"`
|
||||||
// LogoutDetails : Signed out.
|
// LogoutDetails : Signed out.
|
||||||
LogoutDetails *LogoutDetails `json:"logout_details,omitempty"`
|
LogoutDetails *LogoutDetails `json:"logout_details,omitempty"`
|
||||||
// PasswordLoginFailDetails : Failed to sign in using a password.
|
|
||||||
PasswordLoginFailDetails *PasswordLoginFailDetails `json:"password_login_fail_details,omitempty"`
|
|
||||||
// PasswordLoginSuccessDetails : Signed in using a password.
|
|
||||||
PasswordLoginSuccessDetails *PasswordLoginSuccessDetails `json:"password_login_success_details,omitempty"`
|
|
||||||
// ResellerSupportSessionEndDetails : Ended reseller support session.
|
// ResellerSupportSessionEndDetails : Ended reseller support session.
|
||||||
ResellerSupportSessionEndDetails *ResellerSupportSessionEndDetails `json:"reseller_support_session_end_details,omitempty"`
|
ResellerSupportSessionEndDetails *ResellerSupportSessionEndDetails `json:"reseller_support_session_end_details,omitempty"`
|
||||||
// ResellerSupportSessionStartDetails : Started reseller support session.
|
// ResellerSupportSessionStartDetails : Started reseller support session.
|
||||||
@ -1587,8 +1589,8 @@ type EventDetails struct {
|
|||||||
SignInAsSessionEndDetails *SignInAsSessionEndDetails `json:"sign_in_as_session_end_details,omitempty"`
|
SignInAsSessionEndDetails *SignInAsSessionEndDetails `json:"sign_in_as_session_end_details,omitempty"`
|
||||||
// SignInAsSessionStartDetails : Started admin sign-in-as session.
|
// SignInAsSessionStartDetails : Started admin sign-in-as session.
|
||||||
SignInAsSessionStartDetails *SignInAsSessionStartDetails `json:"sign_in_as_session_start_details,omitempty"`
|
SignInAsSessionStartDetails *SignInAsSessionStartDetails `json:"sign_in_as_session_start_details,omitempty"`
|
||||||
// SsoLoginFailDetails : Failed to sign in using SSO.
|
// SsoErrorDetails : Failed to sign in via SSO.
|
||||||
SsoLoginFailDetails *SsoLoginFailDetails `json:"sso_login_fail_details,omitempty"`
|
SsoErrorDetails *SsoErrorDetails `json:"sso_error_details,omitempty"`
|
||||||
// MemberAddNameDetails : Set team member name when joining team.
|
// MemberAddNameDetails : Set team member name when joining team.
|
||||||
MemberAddNameDetails *MemberAddNameDetails `json:"member_add_name_details,omitempty"`
|
MemberAddNameDetails *MemberAddNameDetails `json:"member_add_name_details,omitempty"`
|
||||||
// MemberChangeAdminRoleDetails : Change the admin role belonging to team
|
// MemberChangeAdminRoleDetails : Change the admin role belonging to team
|
||||||
@ -1951,8 +1953,8 @@ type EventDetails struct {
|
|||||||
// MemberSpaceLimitsAddExceptionDetails : Added an exception for one or more
|
// MemberSpaceLimitsAddExceptionDetails : Added an exception for one or more
|
||||||
// team members to bypass space limits imposed by policy.
|
// team members to bypass space limits imposed by policy.
|
||||||
MemberSpaceLimitsAddExceptionDetails *MemberSpaceLimitsAddExceptionDetails `json:"member_space_limits_add_exception_details,omitempty"`
|
MemberSpaceLimitsAddExceptionDetails *MemberSpaceLimitsAddExceptionDetails `json:"member_space_limits_add_exception_details,omitempty"`
|
||||||
// MemberSpaceLimitsChangePolicyDetails : Changed the storage limits applied
|
// MemberSpaceLimitsChangePolicyDetails : Changed the team default limit
|
||||||
// to team members by policy.
|
// level.
|
||||||
MemberSpaceLimitsChangePolicyDetails *MemberSpaceLimitsChangePolicyDetails `json:"member_space_limits_change_policy_details,omitempty"`
|
MemberSpaceLimitsChangePolicyDetails *MemberSpaceLimitsChangePolicyDetails `json:"member_space_limits_change_policy_details,omitempty"`
|
||||||
// MemberSpaceLimitsRemoveExceptionDetails : Removed an exception for one or
|
// MemberSpaceLimitsRemoveExceptionDetails : Removed an exception for one or
|
||||||
// more team members to bypass space limits imposed by policy.
|
// more team members to bypass space limits imposed by policy.
|
||||||
@ -2120,8 +2122,8 @@ const (
|
|||||||
EventDetailsFileRollbackChangesDetails = "file_rollback_changes_details"
|
EventDetailsFileRollbackChangesDetails = "file_rollback_changes_details"
|
||||||
EventDetailsFileSaveCopyReferenceDetails = "file_save_copy_reference_details"
|
EventDetailsFileSaveCopyReferenceDetails = "file_save_copy_reference_details"
|
||||||
EventDetailsFileRequestAddDeadlineDetails = "file_request_add_deadline_details"
|
EventDetailsFileRequestAddDeadlineDetails = "file_request_add_deadline_details"
|
||||||
|
EventDetailsFileRequestChangeDetails = "file_request_change_details"
|
||||||
EventDetailsFileRequestChangeFolderDetails = "file_request_change_folder_details"
|
EventDetailsFileRequestChangeFolderDetails = "file_request_change_folder_details"
|
||||||
EventDetailsFileRequestChangeTitleDetails = "file_request_change_title_details"
|
|
||||||
EventDetailsFileRequestCloseDetails = "file_request_close_details"
|
EventDetailsFileRequestCloseDetails = "file_request_close_details"
|
||||||
EventDetailsFileRequestCreateDetails = "file_request_create_details"
|
EventDetailsFileRequestCreateDetails = "file_request_create_details"
|
||||||
EventDetailsFileRequestReceiveFileDetails = "file_request_receive_file_details"
|
EventDetailsFileRequestReceiveFileDetails = "file_request_receive_file_details"
|
||||||
@ -2138,15 +2140,15 @@ const (
|
|||||||
EventDetailsGroupRemoveExternalIdDetails = "group_remove_external_id_details"
|
EventDetailsGroupRemoveExternalIdDetails = "group_remove_external_id_details"
|
||||||
EventDetailsGroupRemoveMemberDetails = "group_remove_member_details"
|
EventDetailsGroupRemoveMemberDetails = "group_remove_member_details"
|
||||||
EventDetailsGroupRenameDetails = "group_rename_details"
|
EventDetailsGroupRenameDetails = "group_rename_details"
|
||||||
EventDetailsEmmLoginSuccessDetails = "emm_login_success_details"
|
EventDetailsEmmErrorDetails = "emm_error_details"
|
||||||
|
EventDetailsLoginFailDetails = "login_fail_details"
|
||||||
|
EventDetailsLoginSuccessDetails = "login_success_details"
|
||||||
EventDetailsLogoutDetails = "logout_details"
|
EventDetailsLogoutDetails = "logout_details"
|
||||||
EventDetailsPasswordLoginFailDetails = "password_login_fail_details"
|
|
||||||
EventDetailsPasswordLoginSuccessDetails = "password_login_success_details"
|
|
||||||
EventDetailsResellerSupportSessionEndDetails = "reseller_support_session_end_details"
|
EventDetailsResellerSupportSessionEndDetails = "reseller_support_session_end_details"
|
||||||
EventDetailsResellerSupportSessionStartDetails = "reseller_support_session_start_details"
|
EventDetailsResellerSupportSessionStartDetails = "reseller_support_session_start_details"
|
||||||
EventDetailsSignInAsSessionEndDetails = "sign_in_as_session_end_details"
|
EventDetailsSignInAsSessionEndDetails = "sign_in_as_session_end_details"
|
||||||
EventDetailsSignInAsSessionStartDetails = "sign_in_as_session_start_details"
|
EventDetailsSignInAsSessionStartDetails = "sign_in_as_session_start_details"
|
||||||
EventDetailsSsoLoginFailDetails = "sso_login_fail_details"
|
EventDetailsSsoErrorDetails = "sso_error_details"
|
||||||
EventDetailsMemberAddNameDetails = "member_add_name_details"
|
EventDetailsMemberAddNameDetails = "member_add_name_details"
|
||||||
EventDetailsMemberChangeAdminRoleDetails = "member_change_admin_role_details"
|
EventDetailsMemberChangeAdminRoleDetails = "member_change_admin_role_details"
|
||||||
EventDetailsMemberChangeEmailDetails = "member_change_email_details"
|
EventDetailsMemberChangeEmailDetails = "member_change_email_details"
|
||||||
@ -2498,10 +2500,10 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
|||||||
FileSaveCopyReferenceDetails json.RawMessage `json:"file_save_copy_reference_details,omitempty"`
|
FileSaveCopyReferenceDetails json.RawMessage `json:"file_save_copy_reference_details,omitempty"`
|
||||||
// FileRequestAddDeadlineDetails : Added a deadline to a file request.
|
// FileRequestAddDeadlineDetails : Added a deadline to a file request.
|
||||||
FileRequestAddDeadlineDetails json.RawMessage `json:"file_request_add_deadline_details,omitempty"`
|
FileRequestAddDeadlineDetails json.RawMessage `json:"file_request_add_deadline_details,omitempty"`
|
||||||
|
// FileRequestChangeDetails : Change a file request.
|
||||||
|
FileRequestChangeDetails json.RawMessage `json:"file_request_change_details,omitempty"`
|
||||||
// FileRequestChangeFolderDetails : Changed the file request folder.
|
// FileRequestChangeFolderDetails : Changed the file request folder.
|
||||||
FileRequestChangeFolderDetails json.RawMessage `json:"file_request_change_folder_details,omitempty"`
|
FileRequestChangeFolderDetails json.RawMessage `json:"file_request_change_folder_details,omitempty"`
|
||||||
// FileRequestChangeTitleDetails : Change the file request title.
|
|
||||||
FileRequestChangeTitleDetails json.RawMessage `json:"file_request_change_title_details,omitempty"`
|
|
||||||
// FileRequestCloseDetails : Closed a file request.
|
// FileRequestCloseDetails : Closed a file request.
|
||||||
FileRequestCloseDetails json.RawMessage `json:"file_request_close_details,omitempty"`
|
FileRequestCloseDetails json.RawMessage `json:"file_request_close_details,omitempty"`
|
||||||
// FileRequestCreateDetails : Created a file request.
|
// FileRequestCreateDetails : Created a file request.
|
||||||
@ -2535,14 +2537,14 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
|||||||
GroupRemoveMemberDetails json.RawMessage `json:"group_remove_member_details,omitempty"`
|
GroupRemoveMemberDetails json.RawMessage `json:"group_remove_member_details,omitempty"`
|
||||||
// GroupRenameDetails : Renamed a group.
|
// GroupRenameDetails : Renamed a group.
|
||||||
GroupRenameDetails json.RawMessage `json:"group_rename_details,omitempty"`
|
GroupRenameDetails json.RawMessage `json:"group_rename_details,omitempty"`
|
||||||
// EmmLoginSuccessDetails : Signed in using the Dropbox EMM app.
|
// EmmErrorDetails : Failed to sign in via EMM.
|
||||||
EmmLoginSuccessDetails json.RawMessage `json:"emm_login_success_details,omitempty"`
|
EmmErrorDetails json.RawMessage `json:"emm_error_details,omitempty"`
|
||||||
|
// LoginFailDetails : Failed to sign in.
|
||||||
|
LoginFailDetails json.RawMessage `json:"login_fail_details,omitempty"`
|
||||||
|
// LoginSuccessDetails : Signed in.
|
||||||
|
LoginSuccessDetails json.RawMessage `json:"login_success_details,omitempty"`
|
||||||
// LogoutDetails : Signed out.
|
// LogoutDetails : Signed out.
|
||||||
LogoutDetails json.RawMessage `json:"logout_details,omitempty"`
|
LogoutDetails json.RawMessage `json:"logout_details,omitempty"`
|
||||||
// PasswordLoginFailDetails : Failed to sign in using a password.
|
|
||||||
PasswordLoginFailDetails json.RawMessage `json:"password_login_fail_details,omitempty"`
|
|
||||||
// PasswordLoginSuccessDetails : Signed in using a password.
|
|
||||||
PasswordLoginSuccessDetails json.RawMessage `json:"password_login_success_details,omitempty"`
|
|
||||||
// ResellerSupportSessionEndDetails : Ended reseller support session.
|
// ResellerSupportSessionEndDetails : Ended reseller support session.
|
||||||
ResellerSupportSessionEndDetails json.RawMessage `json:"reseller_support_session_end_details,omitempty"`
|
ResellerSupportSessionEndDetails json.RawMessage `json:"reseller_support_session_end_details,omitempty"`
|
||||||
// ResellerSupportSessionStartDetails : Started reseller support
|
// ResellerSupportSessionStartDetails : Started reseller support
|
||||||
@ -2552,8 +2554,8 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
|||||||
SignInAsSessionEndDetails json.RawMessage `json:"sign_in_as_session_end_details,omitempty"`
|
SignInAsSessionEndDetails json.RawMessage `json:"sign_in_as_session_end_details,omitempty"`
|
||||||
// SignInAsSessionStartDetails : Started admin sign-in-as session.
|
// SignInAsSessionStartDetails : Started admin sign-in-as session.
|
||||||
SignInAsSessionStartDetails json.RawMessage `json:"sign_in_as_session_start_details,omitempty"`
|
SignInAsSessionStartDetails json.RawMessage `json:"sign_in_as_session_start_details,omitempty"`
|
||||||
// SsoLoginFailDetails : Failed to sign in using SSO.
|
// SsoErrorDetails : Failed to sign in via SSO.
|
||||||
SsoLoginFailDetails json.RawMessage `json:"sso_login_fail_details,omitempty"`
|
SsoErrorDetails json.RawMessage `json:"sso_error_details,omitempty"`
|
||||||
// MemberAddNameDetails : Set team member name when joining team.
|
// MemberAddNameDetails : Set team member name when joining team.
|
||||||
MemberAddNameDetails json.RawMessage `json:"member_add_name_details,omitempty"`
|
MemberAddNameDetails json.RawMessage `json:"member_add_name_details,omitempty"`
|
||||||
// MemberChangeAdminRoleDetails : Change the admin role belonging to
|
// MemberChangeAdminRoleDetails : Change the admin role belonging to
|
||||||
@ -2927,8 +2929,8 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
|||||||
// MemberSpaceLimitsAddExceptionDetails : Added an exception for one or
|
// MemberSpaceLimitsAddExceptionDetails : Added an exception for one or
|
||||||
// more team members to bypass space limits imposed by policy.
|
// more team members to bypass space limits imposed by policy.
|
||||||
MemberSpaceLimitsAddExceptionDetails json.RawMessage `json:"member_space_limits_add_exception_details,omitempty"`
|
MemberSpaceLimitsAddExceptionDetails json.RawMessage `json:"member_space_limits_add_exception_details,omitempty"`
|
||||||
// MemberSpaceLimitsChangePolicyDetails : Changed the storage limits
|
// MemberSpaceLimitsChangePolicyDetails : Changed the team default limit
|
||||||
// applied to team members by policy.
|
// level.
|
||||||
MemberSpaceLimitsChangePolicyDetails json.RawMessage `json:"member_space_limits_change_policy_details,omitempty"`
|
MemberSpaceLimitsChangePolicyDetails json.RawMessage `json:"member_space_limits_change_policy_details,omitempty"`
|
||||||
// MemberSpaceLimitsRemoveExceptionDetails : Removed an exception for
|
// MemberSpaceLimitsRemoveExceptionDetails : Removed an exception for
|
||||||
// one or more team members to bypass space limits imposed by policy.
|
// one or more team members to bypass space limits imposed by policy.
|
||||||
@ -3429,14 +3431,14 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
case "file_request_change_folder_details":
|
case "file_request_change_details":
|
||||||
err = json.Unmarshal(body, &u.FileRequestChangeFolderDetails)
|
err = json.Unmarshal(body, &u.FileRequestChangeDetails)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
case "file_request_change_title_details":
|
case "file_request_change_folder_details":
|
||||||
err = json.Unmarshal(body, &u.FileRequestChangeTitleDetails)
|
err = json.Unmarshal(body, &u.FileRequestChangeFolderDetails)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -3537,8 +3539,20 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
case "emm_login_success_details":
|
case "emm_error_details":
|
||||||
err = json.Unmarshal(body, &u.EmmLoginSuccessDetails)
|
err = json.Unmarshal(body, &u.EmmErrorDetails)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
case "login_fail_details":
|
||||||
|
err = json.Unmarshal(body, &u.LoginFailDetails)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
case "login_success_details":
|
||||||
|
err = json.Unmarshal(body, &u.LoginSuccessDetails)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -3546,18 +3560,6 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
|||||||
case "logout_details":
|
case "logout_details":
|
||||||
err = json.Unmarshal(body, &u.LogoutDetails)
|
err = json.Unmarshal(body, &u.LogoutDetails)
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
case "password_login_fail_details":
|
|
||||||
err = json.Unmarshal(body, &u.PasswordLoginFailDetails)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
case "password_login_success_details":
|
|
||||||
err = json.Unmarshal(body, &u.PasswordLoginSuccessDetails)
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -3585,8 +3587,8 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
case "sso_login_fail_details":
|
case "sso_error_details":
|
||||||
err = json.Unmarshal(body, &u.SsoLoginFailDetails)
|
err = json.Unmarshal(body, &u.SsoErrorDetails)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -4741,8 +4743,8 @@ const (
|
|||||||
EventTypeFileRollbackChanges = "file_rollback_changes"
|
EventTypeFileRollbackChanges = "file_rollback_changes"
|
||||||
EventTypeFileSaveCopyReference = "file_save_copy_reference"
|
EventTypeFileSaveCopyReference = "file_save_copy_reference"
|
||||||
EventTypeFileRequestAddDeadline = "file_request_add_deadline"
|
EventTypeFileRequestAddDeadline = "file_request_add_deadline"
|
||||||
|
EventTypeFileRequestChange = "file_request_change"
|
||||||
EventTypeFileRequestChangeFolder = "file_request_change_folder"
|
EventTypeFileRequestChangeFolder = "file_request_change_folder"
|
||||||
EventTypeFileRequestChangeTitle = "file_request_change_title"
|
|
||||||
EventTypeFileRequestClose = "file_request_close"
|
EventTypeFileRequestClose = "file_request_close"
|
||||||
EventTypeFileRequestCreate = "file_request_create"
|
EventTypeFileRequestCreate = "file_request_create"
|
||||||
EventTypeFileRequestReceiveFile = "file_request_receive_file"
|
EventTypeFileRequestReceiveFile = "file_request_receive_file"
|
||||||
@ -4759,15 +4761,15 @@ const (
|
|||||||
EventTypeGroupRemoveExternalId = "group_remove_external_id"
|
EventTypeGroupRemoveExternalId = "group_remove_external_id"
|
||||||
EventTypeGroupRemoveMember = "group_remove_member"
|
EventTypeGroupRemoveMember = "group_remove_member"
|
||||||
EventTypeGroupRename = "group_rename"
|
EventTypeGroupRename = "group_rename"
|
||||||
EventTypeEmmLoginSuccess = "emm_login_success"
|
EventTypeEmmError = "emm_error"
|
||||||
|
EventTypeLoginFail = "login_fail"
|
||||||
|
EventTypeLoginSuccess = "login_success"
|
||||||
EventTypeLogout = "logout"
|
EventTypeLogout = "logout"
|
||||||
EventTypePasswordLoginFail = "password_login_fail"
|
|
||||||
EventTypePasswordLoginSuccess = "password_login_success"
|
|
||||||
EventTypeResellerSupportSessionEnd = "reseller_support_session_end"
|
EventTypeResellerSupportSessionEnd = "reseller_support_session_end"
|
||||||
EventTypeResellerSupportSessionStart = "reseller_support_session_start"
|
EventTypeResellerSupportSessionStart = "reseller_support_session_start"
|
||||||
EventTypeSignInAsSessionEnd = "sign_in_as_session_end"
|
EventTypeSignInAsSessionEnd = "sign_in_as_session_end"
|
||||||
EventTypeSignInAsSessionStart = "sign_in_as_session_start"
|
EventTypeSignInAsSessionStart = "sign_in_as_session_start"
|
||||||
EventTypeSsoLoginFail = "sso_login_fail"
|
EventTypeSsoError = "sso_error"
|
||||||
EventTypeMemberAddName = "member_add_name"
|
EventTypeMemberAddName = "member_add_name"
|
||||||
EventTypeMemberChangeAdminRole = "member_change_admin_role"
|
EventTypeMemberChangeAdminRole = "member_change_admin_role"
|
||||||
EventTypeMemberChangeEmail = "member_change_email"
|
EventTypeMemberChangeEmail = "member_change_email"
|
||||||
@ -4997,16 +4999,13 @@ func NewFailureDetailsLogInfo() *FailureDetailsLogInfo {
|
|||||||
|
|
||||||
// FileAddCommentDetails : Added a file comment.
|
// FileAddCommentDetails : Added a file comment.
|
||||||
type FileAddCommentDetails struct {
|
type FileAddCommentDetails struct {
|
||||||
// TargetAssetIndex : Target asset position in the Assets list.
|
|
||||||
TargetAssetIndex uint64 `json:"target_asset_index"`
|
|
||||||
// CommentText : Comment text. Might be missing due to historical data gap.
|
// CommentText : Comment text. Might be missing due to historical data gap.
|
||||||
CommentText string `json:"comment_text,omitempty"`
|
CommentText string `json:"comment_text,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileAddCommentDetails returns a new FileAddCommentDetails instance
|
// NewFileAddCommentDetails returns a new FileAddCommentDetails instance
|
||||||
func NewFileAddCommentDetails(TargetAssetIndex uint64) *FileAddCommentDetails {
|
func NewFileAddCommentDetails() *FileAddCommentDetails {
|
||||||
s := new(FileAddCommentDetails)
|
s := new(FileAddCommentDetails)
|
||||||
s.TargetAssetIndex = TargetAssetIndex
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5023,8 +5022,6 @@ func NewFileAddDetails() *FileAddDetails {
|
|||||||
// FileChangeCommentSubscriptionDetails : Subscribed to or unsubscribed from
|
// FileChangeCommentSubscriptionDetails : Subscribed to or unsubscribed from
|
||||||
// comment notifications for file.
|
// comment notifications for file.
|
||||||
type FileChangeCommentSubscriptionDetails struct {
|
type FileChangeCommentSubscriptionDetails struct {
|
||||||
// TargetAssetIndex : Target asset position in the Assets list.
|
|
||||||
TargetAssetIndex uint64 `json:"target_asset_index"`
|
|
||||||
// NewValue : New file comment subscription.
|
// NewValue : New file comment subscription.
|
||||||
NewValue *FileCommentNotificationPolicy `json:"new_value"`
|
NewValue *FileCommentNotificationPolicy `json:"new_value"`
|
||||||
// PreviousValue : Previous file comment subscription. Might be missing due
|
// PreviousValue : Previous file comment subscription. Might be missing due
|
||||||
@ -5033,9 +5030,8 @@ type FileChangeCommentSubscriptionDetails struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewFileChangeCommentSubscriptionDetails returns a new FileChangeCommentSubscriptionDetails instance
|
// NewFileChangeCommentSubscriptionDetails returns a new FileChangeCommentSubscriptionDetails instance
|
||||||
func NewFileChangeCommentSubscriptionDetails(TargetAssetIndex uint64, NewValue *FileCommentNotificationPolicy) *FileChangeCommentSubscriptionDetails {
|
func NewFileChangeCommentSubscriptionDetails(NewValue *FileCommentNotificationPolicy) *FileChangeCommentSubscriptionDetails {
|
||||||
s := new(FileChangeCommentSubscriptionDetails)
|
s := new(FileChangeCommentSubscriptionDetails)
|
||||||
s.TargetAssetIndex = TargetAssetIndex
|
|
||||||
s.NewValue = NewValue
|
s.NewValue = NewValue
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
@ -5096,16 +5092,13 @@ func NewFileCopyDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo)
|
|||||||
|
|
||||||
// FileDeleteCommentDetails : Deleted a file comment.
|
// FileDeleteCommentDetails : Deleted a file comment.
|
||||||
type FileDeleteCommentDetails struct {
|
type FileDeleteCommentDetails struct {
|
||||||
// TargetAssetIndex : Target asset position in the Assets list.
|
|
||||||
TargetAssetIndex uint64 `json:"target_asset_index"`
|
|
||||||
// CommentText : Comment text. Might be missing due to historical data gap.
|
// CommentText : Comment text. Might be missing due to historical data gap.
|
||||||
CommentText string `json:"comment_text,omitempty"`
|
CommentText string `json:"comment_text,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileDeleteCommentDetails returns a new FileDeleteCommentDetails instance
|
// NewFileDeleteCommentDetails returns a new FileDeleteCommentDetails instance
|
||||||
func NewFileDeleteCommentDetails(TargetAssetIndex uint64) *FileDeleteCommentDetails {
|
func NewFileDeleteCommentDetails() *FileDeleteCommentDetails {
|
||||||
s := new(FileDeleteCommentDetails)
|
s := new(FileDeleteCommentDetails)
|
||||||
s.TargetAssetIndex = TargetAssetIndex
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5151,16 +5144,13 @@ func NewFileGetCopyReferenceDetails() *FileGetCopyReferenceDetails {
|
|||||||
|
|
||||||
// FileLikeCommentDetails : Liked a file comment.
|
// FileLikeCommentDetails : Liked a file comment.
|
||||||
type FileLikeCommentDetails struct {
|
type FileLikeCommentDetails struct {
|
||||||
// TargetAssetIndex : Target asset position in the Assets list.
|
|
||||||
TargetAssetIndex uint64 `json:"target_asset_index"`
|
|
||||||
// CommentText : Comment text. Might be missing due to historical data gap.
|
// CommentText : Comment text. Might be missing due to historical data gap.
|
||||||
CommentText string `json:"comment_text,omitempty"`
|
CommentText string `json:"comment_text,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileLikeCommentDetails returns a new FileLikeCommentDetails instance
|
// NewFileLikeCommentDetails returns a new FileLikeCommentDetails instance
|
||||||
func NewFileLikeCommentDetails(TargetAssetIndex uint64) *FileLikeCommentDetails {
|
func NewFileLikeCommentDetails() *FileLikeCommentDetails {
|
||||||
s := new(FileLikeCommentDetails)
|
s := new(FileLikeCommentDetails)
|
||||||
s.TargetAssetIndex = TargetAssetIndex
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5241,6 +5231,9 @@ func NewFileRenameDetails(RelocateActionDetails []*RelocateAssetReferencesLogInf
|
|||||||
|
|
||||||
// FileRequestAddDeadlineDetails : Added a deadline to a file request.
|
// FileRequestAddDeadlineDetails : Added a deadline to a file request.
|
||||||
type FileRequestAddDeadlineDetails struct {
|
type FileRequestAddDeadlineDetails struct {
|
||||||
|
// FileRequestId : File request id. Might be missing due to historical data
|
||||||
|
// gap.
|
||||||
|
FileRequestId string `json:"file_request_id,omitempty"`
|
||||||
// RequestTitle : File request title.
|
// RequestTitle : File request title.
|
||||||
RequestTitle string `json:"request_title,omitempty"`
|
RequestTitle string `json:"request_title,omitempty"`
|
||||||
}
|
}
|
||||||
@ -5251,8 +5244,30 @@ func NewFileRequestAddDeadlineDetails() *FileRequestAddDeadlineDetails {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FileRequestChangeDetails : Change a file request.
|
||||||
|
type FileRequestChangeDetails struct {
|
||||||
|
// FileRequestId : File request id. Might be missing due to historical data
|
||||||
|
// gap.
|
||||||
|
FileRequestId string `json:"file_request_id,omitempty"`
|
||||||
|
// PreviousDetails : Previous file request details. Might be missing due to
|
||||||
|
// historical data gap.
|
||||||
|
PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"`
|
||||||
|
// NewDetails : New file request details.
|
||||||
|
NewDetails *FileRequestDetails `json:"new_details"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFileRequestChangeDetails returns a new FileRequestChangeDetails instance
|
||||||
|
func NewFileRequestChangeDetails(NewDetails *FileRequestDetails) *FileRequestChangeDetails {
|
||||||
|
s := new(FileRequestChangeDetails)
|
||||||
|
s.NewDetails = NewDetails
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
// FileRequestChangeFolderDetails : Changed the file request folder.
|
// FileRequestChangeFolderDetails : Changed the file request folder.
|
||||||
type FileRequestChangeFolderDetails struct {
|
type FileRequestChangeFolderDetails struct {
|
||||||
|
// FileRequestId : File request id. Might be missing due to historical data
|
||||||
|
// gap.
|
||||||
|
FileRequestId string `json:"file_request_id,omitempty"`
|
||||||
// RequestTitle : File request title.
|
// RequestTitle : File request title.
|
||||||
RequestTitle string `json:"request_title,omitempty"`
|
RequestTitle string `json:"request_title,omitempty"`
|
||||||
}
|
}
|
||||||
@ -5263,22 +5278,14 @@ func NewFileRequestChangeFolderDetails() *FileRequestChangeFolderDetails {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileRequestChangeTitleDetails : Change the file request title.
|
|
||||||
type FileRequestChangeTitleDetails struct {
|
|
||||||
// RequestTitle : File request title.
|
|
||||||
RequestTitle string `json:"request_title,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFileRequestChangeTitleDetails returns a new FileRequestChangeTitleDetails instance
|
|
||||||
func NewFileRequestChangeTitleDetails() *FileRequestChangeTitleDetails {
|
|
||||||
s := new(FileRequestChangeTitleDetails)
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
// FileRequestCloseDetails : Closed a file request.
|
// FileRequestCloseDetails : Closed a file request.
|
||||||
type FileRequestCloseDetails struct {
|
type FileRequestCloseDetails struct {
|
||||||
// RequestTitle : File request title.
|
// FileRequestId : File request id. Might be missing due to historical data
|
||||||
RequestTitle string `json:"request_title,omitempty"`
|
// gap.
|
||||||
|
FileRequestId string `json:"file_request_id,omitempty"`
|
||||||
|
// PreviousDetails : Previous file request details. Might be missing due to
|
||||||
|
// historical data gap.
|
||||||
|
PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileRequestCloseDetails returns a new FileRequestCloseDetails instance
|
// NewFileRequestCloseDetails returns a new FileRequestCloseDetails instance
|
||||||
@ -5289,8 +5296,12 @@ func NewFileRequestCloseDetails() *FileRequestCloseDetails {
|
|||||||
|
|
||||||
// FileRequestCreateDetails : Created a file request.
|
// FileRequestCreateDetails : Created a file request.
|
||||||
type FileRequestCreateDetails struct {
|
type FileRequestCreateDetails struct {
|
||||||
// RequestTitle : File request title.
|
// FileRequestId : File request id. Might be missing due to historical data
|
||||||
RequestTitle string `json:"request_title,omitempty"`
|
// gap.
|
||||||
|
FileRequestId string `json:"file_request_id,omitempty"`
|
||||||
|
// RequestDetails : File request details. Might be missing due to historical
|
||||||
|
// data gap.
|
||||||
|
RequestDetails *FileRequestDetails `json:"request_details,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileRequestCreateDetails returns a new FileRequestCreateDetails instance
|
// NewFileRequestCreateDetails returns a new FileRequestCreateDetails instance
|
||||||
@ -5299,8 +5310,29 @@ func NewFileRequestCreateDetails() *FileRequestCreateDetails {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FileRequestDetails : File request details
|
||||||
|
type FileRequestDetails struct {
|
||||||
|
// RequestTitle : File request title.
|
||||||
|
RequestTitle string `json:"request_title,omitempty"`
|
||||||
|
// AssetIndex : Asset position in the Assets list.
|
||||||
|
AssetIndex uint64 `json:"asset_index"`
|
||||||
|
// Deadline : File request deadline. Might be missing due to historical data
|
||||||
|
// gap.
|
||||||
|
Deadline time.Time `json:"deadline,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFileRequestDetails returns a new FileRequestDetails instance
|
||||||
|
func NewFileRequestDetails(AssetIndex uint64) *FileRequestDetails {
|
||||||
|
s := new(FileRequestDetails)
|
||||||
|
s.AssetIndex = AssetIndex
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
// FileRequestReceiveFileDetails : Received files for a file request.
|
// FileRequestReceiveFileDetails : Received files for a file request.
|
||||||
type FileRequestReceiveFileDetails struct {
|
type FileRequestReceiveFileDetails struct {
|
||||||
|
// FileRequestId : File request id. Might be missing due to historical data
|
||||||
|
// gap.
|
||||||
|
FileRequestId string `json:"file_request_id,omitempty"`
|
||||||
// RequestTitle : File request title.
|
// RequestTitle : File request title.
|
||||||
RequestTitle string `json:"request_title,omitempty"`
|
RequestTitle string `json:"request_title,omitempty"`
|
||||||
// SubmittedFileNames : Submitted file names.
|
// SubmittedFileNames : Submitted file names.
|
||||||
@ -5316,6 +5348,9 @@ func NewFileRequestReceiveFileDetails(SubmittedFileNames []string) *FileRequestR
|
|||||||
|
|
||||||
// FileRequestRemoveDeadlineDetails : Removed the file request deadline.
|
// FileRequestRemoveDeadlineDetails : Removed the file request deadline.
|
||||||
type FileRequestRemoveDeadlineDetails struct {
|
type FileRequestRemoveDeadlineDetails struct {
|
||||||
|
// FileRequestId : File request id. Might be missing due to historical data
|
||||||
|
// gap.
|
||||||
|
FileRequestId string `json:"file_request_id,omitempty"`
|
||||||
// RequestTitle : File request title.
|
// RequestTitle : File request title.
|
||||||
RequestTitle string `json:"request_title,omitempty"`
|
RequestTitle string `json:"request_title,omitempty"`
|
||||||
}
|
}
|
||||||
@ -5328,6 +5363,9 @@ func NewFileRequestRemoveDeadlineDetails() *FileRequestRemoveDeadlineDetails {
|
|||||||
|
|
||||||
// FileRequestSendDetails : Sent file request to users via email.
|
// FileRequestSendDetails : Sent file request to users via email.
|
||||||
type FileRequestSendDetails struct {
|
type FileRequestSendDetails struct {
|
||||||
|
// FileRequestId : File request id. Might be missing due to historical data
|
||||||
|
// gap.
|
||||||
|
FileRequestId string `json:"file_request_id,omitempty"`
|
||||||
// RequestTitle : File request title.
|
// RequestTitle : File request title.
|
||||||
RequestTitle string `json:"request_title,omitempty"`
|
RequestTitle string `json:"request_title,omitempty"`
|
||||||
}
|
}
|
||||||
@ -5389,16 +5427,13 @@ const (
|
|||||||
|
|
||||||
// FileResolveCommentDetails : Resolved a file comment.
|
// FileResolveCommentDetails : Resolved a file comment.
|
||||||
type FileResolveCommentDetails struct {
|
type FileResolveCommentDetails struct {
|
||||||
// TargetAssetIndex : Target asset position in the Assets list.
|
|
||||||
TargetAssetIndex uint64 `json:"target_asset_index"`
|
|
||||||
// CommentText : Comment text. Might be missing due to historical data gap.
|
// CommentText : Comment text. Might be missing due to historical data gap.
|
||||||
CommentText string `json:"comment_text,omitempty"`
|
CommentText string `json:"comment_text,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileResolveCommentDetails returns a new FileResolveCommentDetails instance
|
// NewFileResolveCommentDetails returns a new FileResolveCommentDetails instance
|
||||||
func NewFileResolveCommentDetails(TargetAssetIndex uint64) *FileResolveCommentDetails {
|
func NewFileResolveCommentDetails() *FileResolveCommentDetails {
|
||||||
s := new(FileResolveCommentDetails)
|
s := new(FileResolveCommentDetails)
|
||||||
s.TargetAssetIndex = TargetAssetIndex
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5447,31 +5482,25 @@ func NewFileSaveCopyReferenceDetails(RelocateActionDetails []*RelocateAssetRefer
|
|||||||
|
|
||||||
// FileUnlikeCommentDetails : Unliked a file comment.
|
// FileUnlikeCommentDetails : Unliked a file comment.
|
||||||
type FileUnlikeCommentDetails struct {
|
type FileUnlikeCommentDetails struct {
|
||||||
// TargetAssetIndex : Target asset position in the Assets list.
|
|
||||||
TargetAssetIndex uint64 `json:"target_asset_index"`
|
|
||||||
// CommentText : Comment text. Might be missing due to historical data gap.
|
// CommentText : Comment text. Might be missing due to historical data gap.
|
||||||
CommentText string `json:"comment_text,omitempty"`
|
CommentText string `json:"comment_text,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileUnlikeCommentDetails returns a new FileUnlikeCommentDetails instance
|
// NewFileUnlikeCommentDetails returns a new FileUnlikeCommentDetails instance
|
||||||
func NewFileUnlikeCommentDetails(TargetAssetIndex uint64) *FileUnlikeCommentDetails {
|
func NewFileUnlikeCommentDetails() *FileUnlikeCommentDetails {
|
||||||
s := new(FileUnlikeCommentDetails)
|
s := new(FileUnlikeCommentDetails)
|
||||||
s.TargetAssetIndex = TargetAssetIndex
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileUnresolveCommentDetails : Unresolved a file comment.
|
// FileUnresolveCommentDetails : Unresolved a file comment.
|
||||||
type FileUnresolveCommentDetails struct {
|
type FileUnresolveCommentDetails struct {
|
||||||
// TargetAssetIndex : Target asset position in the Assets list.
|
|
||||||
TargetAssetIndex uint64 `json:"target_asset_index"`
|
|
||||||
// CommentText : Comment text. Might be missing due to historical data gap.
|
// CommentText : Comment text. Might be missing due to historical data gap.
|
||||||
CommentText string `json:"comment_text,omitempty"`
|
CommentText string `json:"comment_text,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFileUnresolveCommentDetails returns a new FileUnresolveCommentDetails instance
|
// NewFileUnresolveCommentDetails returns a new FileUnresolveCommentDetails instance
|
||||||
func NewFileUnresolveCommentDetails(TargetAssetIndex uint64) *FileUnresolveCommentDetails {
|
func NewFileUnresolveCommentDetails() *FileUnresolveCommentDetails {
|
||||||
s := new(FileUnresolveCommentDetails)
|
s := new(FileUnresolveCommentDetails)
|
||||||
s.TargetAssetIndex = TargetAssetIndex
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5798,45 +5827,19 @@ func NewGroupRenameDetails(PreviousValue string, NewValue string) *GroupRenameDe
|
|||||||
// GroupUserManagementChangePolicyDetails : Changed who can create groups.
|
// GroupUserManagementChangePolicyDetails : Changed who can create groups.
|
||||||
type GroupUserManagementChangePolicyDetails struct {
|
type GroupUserManagementChangePolicyDetails struct {
|
||||||
// NewValue : New group users management policy.
|
// NewValue : New group users management policy.
|
||||||
NewValue *GroupUserManagementPolicy `json:"new_value"`
|
NewValue *team_policies.GroupCreation `json:"new_value"`
|
||||||
// PreviousValue : Previous group users management policy. Might be missing
|
// PreviousValue : Previous group users management policy. Might be missing
|
||||||
// due to historical data gap.
|
// due to historical data gap.
|
||||||
PreviousValue *GroupUserManagementPolicy `json:"previous_value,omitempty"`
|
PreviousValue *team_policies.GroupCreation `json:"previous_value,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewGroupUserManagementChangePolicyDetails returns a new GroupUserManagementChangePolicyDetails instance
|
// NewGroupUserManagementChangePolicyDetails returns a new GroupUserManagementChangePolicyDetails instance
|
||||||
func NewGroupUserManagementChangePolicyDetails(NewValue *GroupUserManagementPolicy) *GroupUserManagementChangePolicyDetails {
|
func NewGroupUserManagementChangePolicyDetails(NewValue *team_policies.GroupCreation) *GroupUserManagementChangePolicyDetails {
|
||||||
s := new(GroupUserManagementChangePolicyDetails)
|
s := new(GroupUserManagementChangePolicyDetails)
|
||||||
s.NewValue = NewValue
|
s.NewValue = NewValue
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// GroupUserManagementPolicy : has no documentation (yet)
|
|
||||||
type GroupUserManagementPolicy struct {
|
|
||||||
dropbox.Tagged
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valid tag values for GroupUserManagementPolicy
|
|
||||||
const (
|
|
||||||
GroupUserManagementPolicyAdminsOnly = "admins_only"
|
|
||||||
GroupUserManagementPolicyAllUsers = "all_users"
|
|
||||||
GroupUserManagementPolicyOther = "other"
|
|
||||||
)
|
|
||||||
|
|
||||||
// HostLogInfo : Host details.
|
|
||||||
type HostLogInfo struct {
|
|
||||||
// HostId : Host ID. Might be missing due to historical data gap.
|
|
||||||
HostId uint64 `json:"host_id,omitempty"`
|
|
||||||
// HostName : Host name. Might be missing due to historical data gap.
|
|
||||||
HostName string `json:"host_name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewHostLogInfo returns a new HostLogInfo instance
|
|
||||||
func NewHostLogInfo() *HostLogInfo {
|
|
||||||
s := new(HostLogInfo)
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
// JoinTeamDetails : Additional information relevant when a new member joins the
|
// JoinTeamDetails : Additional information relevant when a new member joins the
|
||||||
// team.
|
// team.
|
||||||
type JoinTeamDetails struct {
|
type JoinTeamDetails struct {
|
||||||
@ -5870,6 +5873,54 @@ const (
|
|||||||
LinkAudienceOther = "other"
|
LinkAudienceOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// LoginFailDetails : Failed to sign in.
|
||||||
|
type LoginFailDetails struct {
|
||||||
|
// IsEmmManaged : Tells if the login device is EMM managed. Might be missing
|
||||||
|
// due to historical data gap.
|
||||||
|
IsEmmManaged bool `json:"is_emm_managed,omitempty"`
|
||||||
|
// LoginMethod : Login method.
|
||||||
|
LoginMethod *LoginMethod `json:"login_method"`
|
||||||
|
// ErrorDetails : Error details.
|
||||||
|
ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewLoginFailDetails returns a new LoginFailDetails instance
|
||||||
|
func NewLoginFailDetails(LoginMethod *LoginMethod, ErrorDetails *FailureDetailsLogInfo) *LoginFailDetails {
|
||||||
|
s := new(LoginFailDetails)
|
||||||
|
s.LoginMethod = LoginMethod
|
||||||
|
s.ErrorDetails = ErrorDetails
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
// LoginMethod : has no documentation (yet)
|
||||||
|
type LoginMethod struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for LoginMethod
|
||||||
|
const (
|
||||||
|
LoginMethodPassword = "password"
|
||||||
|
LoginMethodTwoFactorAuthentication = "two_factor_authentication"
|
||||||
|
LoginMethodSaml = "saml"
|
||||||
|
LoginMethodOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LoginSuccessDetails : Signed in.
|
||||||
|
type LoginSuccessDetails struct {
|
||||||
|
// IsEmmManaged : Tells if the login device is EMM managed. Might be missing
|
||||||
|
// due to historical data gap.
|
||||||
|
IsEmmManaged bool `json:"is_emm_managed,omitempty"`
|
||||||
|
// LoginMethod : Login method.
|
||||||
|
LoginMethod *LoginMethod `json:"login_method"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewLoginSuccessDetails returns a new LoginSuccessDetails instance
|
||||||
|
func NewLoginSuccessDetails(LoginMethod *LoginMethod) *LoginSuccessDetails {
|
||||||
|
s := new(LoginSuccessDetails)
|
||||||
|
s.LoginMethod = LoginMethod
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
// LogoutDetails : Signed out.
|
// LogoutDetails : Signed out.
|
||||||
type LogoutDetails struct {
|
type LogoutDetails struct {
|
||||||
}
|
}
|
||||||
@ -6031,20 +6082,19 @@ func NewMemberSpaceLimitsAddExceptionDetails() *MemberSpaceLimitsAddExceptionDet
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// MemberSpaceLimitsChangePolicyDetails : Changed the storage limits applied to
|
// MemberSpaceLimitsChangePolicyDetails : Changed the team default limit level.
|
||||||
// team members by policy.
|
|
||||||
type MemberSpaceLimitsChangePolicyDetails struct {
|
type MemberSpaceLimitsChangePolicyDetails struct {
|
||||||
// PreviousValue : Previous storage limits policy.
|
// PreviousValue : Previous team default limit value in bytes. Might be
|
||||||
PreviousValue *SpaceLimitsLevel `json:"previous_value"`
|
// missing due to historical data gap.
|
||||||
// NewValue : New storage limits policy.
|
PreviousValue uint64 `json:"previous_value,omitempty"`
|
||||||
NewValue *SpaceLimitsLevel `json:"new_value"`
|
// NewValue : New team default limit value in bytes. Might be missing due to
|
||||||
|
// historical data gap.
|
||||||
|
NewValue uint64 `json:"new_value,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMemberSpaceLimitsChangePolicyDetails returns a new MemberSpaceLimitsChangePolicyDetails instance
|
// NewMemberSpaceLimitsChangePolicyDetails returns a new MemberSpaceLimitsChangePolicyDetails instance
|
||||||
func NewMemberSpaceLimitsChangePolicyDetails(PreviousValue *SpaceLimitsLevel, NewValue *SpaceLimitsLevel) *MemberSpaceLimitsChangePolicyDetails {
|
func NewMemberSpaceLimitsChangePolicyDetails() *MemberSpaceLimitsChangePolicyDetails {
|
||||||
s := new(MemberSpaceLimitsChangePolicyDetails)
|
s := new(MemberSpaceLimitsChangePolicyDetails)
|
||||||
s.PreviousValue = PreviousValue
|
|
||||||
s.NewValue = NewValue
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6408,8 +6458,6 @@ func NewOpenNoteSharedDetails() *OpenNoteSharedDetails {
|
|||||||
type OriginLogInfo struct {
|
type OriginLogInfo struct {
|
||||||
// GeoLocation : Geographic location details.
|
// GeoLocation : Geographic location details.
|
||||||
GeoLocation *GeoLocationLogInfo `json:"geo_location,omitempty"`
|
GeoLocation *GeoLocationLogInfo `json:"geo_location,omitempty"`
|
||||||
// Host : Host details.
|
|
||||||
Host *HostLogInfo `json:"host,omitempty"`
|
|
||||||
// AccessMethod : The method that was used to perform the action.
|
// AccessMethod : The method that was used to perform the action.
|
||||||
AccessMethod *AccessMethodLogInfo `json:"access_method"`
|
AccessMethod *AccessMethodLogInfo `json:"access_method"`
|
||||||
}
|
}
|
||||||
@ -7157,29 +7205,6 @@ func NewPasswordChangeDetails() *PasswordChangeDetails {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// PasswordLoginFailDetails : Failed to sign in using a password.
|
|
||||||
type PasswordLoginFailDetails struct {
|
|
||||||
// ErrorDetails : Login failure details.
|
|
||||||
ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPasswordLoginFailDetails returns a new PasswordLoginFailDetails instance
|
|
||||||
func NewPasswordLoginFailDetails(ErrorDetails *FailureDetailsLogInfo) *PasswordLoginFailDetails {
|
|
||||||
s := new(PasswordLoginFailDetails)
|
|
||||||
s.ErrorDetails = ErrorDetails
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
// PasswordLoginSuccessDetails : Signed in using a password.
|
|
||||||
type PasswordLoginSuccessDetails struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPasswordLoginSuccessDetails returns a new PasswordLoginSuccessDetails instance
|
|
||||||
func NewPasswordLoginSuccessDetails() *PasswordLoginSuccessDetails {
|
|
||||||
s := new(PasswordLoginSuccessDetails)
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
// PasswordResetAllDetails : Reset all team member passwords.
|
// PasswordResetAllDetails : Reset all team member passwords.
|
||||||
type PasswordResetAllDetails struct {
|
type PasswordResetAllDetails struct {
|
||||||
}
|
}
|
||||||
@ -7267,15 +7292,15 @@ func NewRelocateAssetReferencesLogInfo(SrcAssetIndex uint64, DestAssetIndex uint
|
|||||||
type ResellerLogInfo struct {
|
type ResellerLogInfo struct {
|
||||||
// ResellerName : Reseller name.
|
// ResellerName : Reseller name.
|
||||||
ResellerName string `json:"reseller_name"`
|
ResellerName string `json:"reseller_name"`
|
||||||
// ResellerId : Reseller ID.
|
// ResellerEmail : Reseller email.
|
||||||
ResellerId string `json:"reseller_id"`
|
ResellerEmail string `json:"reseller_email"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewResellerLogInfo returns a new ResellerLogInfo instance
|
// NewResellerLogInfo returns a new ResellerLogInfo instance
|
||||||
func NewResellerLogInfo(ResellerName string, ResellerId string) *ResellerLogInfo {
|
func NewResellerLogInfo(ResellerName string, ResellerEmail string) *ResellerLogInfo {
|
||||||
s := new(ResellerLogInfo)
|
s := new(ResellerLogInfo)
|
||||||
s.ResellerName = ResellerName
|
s.ResellerName = ResellerName
|
||||||
s.ResellerId = ResellerId
|
s.ResellerEmail = ResellerEmail
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8499,14 +8524,13 @@ func NewSignInAsSessionStartDetails() *SignInAsSessionStartDetails {
|
|||||||
// members.
|
// members.
|
||||||
type SmartSyncChangePolicyDetails struct {
|
type SmartSyncChangePolicyDetails struct {
|
||||||
// NewValue : New smart sync policy.
|
// NewValue : New smart sync policy.
|
||||||
NewValue *SmartSyncPolicy `json:"new_value"`
|
NewValue *team_policies.SmartSyncPolicy `json:"new_value"`
|
||||||
// PreviousValue : Previous smart sync policy. Might be missing due to
|
// PreviousValue : Previous smart sync policy.
|
||||||
// historical data gap.
|
PreviousValue *team_policies.SmartSyncPolicy `json:"previous_value,omitempty"`
|
||||||
PreviousValue *SmartSyncPolicy `json:"previous_value,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSmartSyncChangePolicyDetails returns a new SmartSyncChangePolicyDetails instance
|
// NewSmartSyncChangePolicyDetails returns a new SmartSyncChangePolicyDetails instance
|
||||||
func NewSmartSyncChangePolicyDetails(NewValue *SmartSyncPolicy) *SmartSyncChangePolicyDetails {
|
func NewSmartSyncChangePolicyDetails(NewValue *team_policies.SmartSyncPolicy) *SmartSyncChangePolicyDetails {
|
||||||
s := new(SmartSyncChangePolicyDetails)
|
s := new(SmartSyncChangePolicyDetails)
|
||||||
s.NewValue = NewValue
|
s.NewValue = NewValue
|
||||||
return s
|
return s
|
||||||
@ -8567,32 +8591,6 @@ const (
|
|||||||
SmartSyncOptOutPolicyOther = "other"
|
SmartSyncOptOutPolicyOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SmartSyncPolicy : has no documentation (yet)
|
|
||||||
type SmartSyncPolicy struct {
|
|
||||||
dropbox.Tagged
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valid tag values for SmartSyncPolicy
|
|
||||||
const (
|
|
||||||
SmartSyncPolicyLocalOnly = "local_only"
|
|
||||||
SmartSyncPolicySynced = "synced"
|
|
||||||
SmartSyncPolicyOther = "other"
|
|
||||||
)
|
|
||||||
|
|
||||||
// SpaceLimitsLevel : has no documentation (yet)
|
|
||||||
type SpaceLimitsLevel struct {
|
|
||||||
dropbox.Tagged
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valid tag values for SpaceLimitsLevel
|
|
||||||
const (
|
|
||||||
SpaceLimitsLevelGenerous = "generous"
|
|
||||||
SpaceLimitsLevelModerate = "moderate"
|
|
||||||
SpaceLimitsLevelNoLimit = "no_limit"
|
|
||||||
SpaceLimitsLevelStrict = "strict"
|
|
||||||
SpaceLimitsLevelOther = "other"
|
|
||||||
)
|
|
||||||
|
|
||||||
// SpaceLimitsStatus : has no documentation (yet)
|
// SpaceLimitsStatus : has no documentation (yet)
|
||||||
type SpaceLimitsStatus struct {
|
type SpaceLimitsStatus struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
@ -8647,7 +8645,8 @@ func NewSsoAddLogoutUrlDetails() *SsoAddLogoutUrlDetails {
|
|||||||
|
|
||||||
// SsoChangeCertDetails : Changed the X.509 certificate for SSO.
|
// SsoChangeCertDetails : Changed the X.509 certificate for SSO.
|
||||||
type SsoChangeCertDetails struct {
|
type SsoChangeCertDetails struct {
|
||||||
// PreviousCertificateDetails : Previous SSO certificate details.
|
// PreviousCertificateDetails : Previous SSO certificate details. Might be
|
||||||
|
// missing due to historical data gap.
|
||||||
PreviousCertificateDetails *Certificate `json:"previous_certificate_details,omitempty"`
|
PreviousCertificateDetails *Certificate `json:"previous_certificate_details,omitempty"`
|
||||||
// NewCertificateDetails : New SSO certificate details.
|
// NewCertificateDetails : New SSO certificate details.
|
||||||
NewCertificateDetails *Certificate `json:"new_certificate_details"`
|
NewCertificateDetails *Certificate `json:"new_certificate_details"`
|
||||||
@ -8724,15 +8723,15 @@ func NewSsoChangeSamlIdentityModeDetails(PreviousValue int64, NewValue int64) *S
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// SsoLoginFailDetails : Failed to sign in using SSO.
|
// SsoErrorDetails : Failed to sign in via SSO.
|
||||||
type SsoLoginFailDetails struct {
|
type SsoErrorDetails struct {
|
||||||
// ErrorDetails : Login failure details.
|
// ErrorDetails : Error details.
|
||||||
ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
|
ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSsoLoginFailDetails returns a new SsoLoginFailDetails instance
|
// NewSsoErrorDetails returns a new SsoErrorDetails instance
|
||||||
func NewSsoLoginFailDetails(ErrorDetails *FailureDetailsLogInfo) *SsoLoginFailDetails {
|
func NewSsoErrorDetails(ErrorDetails *FailureDetailsLogInfo) *SsoErrorDetails {
|
||||||
s := new(SsoLoginFailDetails)
|
s := new(SsoErrorDetails)
|
||||||
s.ErrorDetails = ErrorDetails
|
s.ErrorDetails = ErrorDetails
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
23
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies/types.go
generated
vendored
23
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies/types.go
generated
vendored
@ -36,6 +36,17 @@ const (
|
|||||||
EmmStateOther = "other"
|
EmmStateOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GroupCreation : has no documentation (yet)
|
||||||
|
type GroupCreation struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for GroupCreation
|
||||||
|
const (
|
||||||
|
GroupCreationAdminsAndMembers = "admins_and_members"
|
||||||
|
GroupCreationAdminsOnly = "admins_only"
|
||||||
|
)
|
||||||
|
|
||||||
// OfficeAddInPolicy : has no documentation (yet)
|
// OfficeAddInPolicy : has no documentation (yet)
|
||||||
type OfficeAddInPolicy struct {
|
type OfficeAddInPolicy struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
@ -138,6 +149,18 @@ const (
|
|||||||
SharedLinkCreatePolicyOther = "other"
|
SharedLinkCreatePolicyOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// SmartSyncPolicy : has no documentation (yet)
|
||||||
|
type SmartSyncPolicy struct {
|
||||||
|
dropbox.Tagged
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid tag values for SmartSyncPolicy
|
||||||
|
const (
|
||||||
|
SmartSyncPolicyLocal = "local"
|
||||||
|
SmartSyncPolicyOnDemand = "on_demand"
|
||||||
|
SmartSyncPolicyOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
// SsoPolicy : has no documentation (yet)
|
// SsoPolicy : has no documentation (yet)
|
||||||
type SsoPolicy struct {
|
type SsoPolicy struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
10
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/client.go
generated
vendored
10
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/client.go
generated
vendored
@ -104,7 +104,7 @@ func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -176,7 +176,7 @@ func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccoun
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -240,7 +240,7 @@ func (dbx *apiImpl) GetCurrentAccount() (res *FullAccount, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -304,7 +304,7 @@ func (dbx *apiImpl) GetSpaceUsage() (res *SpaceUsage, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
var apiError dropbox.APIError
|
var apiError dropbox.APIError
|
||||||
if resp.StatusCode == http.StatusBadRequest {
|
if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
|
||||||
apiError.ErrorSummary = string(body)
|
apiError.ErrorSummary = string(body)
|
||||||
err = apiError
|
err = apiError
|
||||||
return
|
return
|
||||||
@ -318,7 +318,7 @@ func (dbx *apiImpl) GetSpaceUsage() (res *SpaceUsage, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New returns a Client implementation for this namespace
|
// New returns a Client implementation for this namespace
|
||||||
func New(c dropbox.Config) *apiImpl {
|
func New(c dropbox.Config) Client {
|
||||||
ctx := apiImpl(dropbox.NewContext(c))
|
ctx := apiImpl(dropbox.NewContext(c))
|
||||||
return &ctx
|
return &ctx
|
||||||
}
|
}
|
||||||
|
6
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/types.go
generated
vendored
6
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/types.go
generated
vendored
@ -26,6 +26,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
|
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
|
||||||
|
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/common"
|
||||||
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies"
|
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies"
|
||||||
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users_common"
|
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users_common"
|
||||||
)
|
)
|
||||||
@ -107,10 +108,12 @@ type FullAccount struct {
|
|||||||
IsPaired bool `json:"is_paired"`
|
IsPaired bool `json:"is_paired"`
|
||||||
// AccountType : What type of account this user has.
|
// AccountType : What type of account this user has.
|
||||||
AccountType *users_common.AccountType `json:"account_type"`
|
AccountType *users_common.AccountType `json:"account_type"`
|
||||||
|
// RootInfo : The root info for this account.
|
||||||
|
RootInfo common.IsRootInfo `json:"root_info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFullAccount returns a new FullAccount instance
|
// NewFullAccount returns a new FullAccount instance
|
||||||
func NewFullAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, Locale string, ReferralLink string, IsPaired bool, AccountType *users_common.AccountType) *FullAccount {
|
func NewFullAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, Locale string, ReferralLink string, IsPaired bool, AccountType *users_common.AccountType, RootInfo common.IsRootInfo) *FullAccount {
|
||||||
s := new(FullAccount)
|
s := new(FullAccount)
|
||||||
s.AccountId = AccountId
|
s.AccountId = AccountId
|
||||||
s.Name = Name
|
s.Name = Name
|
||||||
@ -121,6 +124,7 @@ func NewFullAccount(AccountId string, Name *Name, Email string, EmailVerified bo
|
|||||||
s.ReferralLink = ReferralLink
|
s.ReferralLink = ReferralLink
|
||||||
s.IsPaired = IsPaired
|
s.IsPaired = IsPaired
|
||||||
s.AccountType = AccountType
|
s.AccountType = AccountType
|
||||||
|
s.RootInfo = RootInfo
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/generate-sdk.sh
generated
vendored
2
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/generate-sdk.sh
generated
vendored
@ -15,7 +15,7 @@ stone -v -a :all go_types.stoneg.py "$gen_dir" "$spec_dir"/*.stone
|
|||||||
stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone
|
stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone
|
||||||
|
|
||||||
# Update SDK and API spec versions
|
# Update SDK and API spec versions
|
||||||
sdk_version=${1:-"3.0.0"}
|
sdk_version=${1:-"4.0.0"}
|
||||||
pushd ${spec_dir}
|
pushd ${spec_dir}
|
||||||
spec_version=$(git rev-parse --short HEAD)
|
spec_version=$(git rev-parse --short HEAD)
|
||||||
popd
|
popd
|
||||||
|
5
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_client.stoneg.py
generated
vendored
5
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_client.stoneg.py
generated
vendored
@ -40,7 +40,7 @@ class GoClientBackend(CodeBackend):
|
|||||||
for route in namespace.routes:
|
for route in namespace.routes:
|
||||||
self._generate_route(namespace, route)
|
self._generate_route(namespace, route)
|
||||||
self.emit('// New returns a Client implementation for this namespace')
|
self.emit('// New returns a Client implementation for this namespace')
|
||||||
with self.block('func New(c dropbox.Config) *apiImpl'):
|
with self.block('func New(c dropbox.Config) Client'):
|
||||||
self.emit('ctx := apiImpl(dropbox.NewContext(c))')
|
self.emit('ctx := apiImpl(dropbox.NewContext(c))')
|
||||||
self.emit('return &ctx')
|
self.emit('return &ctx')
|
||||||
|
|
||||||
@ -192,7 +192,8 @@ class GoClientBackend(CodeBackend):
|
|||||||
out('err = apiError')
|
out('err = apiError')
|
||||||
out('return')
|
out('return')
|
||||||
out('var apiError dropbox.APIError')
|
out('var apiError dropbox.APIError')
|
||||||
with self.block('if resp.StatusCode == http.StatusBadRequest'):
|
with self.block("if resp.StatusCode == http.StatusBadRequest || "
|
||||||
|
"resp.StatusCode == http.StatusInternalServerError"):
|
||||||
out('apiError.ErrorSummary = string(body)')
|
out('apiError.ErrorSummary = string(body)')
|
||||||
out('err = apiError')
|
out('err = apiError')
|
||||||
out('return')
|
out('return')
|
||||||
|
Loading…
Reference in New Issue
Block a user