Skip to content

Commit 1fa8a86

Browse files
DropboxBotPranay Sowdaboinamtruong-dbx
authored
Automated Spec Update (#219)
* Automated Spec Update 9303b45bbfa3d1d3de75a2da609ac47c179d18ba Change Notes: Auth Namespace: Update comments Files Namespace: Update comments Team Linked Apps Namespace: Update Examples Team Log Generated Namespace: Update AdminRole union to include billing_admin Co-authored-by: mtruong-dbx [email protected] 822caa80810d2248730a0c6c61309d45f0063f29 Change Notes: Files Namespace: - Add paper/create, paper/update routes - Add PaperCreateArg, PaperCreateResult, PaperCreateArg, PaperCreateResult, PaperUpdateArg, PaperUpdateResult structs - Add ImportFormat, PaperContentError, PaperCreateError, PaperDocUpdatePolicy, PaperUpdateError unions - Update Comments Team Log Generated Namespace: - Add GovernancePolicyContentDisposedDetails, GovernancePolicyContentDisposedType structs - Add DispositionActionType union - Update ClassificationType union to include pii - Update EventDetails union to include governance_policy_content_disposed_details - Update EventType union to include governance_policy_content_disposed - Update EventTypeArg uniont to include governance_policy_content_disposed - Update Comments Team Reports Namespace: - Deprecate reports/get_storage, reports/get_activity, reports/get_membership, reports/get_devices routes Co-authored-by: jorges26 <[email protected]> 0ba804f8549058d48474fb9f77638a2ee3889993 Change Notes: Files Namespace: - Update ExportInfo struct to include export_options - Update ExportError union to include invalid_export_format - Update ExportArg struct to include export_format - Update ExportMetadata to include paper_revision - Update GetTemporaryLinkError union to include not_allowed - Update Comments Team Log Generated Namespace: - Add RecipicientsConfiguration, ObjectLabelAddedDetails, ObjectLabelRemoveDetails, ObjectLabelUpdatedValueDetails, ObjectLabelAddedType, ObjectLabelRemoved, and ObjectLabelUpdatedValue structs - Add AlertRecipientsSettingType, AdminAlertingAlertSensitivity, and LabelType unions - Update AdminAlertSeverityEnum to include sensitivity_level and recipients_settings - Update PlacementRestriction union to include uk_only - Update EventDetails union to include object_label_added_details, object_label_removed_details and object_label_updated_value_details - Update EventType union to include object_label_added, object_label_removed and object_label_updated_value - Update EventTypeArg union to include object_label_added, object_label_removed, and object_label_updated_value - Update Examples cce31b9a2e810b260c4f9fa6250030d00e968533 Change Notes: Files Namespace: - Update Comments - Update Legacy Scopes Shared Links Namespace: - Update Comments - Update Legacy Scopes Sharing Files Namespace: - Update Comments - Update Legacy Scopes Team Namespace: - Update Comments - Update Legacy Scopes Team Devices Namespace: - Update Comments - Update Legacy Scopes Team Linked Apps Namespace: - Update Comments - Update Legacy Scopes d5bb651e5b0236ccacd3860d6ce04508d7fd2c28 files namespace: Update comments team_legal_holds namespace: Update union LegalHoldsPolicyUpdateError team_log_generated namespce: Update union PolicyType Update comments Co-authored-by: Pranay Sowdaboina <[email protected]> * Bump Version Co-authored-by: DropboxBot <[email protected]> Co-authored-by: Pranay Sowdaboina <[email protected]> Co-authored-by: Melody Truong <[email protected]>
1 parent 587b5e4 commit 1fa8a86

File tree

104 files changed

+10176
-346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+10176
-346
lines changed

dropbox-sdk-dotnet/Dropbox.Api/Dropbox.Api.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>Dropbox.Api</id>
5-
<version>5.6.0</version>
5+
<version>5.7.0</version>
66
<title>Dropbox v2 API</title>
77
<authors>Dropbox</authors>
88
<owners>Dropbox</owners>

dropbox-sdk-dotnet/Dropbox.Api/Generated/Auth/AuthUserRoutes.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ internal AuthUserRoutes(enc.ITransport transport)
3030
internal enc.ITransport Transport { get; private set; }
3131

3232
/// <summary>
33-
/// <para>Disables the access token used to authenticate the call.</para>
33+
/// <para>Disables the access token used to authenticate the call. If there is a
34+
/// corresponding refresh token for the access token, this disables that refresh token,
35+
/// as well as any other access tokens for that refresh token.</para>
3436
/// </summary>
3537
/// <returns>The task that represents the asynchronous send operation.</returns>
3638
public t.Task TokenRevokeAsync()

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ExportArg.cs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ public class ExportArg
3131
/// <para>Initializes a new instance of the <see cref="ExportArg" /> class.</para>
3232
/// </summary>
3333
/// <param name="path">The path of the file to be exported.</param>
34-
public ExportArg(string path)
34+
/// <param name="exportFormat">The file format to which the file should be exported.
35+
/// This must be one of the formats listed in the file's export_options returned by
36+
/// <see cref="Dropbox.Api.Files.Routes.FilesUserRoutes.GetMetadataAsync" />. If none
37+
/// is specified, the default format (specified in export_as in file metadata) will be
38+
/// used.</param>
39+
public ExportArg(string path,
40+
string exportFormat = null)
3541
{
3642
if (path == null)
3743
{
@@ -43,6 +49,7 @@ public ExportArg(string path)
4349
}
4450

4551
this.Path = path;
52+
this.ExportFormat = exportFormat;
4653
}
4754

4855
/// <summary>
@@ -60,6 +67,15 @@ public ExportArg()
6067
/// </summary>
6168
public string Path { get; protected set; }
6269

70+
/// <summary>
71+
/// <para>The file format to which the file should be exported. This must be one of the
72+
/// formats listed in the file's export_options returned by <see
73+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.GetMetadataAsync" />. If none is
74+
/// specified, the default format (specified in export_as in file metadata) will be
75+
/// used.</para>
76+
/// </summary>
77+
public string ExportFormat { get; protected set; }
78+
6379
#region Encoder class
6480

6581
/// <summary>
@@ -75,6 +91,10 @@ private class ExportArgEncoder : enc.StructEncoder<ExportArg>
7591
public override void EncodeFields(ExportArg value, enc.IJsonWriter writer)
7692
{
7793
WriteProperty("path", value.Path, writer, enc.StringEncoder.Instance);
94+
if (value.ExportFormat != null)
95+
{
96+
WriteProperty("export_format", value.ExportFormat, writer, enc.StringEncoder.Instance);
97+
}
7898
}
7999
}
80100

