Skip to content

Commit 37a7840

Browse files
DropboxBotBrent Bumann
and
Brent Bumann
authored
Automated Spec Update (#862)
28dfbe46c05026fdd867e4fea67cd0ea9acfbca9 Change Notes: file_tagging Namespace - Add BaseTagError unions - Remove BaseError, BaseTagError extends BaseError unions - Update RemoveTagError extends BaseTagError union to remove tag_not_exists_for_this_path - Update RemoveTagError extends BaseTagError union to include tag_not_present - Update Comments Co-authored-by: DropboxBot <DropboxBot@users.noreply.github.com> Co-authored-by: Brent Bumann <bbumann@dropbox.com>
1 parent 65f349a commit 37a7840

File tree

7 files changed

+20
-60
lines changed

7 files changed

+20
-60
lines changed

lib/types.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,8 @@ only present when needed to discriminate between multiple possible subtypes.
781781

782782
/**
783783
* @typedef {Object} FilesAddTagError
784-
* @property {('unknown'|'transient'|'input_validation'|'cancelled'|'other'|'feature_not_supported'|'path_not_found'|'too_many_tags')} .tag - Tag identifying the union variant.
784+
* @property {FilesLookupError} [path] - Available if .tag is path.
785+
* @property {('path'|'other'|'too_many_tags')} .tag - Tag identifying the union variant.
785786
*/
786787

787788
/**
@@ -812,14 +813,10 @@ only present when needed to discriminate between multiple possible subtypes.
812813
* @property {('path'|'properties_error')} .tag - Tag identifying the union variant.
813814
*/
814815

815-
/**
816-
* @typedef {Object} FilesBaseError
817-
* @property {('unknown'|'transient'|'input_validation'|'cancelled'|'other')} .tag - Tag identifying the union variant.
818-
*/
819-
820816
/**
821817
* @typedef {Object} FilesBaseTagError
822-
* @property {('unknown'|'transient'|'input_validation'|'cancelled'|'other'|'feature_not_supported'|'path_not_found')} .tag - Tag identifying the union variant.
818+
* @property {FilesLookupError} [path] - Available if .tag is path.
819+
* @property {('path'|'other')} .tag - Tag identifying the union variant.
823820
*/
824821

825822
/**
@@ -1959,7 +1956,8 @@ only present when needed to discriminate between multiple possible subtypes.
19591956

19601957
/**
19611958
* @typedef {Object} FilesRemoveTagError
1962-
* @property {('unknown'|'transient'|'input_validation'|'cancelled'|'other'|'feature_not_supported'|'path_not_found'|'tag_not_exists_for_this_path')} .tag - Tag identifying the union variant.
1959+
* @property {FilesLookupError} [path] - Available if .tag is path.
1960+
* @property {('path'|'other'|'tag_not_present')} .tag - Tag identifying the union variant.
19631961
*/
19641962

19651963
/**

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dropbox",
3-
"version": "10.20.0",
3+
"version": "10.21.0",
44
"registry": "npm",
55
"description": "The Dropbox JavaScript SDK is a lightweight, promise based interface to the Dropbox v2 API that works in both nodejs and browser environments.",
66
"main": "cjs/index.js",

types/dropbox_types.d.ts

+9-48
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@
16451645
}
16461646

16471647
/**
1648-
* Item already has max supported tags.
1648+
* The item already has the maximum supported number of tags.
16491649
*/
16501650
export interface AddTagErrorTooManyTags {
16511651
'.tag': 'too_many_tags';
@@ -1668,55 +1668,16 @@
16681668

16691669
export type AlphaGetMetadataError = GetMetadataError | AlphaGetMetadataErrorPropertiesError;
16701670

1671-
/**
1672-
* Action failed.
1673-
*/
1674-
export interface BaseErrorUnknown {
1675-
'.tag': 'unknown';
1676-
}
1677-
1678-
/**
1679-
* Action failed. Try again.
1680-
*/
1681-
export interface BaseErrorTransient {
1682-
'.tag': 'transient';
1683-
}
1684-
1685-
/**
1686-
* Action failed due to wrong params.
1687-
*/
1688-
export interface BaseErrorInputValidation {
1689-
'.tag': 'input_validation';
1690-
}
1691-
1692-
/**
1693-
* Action cancelled.
1694-
*/
1695-
export interface BaseErrorCancelled {
1696-
'.tag': 'cancelled';
1671+
export interface BaseTagErrorPath {
1672+
'.tag': 'path';
1673+
path: LookupError;
16971674
}
16981675

1699-
export interface BaseErrorOther {
1676+
export interface BaseTagErrorOther {
17001677
'.tag': 'other';
17011678
}
17021679

1703-
export type BaseError = BaseErrorUnknown | BaseErrorTransient | BaseErrorInputValidation | BaseErrorCancelled | BaseErrorOther;
1704-
1705-
/**
1706-
* Tags are not turned on for your team. Please turn on the feature.
1707-
*/
1708-
export interface BaseTagErrorFeatureNotSupported {
1709-
'.tag': 'feature_not_supported';
1710-
}
1711-
1712-
/**
1713-
* Path not found.
1714-
*/
1715-
export interface BaseTagErrorPathNotFound {
1716-
'.tag': 'path_not_found';
1717-
}
1718-
1719-
export type BaseTagError = BaseError | BaseTagErrorFeatureNotSupported | BaseTagErrorPathNotFound;
1680+
export type BaseTagError = BaseTagErrorPath | BaseTagErrorOther;
17201681

17211682
export interface CommitInfo {
17221683
/**
@@ -3959,11 +3920,11 @@
39593920
/**
39603921
* That tag doesn't exist at this path.
39613922
*/
3962-
export interface RemoveTagErrorTagNotExistsForThisPath {
3963-
'.tag': 'tag_not_exists_for_this_path';
3923+
export interface RemoveTagErrorTagNotPresent {
3924+
'.tag': 'tag_not_present';
39643925
}
39653926

3966-
export type RemoveTagError = BaseTagError | RemoveTagErrorTagNotExistsForThisPath;
3927+
export type RemoveTagError = BaseTagError | RemoveTagErrorTagNotPresent;
39673928

39683929
export interface RestoreArg {
39693930
/**

types/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Auto-generated by Stone, do not modify.
22

3+
34
import { account, async, auth, check, common, contacts, file_properties, file_requests, files, paper, secondary_emails, seen_state, sharing, team, team_common, team_log, team_policies, users, users_common } from './dropbox_types';
45
export * from './dropbox_types';
56

0 commit comments

Comments
 (0)