Skip to content

Commit 7afa861

Browse files
author
Diwaker Gupta
committed
Generated against spec 222ba8c
1 parent cdadcb6 commit 7afa861

File tree

8 files changed

+544
-39
lines changed

8 files changed

+544
-39
lines changed

dropbox/files/client.go

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,19 @@ type Client interface {
247247
// upload session with `uploadSessionStart`.
248248
Upload(arg *CommitInfo, content io.Reader) (res *FileMetadata, err error)
249249
// UploadSessionAppend : Append more data to an upload session. A single
250-
// request should not upload more than 150 MB.
250+
// request should not upload more than 150 MB. The maximum size of a file
251+
// one can upload to an upload session is 350 GB.
251252
// Deprecated: Use `UploadSessionAppendV2` instead
252253
UploadSessionAppend(arg *UploadSessionCursor, content io.Reader) (err error)
253254
// UploadSessionAppendV2 : Append more data to an upload session. When the
254255
// parameter close is set, this call will close the session. A single
255-
// request should not upload more than 150 MB.
256+
// request should not upload more than 150 MB. The maximum size of a file
257+
// one can upload to an upload session is 350 GB.
256258
UploadSessionAppendV2(arg *UploadSessionAppendArg, content io.Reader) (err error)
257259
// UploadSessionFinish : Finish an upload session and save the uploaded data
258260
// to the given file path. A single request should not upload more than 150
259-
// MB.
261+
// MB. The maximum size of a file one can upload to an upload session is 350
262+
// GB.
260263
UploadSessionFinish(arg *UploadSessionFinishArg, content io.Reader) (res *FileMetadata, err error)
261264
// UploadSessionFinishBatch : This route helps you commit many files at once
262265
// into a user's Dropbox. Use `uploadSessionStart` and
@@ -266,11 +269,12 @@ type Client interface {
266269
// route to finish all your upload sessions in a single request.
267270
// `UploadSessionStartArg.close` or `UploadSessionAppendArg.close` needs to
268271
// be true for the last `uploadSessionStart` or `uploadSessionAppendV2`
269-
// call. This route will return a job_id immediately and do the async commit
270-
// job in background. Use `uploadSessionFinishBatchCheck` to check the job
271-
// status. For the same account, this route should be executed serially.
272-
// That means you should not start the next job before current job finishes.
273-
// We allow up to 1000 entries in a single request.
272+
// call. The maximum size of a file one can upload to an upload session is
273+
// 350 GB. This route will return a job_id immediately and do the async
274+
// commit job in background. Use `uploadSessionFinishBatchCheck` to check
275+
// the job status. For the same account, this route should be executed
276+
// serially. That means you should not start the next job before current job
277+
// finishes. We allow up to 1000 entries in a single request.
274278
UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (res *UploadSessionFinishBatchLaunch, err error)
275279
// UploadSessionFinishBatchCheck : Returns the status of an asynchronous job
276280
// for `uploadSessionFinishBatch`. If success, it returns list of result for
@@ -281,8 +285,9 @@ type Client interface {
281285
// than 150 MB. This call starts a new upload session with the given data.
282286
// You can then use `uploadSessionAppendV2` to add more data and
283287
// `uploadSessionFinish` to save all the data to a file in Dropbox. A single
284-
// request should not upload more than 150 MB. An upload session can be used
285-
// for a maximum of 48 hours. Attempting to use an
288+
// request should not upload more than 150 MB. The maximum size of a file
289+
// one can upload to an upload session is 350 GB. An upload session can be
290+
// used for a maximum of 48 hours. Attempting to use an
286291
// `UploadSessionStartResult.session_id` with `uploadSessionAppendV2` or
287292
// `uploadSessionFinish` more than 48 hours after its creation will return a
288293
// `UploadSessionLookupError.not_found`.

dropbox/files/types.go

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3158,7 +3158,8 @@ type UploadError struct {
31583158
dropbox.Tagged
31593159
// Path : Unable to save the uploaded contents to a file.
31603160
Path *UploadWriteFailed `json:"path,omitempty"`
3161-
// PropertiesError : The supplied property group is invalid.
3161+
// PropertiesError : The supplied property group is invalid. The file has
3162+
// uploaded without property groups.
31623163
PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
31633164
}
31643165

@@ -3175,7 +3176,8 @@ func (u *UploadError) UnmarshalJSON(body []byte) error {
31753176
dropbox.Tagged
31763177
// Path : Unable to save the uploaded contents to a file.
31773178
Path json.RawMessage `json:"path,omitempty"`
3178-
// PropertiesError : The supplied property group is invalid.
3179+
// PropertiesError : The supplied property group is invalid. The file
3180+
// has uploaded without property groups.
31793181
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
31803182
}
31813183
var w wrap
@@ -3206,7 +3208,8 @@ type UploadErrorWithProperties struct {
32063208
dropbox.Tagged
32073209
// Path : Unable to save the uploaded contents to a file.
32083210
Path *UploadWriteFailed `json:"path,omitempty"`
3209-
// PropertiesError : The supplied property group is invalid.
3211+
// PropertiesError : The supplied property group is invalid. The file has
3212+
// uploaded without property groups.
32103213
PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
32113214
}
32123215

@@ -3223,7 +3226,8 @@ func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error {
32233226
dropbox.Tagged
32243227
// Path : Unable to save the uploaded contents to a file.
32253228
Path json.RawMessage `json:"path,omitempty"`
3226-
// PropertiesError : The supplied property group is invalid.
3229+
// PropertiesError : The supplied property group is invalid. The file
3230+
// has uploaded without property groups.
32273231
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
32283232
}
32293233
var w wrap
@@ -3467,14 +3471,20 @@ type UploadSessionFinishError struct {
34673471
// LookupFailed : The session arguments are incorrect; the value explains
34683472
// the reason.
34693473
LookupFailed *UploadSessionLookupError `json:"lookup_failed,omitempty"`
3470-
// Path : Unable to save the uploaded contents to a file.
3474+
// Path : Unable to save the uploaded contents to a file. Data has already
3475+
// been appended to the upload session. Please retry with empty data body
3476+
// and updated offset.
34713477
Path *WriteError `json:"path,omitempty"`
3478+
// PropertiesError : The supplied property group is invalid. The file has
3479+
// uploaded without property groups.
3480+
PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
34723481
}
34733482

34743483
// Valid tag values for UploadSessionFinishError
34753484
const (
34763485
UploadSessionFinishErrorLookupFailed = "lookup_failed"
34773486
UploadSessionFinishErrorPath = "path"
3487+
UploadSessionFinishErrorPropertiesError = "properties_error"
34783488
UploadSessionFinishErrorTooManySharedFolderTargets = "too_many_shared_folder_targets"
34793489
UploadSessionFinishErrorTooManyWriteOperations = "too_many_write_operations"
34803490
UploadSessionFinishErrorOther = "other"
@@ -3487,8 +3497,13 @@ func (u *UploadSessionFinishError) UnmarshalJSON(body []byte) error {
34873497
// LookupFailed : The session arguments are incorrect; the value
34883498
// explains the reason.
34893499
LookupFailed json.RawMessage `json:"lookup_failed,omitempty"`
3490-
// Path : Unable to save the uploaded contents to a file.
3500+
// Path : Unable to save the uploaded contents to a file. Data has
3501+
// already been appended to the upload session. Please retry with empty
3502+
// data body and updated offset.
34913503
Path json.RawMessage `json:"path,omitempty"`
3504+
// PropertiesError : The supplied property group is invalid. The file
3505+
// has uploaded without property groups.
3506+
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
34923507
}
34933508
var w wrap
34943509
var err error
@@ -3506,6 +3521,12 @@ func (u *UploadSessionFinishError) UnmarshalJSON(body []byte) error {
35063521
case "path":
35073522
err = json.Unmarshal(w.Path, &u.Path)
35083523

3524+
if err != nil {
3525+
return err
3526+
}
3527+
case "properties_error":
3528+
err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
3529+
35093530
if err != nil {
35103531
return err
35113532
}
@@ -3529,6 +3550,7 @@ const (
35293550
UploadSessionLookupErrorIncorrectOffset = "incorrect_offset"
35303551
UploadSessionLookupErrorClosed = "closed"
35313552
UploadSessionLookupErrorNotClosed = "not_closed"
3553+
UploadSessionLookupErrorTooLarge = "too_large"
35323554
UploadSessionLookupErrorOther = "other"
35333555
)
35343556

@@ -3605,8 +3627,9 @@ func NewUploadSessionStartResult(SessionId string) *UploadSessionStartResult {
36053627
type UploadWriteFailed struct {
36063628
// Reason : The reason why the file couldn't be saved.
36073629
Reason *WriteError `json:"reason"`
3608-
// UploadSessionId : The upload session ID; this may be used to retry the
3609-
// commit.
3630+
// UploadSessionId : The upload session ID; data has already been uploaded
3631+
// to the corresponding upload session and this ID may be used to retry the
3632+
// commit with `uploadSessionFinish`.
36103633
UploadSessionId string `json:"upload_session_id"`
36113634
}
36123635

dropbox/paper/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ type Client interface {
5252
// DocsGetFolderInfo : Retrieves folder information for the given Paper doc.
5353
// This includes: - folder sharing policy; permissions for subfolders are
5454
// set by the top-level folder. - full 'filepath', i.e. the list of
55-
// folders (both folderId and folderName) from the root folder to the folder
56-
// directly containing the Paper doc. Note: If the Paper doc is not in any
57-
// folder (aka unfiled) the response will be empty.
55+
// folders (both folderId and folderName) from the root folder to the
56+
// folder directly containing the Paper doc. Note: If the Paper doc is not
57+
// in any folder (aka unfiled) the response will be empty.
5858
DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error)
5959
// DocsList : Return the list of all Paper docs according to the argument
6060
// specifications. To iterate over through the full pagination, pass the

dropbox/sdk.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const (
3636
hostAPI = "api"
3737
hostContent = "content"
3838
hostNotify = "notify"
39-
sdkVersion = "4.6.0"
40-
specVersion = "ffd6841"
39+
sdkVersion = "4.2.0"
40+
specVersion = "222ba8c"
4141
)
4242

4343
// Version returns the current SDK version and API Spec version

dropbox/team/types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,6 +1947,8 @@ type MemberAddArg struct {
19471947
SendWelcomeEmail bool `json:"send_welcome_email"`
19481948
// Role : has no documentation (yet)
19491949
Role *AdminTier `json:"role"`
1950+
// IsDirectoryRestricted : Whether a user is directory restricted.
1951+
IsDirectoryRestricted bool `json:"is_directory_restricted,omitempty"`
19501952
}
19511953

19521954
// NewMemberAddArg returns a new MemberAddArg instance
@@ -2161,6 +2163,8 @@ type MemberProfile struct {
21612163
// PersistentId : Persistent ID that a team can attach to the user. The
21622164
// persistent ID is unique ID to be used for SAML authentication.
21632165
PersistentId string `json:"persistent_id,omitempty"`
2166+
// IsDirectoryRestricted : Whether the user is a directory restricted user.
2167+
IsDirectoryRestricted bool `json:"is_directory_restricted,omitempty"`
21642168
}
21652169

21662170
// NewMemberProfile returns a new MemberProfile instance
@@ -2640,6 +2644,9 @@ type MembersSetProfileArg struct {
26402644
// NewPersistentId : New persistent ID. This field only available to teams
26412645
// using persistent ID SAML configuration.
26422646
NewPersistentId string `json:"new_persistent_id,omitempty"`
2647+
// NewIsDirectoryRestricted : New value for whether the user is a directory
2648+
// restricted user.
2649+
NewIsDirectoryRestricted bool `json:"new_is_directory_restricted,omitempty"`
26432650
}
26442651

26452652
// NewMembersSetProfileArg returns a new MembersSetProfileArg instance
@@ -2666,6 +2673,7 @@ const (
26662673
MembersSetProfileErrorParamCannotBeEmpty = "param_cannot_be_empty"
26672674
MembersSetProfileErrorPersistentIdDisabled = "persistent_id_disabled"
26682675
MembersSetProfileErrorPersistentIdUsedByOtherUser = "persistent_id_used_by_other_user"
2676+
MembersSetProfileErrorDirectoryRestrictedOff = "directory_restricted_off"
26692677
MembersSetProfileErrorOther = "other"
26702678
)
26712679

dropbox/team_log/client.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ import (
3333
type Client interface {
3434
// GetEvents : Retrieves team events. Events have a lifespan of two years.
3535
// Events older than two years will not be returned. Many attributes note
36-
// 'may be missing due to historical data gap'. Permission : Team Auditing.
36+
// 'may be missing due to historical data gap'. Note that the
37+
// file_operations category and & analogous paper events are not available
38+
// on all Dropbox Business `plans` </business/plans-comparison>. Use
39+
// `features/get_values`
40+
// </developers/documentation/http/teams#team-features-get_values> to check
41+
// for this feature. Permission : Team Auditing.
3742
GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error)
3843
// GetEventsContinue : Once a cursor has been retrieved from `getEvents`,
3944
// use this to paginate through all events. Permission : Team Auditing.

0 commit comments

Comments
 (0)