@@ -538,6 +538,7 @@ const (
538538 FileActionUnshare = "unshare"
539539 FileActionRelinquishMembership = "relinquish_membership"
540540 FileActionShareLink = "share_link"
541+ FileActionCreateLink = "create_link"
541542 FileActionOther = "other"
542543)
543544
@@ -713,15 +714,41 @@ func NewFileLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissio
713714// FileMemberActionError : has no documentation (yet)
714715type FileMemberActionError struct {
715716 dropbox.Tagged
717+ // AccessError : Specified file was invalid or user does not have access.
718+ AccessError * SharingFileAccessError `json:"access_error,omitempty"`
716719}
717720
718721// Valid tag values for FileMemberActionError
719722const (
720723 FileMemberActionErrorInvalidMember = "invalid_member"
721724 FileMemberActionErrorNoPermission = "no_permission"
725+ FileMemberActionErrorAccessError = "access_error"
722726 FileMemberActionErrorOther = "other"
723727)
724728
729+ // UnmarshalJSON deserializes into a FileMemberActionError instance
730+ func (u * FileMemberActionError ) UnmarshalJSON (body []byte ) error {
731+ type wrap struct {
732+ dropbox.Tagged
733+ // AccessError : Specified file was invalid or user does not have
734+ // access.
735+ AccessError json.RawMessage `json:"access_error,omitempty"`
736+ }
737+ var w wrap
738+ if err := json .Unmarshal (body , & w ); err != nil {
739+ return err
740+ }
741+ u .Tag = w .Tag
742+ switch u .Tag {
743+ case "access_error" :
744+ if err := json .Unmarshal (w .AccessError , & u .AccessError ); err != nil {
745+ return err
746+ }
747+
748+ }
749+ return nil
750+ }
751+
725752// FileMemberActionIndividualResult : has no documentation (yet)
726753type FileMemberActionIndividualResult struct {
727754 dropbox.Tagged
@@ -868,6 +895,7 @@ const (
868895 FolderActionUnshare = "unshare"
869896 FolderActionLeaveACopy = "leave_a_copy"
870897 FolderActionShareLink = "share_link"
898+ FolderActionCreateLink = "create_link"
871899 FolderActionOther = "other"
872900)
873901
@@ -2880,6 +2908,11 @@ type SharedFileMetadata struct {
28802908 Name string `json:"name"`
28812909 // Id : The ID of the file.
28822910 Id string `json:"id"`
2911+ // TimeInvited : Timestamp indicating when the current user was invited to
2912+ // this shared file. If the user was not invited to the shared file, the
2913+ // timestamp will indicate when the user was invited to the parent shared
2914+ // folder. This value may be absent.
2915+ TimeInvited time.Time `json:"time_invited,omitempty"`
28832916}
28842917
28852918// NewSharedFileMetadata returns a new SharedFileMetadata instance
0 commit comments