Skip to content

Commit 2ee4651

Browse files
committed
Update to latest spec.
1 parent 2813416 commit 2ee4651

32 files changed

+4679
-2886
lines changed

Dropbox.Api/Dropbox.Api.Portable.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
<Compile Include="Sharing\ListFolderMembersArgs.cs" />
174174
<Compile Include="Sharing\ListFolderMembersContinueArg.cs" />
175175
<Compile Include="Sharing\ListFolderMembersContinueError.cs" />
176+
<Compile Include="Sharing\ListFolderMembersCursorArg.cs" />
176177
<Compile Include="Sharing\ListFoldersArgs.cs" />
177178
<Compile Include="Sharing\ListFoldersContinueArg.cs" />
178179
<Compile Include="Sharing\ListFoldersContinueError.cs" />
@@ -266,6 +267,7 @@
266267
<Compile Include="Team\GroupSelector.cs" />
267268
<Compile Include="Team\GroupSelectorError.cs" />
268269
<Compile Include="Team\GroupSummary.cs" />
270+
<Compile Include="Team\GroupType.cs" />
269271
<Compile Include="Team\GroupUpdateArgs.cs" />
270272
<Compile Include="Team\GroupUpdateError.cs" />
271273
<Compile Include="Team\GroupsGetInfoError.cs" />
@@ -336,6 +338,7 @@
336338
<Compile Include="Team\RevokeLinkedAppStatus.cs" />
337339
<Compile Include="Team\SharedFolderJoinPolicy.cs" />
338340
<Compile Include="Team\SharedFolderMemberPolicy.cs" />
341+
<Compile Include="Team\SharedLinkCreatePolicy.cs" />
339342
<Compile Include="Team\StorageBucket.cs" />
340343
<Compile Include="Team\TeamGetInfoResult.cs" />
341344
<Compile Include="Team\TeamMemberInfo.cs" />

Dropbox.Api/Dropbox.Api.Portable40.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
<Compile Include="Sharing\ListFolderMembersArgs.cs" />
198198
<Compile Include="Sharing\ListFolderMembersContinueArg.cs" />
199199
<Compile Include="Sharing\ListFolderMembersContinueError.cs" />
200+
<Compile Include="Sharing\ListFolderMembersCursorArg.cs" />
200201
<Compile Include="Sharing\ListFoldersArgs.cs" />
201202
<Compile Include="Sharing\ListFoldersContinueArg.cs" />
202203
<Compile Include="Sharing\ListFoldersContinueError.cs" />
@@ -290,6 +291,7 @@
290291
<Compile Include="Team\GroupSelector.cs" />
291292
<Compile Include="Team\GroupSelectorError.cs" />
292293
<Compile Include="Team\GroupSummary.cs" />
294+
<Compile Include="Team\GroupType.cs" />
293295
<Compile Include="Team\GroupUpdateArgs.cs" />
294296
<Compile Include="Team\GroupUpdateError.cs" />
295297
<Compile Include="Team\GroupsGetInfoError.cs" />
@@ -360,6 +362,7 @@
360362
<Compile Include="Team\RevokeLinkedAppStatus.cs" />
361363
<Compile Include="Team\SharedFolderJoinPolicy.cs" />
362364
<Compile Include="Team\SharedFolderMemberPolicy.cs" />
365+
<Compile Include="Team\SharedLinkCreatePolicy.cs" />
363366
<Compile Include="Team\StorageBucket.cs" />
364367
<Compile Include="Team\TeamGetInfoResult.cs" />
365368
<Compile Include="Team\TeamMemberInfo.cs" />

Dropbox.Api/Dropbox.Api.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178
<Compile Include="Sharing\ListFolderMembersArgs.cs" />
179179
<Compile Include="Sharing\ListFolderMembersContinueArg.cs" />
180180
<Compile Include="Sharing\ListFolderMembersContinueError.cs" />
181+
<Compile Include="Sharing\ListFolderMembersCursorArg.cs" />
181182
<Compile Include="Sharing\ListFoldersArgs.cs" />
182183
<Compile Include="Sharing\ListFoldersContinueArg.cs" />
183184
<Compile Include="Sharing\ListFoldersContinueError.cs" />
@@ -271,6 +272,7 @@
271272
<Compile Include="Team\GroupSelector.cs" />
272273
<Compile Include="Team\GroupSelectorError.cs" />
273274
<Compile Include="Team\GroupSummary.cs" />
275+
<Compile Include="Team\GroupType.cs" />
274276
<Compile Include="Team\GroupUpdateArgs.cs" />
275277
<Compile Include="Team\GroupUpdateError.cs" />
276278
<Compile Include="Team\GroupsGetInfoError.cs" />
@@ -341,6 +343,7 @@
341343
<Compile Include="Team\RevokeLinkedAppStatus.cs" />
342344
<Compile Include="Team\SharedFolderJoinPolicy.cs" />
343345
<Compile Include="Team\SharedFolderMemberPolicy.cs" />
346+
<Compile Include="Team\SharedLinkCreatePolicy.cs" />
344347
<Compile Include="Team\StorageBucket.cs" />
345348
<Compile Include="Team\TeamGetInfoResult.cs" />
346349
<Compile Include="Team\TeamMemberInfo.cs" />