@@ -110,6 +130,9 @@ protected override void SetField(ExportArg value, string fieldName, enc.IJsonRea
110130
case "path":
111131
value.Path = enc.StringDecoder.Instance.Decode(reader);
112132
break;
133+
case "export_format":
134+
value.ExportFormat = enc.StringDecoder.Instance.Decode(reader);
135+
break;
113136
default:
114137
reader.Skip();
115138
break;

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ExportError.cs

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,28 @@ public NonExportable AsNonExportable
7878
}
7979
}
8080

81+
/// <summary>
82+
/// <para>Gets a value indicating whether this instance is InvalidExportFormat</para>
83+
/// </summary>
84+
public bool IsInvalidExportFormat
85+
{
86+
get
87+
{
88+
return this is InvalidExportFormat;
89+
}
90+
}
91+
92+
/// <summary>
93+
/// <para>Gets this instance as a InvalidExportFormat, or <c>null</c>.</para>
94+
/// </summary>
95+
public InvalidExportFormat AsInvalidExportFormat
96+
{
97+
get
98+
{
99+
return this as InvalidExportFormat;
100+
}
101+
}
102+
81103
/// <summary>
82104
/// <para>Gets a value indicating whether this instance is RetryError</para>
83105
/// </summary>
@@ -148,6 +170,12 @@ public override void EncodeFields(ExportError value, enc.IJsonWriter writer)
148170
NonExportable.Encoder.EncodeFields((NonExportable)value, writer);
149171
return;
150172
}
173+
if (value is InvalidExportFormat)
174+
{
175+
WriteProperty(".tag", "invalid_export_format", writer, enc.StringEncoder.Instance);
176+
InvalidExportFormat.Encoder.EncodeFields((InvalidExportFormat)value, writer);
177+
return;
178+
}
151179
if (value is RetryError)
152180
{
153181
WriteProperty(".tag", "retry_error", writer, enc.StringEncoder.Instance);
@@ -196,6 +224,8 @@ protected override ExportError Decode(string tag, enc.IJsonReader reader)
196224
return Path.Decoder.DecodeFields(reader);
197225
case "non_exportable":
198226
return NonExportable.Decoder.DecodeFields(reader);
227+
case "invalid_export_format":
228+
return InvalidExportFormat.Decoder.DecodeFields(reader);
199229
case "retry_error":
200230
return RetryError.Decoder.DecodeFields(reader);
201231
default:
@@ -373,6 +403,77 @@ protected override NonExportable Create()
373403
#endregion
374404
}
375405

