ducimusipsa 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.prettierignore +2 -0
- package/.travis.yml +34 -0
- package/.vscode/launch.json +24 -0
- package/.vscode/settings.json +3 -0
- package/demos/ago-node-cli/README.md +29 -0
- package/demos/ago-node-cli/ago.js +32 -0
- package/demos/ago-node-cli/index.js +11 -0
- package/demos/ago-node-cli/lib/item-export-command.js +48 -0
- package/demos/ago-node-cli/lib/item-search-command.js +35 -0
- package/demos/ago-node-cli/package-lock.json +180 -0
- package/demos/ago-node-cli/package.json +30 -0
- package/demos/attachments/README.md +5 -0
- package/demos/attachments/index.html +164 -0
- package/demos/attachments/package-lock.json +182 -0
- package/demos/attachments/package.json +18 -0
- package/demos/batch-geocoder-node/NYC_Restaurant_Inspection_Results.csv +100 -0
- package/demos/batch-geocoder-node/README.md +15 -0
- package/demos/batch-geocoder-node/batch-geocode.js +115 -0
- package/demos/batch-geocoder-node/config-template.js +18 -0
- package/demos/batch-geocoder-node/package-lock.json +109 -0
- package/demos/batch-geocoder-node/package.json +38 -0
- package/demos/express/README.md +15 -0
- package/demos/express/config.json.template +3 -0
- package/demos/express/package-lock.json +428 -0
- package/demos/express/package.json +18 -0
- package/demos/express/server.js +33 -0
- package/demos/feature-service-browser/README.md +6 -0
- package/demos/feature-service-browser/index.html +122 -0
- package/demos/feature-service-browser/package-lock.json +182 -0
- package/demos/feature-service-browser/package.json +18 -0
- package/demos/geocoder-browser/README.md +10 -0
- package/demos/geocoder-browser/config.js.template +1 -0
- package/demos/geocoder-browser/index.html +131 -0
- package/demos/geocoder-browser/package-lock.json +182 -0
- package/demos/geocoder-browser/package.json +19 -0
- package/demos/geocoder-browser/post-sign-in.html +25 -0
- package/demos/jsapi-integration/README.md +25 -0
- package/demos/jsapi-integration/config.js +6 -0
- package/demos/jsapi-integration/index.html +85 -0
- package/demos/jsapi-integration/package-lock.json +184 -0
- package/demos/jsapi-integration/package.json +19 -0
- package/demos/oauth2-browser/README.md +14 -0
- package/demos/oauth2-browser/authenticate.html +32 -0
- package/demos/oauth2-browser/config.js.template +6 -0
- package/demos/oauth2-browser/index.html +202 -0
- package/demos/oauth2-browser/logo.svg +4 -0
- package/demos/oauth2-browser/package-lock.json +163 -0
- package/demos/oauth2-browser/package.json +18 -0
- package/demos/oauth2-browser/style.css +36 -0
- package/demos/oauth2-browser-retry/README.md +25 -0
- package/demos/oauth2-browser-retry/authenticate.html +21 -0
- package/demos/oauth2-browser-retry/index.html +116 -0
- package/demos/oauth2-browser-retry/logo.svg +4 -0
- package/demos/vue/.env.example +11 -0
- package/demos/vue/.eslintrc.js +17 -0
- package/demos/vue/.postcssrc.js +5 -0
- package/demos/vue/README.md +17 -0
- package/demos/vue/babel.config.js +3 -0
- package/demos/vue/package-lock.json +11323 -0
- package/demos/vue/package.json +33 -0
- package/demos/vue/public/favicon.ico +0 -0
- package/demos/vue/public/index.html +24 -0
- package/demos/vue/src/assets/logo.svg +29 -0
- package/demos/vue/src/components/App.vue +308 -0
- package/demos/vue/src/components/Authenticate.vue +65 -0
- package/demos/vue/src/components/Loader.vue +230 -0
- package/demos/vue/src/main.js +92 -0
- package/docs/FAQ.md +28 -0
- package/docs/HISTORY.md +62 -0
- package/docs/acetate.config.js +223 -0
- package/docs/build-typedoc.js +303 -0
- package/docs/src/_layout.html +82 -0
- package/docs/src/api/_declaration.html +496 -0
- package/docs/src/api/_layout.html +127 -0
- package/docs/src/api/_package.html +13 -0
- package/docs/src/api/index.html +23 -0
- package/docs/src/guides/_layout.html +24 -0
- package/docs/src/guides/amd-requirejs-dojo.md +40 -0
- package/docs/src/guides/babel-and-rollup.md +30 -0
- package/docs/src/guides/babel-and-webpack.md +30 -0
- package/docs/src/guides/browser-authentication.md +41 -0
- package/docs/src/guides/browserify.md +9 -0
- package/docs/src/guides/cli-authentication.md +9 -0
- package/docs/src/guides/client-server-authentication.md +9 -0
- package/docs/src/guides/from-a-cdn.md +36 -0
- package/docs/src/guides/index.md +52 -0
- package/docs/src/guides/node.md +70 -0
- package/docs/src/guides/package-overview.md +8 -0
- package/docs/src/guides/server-authentication.md +9 -0
- package/docs/src/guides/typescript-and-webpack.md +9 -0
- package/docs/src/img/icons.png +0 -0
- package/docs/src/img/icons@2x.png +0 -0
- package/docs/src/index.html +12 -0
- package/docs/src/js/api-search.js +112 -0
- package/docs/src/js/nav-toggle.js +41 -0
- package/docs/src/sass/_highlight.scss +96 -0
- package/docs/src/sass/_icons.scss +157 -0
- package/docs/src/sass/style.scss +169 -0
- package/jasmine.json +7 -0
- package/karma.conf.js +100 -0
- package/lerna.json +8 -0
- package/notes/README.md +88 -0
- package/package.json +129 -0
- package/packages/arcgis-rest-auth/README.md +67 -0
- package/packages/arcgis-rest-auth/package-lock.json +11 -0
- package/packages/arcgis-rest-auth/package.json +53 -0
- package/packages/arcgis-rest-auth/src/ApplicationSession.ts +108 -0
- package/packages/arcgis-rest-auth/src/UserSession.ts +880 -0
- package/packages/arcgis-rest-auth/src/authenticated-request-options.ts +24 -0
- package/packages/arcgis-rest-auth/src/fetch-token.ts +52 -0
- package/packages/arcgis-rest-auth/src/generate-token.ts +39 -0
- package/packages/arcgis-rest-auth/src/index.ts +8 -0
- package/packages/arcgis-rest-auth/test/ApplicationSession.test.ts +124 -0
- package/packages/arcgis-rest-auth/test/UserSession.test.ts +1005 -0
- package/packages/arcgis-rest-auth/test/fetchToken.test.ts +112 -0
- package/packages/arcgis-rest-auth/test/generateToken.test.ts +130 -0
- package/packages/arcgis-rest-auth/test/utils.ts +14 -0
- package/packages/arcgis-rest-auth/tsconfig.json +6 -0
- package/packages/arcgis-rest-common/README.md +57 -0
- package/packages/arcgis-rest-common/package-lock.json +11 -0
- package/packages/arcgis-rest-common/package.json +41 -0
- package/packages/arcgis-rest-common/src/index.ts +10 -0
- package/packages/arcgis-rest-common/src/types/feature.ts +14 -0
- package/packages/arcgis-rest-common/src/types/geometry.ts +47 -0
- package/packages/arcgis-rest-common/src/types/symbol.ts +21 -0
- package/packages/arcgis-rest-common/src/util/location.ts +19 -0
- package/packages/arcgis-rest-common/test/location.test.ts +73 -0
- package/packages/arcgis-rest-common/tsconfig.json +6 -0
- package/packages/arcgis-rest-common-types/README.md +64 -0
- package/packages/arcgis-rest-common-types/package.json +40 -0
- package/packages/arcgis-rest-common-types/src/group.ts +54 -0
- package/packages/arcgis-rest-common-types/src/index.ts +469 -0
- package/packages/arcgis-rest-common-types/src/item.ts +47 -0
- package/packages/arcgis-rest-common-types/src/webmap.ts +1267 -0
- package/packages/arcgis-rest-common-types/tsconfig.json +11 -0
- package/packages/arcgis-rest-feature-service/README.md +73 -0
- package/packages/arcgis-rest-feature-service/package-lock.json +11 -0
- package/packages/arcgis-rest-feature-service/package.json +53 -0
- package/packages/arcgis-rest-feature-service/src/add.ts +90 -0
- package/packages/arcgis-rest-feature-service/src/addAttachment.ts +64 -0
- package/packages/arcgis-rest-feature-service/src/decodeValues.ts +129 -0
- package/packages/arcgis-rest-feature-service/src/delete.ts +97 -0
- package/packages/arcgis-rest-feature-service/src/deleteAttachments.ts +67 -0
- package/packages/arcgis-rest-feature-service/src/getAttachments.ts +64 -0
- package/packages/arcgis-rest-feature-service/src/getLayer.ts +27 -0
- package/packages/arcgis-rest-feature-service/src/helpers.ts +50 -0
- package/packages/arcgis-rest-feature-service/src/index.ts +14 -0
- package/packages/arcgis-rest-feature-service/src/query.ts +183 -0
- package/packages/arcgis-rest-feature-service/src/queryRelated.ts +94 -0
- package/packages/arcgis-rest-feature-service/src/update.ts +90 -0
- package/packages/arcgis-rest-feature-service/src/updateAttachment.ts +73 -0
- package/packages/arcgis-rest-feature-service/test/attachments.test.ts +203 -0
- package/packages/arcgis-rest-feature-service/test/crud.test.ts +263 -0
- package/packages/arcgis-rest-feature-service/test/decodeValues.test.ts +67 -0
- package/packages/arcgis-rest-feature-service/test/getLayer.test.ts +31 -0
- package/packages/arcgis-rest-feature-service/test/mocks/cvdQueryResponse.ts +225 -0
- package/packages/arcgis-rest-feature-service/test/mocks/feature.ts +281 -0
- package/packages/arcgis-rest-feature-service/test/mocks/fields.ts +779 -0
- package/packages/arcgis-rest-feature-service/test/mocks/foo.txt +1 -0
- package/packages/arcgis-rest-feature-service/test/mocks/service.ts +259 -0
- package/packages/arcgis-rest-feature-service/test/query.test.ts +140 -0
- package/packages/arcgis-rest-feature-service/tsconfig.json +6 -0
- package/packages/arcgis-rest-feature-service-admin/README.md +69 -0
- package/packages/arcgis-rest-feature-service-admin/package-lock.json +11 -0
- package/packages/arcgis-rest-feature-service-admin/package.json +56 -0
- package/packages/arcgis-rest-feature-service-admin/src/addTo.ts +74 -0
- package/packages/arcgis-rest-feature-service-admin/src/create.ts +207 -0
- package/packages/arcgis-rest-feature-service-admin/src/index.ts +2 -0
- package/packages/arcgis-rest-feature-service-admin/test/addTo.test.ts +353 -0
- package/packages/arcgis-rest-feature-service-admin/test/create.test.ts +412 -0
- package/packages/arcgis-rest-feature-service-admin/test/mocks/layerDefinition.ts +79 -0
- package/packages/arcgis-rest-feature-service-admin/test/mocks/move.ts +14 -0
- package/packages/arcgis-rest-feature-service-admin/test/mocks/service.ts +72 -0
- package/packages/arcgis-rest-feature-service-admin/tsconfig.json +6 -0
- package/packages/arcgis-rest-geocoder/README.md +83 -0
- package/packages/arcgis-rest-geocoder/package-lock.json +11 -0
- package/packages/arcgis-rest-geocoder/package.json +55 -0
- package/packages/arcgis-rest-geocoder/src/bulk.ts +102 -0
- package/packages/arcgis-rest-geocoder/src/geocode.ts +130 -0
- package/packages/arcgis-rest-geocoder/src/helpers.ts +80 -0
- package/packages/arcgis-rest-geocoder/src/index.ts +8 -0
- package/packages/arcgis-rest-geocoder/src/reverse.ts +83 -0
- package/packages/arcgis-rest-geocoder/src/suggest.ts +69 -0
- package/packages/arcgis-rest-geocoder/test/bulk.test.ts +113 -0
- package/packages/arcgis-rest-geocoder/test/geocode.test.ts +176 -0
- package/packages/arcgis-rest-geocoder/test/helpers.test.ts +111 -0
- package/packages/arcgis-rest-geocoder/test/mocks/responses.ts +629 -0
- package/packages/arcgis-rest-geocoder/test/reverse.test.ts +126 -0
- package/packages/arcgis-rest-geocoder/test/suggest.test.ts +98 -0
- package/packages/arcgis-rest-geocoder/tsconfig.json +6 -0
- package/packages/arcgis-rest-groups/README.md +67 -0
- package/packages/arcgis-rest-groups/package-lock.json +11 -0
- package/packages/arcgis-rest-groups/package.json +55 -0
- package/packages/arcgis-rest-groups/src/create.ts +34 -0
- package/packages/arcgis-rest-groups/src/get.ts +95 -0
- package/packages/arcgis-rest-groups/src/helpers.ts +27 -0
- package/packages/arcgis-rest-groups/src/index.ts +11 -0
- package/packages/arcgis-rest-groups/src/notification.ts +77 -0
- package/packages/arcgis-rest-groups/src/protect.ts +40 -0
- package/packages/arcgis-rest-groups/src/remove.ts +23 -0
- package/packages/arcgis-rest-groups/src/search.ts +64 -0
- package/packages/arcgis-rest-groups/src/update.ts +36 -0
- package/packages/arcgis-rest-groups/test/crud.test.ts +134 -0
- package/packages/arcgis-rest-groups/test/get.test.ts +101 -0
- package/packages/arcgis-rest-groups/test/mocks/responses.ts +141 -0
- package/packages/arcgis-rest-groups/test/notification.test.ts +102 -0
- package/packages/arcgis-rest-groups/test/protect.test.ts +64 -0
- package/packages/arcgis-rest-groups/test/search.test.ts +85 -0
- package/packages/arcgis-rest-groups/tsconfig.json +6 -0
- package/packages/arcgis-rest-items/README.md +69 -0
- package/packages/arcgis-rest-items/package-lock.json +11 -0
- package/packages/arcgis-rest-items/package.json +55 -0
- package/packages/arcgis-rest-items/src/add.ts +103 -0
- package/packages/arcgis-rest-items/src/create.ts +110 -0
- package/packages/arcgis-rest-items/src/get.ts +79 -0
- package/packages/arcgis-rest-items/src/helpers.ts +147 -0
- package/packages/arcgis-rest-items/src/index.ts +11 -0
- package/packages/arcgis-rest-items/src/protect.ts +38 -0
- package/packages/arcgis-rest-items/src/remove.ts +58 -0
- package/packages/arcgis-rest-items/src/search.ts +78 -0
- package/packages/arcgis-rest-items/src/update.ts +134 -0
- package/packages/arcgis-rest-items/test/add.test.ts +256 -0
- package/packages/arcgis-rest-items/test/create.test.ts +371 -0
- package/packages/arcgis-rest-items/test/get.test.ts +181 -0
- package/packages/arcgis-rest-items/test/mocks/foo.zip +0 -0
- package/packages/arcgis-rest-items/test/mocks/item.ts +35 -0
- package/packages/arcgis-rest-items/test/mocks/resources.ts +31 -0
- package/packages/arcgis-rest-items/test/mocks/search.ts +62 -0
- package/packages/arcgis-rest-items/test/protect.test.ts +122 -0
- package/packages/arcgis-rest-items/test/remove.test.ts +161 -0
- package/packages/arcgis-rest-items/test/search.test.ts +159 -0
- package/packages/arcgis-rest-items/test/update.test.ts +450 -0
- package/packages/arcgis-rest-items/tsconfig.json +6 -0
- package/packages/arcgis-rest-request/README.md +68 -0
- package/packages/arcgis-rest-request/package-lock.json +11 -0
- package/packages/arcgis-rest-request/package.json +45 -0
- package/packages/arcgis-rest-request/src/index.ts +15 -0
- package/packages/arcgis-rest-request/src/request.ts +358 -0
- package/packages/arcgis-rest-request/src/utils/ArcGISRequestError.ts +76 -0
- package/packages/arcgis-rest-request/src/utils/ErrorTypes.ts +29 -0
- package/packages/arcgis-rest-request/src/utils/append-custom-params.ts +29 -0
- package/packages/arcgis-rest-request/src/utils/encode-form-data.ts +34 -0
- package/packages/arcgis-rest-request/src/utils/encode-query-string.ts +23 -0
- package/packages/arcgis-rest-request/src/utils/get-portal-url.ts +25 -0
- package/packages/arcgis-rest-request/src/utils/get-portal.ts +45 -0
- package/packages/arcgis-rest-request/src/utils/params.ts +52 -0
- package/packages/arcgis-rest-request/src/utils/process-params.ts +99 -0
- package/packages/arcgis-rest-request/src/utils/retryAuthError.ts +9 -0
- package/packages/arcgis-rest-request/src/utils/warn.ts +11 -0
- package/packages/arcgis-rest-request/test/mocks/errors.ts +68 -0
- package/packages/arcgis-rest-request/test/mocks/geojson-feature-collection.ts +13 -0
- package/packages/arcgis-rest-request/test/mocks/portal.ts +112 -0
- package/packages/arcgis-rest-request/test/mocks/sharing-rest-info.ts +41 -0
- package/packages/arcgis-rest-request/test/mocks/webmap.ts +41 -0
- package/packages/arcgis-rest-request/test/request.test.ts +323 -0
- package/packages/arcgis-rest-request/test/utils/ArcGISAuthError.test.ts +170 -0
- package/packages/arcgis-rest-request/test/utils/ArcGISRequestError.test.ts +51 -0
- package/packages/arcgis-rest-request/test/utils/check-for-errors.test.ts +111 -0
- package/packages/arcgis-rest-request/test/utils/encode-form-data.test.ts +133 -0
- package/packages/arcgis-rest-request/test/utils/get-portal-url.test.ts +37 -0
- package/packages/arcgis-rest-request/test/utils/portal.test.ts +97 -0
- package/packages/arcgis-rest-request/test/utils/process-params.test.ts +193 -0
- package/packages/arcgis-rest-request/tsconfig.json +6 -0
- package/packages/arcgis-rest-routing/README.md +71 -0
- package/packages/arcgis-rest-routing/package-lock.json +11 -0
- package/packages/arcgis-rest-routing/package.json +54 -0
- package/packages/arcgis-rest-routing/src/helpers.ts +16 -0
- package/packages/arcgis-rest-routing/src/index.ts +4 -0
- package/packages/arcgis-rest-routing/src/solveRoute.ts +102 -0
- package/packages/arcgis-rest-routing/test/mocks/responses.ts +825 -0
- package/packages/arcgis-rest-routing/test/solveRoute.test.ts +267 -0
- package/packages/arcgis-rest-routing/tsconfig.json +6 -0
- package/packages/arcgis-rest-sharing/README.md +70 -0
- package/packages/arcgis-rest-sharing/package-lock.json +11 -0
- package/packages/arcgis-rest-sharing/package.json +60 -0
- package/packages/arcgis-rest-sharing/src/access.ts +85 -0
- package/packages/arcgis-rest-sharing/src/group-sharing.ts +211 -0
- package/packages/arcgis-rest-sharing/src/helpers.ts +82 -0
- package/packages/arcgis-rest-sharing/src/index.ts +5 -0
- package/packages/arcgis-rest-sharing/test/access.test.ts +154 -0
- package/packages/arcgis-rest-sharing/test/group-sharing.test.ts +566 -0
- package/packages/arcgis-rest-sharing/test/helpers.test.ts +55 -0
- package/packages/arcgis-rest-sharing/test/mocks/sharing.ts +18 -0
- package/packages/arcgis-rest-sharing/tsconfig.json +6 -0
- package/packages/arcgis-rest-users/README.md +74 -0
- package/packages/arcgis-rest-users/package-lock.json +11 -0
- package/packages/arcgis-rest-users/package.json +54 -0
- package/packages/arcgis-rest-users/src/get.ts +69 -0
- package/packages/arcgis-rest-users/src/index.ts +6 -0
- package/packages/arcgis-rest-users/src/invitation.ts +166 -0
- package/packages/arcgis-rest-users/src/notification.ts +73 -0
- package/packages/arcgis-rest-users/test/get.test.ts +99 -0
- package/packages/arcgis-rest-users/test/invitation.test.ts +169 -0
- package/packages/arcgis-rest-users/test/mocks/invitation.ts +70 -0
- package/packages/arcgis-rest-users/test/mocks/notification.ts +34 -0
- package/packages/arcgis-rest-users/test/mocks/user.ts +173 -0
- package/packages/arcgis-rest-users/test/notification.test.ts +83 -0
- package/packages/arcgis-rest-users/tsconfig.json +6 -0
- package/support/changelog.js +394 -0
- package/support/deploy-doc-site.js +16 -0
- package/support/dev.sh +6 -0
- package/support/publish.sh +43 -0
- package/support/test-helpers.js +8 -0
- package/tsconfig.json +69 -0
- package/tslint.json +16 -0
- package/umd-base-profile.js +82 -0
- package/umd-production-profile.js +13 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
2
|
+
* Apache-2.0 */
|
3
|
+
|
4
|
+
// if you want to get *really* pedantic, nonmember is more _derived_
|
5
|
+
export type GroupMembership = "owner" | "admin" | "member" | "nonmember";
|
6
|
+
|
7
|
+
/**
|
8
|
+
* A [Group](https://developers.arcgis.com/rest/users-groups-and-items/common-parameters.htm) that has not been created yet.
|
9
|
+
*/
|
10
|
+
export interface IGroupAdd {
|
11
|
+
title: string;
|
12
|
+
access: "private" | "org" | "public";
|
13
|
+
owner?: string;
|
14
|
+
tags?: string[];
|
15
|
+
description?: string;
|
16
|
+
phone?: string;
|
17
|
+
sortField?:
|
18
|
+
| "title"
|
19
|
+
| "owner"
|
20
|
+
| "avgrating"
|
21
|
+
| "numviews"
|
22
|
+
| "created"
|
23
|
+
| "modified";
|
24
|
+
sortOrder?: "asc" | "desc";
|
25
|
+
isViewOnly?: boolean;
|
26
|
+
isInvitationOnly?: boolean;
|
27
|
+
thumbnail?: string;
|
28
|
+
autoJoin?: boolean;
|
29
|
+
snippet?: string;
|
30
|
+
[key: string]: any;
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Existing Portal [Group](https://developers.arcgis.com/rest/users-groups-and-items/group.htm).
|
35
|
+
*/
|
36
|
+
export interface IGroup extends IGroupAdd {
|
37
|
+
id: string;
|
38
|
+
owner: string;
|
39
|
+
tags: string[];
|
40
|
+
created: number;
|
41
|
+
modified: number;
|
42
|
+
protected: boolean;
|
43
|
+
isInvitationOnly: boolean;
|
44
|
+
isViewOnly: boolean;
|
45
|
+
isOpenData?: boolean;
|
46
|
+
isFav: boolean;
|
47
|
+
autoJoin: boolean;
|
48
|
+
userMembership?: {
|
49
|
+
username?: string;
|
50
|
+
memberType?: GroupMembership;
|
51
|
+
applications?: number;
|
52
|
+
};
|
53
|
+
hasCategorySchema?: boolean;
|
54
|
+
}
|
@@ -0,0 +1,469 @@
|
|
1
|
+
/* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc.
|
2
|
+
* Apache-2.0 */
|
3
|
+
|
4
|
+
import { IGroup } from "./group";
|
5
|
+
|
6
|
+
export * from "./webmap";
|
7
|
+
export * from "./item";
|
8
|
+
export * from "./group";
|
9
|
+
|
10
|
+
/**
|
11
|
+
* an arc can be represented as a JSON curve object
|
12
|
+
*/
|
13
|
+
export interface IArc {
|
14
|
+
a: [
|
15
|
+
Position, // End point: x, y, <z>, <m>
|
16
|
+
Position2D, // Center point: center_x, center_y
|
17
|
+
number, // minor
|
18
|
+
number, // clockwise
|
19
|
+
number, // rotation
|
20
|
+
number, // axis
|
21
|
+
number // ratio
|
22
|
+
];
|
23
|
+
}
|
24
|
+
|
25
|
+
/**
|
26
|
+
* a bezier curve can be represented as a JSON curve object
|
27
|
+
*/
|
28
|
+
export interface IBezierCurve {
|
29
|
+
b: [Position, Position2D, Position2D];
|
30
|
+
}
|
31
|
+
|
32
|
+
/**
|
33
|
+
* a circular arc can be represented as a JSON curve object
|
34
|
+
*/
|
35
|
+
export interface ICircularArc {
|
36
|
+
c: [Position, Position2D];
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
*
|
41
|
+
*/
|
42
|
+
export type Color = [number, number, number, number];
|
43
|
+
|
44
|
+
/**
|
45
|
+
*
|
46
|
+
*/
|
47
|
+
export type ElipticArc = IArc;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* a spatial entity and its corresponding properties
|
51
|
+
*/
|
52
|
+
export interface IFeature {
|
53
|
+
geometry?: IGeometry;
|
54
|
+
attributes: { [key: string]: any };
|
55
|
+
symbol?: ISymbol;
|
56
|
+
}
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Field type.
|
60
|
+
*/
|
61
|
+
export type esriFieldType =
|
62
|
+
| "esriFieldTypeBlob"
|
63
|
+
| "esriFieldTypeDate"
|
64
|
+
| "esriFieldTypeDouble"
|
65
|
+
| "esriFieldTypeGeometry"
|
66
|
+
| "esriFieldTypeGlobalID"
|
67
|
+
| "esriFieldTypeGUID"
|
68
|
+
| "esriFieldTypeInteger"
|
69
|
+
| "esriFieldTypeOID"
|
70
|
+
| "esriFieldTypeRaster"
|
71
|
+
| "esriFieldTypeSingle"
|
72
|
+
| "esriFieldTypeSmallInteger"
|
73
|
+
| "esriFieldTypeString"
|
74
|
+
| "esriFieldTypeXML";
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Contains information about an attribute field.
|
78
|
+
*/
|
79
|
+
export interface IField {
|
80
|
+
/** A string defining the field name. */
|
81
|
+
name: string;
|
82
|
+
/** A string defining the field type. */
|
83
|
+
type: esriFieldType;
|
84
|
+
/** A string defining the field alias. */
|
85
|
+
alias?: string;
|
86
|
+
/** The domain objects if applicable. */
|
87
|
+
domain?: any;
|
88
|
+
/** A Boolean defining whether this field is editable. */
|
89
|
+
editable?: boolean;
|
90
|
+
/** A Boolean defining whether or not the field is an exact match. */
|
91
|
+
exactMatch?: boolean;
|
92
|
+
/** A number defining how many characters are allowed in a string. field. */
|
93
|
+
length?: number;
|
94
|
+
/** A Boolean defining whether this field can have a null value. */
|
95
|
+
nullable?: boolean;
|
96
|
+
/** The value written in for new records by default. */
|
97
|
+
defaultValue?: any;
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* a building block for discrete geometries
|
102
|
+
*/
|
103
|
+
export interface IGeometry {
|
104
|
+
spatialReference?: ISpatialReference;
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* An envelope is a rectangle defined by a range of values for each coordinate and attribute.
|
109
|
+
*/
|
110
|
+
export interface IEnvelope extends IGeometry {
|
111
|
+
xmin: number;
|
112
|
+
xmax: number;
|
113
|
+
ymin: number;
|
114
|
+
ymax: number;
|
115
|
+
|
116
|
+
zmin?: number;
|
117
|
+
zmax?: number;
|
118
|
+
|
119
|
+
mmin?: number;
|
120
|
+
mmax?: number;
|
121
|
+
}
|
122
|
+
|
123
|
+
/**
|
124
|
+
*
|
125
|
+
*/
|
126
|
+
export type esriGeometryType = // why is this type camelCased?
|
127
|
+
| "esriGeometryPoint"
|
128
|
+
| "esriGeometryMultipoint"
|
129
|
+
| "esriGeometryPolyline"
|
130
|
+
| "esriGeometryPolygon"
|
131
|
+
| "esriGeometryEnvelope";
|
132
|
+
|
133
|
+
/**
|
134
|
+
* The spatial relationship used to compare input geometries
|
135
|
+
*/
|
136
|
+
export type SpatialRelationship =
|
137
|
+
| "esriSpatialRelIntersects"
|
138
|
+
| "esriSpatialRelContains"
|
139
|
+
| "esriSpatialRelCrosses"
|
140
|
+
| "esriSpatialRelEnvelopeIntersects"
|
141
|
+
| "esriSpatialRelIndexIntersects"
|
142
|
+
| "esriSpatialRelOverlaps"
|
143
|
+
| "esriSpatialRelTouches"
|
144
|
+
| "esriSpatialRelWithin";
|
145
|
+
|
146
|
+
/**
|
147
|
+
* Extents are used to define rectangles and bounding boxes.
|
148
|
+
*/
|
149
|
+
export interface IExtent {
|
150
|
+
xmin: number;
|
151
|
+
ymin: number;
|
152
|
+
xmax: number;
|
153
|
+
ymax: number;
|
154
|
+
spatialReference?: ISpatialReference;
|
155
|
+
}
|
156
|
+
|
157
|
+
/**
|
158
|
+
*
|
159
|
+
*/
|
160
|
+
export interface IHasZM {
|
161
|
+
hasZ?: boolean;
|
162
|
+
hasM?: boolean;
|
163
|
+
}
|
164
|
+
|
165
|
+
/**
|
166
|
+
*
|
167
|
+
*/
|
168
|
+
export interface IFeatureSet extends IHasZM {
|
169
|
+
objectIdFieldName?: string; // optional
|
170
|
+
globalIdFieldName?: string; // optional
|
171
|
+
displayFieldName?: string; // optional
|
172
|
+
geometryType?: esriGeometryType; // for feature layers only
|
173
|
+
spatialReference?: ISpatialReference; // for feature layers only.
|
174
|
+
fields?: IField[];
|
175
|
+
features: IFeature[];
|
176
|
+
}
|
177
|
+
|
178
|
+
/**
|
179
|
+
*
|
180
|
+
*/
|
181
|
+
export interface IFont {
|
182
|
+
family?: string; // "<fontFamily>";
|
183
|
+
size?: number; // <fontSize>;
|
184
|
+
style?: "italic" | "normal" | "oblique";
|
185
|
+
weight?: "bold" | "bolder" | "lighter" | "normal";
|
186
|
+
decoration?: "line-through" | "underline" | "none";
|
187
|
+
}
|
188
|
+
|
189
|
+
/**
|
190
|
+
*
|
191
|
+
*/
|
192
|
+
export type JsonCurve = ICircularArc | IArc | IOldCircularArc | IBezierCurve;
|
193
|
+
|
194
|
+
/**
|
195
|
+
*
|
196
|
+
*/
|
197
|
+
export interface IOldCircularArc {
|
198
|
+
a: [
|
199
|
+
Position, // End point: x, y, <z>, <m>
|
200
|
+
Position2D, // Center point: center_x, center_y
|
201
|
+
number, // minor
|
202
|
+
number // clockwise
|
203
|
+
];
|
204
|
+
}
|
205
|
+
|
206
|
+
/**
|
207
|
+
*
|
208
|
+
*/
|
209
|
+
export interface ISymbol {
|
210
|
+
type: SymbolType;
|
211
|
+
style?: string;
|
212
|
+
}
|
213
|
+
|
214
|
+
/**
|
215
|
+
*
|
216
|
+
*/
|
217
|
+
export interface IMarkerSymbol extends ISymbol {
|
218
|
+
angle?: number;
|
219
|
+
xoffset?: number;
|
220
|
+
yoffset?: number;
|
221
|
+
}
|
222
|
+
|
223
|
+
/**
|
224
|
+
* A multipoint contains an array of points.
|
225
|
+
*/
|
226
|
+
export interface IMultipoint extends IHasZM, IGeometry {
|
227
|
+
points: Position[];
|
228
|
+
}
|
229
|
+
|
230
|
+
/**
|
231
|
+
* Params for paging operations
|
232
|
+
*/
|
233
|
+
export interface IPagingParams {
|
234
|
+
start?: number;
|
235
|
+
num?: number;
|
236
|
+
}
|
237
|
+
|
238
|
+
/**
|
239
|
+
*
|
240
|
+
*/
|
241
|
+
export interface IPictureSourced {
|
242
|
+
url?: string; // Relative URL for static layers and full URL for dynamic layers. Access relative URL using http://<mapservice-url>/<layerId1>/images/<imageUrl11>
|
243
|
+
imageData?: string; // "<base64EncodedImageData>";
|
244
|
+
contentType?: string;
|
245
|
+
width?: number;
|
246
|
+
height?: number;
|
247
|
+
angle?: number;
|
248
|
+
xoffset?: number;
|
249
|
+
yoffset?: number;
|
250
|
+
}
|
251
|
+
|
252
|
+
/**
|
253
|
+
*
|
254
|
+
*/
|
255
|
+
export interface IPictureFillSymbol extends ISymbol, IPictureSourced {
|
256
|
+
type: "esriPFS";
|
257
|
+
outline?: ISimpleLineSymbol; // if outline has been specified
|
258
|
+
xscale?: number;
|
259
|
+
yscale?: number;
|
260
|
+
}
|
261
|
+
|
262
|
+
/**
|
263
|
+
*
|
264
|
+
*/
|
265
|
+
export interface IPictureMarkerSymbol extends IMarkerSymbol, IPictureSourced {
|
266
|
+
type: "esriPMS";
|
267
|
+
}
|
268
|
+
|
269
|
+
/**
|
270
|
+
* A simple point geometry, with spatial reference defined.
|
271
|
+
*/
|
272
|
+
export interface IPoint extends IHasZM, IGeometry {
|
273
|
+
x: number;
|
274
|
+
y: number;
|
275
|
+
}
|
276
|
+
|
277
|
+
/**
|
278
|
+
*
|
279
|
+
*/
|
280
|
+
export interface IPolyline extends IHasZM, IGeometry {
|
281
|
+
paths: Position[][];
|
282
|
+
}
|
283
|
+
|
284
|
+
/**
|
285
|
+
*
|
286
|
+
*/
|
287
|
+
export interface IPolylineWithCurves extends IHasZM, IGeometry {
|
288
|
+
curvePaths: Array<Array<Position | JsonCurve>>;
|
289
|
+
}
|
290
|
+
|
291
|
+
/**
|
292
|
+
*
|
293
|
+
*/
|
294
|
+
export interface IPolygon extends IHasZM, IGeometry {
|
295
|
+
rings: Position[][];
|
296
|
+
}
|
297
|
+
|
298
|
+
/**
|
299
|
+
*
|
300
|
+
*/
|
301
|
+
export interface IPolygonWithCurves extends IHasZM, IGeometry {
|
302
|
+
curveRings: Array<Array<Position | JsonCurve>>;
|
303
|
+
}
|
304
|
+
|
305
|
+
/**
|
306
|
+
*
|
307
|
+
*/
|
308
|
+
export type Position =
|
309
|
+
| Position2D
|
310
|
+
| [number, number, number]
|
311
|
+
| [number, number, number, number];
|
312
|
+
|
313
|
+
/**
|
314
|
+
*
|
315
|
+
*/
|
316
|
+
export type Position2D = [number, number];
|
317
|
+
|
318
|
+
/**
|
319
|
+
*
|
320
|
+
*/
|
321
|
+
export type SimpleMarkerSymbolStyle =
|
322
|
+
| "esriSMSCircle"
|
323
|
+
| "esriSMSCross"
|
324
|
+
| "esriSMSDiamond"
|
325
|
+
| "esriSMSSquare"
|
326
|
+
| "esriSMSX"
|
327
|
+
| "esriSMSTriangle";
|
328
|
+
|
329
|
+
/**
|
330
|
+
*
|
331
|
+
*/
|
332
|
+
export type SimpleLineSymbolStyle =
|
333
|
+
| "esriSLSDash"
|
334
|
+
| "esriSLSDashDot"
|
335
|
+
| "esriSLSDashDotDot"
|
336
|
+
| "esriSLSDot"
|
337
|
+
| "esriSLSNull"
|
338
|
+
| "esriSLSSolid";
|
339
|
+
|
340
|
+
/**
|
341
|
+
*
|
342
|
+
*/
|
343
|
+
export type SimpleFillSymbolStyle =
|
344
|
+
| "esriSFSBackwardDiagonal"
|
345
|
+
| "esriSFSCross"
|
346
|
+
| "esriSFSDiagonalCross"
|
347
|
+
| "esriSFSForwardDiagonal"
|
348
|
+
| "esriSFSHorizontal"
|
349
|
+
| "esriSFSNull"
|
350
|
+
| "esriSFSSolid"
|
351
|
+
| "esriSFSVertical";
|
352
|
+
|
353
|
+
/**
|
354
|
+
*
|
355
|
+
*/
|
356
|
+
export type SymbolType =
|
357
|
+
| "esriSLS"
|
358
|
+
| "esriSMS"
|
359
|
+
| "esriSFS"
|
360
|
+
| "esriPMS"
|
361
|
+
| "esriPFS"
|
362
|
+
| "esriTS";
|
363
|
+
|
364
|
+
/**
|
365
|
+
*
|
366
|
+
*/
|
367
|
+
export interface ISimpleFillSymbol extends ISymbol {
|
368
|
+
type: "esriSFS";
|
369
|
+
style?: SimpleFillSymbolStyle;
|
370
|
+
color?: Color;
|
371
|
+
outline?: ISimpleLineSymbol; // if outline has been specified
|
372
|
+
}
|
373
|
+
|
374
|
+
/**
|
375
|
+
*
|
376
|
+
*/
|
377
|
+
export interface ISimpleLineSymbol extends ISymbol {
|
378
|
+
type: "esriSLS";
|
379
|
+
style?: SimpleLineSymbolStyle;
|
380
|
+
color?: Color;
|
381
|
+
width?: number;
|
382
|
+
}
|
383
|
+
|
384
|
+
/**
|
385
|
+
*
|
386
|
+
*/
|
387
|
+
export interface ISimpleMarkerSymbol extends IMarkerSymbol {
|
388
|
+
type: "esriSMS";
|
389
|
+
style?: SimpleMarkerSymbolStyle;
|
390
|
+
color?: Color;
|
391
|
+
size?: number;
|
392
|
+
outline?: ISimpleLineSymbol;
|
393
|
+
}
|
394
|
+
|
395
|
+
/**
|
396
|
+
* Spatial reference systems define mathematical transformations and coordinate systems for displaying spatial information in 2D and 3D.
|
397
|
+
*/
|
398
|
+
export interface ISpatialReference {
|
399
|
+
wkid?: number;
|
400
|
+
latestWkid?: number;
|
401
|
+
vcsWkid?: number;
|
402
|
+
latestVcsWkid?: number;
|
403
|
+
wkt?: string;
|
404
|
+
latestWkt?: string;
|
405
|
+
}
|
406
|
+
|
407
|
+
/**
|
408
|
+
*
|
409
|
+
*/
|
410
|
+
export interface ITextSymbol extends IMarkerSymbol {
|
411
|
+
type: "esriTS";
|
412
|
+
color?: Color;
|
413
|
+
backgroundColor?: Color;
|
414
|
+
borderLineSize?: number; // <size>;
|
415
|
+
borderLineColor?: Color;
|
416
|
+
haloSize?: number; // <size>;
|
417
|
+
haloColor?: Color;
|
418
|
+
verticalAlignment?: "baseline" | "top" | "middle" | "bottom";
|
419
|
+
horizontalAlignment?: "left" | "right" | "center" | "justify";
|
420
|
+
rightToLeft?: boolean;
|
421
|
+
kerning?: boolean;
|
422
|
+
font?: IFont;
|
423
|
+
text?: string; // only applicable when specified as a client-side graphic.
|
424
|
+
}
|
425
|
+
|
426
|
+
/**
|
427
|
+
* An ArcGIS Online or Enterprise user
|
428
|
+
*/
|
429
|
+
export interface IUser {
|
430
|
+
username?: string;
|
431
|
+
fullName?: string;
|
432
|
+
availableCredits?: number;
|
433
|
+
assignedCredits?: number;
|
434
|
+
firstName?: string;
|
435
|
+
lastName?: string;
|
436
|
+
preferredView?: any;
|
437
|
+
description?: string;
|
438
|
+
email?: string;
|
439
|
+
idpUsername?: string;
|
440
|
+
favGroupId?: string;
|
441
|
+
lastLogin?: number;
|
442
|
+
mfaEnabled?: boolean;
|
443
|
+
access?: string;
|
444
|
+
storageUsage?: number;
|
445
|
+
storageQuota?: number;
|
446
|
+
orgId?: string;
|
447
|
+
role?: "org_admin" | "org_publisher" | "org_user";
|
448
|
+
privileges?: string[];
|
449
|
+
roleId?: string;
|
450
|
+
level?: string;
|
451
|
+
disabled?: boolean;
|
452
|
+
units?: string;
|
453
|
+
tags?: string[];
|
454
|
+
culture?: string;
|
455
|
+
region?: string;
|
456
|
+
thumbnail?: string;
|
457
|
+
created?: number;
|
458
|
+
modified?: number;
|
459
|
+
groups?: IGroup[];
|
460
|
+
provider?: "arcgis" | "enterprise" | "facebook" | "google";
|
461
|
+
}
|
462
|
+
|
463
|
+
export type esriUnits =
|
464
|
+
| "esriSRUnit_Meter"
|
465
|
+
| "esriSRUnit_StatuteMile"
|
466
|
+
| "esriSRUnit_Foot"
|
467
|
+
| "esriSRUnit_Kilometer"
|
468
|
+
| "esriSRUnit_NauticalMile"
|
469
|
+
| "esriSRUnit_USNauticalMile";
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
2
|
+
* Apache-2.0 */
|
3
|
+
|
4
|
+
import { ISpatialReference } from "./index";
|
5
|
+
|
6
|
+
/**
|
7
|
+
* A Portal [Item](https://developers.arcgis.com/rest/users-groups-and-items/common-parameters.htm) that has not been created yet.
|
8
|
+
*/
|
9
|
+
export interface IItemAdd {
|
10
|
+
title: string;
|
11
|
+
type: string;
|
12
|
+
owner?: string;
|
13
|
+
typeKeywords?: string[];
|
14
|
+
description?: string;
|
15
|
+
snippet?: string;
|
16
|
+
documentation?: string;
|
17
|
+
extent?: number[][];
|
18
|
+
categories?: string[];
|
19
|
+
spatialReference?: ISpatialReference;
|
20
|
+
culture?: string;
|
21
|
+
properties?: any;
|
22
|
+
url?: string;
|
23
|
+
tags?: string[];
|
24
|
+
[key: string]: any;
|
25
|
+
}
|
26
|
+
|
27
|
+
/**
|
28
|
+
* A Portal [Item](https://developers.arcgis.com/rest/users-groups-and-items/common-parameters.htm) to be updated.
|
29
|
+
*/
|
30
|
+
export interface IItemUpdate {
|
31
|
+
id: string;
|
32
|
+
[key: string]: any;
|
33
|
+
}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Existing Portal [Item](https://developers.arcgis.com/rest/users-groups-and-items/item.htm).
|
37
|
+
*/
|
38
|
+
export interface IItem extends IItemAdd {
|
39
|
+
id: string;
|
40
|
+
owner: string;
|
41
|
+
tags: string[];
|
42
|
+
created: number;
|
43
|
+
modified: number;
|
44
|
+
numViews: number;
|
45
|
+
size: number;
|
46
|
+
protected?: boolean; // not present in search results
|
47
|
+
}
|