Dropbox.Api/Files/FilesRoutes.cs

Lines changed: 865 additions & 853 deletions
Large diffs are not rendered by default.

Dropbox.Api/Files/ListFolderLongpollArg.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ public class ListFolderLongpollArg
3333
/// </summary>
3434
/// <param name="cursor">A cursor as returned by <see
3535
/// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderAsync" /> or <see
36-
/// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderContinueAsync" /></param>
36+
/// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderContinueAsync" />. Cursors
37+
/// retrieved by setting <see cref="Dropbox.Api.Files.ListFolderArg.IncludeMediaInfo"
38+
/// /> to <c>true</c> are not supported.</param>
3739
/// <param name="timeout">A timeout in seconds. The request will block for at most this
3840
/// length of time, plus up to 90 seconds of random jitter added to avoid the
3941
/// thundering herd problem. Care should be taken when using this parameter, as some
@@ -73,7 +75,9 @@ public ListFolderLongpollArg()
7375
/// <summary>
7476
/// <para>A cursor as returned by <see
7577
/// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderAsync" /> or <see
76-
/// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderContinueAsync" /></para>
78+
/// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderContinueAsync" />. Cursors
79+
/// retrieved by setting <see cref="Dropbox.Api.Files.ListFolderArg.IncludeMediaInfo"
80+
/// /> to <c>true</c> are not supported.</para>
7781
/// </summary>
7882
public string Cursor { get; protected set; }
7983

Dropbox.Api/Sharing/FolderPermission.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class FolderPermission
3535
/// folder.</param>
3636
/// <param name="allow">True if the user is allowed to take the action.</param>
3737
/// <param name="reason">The reason why the user is denied the permission. Not present
38-
/// if the action is allowed</param>
38+
/// if the action is allowed, or if no reason is available.</param>
3939
public FolderPermission(FolderAction action,
4040
bool allow,
4141
PermissionDeniedReason reason = null)
@@ -72,7 +72,7 @@ public FolderPermission()
7272

7373
/// <summary>
7474
/// <para>The reason why the user is denied the permission. Not present if the action
75-
/// is allowed</para>
75+
/// is allowed, or if no reason is available.</para>
7676
/// </summary>
7777
public PermissionDeniedReason Reason { get; protected set; }
7878

