-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove serializeGroup method
AFFECTS PACKAGES: @esri/arcgis-rest-groups BREAKING CHANGE: remove serializeGroup helper method from groups package
- Loading branch information
Showing
1 changed file
with
1 addition
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,8 @@ | ||
/* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc. | ||
/* Copyright (c) 2017-2019 Environmental Systems Research Institute, Inc. | ||
* Apache-2.0 */ | ||
|
||
import { IUserRequestOptions } from "@esri/arcgis-rest-auth"; | ||
|
||
import { IItemUpdate, IGroupAdd, IGroup } from "@esri/arcgis-rest-common-types"; | ||
|
||
export interface IGroupIdRequestOptions extends IUserRequestOptions { | ||
id: string; | ||
} | ||
|
||
/** | ||
* (Deprecated) Serialize a group into a json format accepted by the Portal API | ||
* for create and update operations. | ||
* | ||
* @param group IGroup to be serialized | ||
* @returns a formatted JSON object to be sent to Portal | ||
* @private | ||
*/ | ||
/* istanbul ignore next */ | ||
export function serializeGroup(group: IGroupAdd | IItemUpdate | IGroup): any { | ||
const clone = JSON.parse(JSON.stringify(group)); | ||
const { tags = [] } = group; | ||
clone.tags = tags.join(", "); | ||
return clone; | ||
} |