406+
/// <summary>
407+
/// <para>The specified export format is not a valid option for this file type.</para>
408+
/// </summary>
409+
public sealed class InvalidExportFormat : ExportError
410+
{
411+
#pragma warning disable 108
412+
413+
/// <summary>
414+
/// <para>The encoder instance.</para>
415+
/// </summary>
416+
internal static enc.StructEncoder<InvalidExportFormat> Encoder = new InvalidExportFormatEncoder();
417+
418+
/// <summary>
419+
/// <para>The decoder instance.</para>
420+
/// </summary>
421+
internal static enc.StructDecoder<InvalidExportFormat> Decoder = new InvalidExportFormatDecoder();
422+
423+
/// <summary>
424+
/// <para>Initializes a new instance of the <see cref="InvalidExportFormat" />
425+
/// class.</para>
426+
/// </summary>
427+
private InvalidExportFormat()
428+
{
429+
}
430+
431+
/// <summary>
432+
/// <para>A singleton instance of InvalidExportFormat</para>
433+
/// </summary>
434+
public static readonly InvalidExportFormat Instance = new InvalidExportFormat();
435+
436+
#region Encoder class
437+
438+
/// <summary>
439+
/// <para>Encoder for <see cref="InvalidExportFormat" />.</para>
440+
/// </summary>
441+
private class InvalidExportFormatEncoder : enc.StructEncoder<InvalidExportFormat>
442+
{
443+
/// <summary>
444+
/// <para>Encode fields of given value.</para>
445+
/// </summary>
446+
/// <param name="value">The value.</param>
447+
/// <param name="writer">The writer.</param>
448+
public override void EncodeFields(InvalidExportFormat value, enc.IJsonWriter writer)
449+
{
450+
}
451+
}
452+
453+
#endregion
454+
455+
#region Decoder class
456+
457+
/// <summary>
458+
/// <para>Decoder for <see cref="InvalidExportFormat" />.</para>
459+
/// </summary>
460+
private class InvalidExportFormatDecoder : enc.StructDecoder<InvalidExportFormat>
461+
{
462+
/// <summary>
463+
/// <para>Create a new instance of type <see cref="InvalidExportFormat"
464+
/// />.</para>
465+
/// </summary>
466+
/// <returns>The struct instance.</returns>
467+
protected override InvalidExportFormat Create()
468+
{
469+
return InvalidExportFormat.Instance;
470+
}
471+
472+
}
473+
474+
#endregion
475+
}
476+
376477
/// <summary>
377478
/// <para>The exportable content is not yet available. Please retry later.</para>
378479
/// </summary>

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ExportInfo.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ public class ExportInfo
3131
/// <para>Initializes a new instance of the <see cref="ExportInfo" /> class.</para>
3232
/// </summary>
3333
/// <param name="exportAs">Format to which the file can be exported to.</param>
34-
public ExportInfo(string exportAs = null)
34+
/// <param name="exportOptions">Additional formats to which the file can be exported.
35+
/// These values can be specified as the export_format in /files/export.</param>
36+
public ExportInfo(string exportAs = null,
37+
col.IEnumerable<string> exportOptions = null)
3538
{
39+
var exportOptionsList = enc.Util.ToList(exportOptions);
40+
3641
this.ExportAs = exportAs;
42+
this.ExportOptions = exportOptionsList;
3743
}
3844

3945
/// <summary>
@@ -51,6 +57,12 @@ public ExportInfo()
5157
/// </summary>
5258
public string ExportAs { get; protected set; }
5359

60+
/// <summary>
61+
/// <para>Additional formats to which the file can be exported. These values can be
62+
/// specified as the export_format in /files/export.</para>
63+
/// </summary>
64+
public col.IList<string> ExportOptions { get; protected set; }
65+
5466
#region Encoder class
5567

