Skip to content

Commit

Permalink
Merge pull request #305 from Esri/mkt-add-param-notes
Browse files Browse the repository at this point in the history
Added notes for i/o parameters of createFolder and moveItem
  • Loading branch information
MikeTschudi authored Sep 5, 2018
2 parents 1bbe7e6 + 080573b commit 984f76b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/arcgis-rest-items/src/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import {
} from "./helpers";

export interface IAddFolderRequestOptions extends IItemCrudRequestOptions {
/**
* Name of the folder to create.
*/
title: string;
}

Expand Down
20 changes: 19 additions & 1 deletion packages/arcgis-rest-items/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ export interface IItemResourceResponse {
}

export interface IAddFolderResponse {
/**
* Success or failure of request.
*/
success: boolean;
/**
* Information about created folder: its alphanumeric id, name, and owner's name.
*/
folder: {
id: string;
title: string;
Expand All @@ -78,10 +84,22 @@ export interface IAddFolderResponse {
}

export interface IItemMoveResponse {
/**
* Success or failure of request.
*/
success: boolean;
/**
* Alphanumeric id of moved item.
*/
itemId: string;
/**
* Name of owner of item.
*/
owner: string;
folder: string; // folder id
/**
* Alphanumeric id of folder now housing item.
*/
folder: string;
}

/**
Expand Down
11 changes: 9 additions & 2 deletions packages/arcgis-rest-items/src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ export interface IItemUpdateRequestOptions extends IItemCrudRequestOptions {
}

export interface IItemMoveRequestOptions extends IItemCrudRequestOptions {
itemId: string; // id of item to be moved
folder: string; // id of destination folder; null, empty, or "/" if the destination is the root folder
/**
* Alphanumeric id of item to be moved.
*/
itemId: string;
/**
* Alphanumeric id of folder to house moved item. If null, empty, or "/", the destination is the
* root folder.
*/
folder: string;
}

/**
Expand Down

0 comments on commit 984f76b

Please sign in to comment.