Skip to content

Commit

Permalink
refactor(interface names): removes "Request" from interface names in …
Browse files Browse the repository at this point in the history
…routing and service-admin

AFFECTS PACKAGES:
@esri/arcgis-rest-routing
@esri/arcgis-rest-service-admin

BREAKING CHANGE:
removed "Request" from interface names in routing and service-admin
  • Loading branch information
tomwayson committed Apr 19, 2019
1 parent 04aa397 commit 5702526
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/arcgis-rest-routing/src/solveRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {

import { ARCGIS_ONLINE_ROUTING_URL, IEndpointOptions } from "./helpers";

export interface ISolveRouteRequestOptions extends IEndpointOptions {
export interface ISolveRouteOptions extends IEndpointOptions {
/**
* Specify two or more locations between which the route is to be found.
*/
Expand Down Expand Up @@ -75,9 +75,9 @@ function isLocation(
* @returns A Promise that will resolve with routes and directions for the request.
*/
export function solveRoute(
requestOptions: ISolveRouteRequestOptions
requestOptions: ISolveRouteOptions
): Promise<ISolveRouteResponse> {
const options: ISolveRouteRequestOptions = {
const options: ISolveRouteOptions = {
endpoint: requestOptions.endpoint || ARCGIS_ONLINE_ROUTING_URL,
params: {},
...requestOptions
Expand Down
5 changes: 2 additions & 3 deletions packages/arcgis-rest-service-admin/src/addTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { request, cleanUrl } from "@esri/arcgis-rest-request";
import { ILayer, ILayerDefinition, ITable } from "@esri/arcgis-rest-types";
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";

export interface IAddToServiceDefinitionRequestOptions
extends IUserRequestOptions {
export interface IAddToServiceDefinitionOptions extends IUserRequestOptions {
/**
* Layers to add
*/
Expand Down Expand Up @@ -47,7 +46,7 @@ export interface IAddToServiceDefinitionResult {
*/
export function addToServiceDefinition(
url: string,
requestOptions: IAddToServiceDefinitionRequestOptions
requestOptions: IAddToServiceDefinitionOptions
): Promise<IAddToServiceDefinitionResult> {
const adminUrl = `${cleanUrl(url).replace(
`/rest/services`,
Expand Down
6 changes: 3 additions & 3 deletions packages/arcgis-rest-service-admin/src/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface ICreateServiceParams {
};
}

export interface ICreateServiceRequestOptions extends IItemCrudRequestOptions {
export interface ICreateServiceOptions extends IItemCrudRequestOptions {
/**
* A JSON object specifying the properties of the newly-created service. See the [REST
* Documentation](https://developers.arcgis.com/rest/users-groups-and-items/working-with-users-groups-and-items.htm)
Expand Down Expand Up @@ -166,12 +166,12 @@ export interface ICreateServiceResult {
* @returns A Promise that resolves with service details once the service has been created
*/
export function createFeatureService(
requestOptions: ICreateServiceRequestOptions
requestOptions: ICreateServiceOptions
): Promise<ICreateServiceResult> {
const owner = determineOwner(requestOptions);
const baseUrl = `${getPortalUrl(requestOptions)}/content/users/${owner}`;
const url = `${baseUrl}/createService`;
const options: ICreateServiceRequestOptions = {
const options: ICreateServiceOptions = {
...requestOptions,
rawResponse: false
};
Expand Down

0 comments on commit 5702526

Please sign in to comment.