Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "c370934", "specHash": "a4bdc72", "version": "4.2.0" }
{ "engineHash": "c370934", "specHash": "f3c7c76", "version": "4.2.0" }
4 changes: 2 additions & 2 deletions docs/sdk-gen/metadataTaxonomies.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ See the endpoint docs at

### Arguments

- scope `GetMetadataTemplateFieldOptionsScope`
- The scope of the metadata template. Example: "global"
- namespace `string`
- The namespace of the metadata taxonomy. Example: "enterprise_123456"
- templateKey `string`
- The name of the metadata template. Example: "properties"
- fieldKey `string`
Expand Down
33 changes: 4 additions & 29 deletions src/sdk-gen/managers/metadataTaxonomies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -873,10 +873,6 @@ export interface DeleteMetadataTaxonomyNodeHeadersInput {
readonly [key: string]: undefined | string;
};
}
export type GetMetadataTemplateFieldOptionsScope =
| 'global'
| 'enterprise'
| string;
export interface GetMetadataTemplateFieldOptionsQueryParams {
/**
* Filters results by taxonomy level. Multiple values can be provided.
Expand Down Expand Up @@ -1704,8 +1700,8 @@ export class MetadataTaxonomiesManager {
* on its configuration and the parameters specified.
* Results are sorted in lexicographic order unless a `query` parameter is passed.
* With a `query` parameter specified, results are sorted in order of relevance.
* @param {GetMetadataTemplateFieldOptionsScope} scope The scope of the metadata template.
Example: "global"
* @param {string} namespace The namespace of the metadata taxonomy.
Example: "enterprise_123456"
* @param {string} templateKey The name of the metadata template.
Example: "properties"
* @param {string} fieldKey The key of the metadata taxonomy field in the template.
Expand All @@ -1714,7 +1710,7 @@ export class MetadataTaxonomiesManager {
* @returns {Promise<MetadataTaxonomyNodes>}
*/
async getMetadataTemplateFieldOptions(
scope: GetMetadataTemplateFieldOptionsScope,
namespace: string,
templateKey: string,
fieldKey: string,
optionalsInput: GetMetadataTemplateFieldOptionsOptionalsInput = {}
Expand Down Expand Up @@ -1759,7 +1755,7 @@ export class MetadataTaxonomiesManager {
url: ''.concat(
this.networkSession.baseUrls.baseUrl,
'/2.0/metadata_templates/',
toString(scope) as string,
toString(namespace) as string,
'/',
toString(templateKey) as string,
'/fields/',
Expand Down Expand Up @@ -2032,24 +2028,3 @@ export function deserializeUpdateMetadataTaxonomyNodeRequestBody(
displayName: displayName,
} satisfies UpdateMetadataTaxonomyNodeRequestBody;
}
export function serializeGetMetadataTemplateFieldOptionsScope(
val: GetMetadataTemplateFieldOptionsScope
): SerializedData {
return val;
}
export function deserializeGetMetadataTemplateFieldOptionsScope(
val: SerializedData
): GetMetadataTemplateFieldOptionsScope {
if (val == 'global') {
return val;
}
if (val == 'enterprise') {
return val;
}
if (sdIsString(val)) {
return val;
}
throw new BoxSdkError({
message: "Can't deserialize GetMetadataTemplateFieldOptionsScope",
});
}
Loading