Dropbox.Api/Sharing/FolderPolicy.cs

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,17 @@ public class FolderPolicy
3535
/// <param name="aclUpdatePolicy">Who can add and remove members from this shared
3636
/// folder.</param>
3737
/// <param name="sharedLinkPolicy">Who links can be shared with.</param>
38-
/// <param name="memberPolicy">Who can be a member of this shared folder. Only set if
39-
/// the user is a member of a team.</param>
38+
/// <param name="memberPolicy">Who can be a member of this shared folder, as set on the
39+
/// folder itself. The effective policy may differ from this value if the team-wide
40+
/// policy is more restrictive. Present only if the folder is owned by a team.</param>
41+
/// <param name="resolvedMemberPolicy">Who can be a member of this shared folder,
42+
/// taking into account both the folder and the team-wide policy. This value may differ
43+
/// from that of member_policy if the team-wide policy is more restrictive than the
44+
/// folder policy. Present only if the folder is owned by a team.</param>
4045
public FolderPolicy(AclUpdatePolicy aclUpdatePolicy,
4146
SharedLinkPolicy sharedLinkPolicy,
42-
MemberPolicy memberPolicy = null)
47+
MemberPolicy memberPolicy = null,
48+
MemberPolicy resolvedMemberPolicy = null)
4349
{
4450
if (aclUpdatePolicy == null)
4551
{
@@ -54,6 +60,7 @@ public FolderPolicy(AclUpdatePolicy aclUpdatePolicy,
5460
this.AclUpdatePolicy = aclUpdatePolicy;
5561
this.SharedLinkPolicy = sharedLinkPolicy;
5662
this.MemberPolicy = memberPolicy;
63+
this.ResolvedMemberPolicy = resolvedMemberPolicy;
5764
}
5865

5966
/// <summary>
@@ -76,11 +83,20 @@ public FolderPolicy()
7683
public SharedLinkPolicy SharedLinkPolicy { get; protected set; }
7784

7885
/// <summary>
79-
/// <para>Who can be a member of this shared folder. Only set if the user is a member
80-
/// of a team.</para>
86+
/// <para>Who can be a member of this shared folder, as set on the folder itself. The
87+
/// effective policy may differ from this value if the team-wide policy is more
88+
/// restrictive. Present only if the folder is owned by a team.</para>
8189
/// </summary>
8290
public MemberPolicy MemberPolicy { get; protected set; }
8391

92+
/// <summary>
93+
/// <para>Who can be a member of this shared folder, taking into account both the
94+
/// folder and the team-wide policy. This value may differ from that of member_policy
95+
/// if the team-wide policy is more restrictive than the folder policy. Present only if
96+
/// the folder is owned by a team.</para>
97+
/// </summary>
98+
public MemberPolicy ResolvedMemberPolicy { get; protected set; }
99+
84100
#region Encoder class
85101

86102
/// <summary>
@@ -101,6 +117,10 @@ public override void EncodeFields(FolderPolicy value, enc.IJsonWriter writer)
101117
{
102118
WriteProperty("member_policy", value.MemberPolicy, writer, Dropbox.Api.Sharing.MemberPolicy.Encoder);
103119
}
120+
if (value.ResolvedMemberPolicy != null)
121+
{
122+
WriteProperty("resolved_member_policy", value.ResolvedMemberPolicy, writer, Dropbox.Api.Sharing.MemberPolicy.Encoder);
123+
}
104124
}
105125
}
106126