5668
/// <summary>
@@ -69,6 +81,10 @@ public override void EncodeFields(ExportInfo value, enc.IJsonWriter writer)
6981
{
7082
WriteProperty("export_as", value.ExportAs, writer, enc.StringEncoder.Instance);
7183
}
84+
if (value.ExportOptions.Count > 0)
85+
{
86+
WriteListProperty("export_options", value.ExportOptions, writer, enc.StringEncoder.Instance);
87+
}
7288
}
7389
}
7490

@@ -104,6 +120,9 @@ protected override void SetField(ExportInfo value, string fieldName, enc.IJsonRe
104120
case "export_as":
105121
value.ExportAs = enc.StringDecoder.Instance.Decode(reader);
106122
break;
123+
case "export_options":
124+
value.ExportOptions = ReadList<string>(reader, enc.StringDecoder.Instance);
125+
break;
107126
default:
108127
reader.Skip();
109128
break;

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ExportMetadata.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ public class ExportMetadata
3838
/// be used to verify data integrity. Similar to content hash. For more information see
3939
/// our <a href="https://www.dropbox.com/developers/reference/content-hash">Content
4040
/// hash</a> page.</param>
41+
/// <param name="paperRevision">If the file is a Paper doc, this gives the latest doc
42+
/// revision which can be used in <see
43+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.PaperUpdateAsync" />.</param>
4144
public ExportMetadata(string name,
4245
ulong size,
43-
string exportHash = null)
46+
string exportHash = null,
47+
long? paperRevision = null)
4448
{
4549
if (name == null)
4650
{
@@ -62,6 +66,7 @@ public ExportMetadata(string name,
6266
this.Name = name;
6367
this.Size = size;
6468
this.ExportHash = exportHash;
69+
this.PaperRevision = paperRevision;
6570
}
6671

6772
/// <summary>
@@ -93,6 +98,13 @@ public ExportMetadata()
9398
/// </summary>
9499
public string ExportHash { get; protected set; }
95100

101+
/// <summary>
102+
/// <para>If the file is a Paper doc, this gives the latest doc revision which can be
103+
/// used in <see cref="Dropbox.Api.Files.Routes.FilesUserRoutes.PaperUpdateAsync"
104+
/// />.</para>
105+
/// </summary>
106+
public long? PaperRevision { get; protected set; }
107+
96108
#region Encoder class
97109

98110
/// <summary>
@@ -113,6 +125,10 @@ public override void EncodeFields(ExportMetadata value, enc.IJsonWriter writer)
113125
{
114126
WriteProperty("export_hash", value.ExportHash, writer, enc.StringEncoder.Instance);
115127
}
128+
if (value.PaperRevision != null)
129+
{
130+
WriteProperty("paper_revision", value.PaperRevision.Value, writer, enc.Int64Encoder.Instance);
131+
}
116132
}
117133
}
118134

@@ -154,6 +170,9 @@ protected override void SetField(ExportMetadata value, string fieldName, enc.IJs
154170
case "export_hash":
155171
value.ExportHash = enc.StringDecoder.Instance.Decode(reader);
156172
break;
173+
case "paper_revision":
174+
value.PaperRevision = enc.Int64Decoder.Instance.Decode(reader);
175+
break;
157176
default:
158177
reader.Skip();
159178
break;

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/FilesAppRoutes.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ internal FilesAppRoutes(enc.ITransport transport)
3030
internal enc.ITransport Transport { get; private set; }
3131

3232
/// <summary>
33-
/// <para>Get a thumbnail for a file.</para>
33+
/// <para>Get a thumbnail for an image.</para>
34+
/// <para>This method currently supports files with the following file extensions: jpg,
35+
/// jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in
36+
/// size won't be converted to a thumbnail.</para>
3437
/// </summary>
3538
/// <param name="thumbnailV2Arg">The request parameters</param>
3639
/// <returns>The task that represents the asynchronous send operation. The TResult
@@ -60,7 +63,10 @@ public sys.IAsyncResult BeginGetThumbnailV2(ThumbnailV2Arg thumbnailV2Arg, sys.A
6063
}
6164

6265
/// <summary>
63-
/// <para>Get a thumbnail for a file.</para>
66+
/// <para>Get a thumbnail for an image.</para>
67+
/// <para>This method currently supports files with the following file extensions: jpg,
68+
/// jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in
69+
/// size won't be converted to a thumbnail.</para>
6470
/// </summary>
6571
/// <param name="resource">Information specifying which file to preview. This could be
6672
/// a path to a file, a shared link pointing to a file, or a shared link pointing to a

0 commit comments

Comments
 (0)