@@ -142,6 +162,9 @@ protected override void SetField(FolderPolicy value, string fieldName, enc.IJson
142162
case "member_policy":
143163
value.MemberPolicy = Dropbox.Api.Sharing.MemberPolicy.Decoder.Decode(reader);
144164
break;
165+
case "resolved_member_policy":
166+
value.ResolvedMemberPolicy = Dropbox.Api.Sharing.MemberPolicy.Decoder.Decode(reader);
167+
break;
145168
default:
146169
reader.Skip();
147170
break;

Dropbox.Api/Sharing/GetMetadataArgs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class GetMetadataArgs
3232
/// class.</para>
3333
/// </summary>
3434
/// <param name="sharedFolderId">The ID for the shared folder.</param>
35-
/// <param name="actions">Folder actions to query. This field is optional.</param>
35+
/// <param name="actions">Folder actions to query.</param>
3636
public GetMetadataArgs(string sharedFolderId,
3737
col.IEnumerable<FolderAction> actions = null)
3838
{
@@ -67,7 +67,7 @@ public GetMetadataArgs()
6767
public string SharedFolderId { get; protected set; }
6868

6969
/// <summary>
70-
/// <para>Folder actions to query. This field is optional.</para>
70+
/// <para>Folder actions to query.</para>
7171
/// </summary>
7272
public col.IList<FolderAction> Actions { get; protected set; }
7373

Dropbox.Api/Sharing/GroupInfo.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,24 @@ public class GroupInfo : Dropbox.Api.Team.GroupSummary
3636
/// <param name="groupName">The group name</param>
3737
/// <param name="groupId">The group id</param>
3838
/// <param name="memberCount">The number of members in the group.</param>
39+
/// <param name="groupType">The type of group.</param>
3940
/// <param name="sameTeam">If the group is owned by the current user's team.</param>
4041
/// <param name="groupExternalId">External ID of group. This is an arbitrary ID that an
4142
/// admin can attach to a group.</param>
4243
public GroupInfo(string groupName,
4344
string groupId,
4445
uint memberCount,
46+
Dropbox.Api.Team.GroupType groupType,
4547
bool sameTeam,
4648
string groupExternalId = null)
4749
: base(groupName, groupId, memberCount, groupExternalId)
4850
{
51+
if (groupType == null)
52+
{
53+
throw new sys.ArgumentNullException("groupType");
54+
}
55+
56+
this.GroupType = groupType;
4957
this.SameTeam = sameTeam;
5058
}
5159

@@ -58,6 +66,11 @@ public GroupInfo()
5866
{
5967
}
6068

69+
/// <summary>
70+
/// <para>The type of group.</para>
71+
/// </summary>
72+
public Dropbox.Api.Team.GroupType GroupType { get; protected set; }
73+
6174
/// <summary>
6275
/// <para>If the group is owned by the current user's team.</para>
6376
/// </summary>
@@ -80,6 +93,7 @@ public override void EncodeFields(GroupInfo value, enc.IJsonWriter writer)
8093
WriteProperty("group_name", value.GroupName, writer, enc.StringEncoder.Instance);
8194
WriteProperty("group_id", value.GroupId, writer, enc.StringEncoder.Instance);
8295
WriteProperty("member_count", value.MemberCount, writer, enc.UInt32Encoder.Instance);
96+
WriteProperty("group_type", value.GroupType, writer, Dropbox.Api.Team.GroupType.Encoder);
8397
WriteProperty("same_team", value.SameTeam, writer, enc.BooleanEncoder.Instance);
8498
if (value.GroupExternalId != null)
8599
{
@@ -126,6 +140,9 @@ protected override void SetField(GroupInfo value, string fieldName, enc.IJsonRea
126140
case "member_count":
127141
value.MemberCount = enc.UInt32Decoder.Instance.Decode(reader);
128142
break;
143+
case "group_type":
144+
value.GroupType = Dropbox.Api.Team.GroupType.Decoder.Decode(reader);
145+
break;
129146
case "same_team":
130147
value.SameTeam = enc.BooleanDecoder.Instance.Decode(reader);
131148
break;

Dropbox.Api/Sharing/ListFolderMembersArgs.cs

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ namespace Dropbox.Api.Sharing
1313
/// <summary>
1414
/// <para>The list folder members args object</para>
1515
/// </summary>
16-
public class ListFolderMembersArgs
16+
/// <seealso cref="Dropbox.Api.Sharing.ListFolderMembersCursorArg" />
17+
public class ListFolderMembersArgs : ListFolderMembersCursorArg
1718
{
1819
#pragma warning disable 108
1920

@@ -32,12 +33,13 @@ public class ListFolderMembersArgs
3233
/// class.</para>
3334
/// </summary>
3435
/// <param name="sharedFolderId">The ID for the shared folder.</param>
35-
/// <param name="actions">Member actions to query. This field is optional.</param>
36+
/// <param name="actions">Member actions to query.</param>
3637
/// <param name="limit">The maximum number of results that include members, groups and
3738
/// invitees to return per request.</param>
3839
public ListFolderMembersArgs(string sharedFolderId,
3940
col.IEnumerable<MemberAction> actions = null,
4041
uint limit = 1000)
42+
: base(actions, limit)
4143
{
4244
if (sharedFolderId == null)
4345
{
@@ -48,16 +50,7 @@ public ListFolderMembersArgs(string sharedFolderId,
4850
throw new sys.ArgumentOutOfRangeException("sharedFolderId");
4951
}
5052

51-
var actionsList = enc.Util.ToList(actions);
52-
53-
if (limit < 1U || limit > 1000U)
54-
{
55-
throw new sys.ArgumentOutOfRangeException("limit");
56-
}
57-
5853
this.SharedFolderId = sharedFolderId;
59-
this.Actions = actionsList;
60-
this.Limit = limit;
6154
}
6255

6356
/// <summary>
@@ -68,25 +61,13 @@ public ListFolderMembersArgs(string sharedFolderId,
6861
/// deserializing.</remarks>
6962
public ListFolderMembersArgs()
7063
{
71-
this.Limit = 1000;
7264
}
7365

7466
/// <summary>
7567
/// <para>The ID for the shared folder.</para>
7668
/// </summary>
7769
public string SharedFolderId { get; protected set; }
7870

79-
/// <summary>
80-
/// <para>Member actions to query. This field is optional.</para>
81-
/// </summary>
82-
public col.IList<MemberAction> Actions { get; protected set; }
83-
84-
/// <summary>
85-
/// <para>The maximum number of results that include members, groups and invitees to
86-
/// return per request.</para>
87-
/// </summary>
88-
public uint Limit { get; protected set; }
89-
9071
#region Encoder class
9172

9273
/// <summary>

0 commit comments

Comments
 (0)