@esri/arcgis-rest-developer-credentials 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-developer-credentials - v1.0.0 - Apache-2.0
3
- * Copyright (c) 2017-2024 Esri, Inc.
4
- * Sat Jun 15 2024 00:23:29 GMT+0000 (Coordinated Universal Time)
2
+ * @esri/arcgis-rest-developer-credentials - v1.0.1 - Apache-2.0
3
+ * Copyright (c) 2017-2025 Esri, Inc.
4
+ * Thu Jan 23 2025 20:05:00 GMT+0000 (Coordinated Universal Time)
5
5
  */
6
6
  import { getPortalUrl, createItem, getItem, removeItem } from '@esri/arcgis-rest-portal';
7
7
  import { appendCustomParams, request } from '@esri/arcgis-rest-request';
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-developer-credentials - v1.0.0 - Apache-2.0
3
- * Copyright (c) 2017-2024 Esri, Inc.
4
- * Sat Jun 15 2024 00:23:29 GMT+0000 (Coordinated Universal Time)
2
+ * @esri/arcgis-rest-developer-credentials - v1.0.1 - Apache-2.0
3
+ * Copyright (c) 2017-2025 Esri, Inc.
4
+ * Thu Jan 23 2025 20:05:00 GMT+0000 (Coordinated Universal Time)
5
5
  */
6
6
  import{getPortalUrl as t,createItem as e,getItem as i,removeItem as a}from"@esri/arcgis-rest-portal";import{appendCustomParams as n,request as s}from"@esri/arcgis-rest-request";var r;!function(t){t.Basemaps="portal:apikey:basemaps",t.Demographics="premium:user:demographics",t.Elevation="premium:user:elevation",t.FeatureReport="premium:user:featurereport",t.Geocode="premium:user:geocode",t.GeocodeStored="premium:user:geocode:stored",t.GeocodeTemporary="premium:user:geocode:temporary",t.GeoEnrichment="premium:user:geoenrichment",t.NetworkAnalysis="premium:user:networkanalysis",t.NetworkAnalysisRouting="premium:user:networkanalysis:routing",t.NetworkAnalysisOptimizedRouting="premium:user:networkanalysis:optimizedrouting",t.NetworkAnalysisClosestFacility="premium:user:networkanalysis:closestfacility",t.NetworkAnalysisServiceArea="premium:user:networkanalysis:servicearea",t.NetworkAnalysisLocationalLocation="premium:user:networkanalysis:locationallocation",t.NetworkAnalysisVehicleRouting="premium:user:networkanalysis:vehiclerouting",t.NetworkAnalysisOriginDestinationCostMatrix="premium:user:networkanalysis:origindestinationcostmatrix",t.Places="premium:user:places",t.SpatialAnalysis="premium:user:spatialanalysis",t.GeoAnalytics="premium:publisher:geoanalytics",t.RasterAnalysis="premium:publisher:rasteranalysis"}(r||(r={}));const o=t=>t.every((t=>Object.values(r).includes(t))),c=t=>{Object.entries(t.params).forEach((e=>{const[i,a]=e;"Array"===a.constructor.name&&(t.params[i]=JSON.stringify(a))}))};function p(t){const e=["apnsProdCert","apnsSandboxCert","gcmApiKey","isBeta"],i=["modified","registered"];return Object.keys(t).filter((t=>!e.includes(t))).reduce(((e,a)=>(i.includes(a)?e[a]=new Date(t[a]):e[a]=t[a],e)),{})}function u(t){if("apikey"!==t.appType||!("apiKey"in t))throw new Error("Item is not an API key.");return delete t.client_id,delete t.client_secret,delete t.redirect_uris,delete t.appType,t}function m(t){if("apikey"===t.appType)throw new Error("Item is not an OAuth 2.0 app.");return delete t.appType,delete t.httpReferrers,delete t.privileges,t}function g(t){return h(t,["credentials","headers","hideToken","httpMethod","maxUrlLength","portal","rawResponse","signal","suppressWarnings"])}function h(t,e){return e.reduce(((e,i)=>(i in t&&(e[i]=t[i]),e)),{})}async function l(e){if(!o(e.privileges))throw new Error("The `privileges` option contains invalid privileges.");const i=n(e,["itemId","appType","redirect_uris","httpReferrers","privileges"]);c(i);const a=t(i)+"/oauth2/registerApp";i.httpMethod="POST",i.params.f="json";return p(await s(a,i))}async function d(t){if(!o(t.privileges))throw new Error("The `privileges` option contains invalid privileges.");t.httpMethod="POST";const a=g(t),n=Object.assign(Object.assign({item:Object.assign(Object.assign({},h(t,["categories","culture","description","documentation","extent","owner","properties","snippet","spatialReference","tags","title","type","typeKeywords","url"])),{type:"API Key"})},a),{authentication:t.authentication,params:{f:"json"}}),s=await e(n),r=Object.assign(Object.assign({itemId:s.id,appType:"apikey",redirect_uris:[],httpReferrers:t.httpReferrers||[],privileges:t.privileges},a),{authentication:t.authentication}),c=await l(r),p=await i(c.itemId,Object.assign(Object.assign({},a),{authentication:t.authentication,params:{f:"json"}}));return Object.assign(Object.assign({},u(c)),{item:p})}async function O(e){const i=await e.authentication.getUsername(),a=t(e)+`/content/users/${i}/items/${e.itemId}/registeredAppInfo`;e.httpMethod="POST";return p(await s(a,Object.assign(Object.assign({},e),{params:{f:"json"}})))}async function j(e){if(e.privileges&&!o(e.privileges))throw new Error("The `privileges` option contains invalid privileges.");e.httpMethod="POST";const a=g(e),r=Object.assign(Object.assign({},a),{authentication:e.authentication,itemId:e.itemId}),m=await O(r);if("apikey"!==m.appType||!("apiKey"in m))throw new Error("Item is not an API key.");const h=m.client_id,l=n(Object.assign(Object.assign({},m),e),["privileges","httpReferrers"]);l.params.f="json",c(l);const d=t(l)+`/oauth2/apps/${h}/update`,j=await s(d,Object.assign(Object.assign({},l),{authentication:e.authentication})),y=p(Object.assign(Object.assign({},j),{apiKey:m.apiKey})),b=await i(e.itemId,Object.assign(Object.assign({},a),{authentication:e.authentication,params:{f:"json"}}));return Object.assign(Object.assign({},u(y)),{item:b})}async function y(t){const e=await O(t),a=await i(t.itemId,Object.assign(Object.assign({},g(t)),{authentication:t.authentication}));return Object.assign(Object.assign({},u(e)),{item:a})}async function b(t){t.httpMethod="POST";const e=g(t);await y(Object.assign(Object.assign({},e),{itemId:t.itemId,authentication:t.authentication}));return await a(Object.assign(Object.assign({},e),{id:t.itemId,authentication:t.authentication,params:{f:"json"}}))}async function w(t){const e=await O(t),a=await i(t.itemId,Object.assign(Object.assign({},g(t)),{authentication:t.authentication}));return Object.assign(Object.assign({},m(e)),{item:a})}async function f(t){t.httpMethod="POST";const e=g(t);await w(Object.assign(Object.assign({},e),{itemId:t.itemId,authentication:t.authentication}));return await a(Object.assign(Object.assign({},e),{id:t.itemId,authentication:t.authentication,params:{f:"json"}}))}async function I(e){e.httpMethod="POST";const a=g(e),r=Object.assign(Object.assign({},a),{authentication:e.authentication,itemId:e.itemId}),o=await O(r);if("apikey"===o.appType)throw new Error("Item is not an OAuth 2.0 app.");const u=o.client_id,h=n(Object.assign(Object.assign({},o),e),["redirect_uris"]);h.params.f="json",h.params.appType="multiple",c(h);const l=t(h)+`/oauth2/apps/${u}/update`,d=p(await s(l,Object.assign(Object.assign({},h),{authentication:e.authentication}))),j=await i(e.itemId,Object.assign(Object.assign({},a),{authentication:e.authentication,params:{f:"json"}}));return Object.assign(Object.assign({},m(d)),{item:j})}async function v(t){t.httpMethod="POST";const a=g(t),n=Object.assign(Object.assign({item:Object.assign(Object.assign({},h(t,["categories","culture","description","documentation","extent","owner","properties","snippet","spatialReference","tags","title","type","typeKeywords","url"])),{type:"Application"})},a),{authentication:t.authentication,params:{f:"json"}}),s=await e(n),r=Object.assign(Object.assign({itemId:s.id,appType:"multiple",redirect_uris:t.redirect_uris||[],httpReferrers:[],privileges:[]},a),{authentication:t.authentication}),o=await l(r),c=await i(o.itemId,Object.assign(Object.assign({},a),{authentication:t.authentication,params:{f:"json"}}));return Object.assign(Object.assign({},m(o)),{item:c})}async function k(e){e.httpMethod="POST";const i=g(e),a=Object.assign(Object.assign({},i),{authentication:e.authentication,itemId:e.itemId}),n=(await O(a)).client_id,r=t(e)+`/oauth2/apps/${n}/unregister`;return await s(r,Object.assign(Object.assign({},i),{authentication:e.authentication,params:{f:"json"}}))}export{r as Privileges,u as appToApiKeyProperties,m as appToOAuthAppProperties,o as arePrivilegesValid,d as createApiKey,v as createOAuthApp,b as deleteApiKey,f as deleteOAuthApp,g as extractBaseRequestOptions,h as filterKeys,y as getApiKey,w as getOAuthApp,O as getRegisteredAppInfo,l as registerApp,p as registeredAppResponseToApp,c as stringifyArrays,k as unregisterApp,j as updateApiKey,I as updateOAuthApp};
7
7
  //# sourceMappingURL=developer-credentials.esm.min.js.map
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-developer-credentials - v1.0.0 - Apache-2.0
3
- * Copyright (c) 2017-2024 Esri, Inc.
4
- * Sat Jun 15 2024 00:23:29 GMT+0000 (Coordinated Universal Time)
2
+ * @esri/arcgis-rest-developer-credentials - v1.0.1 - Apache-2.0
3
+ * Copyright (c) 2017-2025 Esri, Inc.
4
+ * Thu Jan 23 2025 20:05:00 GMT+0000 (Coordinated Universal Time)
5
5
  */
6
6
  (function (global, factory) {
7
7
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@esri/arcgis-rest-portal'), require('@esri/arcgis-rest-request')) :
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-developer-credentials - v1.0.0 - Apache-2.0
3
- * Copyright (c) 2017-2024 Esri, Inc.
4
- * Sat Jun 15 2024 00:23:29 GMT+0000 (Coordinated Universal Time)
2
+ * @esri/arcgis-rest-developer-credentials - v1.0.1 - Apache-2.0
3
+ * Copyright (c) 2017-2025 Esri, Inc.
4
+ * Thu Jan 23 2025 20:05:00 GMT+0000 (Coordinated Universal Time)
5
5
  */
6
6
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-portal"),require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-portal","@esri/arcgis-rest-request"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest,e.arcgisRest)}(this,(function(e,t,i){"use strict";var a;e.Privileges=void 0,(a=e.Privileges||(e.Privileges={})).Basemaps="portal:apikey:basemaps",a.Demographics="premium:user:demographics",a.Elevation="premium:user:elevation",a.FeatureReport="premium:user:featurereport",a.Geocode="premium:user:geocode",a.GeocodeStored="premium:user:geocode:stored",a.GeocodeTemporary="premium:user:geocode:temporary",a.GeoEnrichment="premium:user:geoenrichment",a.NetworkAnalysis="premium:user:networkanalysis",a.NetworkAnalysisRouting="premium:user:networkanalysis:routing",a.NetworkAnalysisOptimizedRouting="premium:user:networkanalysis:optimizedrouting",a.NetworkAnalysisClosestFacility="premium:user:networkanalysis:closestfacility",a.NetworkAnalysisServiceArea="premium:user:networkanalysis:servicearea",a.NetworkAnalysisLocationalLocation="premium:user:networkanalysis:locationallocation",a.NetworkAnalysisVehicleRouting="premium:user:networkanalysis:vehiclerouting",a.NetworkAnalysisOriginDestinationCostMatrix="premium:user:networkanalysis:origindestinationcostmatrix",a.Places="premium:user:places",a.SpatialAnalysis="premium:user:spatialanalysis",a.GeoAnalytics="premium:publisher:geoanalytics",a.RasterAnalysis="premium:publisher:rasteranalysis";const s=t=>t.every((t=>Object.values(e.Privileges).includes(t))),n=e=>{Object.entries(e.params).forEach((t=>{const[i,a]=t;"Array"===a.constructor.name&&(e.params[i]=JSON.stringify(a))}))};function r(e){const t=["apnsProdCert","apnsSandboxCert","gcmApiKey","isBeta"],i=["modified","registered"];return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,a)=>(i.includes(a)?t[a]=new Date(e[a]):t[a]=e[a],t)),{})}function o(e){if("apikey"!==e.appType||!("apiKey"in e))throw new Error("Item is not an API key.");return delete e.client_id,delete e.client_secret,delete e.redirect_uris,delete e.appType,e}function c(e){if("apikey"===e.appType)throw new Error("Item is not an OAuth 2.0 app.");return delete e.appType,delete e.httpReferrers,delete e.privileges,e}function p(e){return u(e,["credentials","headers","hideToken","httpMethod","maxUrlLength","portal","rawResponse","signal","suppressWarnings"])}function u(e,t){return t.reduce(((t,i)=>(i in e&&(t[i]=e[i]),t)),{})}async function g(e){if(!s(e.privileges))throw new Error("The `privileges` option contains invalid privileges.");const a=i.appendCustomParams(e,["itemId","appType","redirect_uris","httpReferrers","privileges"]);n(a);const o=t.getPortalUrl(a)+"/oauth2/registerApp";a.httpMethod="POST",a.params.f="json";return r(await i.request(o,a))}async function m(e){const a=await e.authentication.getUsername(),s=t.getPortalUrl(e)+`/content/users/${a}/items/${e.itemId}/registeredAppInfo`;e.httpMethod="POST";return r(await i.request(s,Object.assign(Object.assign({},e),{params:{f:"json"}})))}async function l(e){const i=await m(e),a=await t.getItem(e.itemId,Object.assign(Object.assign({},p(e)),{authentication:e.authentication}));return Object.assign(Object.assign({},o(i)),{item:a})}async function d(e){const i=await m(e),a=await t.getItem(e.itemId,Object.assign(Object.assign({},p(e)),{authentication:e.authentication}));return Object.assign(Object.assign({},c(i)),{item:a})}e.appToApiKeyProperties=o,e.appToOAuthAppProperties=c,e.arePrivilegesValid=s,e.createApiKey=async function(e){if(!s(e.privileges))throw new Error("The `privileges` option contains invalid privileges.");e.httpMethod="POST";const i=p(e),a=Object.assign(Object.assign({item:Object.assign(Object.assign({},u(e,["categories","culture","description","documentation","extent","owner","properties","snippet","spatialReference","tags","title","type","typeKeywords","url"])),{type:"API Key"})},i),{authentication:e.authentication,params:{f:"json"}}),n=await t.createItem(a),r=Object.assign(Object.assign({itemId:n.id,appType:"apikey",redirect_uris:[],httpReferrers:e.httpReferrers||[],privileges:e.privileges},i),{authentication:e.authentication}),c=await g(r),m=await t.getItem(c.itemId,Object.assign(Object.assign({},i),{authentication:e.authentication,params:{f:"json"}}));return Object.assign(Object.assign({},o(c)),{item:m})},e.createOAuthApp=async function(e){e.httpMethod="POST";const i=p(e),a=Object.assign(Object.assign({item:Object.assign(Object.assign({},u(e,["categories","culture","description","documentation","extent","owner","properties","snippet","spatialReference","tags","title","type","typeKeywords","url"])),{type:"Application"})},i),{authentication:e.authentication,params:{f:"json"}}),s=await t.createItem(a),n=Object.assign(Object.assign({itemId:s.id,appType:"multiple",redirect_uris:e.redirect_uris||[],httpReferrers:[],privileges:[]},i),{authentication:e.authentication}),r=await g(n),o=await t.getItem(r.itemId,Object.assign(Object.assign({},i),{authentication:e.authentication,params:{f:"json"}}));return Object.assign(Object.assign({},c(r)),{item:o})},e.deleteApiKey=async function(e){e.httpMethod="POST";const i=p(e);return await l(Object.assign(Object.assign({},i),{itemId:e.itemId,authentication:e.authentication})),await t.removeItem(Object.assign(Object.assign({},i),{id:e.itemId,authentication:e.authentication,params:{f:"json"}}))},e.deleteOAuthApp=async function(e){e.httpMethod="POST";const i=p(e);return await d(Object.assign(Object.assign({},i),{itemId:e.itemId,authentication:e.authentication})),await t.removeItem(Object.assign(Object.assign({},i),{id:e.itemId,authentication:e.authentication,params:{f:"json"}}))},e.extractBaseRequestOptions=p,e.filterKeys=u,e.getApiKey=l,e.getOAuthApp=d,e.getRegisteredAppInfo=m,e.registerApp=g,e.registeredAppResponseToApp=r,e.stringifyArrays=n,e.unregisterApp=async function(e){e.httpMethod="POST";const a=p(e),s=Object.assign(Object.assign({},a),{authentication:e.authentication,itemId:e.itemId}),n=(await m(s)).client_id,r=t.getPortalUrl(e)+`/oauth2/apps/${n}/unregister`;return await i.request(r,Object.assign(Object.assign({},a),{authentication:e.authentication,params:{f:"json"}}))},e.updateApiKey=async function(e){if(e.privileges&&!s(e.privileges))throw new Error("The `privileges` option contains invalid privileges.");e.httpMethod="POST";const a=p(e),c=Object.assign(Object.assign({},a),{authentication:e.authentication,itemId:e.itemId}),u=await m(c);if("apikey"!==u.appType||!("apiKey"in u))throw new Error("Item is not an API key.");const g=u.client_id,l=i.appendCustomParams(Object.assign(Object.assign({},u),e),["privileges","httpReferrers"]);l.params.f="json",n(l);const d=t.getPortalUrl(l)+`/oauth2/apps/${g}/update`,h=await i.request(d,Object.assign(Object.assign({},l),{authentication:e.authentication})),O=r(Object.assign(Object.assign({},h),{apiKey:u.apiKey})),y=await t.getItem(e.itemId,Object.assign(Object.assign({},a),{authentication:e.authentication,params:{f:"json"}}));return Object.assign(Object.assign({},o(O)),{item:y})},e.updateOAuthApp=async function(e){e.httpMethod="POST";const a=p(e),s=Object.assign(Object.assign({},a),{authentication:e.authentication,itemId:e.itemId}),o=await m(s);if("apikey"===o.appType)throw new Error("Item is not an OAuth 2.0 app.");const u=o.client_id,g=i.appendCustomParams(Object.assign(Object.assign({},o),e),["redirect_uris"]);g.params.f="json",g.params.appType="multiple",n(g);const l=t.getPortalUrl(g)+`/oauth2/apps/${u}/update`,d=r(await i.request(l,Object.assign(Object.assign({},g),{authentication:e.authentication}))),h=await t.getItem(e.itemId,Object.assign(Object.assign({},a),{authentication:e.authentication,params:{f:"json"}}));return Object.assign(Object.assign({},c(d)),{item:h})},Object.defineProperty(e,"__esModule",{value:!0})}));
7
7
  //# sourceMappingURL=developer-credentials.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"apiKeyType.js","sourceRoot":"","sources":["../../../../src/shared/types/apiKeyType.ts"],"names":[],"mappings":"","sourcesContent":["import {\n ArcGISIdentityManager,\n IRequestOptions,\n ISpatialReference\n} from \"@esri/arcgis-rest-request\";\nimport { IRegisterAppOptions, IApp } from \"./appType.js\";\nimport { Privileges } from \"../enum/privileges.js\";\nimport { IItem } from \"@esri/arcgis-rest-portal\";\n\n/**\n * Options to register an API Key.\n */\nexport interface ICreateApiKeyOptions\n extends Omit<\n IRegisterAppOptions,\n \"itemId\" | \"redirect_uris\" | \"appType\" | \"httpReferrers\"\n > {\n httpReferrers?: string[];\n title: string;\n owner?: string;\n typeKeywords?: string[];\n description?: string;\n snippet?: string;\n documentation?: string;\n extent?: number[][];\n categories?: string[];\n spatialReference?: ISpatialReference;\n culture?: string;\n properties?: any;\n url?: string;\n tags?: string[];\n}\n\n/**\n * Options to retrieve an API Key.\n */\nexport interface IGetApiKeyOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which API key to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Represent only the API key related properties from {@linkcode IApp}.\n */\nexport interface IApiKeyInfo\n extends Omit<\n IApp,\n \"client_id\" | \"client_secret\" | \"redirect_uris\" | \"appType\"\n > {\n apiKey: string;\n}\n\n/**\n * Return value of {@linkcode createApiKey}, {@linkcode getApiKey}, {@linkcode updateApiKey} representing an API Key entity.\n */\nexport interface IApiKeyResponse extends IApiKeyInfo {\n /**\n * Represent item info attached to this API Key.\n */\n item: IItem;\n}\n\n/**\n * Options to update an API Key.\n */\nexport interface IUpdateApiKeyOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which API key will be updated.\n */\n itemId: string;\n /**\n * Override previous `httpReferrers` if this value is provided.\n */\n httpReferrers?: string[];\n /**\n * Override previous `privileges` if this value is provided.\n */\n privileges?: Array<Privileges | `${Privileges}`>;\n}\n\n/**\n * Options to delete an API key.\n */\nexport interface IDeleteApiKeyOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which API key to be removed.\n */\n itemId: string;\n}\n\n/**\n * Response of API key deletion.\n */\nexport interface IDeleteApiKeyResponse {\n /**\n * itemId of which API key has been removed.\n */\n itemId: string;\n success: boolean;\n}\n"]}
1
+ {"version":3,"file":"apiKeyType.js","sourceRoot":"","sources":["../../../../src/shared/types/apiKeyType.ts"],"names":[],"mappings":"","sourcesContent":["import {\n IAuthenticationManager,\n IRequestOptions,\n ISpatialReference\n} from \"@esri/arcgis-rest-request\";\nimport { IRegisterAppOptions, IApp } from \"./appType.js\";\nimport { Privileges } from \"../enum/privileges.js\";\nimport { IItem } from \"@esri/arcgis-rest-portal\";\n\n/**\n * Options to register an API Key.\n */\nexport interface ICreateApiKeyOptions\n extends Omit<\n IRegisterAppOptions,\n \"itemId\" | \"redirect_uris\" | \"appType\" | \"httpReferrers\"\n > {\n httpReferrers?: string[];\n title: string;\n owner?: string;\n typeKeywords?: string[];\n description?: string;\n snippet?: string;\n documentation?: string;\n extent?: number[][];\n categories?: string[];\n spatialReference?: ISpatialReference;\n culture?: string;\n properties?: any;\n url?: string;\n tags?: string[];\n}\n\n/**\n * Options to retrieve an API Key.\n */\nexport interface IGetApiKeyOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which API key to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Represent only the API key related properties from {@linkcode IApp}.\n */\nexport interface IApiKeyInfo\n extends Omit<\n IApp,\n \"client_id\" | \"client_secret\" | \"redirect_uris\" | \"appType\"\n > {\n apiKey: string;\n}\n\n/**\n * Return value of {@linkcode createApiKey}, {@linkcode getApiKey}, {@linkcode updateApiKey} representing an API Key entity.\n */\nexport interface IApiKeyResponse extends IApiKeyInfo {\n /**\n * Represent item info attached to this API Key.\n */\n item: IItem;\n}\n\n/**\n * Options to update an API Key.\n */\nexport interface IUpdateApiKeyOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which API key will be updated.\n */\n itemId: string;\n /**\n * Override previous `httpReferrers` if this value is provided.\n */\n httpReferrers?: string[];\n /**\n * Override previous `privileges` if this value is provided.\n */\n privileges?: Array<Privileges | `${Privileges}`>;\n}\n\n/**\n * Options to delete an API key.\n */\nexport interface IDeleteApiKeyOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which API key to be removed.\n */\n itemId: string;\n}\n\n/**\n * Response of API key deletion.\n */\nexport interface IDeleteApiKeyResponse {\n /**\n * itemId of which API key has been removed.\n */\n itemId: string;\n success: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"appType.js","sourceRoot":"","sources":["../../../../src/shared/types/appType.ts"],"names":[],"mappings":"","sourcesContent":["import {\n IRequestOptions,\n ArcGISIdentityManager\n} from \"@esri/arcgis-rest-request\";\nimport { UnixTime } from \"@esri/arcgis-rest-portal\";\nimport { Privileges } from \"../enum/privileges.js\";\n\n/**\n * Accepted app types.\n */\nexport type AppType = \"apikey\" | \"browser\" | \"native\" | \"server\" | \"multiple\";\n\n/**\n * Options to register an app.\n */\nexport interface IRegisterAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * itemId that the newly registered app will be based on.\n */\n itemId: string;\n /**\n * App types. For more info, refer to {@linkcode AppType}.\n */\n appType: AppType;\n /**\n * Redirect URIs set for this app.\n */\n redirect_uris: string[];\n /**\n * Http Referrers set for this app.\n */\n httpReferrers: string[];\n /**\n * Privilege lists. For more info, refer to {@linkcode Privileges}.\n */\n privileges: Array<Privileges | `${Privileges}`>;\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n}\n\n/**\n * Options to retrieve an app.\n */\nexport interface IGetAppInfoOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which app to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Raw response of app related endpoints calls.\n */\nexport interface IRegisteredAppResponse {\n itemId: string;\n /**\n * Only to be present if appType is apikey\n */\n apiKey?: string;\n appType: AppType;\n client_id: string;\n client_secret: string;\n httpReferrers: string[];\n redirect_uris: string[];\n privileges: Array<Privileges | `${Privileges}`>;\n registered: UnixTime;\n modified: UnixTime;\n apnsProdCert: any;\n apnsSandboxCert: any;\n gcmApiKey: any;\n isBeta: boolean;\n}\n\n/**\n * Return value of {@linkcode registerApp} and {@linkcode getRegisteredAppInfo} representing an app entity.\n */\nexport interface IApp\n extends Omit<\n IRegisteredAppResponse,\n | \"registered\"\n | \"modified\"\n | \"apnsProdCert\"\n | \"apnsSandboxCert\"\n | \"gcmApiKey\"\n | \"isBeta\"\n > {\n registered: Date;\n modified: Date;\n}\n\n/**\n * Options to unregister an app.\n */\nexport interface IUnregisterAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which app to be unregistered.\n */\n itemId: string;\n}\n\n/**\n * Response of app un-registration.\n */\nexport interface IUnregisterAppResponse {\n success: true | false;\n /**\n * itemId of which app has been unregistered.\n */\n itemId: string;\n}\n"]}
1
+ {"version":3,"file":"appType.js","sourceRoot":"","sources":["../../../../src/shared/types/appType.ts"],"names":[],"mappings":"","sourcesContent":["import {\n IRequestOptions,\n IAuthenticationManager\n} from \"@esri/arcgis-rest-request\";\nimport { UnixTime } from \"@esri/arcgis-rest-portal\";\nimport { Privileges } from \"../enum/privileges.js\";\n\n/**\n * Accepted app types.\n */\nexport type AppType = \"apikey\" | \"browser\" | \"native\" | \"server\" | \"multiple\";\n\n/**\n * Options to register an app.\n */\nexport interface IRegisterAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * itemId that the newly registered app will be based on.\n */\n itemId: string;\n /**\n * App types. For more info, refer to {@linkcode AppType}.\n */\n appType: AppType;\n /**\n * Redirect URIs set for this app.\n */\n redirect_uris: string[];\n /**\n * Http Referrers set for this app.\n */\n httpReferrers: string[];\n /**\n * Privilege lists. For more info, refer to {@linkcode Privileges}.\n */\n privileges: Array<Privileges | `${Privileges}`>;\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n}\n\n/**\n * Options to retrieve an app.\n */\nexport interface IGetAppInfoOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which app to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Raw response of app related endpoints calls.\n */\nexport interface IRegisteredAppResponse {\n itemId: string;\n /**\n * Only to be present if appType is apikey\n */\n apiKey?: string;\n appType: AppType;\n client_id: string;\n client_secret: string;\n httpReferrers: string[];\n redirect_uris: string[];\n privileges: Array<Privileges | `${Privileges}`>;\n registered: UnixTime;\n modified: UnixTime;\n apnsProdCert: any;\n apnsSandboxCert: any;\n gcmApiKey: any;\n isBeta: boolean;\n}\n\n/**\n * Return value of {@linkcode registerApp} and {@linkcode getRegisteredAppInfo} representing an app entity.\n */\nexport interface IApp\n extends Omit<\n IRegisteredAppResponse,\n | \"registered\"\n | \"modified\"\n | \"apnsProdCert\"\n | \"apnsSandboxCert\"\n | \"gcmApiKey\"\n | \"isBeta\"\n > {\n registered: Date;\n modified: Date;\n}\n\n/**\n * Options to unregister an app.\n */\nexport interface IUnregisterAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which app to be unregistered.\n */\n itemId: string;\n}\n\n/**\n * Response of app un-registration.\n */\nexport interface IUnregisterAppResponse {\n success: true | false;\n /**\n * itemId of which app has been unregistered.\n */\n itemId: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"oAuthType.js","sourceRoot":"","sources":["../../../../src/shared/types/oAuthType.ts"],"names":[],"mappings":"","sourcesContent":["import { IItem } from \"@esri/arcgis-rest-portal\";\nimport {\n ArcGISIdentityManager,\n IRequestOptions,\n ISpatialReference\n} from \"@esri/arcgis-rest-request\";\n\n/**\n * Options to register an OAuth2.0 app.\n */\nexport interface ICreateOAuthAppOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * Redirect URIs set for this OAuth2.0 app.\n */\n redirect_uris?: string[];\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n title: string;\n owner?: string;\n typeKeywords?: string[];\n description?: string;\n snippet?: string;\n documentation?: string;\n extent?: number[][];\n categories?: string[];\n spatialReference?: ISpatialReference;\n culture?: string;\n properties?: any;\n url?: string;\n tags?: string[];\n}\n\n/**\n * Options to retrieve an OAuth2.0 app.\n */\nexport interface IGetOAuthAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which OAuth2.0 app to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Options to update an OAuth2.0 app.\n */\nexport interface IUpdateOAuthOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which OAuth2.0 app to be updated.\n */\n itemId: string;\n /**\n * Override previous `redirect_uris` if this value is provided.\n */\n redirect_uris?: string[];\n}\n\n/**\n * Represent only the OAuth2.0 app related properties from {@linkcode IApp}.\n */\nexport interface IOAuthAppInfo {\n itemId: string;\n client_id: string;\n client_secret: string;\n redirect_uris: string[];\n registered: Date;\n modified: Date;\n}\n\n/**\n * Return value of {@linkcode createOAuthApp}, {@linkcode getOAuthApp}, {@linkcode updateOAuthApp} representing an OAuth2.0 app entity.\n */\nexport interface IOAuthApp extends IOAuthAppInfo {\n /**\n * Represent item info attached to this OAuth2.0 app.\n */\n item: IItem;\n}\n\n/**\n * Options to delete an OAuth2.0 app.\n */\nexport interface IDeleteOAuthAppOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which OAuth2.0 app to be removed.\n */\n itemId: string;\n}\n\n/**\n * Response of OAuth2.0 app deletion.\n */\nexport interface IDeleteOAuthAppResponse {\n /**\n * itemId of which OAuth2.0 app has been removed.\n */\n itemId: string;\n success: boolean;\n}\n"]}
1
+ {"version":3,"file":"oAuthType.js","sourceRoot":"","sources":["../../../../src/shared/types/oAuthType.ts"],"names":[],"mappings":"","sourcesContent":["import { IItem } from \"@esri/arcgis-rest-portal\";\nimport {\n IAuthenticationManager,\n IRequestOptions,\n ISpatialReference\n} from \"@esri/arcgis-rest-request\";\n\n/**\n * Options to register an OAuth2.0 app.\n */\nexport interface ICreateOAuthAppOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * Redirect URIs set for this OAuth2.0 app.\n */\n redirect_uris?: string[];\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n title: string;\n owner?: string;\n typeKeywords?: string[];\n description?: string;\n snippet?: string;\n documentation?: string;\n extent?: number[][];\n categories?: string[];\n spatialReference?: ISpatialReference;\n culture?: string;\n properties?: any;\n url?: string;\n tags?: string[];\n}\n\n/**\n * Options to retrieve an OAuth2.0 app.\n */\nexport interface IGetOAuthAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which OAuth2.0 app to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Options to update an OAuth2.0 app.\n */\nexport interface IUpdateOAuthOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which OAuth2.0 app to be updated.\n */\n itemId: string;\n /**\n * Override previous `redirect_uris` if this value is provided.\n */\n redirect_uris?: string[];\n}\n\n/**\n * Represent only the OAuth2.0 app related properties from {@linkcode IApp}.\n */\nexport interface IOAuthAppInfo {\n itemId: string;\n client_id: string;\n client_secret: string;\n redirect_uris: string[];\n registered: Date;\n modified: Date;\n}\n\n/**\n * Return value of {@linkcode createOAuthApp}, {@linkcode getOAuthApp}, {@linkcode updateOAuthApp} representing an OAuth2.0 app entity.\n */\nexport interface IOAuthApp extends IOAuthAppInfo {\n /**\n * Represent item info attached to this OAuth2.0 app.\n */\n item: IItem;\n}\n\n/**\n * Options to delete an OAuth2.0 app.\n */\nexport interface IDeleteOAuthAppOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which OAuth2.0 app to be removed.\n */\n itemId: string;\n}\n\n/**\n * Response of OAuth2.0 app deletion.\n */\nexport interface IDeleteOAuthAppResponse {\n /**\n * itemId of which OAuth2.0 app has been removed.\n */\n itemId: string;\n success: boolean;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { ArcGISIdentityManager, IRequestOptions, ISpatialReference } from "@esri/arcgis-rest-request";
1
+ import { IAuthenticationManager, IRequestOptions, ISpatialReference } from "@esri/arcgis-rest-request";
2
2
  import { IRegisterAppOptions, IApp } from "./appType.js";
3
3
  import { Privileges } from "../enum/privileges.js";
4
4
  import { IItem } from "@esri/arcgis-rest-portal";
@@ -26,9 +26,9 @@ export interface ICreateApiKeyOptions extends Omit<IRegisterAppOptions, "itemId"
26
26
  */
27
27
  export interface IGetApiKeyOptions extends Omit<IRequestOptions, "params"> {
28
28
  /**
29
- * {@linkcode ArcGISIdentityManager} authentication.
29
+ * {@linkcode IAuthenticationManager} authentication.
30
30
  */
31
- authentication: ArcGISIdentityManager;
31
+ authentication: IAuthenticationManager;
32
32
  /**
33
33
  * itemId of which API key to be retrieved.
34
34
  */
@@ -54,9 +54,9 @@ export interface IApiKeyResponse extends IApiKeyInfo {
54
54
  */
55
55
  export interface IUpdateApiKeyOptions extends Omit<IRequestOptions, "params"> {
56
56
  /**
57
- * {@linkcode ArcGISIdentityManager} authentication.
57
+ * {@linkcode IAuthenticationManager} authentication.
58
58
  */
59
- authentication: ArcGISIdentityManager;
59
+ authentication: IAuthenticationManager;
60
60
  /**
61
61
  * itemId of which API key will be updated.
62
62
  */
@@ -75,9 +75,9 @@ export interface IUpdateApiKeyOptions extends Omit<IRequestOptions, "params"> {
75
75
  */
76
76
  export interface IDeleteApiKeyOption extends Omit<IRequestOptions, "params"> {
77
77
  /**
78
- * {@linkcode ArcGISIdentityManager} authentication.
78
+ * {@linkcode IAuthenticationManager} authentication.
79
79
  */
80
- authentication: ArcGISIdentityManager;
80
+ authentication: IAuthenticationManager;
81
81
  /**
82
82
  * itemId of which API key to be removed.
83
83
  */
@@ -1 +1 @@
1
- {"version":3,"file":"apiKeyType.js","sourceRoot":"","sources":["../../../../src/shared/types/apiKeyType.ts"],"names":[],"mappings":"","sourcesContent":["import {\n ArcGISIdentityManager,\n IRequestOptions,\n ISpatialReference\n} from \"@esri/arcgis-rest-request\";\nimport { IRegisterAppOptions, IApp } from \"./appType.js\";\nimport { Privileges } from \"../enum/privileges.js\";\nimport { IItem } from \"@esri/arcgis-rest-portal\";\n\n/**\n * Options to register an API Key.\n */\nexport interface ICreateApiKeyOptions\n extends Omit<\n IRegisterAppOptions,\n \"itemId\" | \"redirect_uris\" | \"appType\" | \"httpReferrers\"\n > {\n httpReferrers?: string[];\n title: string;\n owner?: string;\n typeKeywords?: string[];\n description?: string;\n snippet?: string;\n documentation?: string;\n extent?: number[][];\n categories?: string[];\n spatialReference?: ISpatialReference;\n culture?: string;\n properties?: any;\n url?: string;\n tags?: string[];\n}\n\n/**\n * Options to retrieve an API Key.\n */\nexport interface IGetApiKeyOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which API key to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Represent only the API key related properties from {@linkcode IApp}.\n */\nexport interface IApiKeyInfo\n extends Omit<\n IApp,\n \"client_id\" | \"client_secret\" | \"redirect_uris\" | \"appType\"\n > {\n apiKey: string;\n}\n\n/**\n * Return value of {@linkcode createApiKey}, {@linkcode getApiKey}, {@linkcode updateApiKey} representing an API Key entity.\n */\nexport interface IApiKeyResponse extends IApiKeyInfo {\n /**\n * Represent item info attached to this API Key.\n */\n item: IItem;\n}\n\n/**\n * Options to update an API Key.\n */\nexport interface IUpdateApiKeyOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which API key will be updated.\n */\n itemId: string;\n /**\n * Override previous `httpReferrers` if this value is provided.\n */\n httpReferrers?: string[];\n /**\n * Override previous `privileges` if this value is provided.\n */\n privileges?: Array<Privileges | `${Privileges}`>;\n}\n\n/**\n * Options to delete an API key.\n */\nexport interface IDeleteApiKeyOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which API key to be removed.\n */\n itemId: string;\n}\n\n/**\n * Response of API key deletion.\n */\nexport interface IDeleteApiKeyResponse {\n /**\n * itemId of which API key has been removed.\n */\n itemId: string;\n success: boolean;\n}\n"]}
1
+ {"version":3,"file":"apiKeyType.js","sourceRoot":"","sources":["../../../../src/shared/types/apiKeyType.ts"],"names":[],"mappings":"","sourcesContent":["import {\n IAuthenticationManager,\n IRequestOptions,\n ISpatialReference\n} from \"@esri/arcgis-rest-request\";\nimport { IRegisterAppOptions, IApp } from \"./appType.js\";\nimport { Privileges } from \"../enum/privileges.js\";\nimport { IItem } from \"@esri/arcgis-rest-portal\";\n\n/**\n * Options to register an API Key.\n */\nexport interface ICreateApiKeyOptions\n extends Omit<\n IRegisterAppOptions,\n \"itemId\" | \"redirect_uris\" | \"appType\" | \"httpReferrers\"\n > {\n httpReferrers?: string[];\n title: string;\n owner?: string;\n typeKeywords?: string[];\n description?: string;\n snippet?: string;\n documentation?: string;\n extent?: number[][];\n categories?: string[];\n spatialReference?: ISpatialReference;\n culture?: string;\n properties?: any;\n url?: string;\n tags?: string[];\n}\n\n/**\n * Options to retrieve an API Key.\n */\nexport interface IGetApiKeyOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which API key to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Represent only the API key related properties from {@linkcode IApp}.\n */\nexport interface IApiKeyInfo\n extends Omit<\n IApp,\n \"client_id\" | \"client_secret\" | \"redirect_uris\" | \"appType\"\n > {\n apiKey: string;\n}\n\n/**\n * Return value of {@linkcode createApiKey}, {@linkcode getApiKey}, {@linkcode updateApiKey} representing an API Key entity.\n */\nexport interface IApiKeyResponse extends IApiKeyInfo {\n /**\n * Represent item info attached to this API Key.\n */\n item: IItem;\n}\n\n/**\n * Options to update an API Key.\n */\nexport interface IUpdateApiKeyOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which API key will be updated.\n */\n itemId: string;\n /**\n * Override previous `httpReferrers` if this value is provided.\n */\n httpReferrers?: string[];\n /**\n * Override previous `privileges` if this value is provided.\n */\n privileges?: Array<Privileges | `${Privileges}`>;\n}\n\n/**\n * Options to delete an API key.\n */\nexport interface IDeleteApiKeyOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which API key to be removed.\n */\n itemId: string;\n}\n\n/**\n * Response of API key deletion.\n */\nexport interface IDeleteApiKeyResponse {\n /**\n * itemId of which API key has been removed.\n */\n itemId: string;\n success: boolean;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { IRequestOptions, ArcGISIdentityManager } from "@esri/arcgis-rest-request";
1
+ import { IRequestOptions, IAuthenticationManager } from "@esri/arcgis-rest-request";
2
2
  import { UnixTime } from "@esri/arcgis-rest-portal";
3
3
  import { Privileges } from "../enum/privileges.js";
4
4
  /**
@@ -30,18 +30,18 @@ export interface IRegisterAppOptions extends Omit<IRequestOptions, "params"> {
30
30
  */
31
31
  privileges: Array<Privileges | `${Privileges}`>;
32
32
  /**
33
- * {@linkcode ArcGISIdentityManager} authentication.
33
+ * {@linkcode IAuthenticationManager} authentication.
34
34
  */
35
- authentication: ArcGISIdentityManager;
35
+ authentication: IAuthenticationManager;
36
36
  }
37
37
  /**
38
38
  * Options to retrieve an app.
39
39
  */
40
40
  export interface IGetAppInfoOptions extends Omit<IRequestOptions, "params"> {
41
41
  /**
42
- * {@linkcode ArcGISIdentityManager} authentication.
42
+ * {@linkcode IAuthenticationManager} authentication.
43
43
  */
44
- authentication: ArcGISIdentityManager;
44
+ authentication: IAuthenticationManager;
45
45
  /**
46
46
  * itemId of which app to be retrieved.
47
47
  */
@@ -81,9 +81,9 @@ export interface IApp extends Omit<IRegisteredAppResponse, "registered" | "modif
81
81
  */
82
82
  export interface IUnregisterAppOptions extends Omit<IRequestOptions, "params"> {
83
83
  /**
84
- * {@linkcode ArcGISIdentityManager} authentication.
84
+ * {@linkcode IAuthenticationManager} authentication.
85
85
  */
86
- authentication: ArcGISIdentityManager;
86
+ authentication: IAuthenticationManager;
87
87
  /**
88
88
  * itemId of which app to be unregistered.
89
89
  */
@@ -1 +1 @@
1
- {"version":3,"file":"appType.js","sourceRoot":"","sources":["../../../../src/shared/types/appType.ts"],"names":[],"mappings":"","sourcesContent":["import {\n IRequestOptions,\n ArcGISIdentityManager\n} from \"@esri/arcgis-rest-request\";\nimport { UnixTime } from \"@esri/arcgis-rest-portal\";\nimport { Privileges } from \"../enum/privileges.js\";\n\n/**\n * Accepted app types.\n */\nexport type AppType = \"apikey\" | \"browser\" | \"native\" | \"server\" | \"multiple\";\n\n/**\n * Options to register an app.\n */\nexport interface IRegisterAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * itemId that the newly registered app will be based on.\n */\n itemId: string;\n /**\n * App types. For more info, refer to {@linkcode AppType}.\n */\n appType: AppType;\n /**\n * Redirect URIs set for this app.\n */\n redirect_uris: string[];\n /**\n * Http Referrers set for this app.\n */\n httpReferrers: string[];\n /**\n * Privilege lists. For more info, refer to {@linkcode Privileges}.\n */\n privileges: Array<Privileges | `${Privileges}`>;\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n}\n\n/**\n * Options to retrieve an app.\n */\nexport interface IGetAppInfoOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which app to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Raw response of app related endpoints calls.\n */\nexport interface IRegisteredAppResponse {\n itemId: string;\n /**\n * Only to be present if appType is apikey\n */\n apiKey?: string;\n appType: AppType;\n client_id: string;\n client_secret: string;\n httpReferrers: string[];\n redirect_uris: string[];\n privileges: Array<Privileges | `${Privileges}`>;\n registered: UnixTime;\n modified: UnixTime;\n apnsProdCert: any;\n apnsSandboxCert: any;\n gcmApiKey: any;\n isBeta: boolean;\n}\n\n/**\n * Return value of {@linkcode registerApp} and {@linkcode getRegisteredAppInfo} representing an app entity.\n */\nexport interface IApp\n extends Omit<\n IRegisteredAppResponse,\n | \"registered\"\n | \"modified\"\n | \"apnsProdCert\"\n | \"apnsSandboxCert\"\n | \"gcmApiKey\"\n | \"isBeta\"\n > {\n registered: Date;\n modified: Date;\n}\n\n/**\n * Options to unregister an app.\n */\nexport interface IUnregisterAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which app to be unregistered.\n */\n itemId: string;\n}\n\n/**\n * Response of app un-registration.\n */\nexport interface IUnregisterAppResponse {\n success: true | false;\n /**\n * itemId of which app has been unregistered.\n */\n itemId: string;\n}\n"]}
1
+ {"version":3,"file":"appType.js","sourceRoot":"","sources":["../../../../src/shared/types/appType.ts"],"names":[],"mappings":"","sourcesContent":["import {\n IRequestOptions,\n IAuthenticationManager\n} from \"@esri/arcgis-rest-request\";\nimport { UnixTime } from \"@esri/arcgis-rest-portal\";\nimport { Privileges } from \"../enum/privileges.js\";\n\n/**\n * Accepted app types.\n */\nexport type AppType = \"apikey\" | \"browser\" | \"native\" | \"server\" | \"multiple\";\n\n/**\n * Options to register an app.\n */\nexport interface IRegisterAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * itemId that the newly registered app will be based on.\n */\n itemId: string;\n /**\n * App types. For more info, refer to {@linkcode AppType}.\n */\n appType: AppType;\n /**\n * Redirect URIs set for this app.\n */\n redirect_uris: string[];\n /**\n * Http Referrers set for this app.\n */\n httpReferrers: string[];\n /**\n * Privilege lists. For more info, refer to {@linkcode Privileges}.\n */\n privileges: Array<Privileges | `${Privileges}`>;\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n}\n\n/**\n * Options to retrieve an app.\n */\nexport interface IGetAppInfoOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which app to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Raw response of app related endpoints calls.\n */\nexport interface IRegisteredAppResponse {\n itemId: string;\n /**\n * Only to be present if appType is apikey\n */\n apiKey?: string;\n appType: AppType;\n client_id: string;\n client_secret: string;\n httpReferrers: string[];\n redirect_uris: string[];\n privileges: Array<Privileges | `${Privileges}`>;\n registered: UnixTime;\n modified: UnixTime;\n apnsProdCert: any;\n apnsSandboxCert: any;\n gcmApiKey: any;\n isBeta: boolean;\n}\n\n/**\n * Return value of {@linkcode registerApp} and {@linkcode getRegisteredAppInfo} representing an app entity.\n */\nexport interface IApp\n extends Omit<\n IRegisteredAppResponse,\n | \"registered\"\n | \"modified\"\n | \"apnsProdCert\"\n | \"apnsSandboxCert\"\n | \"gcmApiKey\"\n | \"isBeta\"\n > {\n registered: Date;\n modified: Date;\n}\n\n/**\n * Options to unregister an app.\n */\nexport interface IUnregisterAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which app to be unregistered.\n */\n itemId: string;\n}\n\n/**\n * Response of app un-registration.\n */\nexport interface IUnregisterAppResponse {\n success: true | false;\n /**\n * itemId of which app has been unregistered.\n */\n itemId: string;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { IItem } from "@esri/arcgis-rest-portal";
2
- import { ArcGISIdentityManager, IRequestOptions, ISpatialReference } from "@esri/arcgis-rest-request";
2
+ import { IAuthenticationManager, IRequestOptions, ISpatialReference } from "@esri/arcgis-rest-request";
3
3
  /**
4
4
  * Options to register an OAuth2.0 app.
5
5
  */
@@ -9,9 +9,9 @@ export interface ICreateOAuthAppOption extends Omit<IRequestOptions, "params"> {
9
9
  */
10
10
  redirect_uris?: string[];
11
11
  /**
12
- * {@linkcode ArcGISIdentityManager} authentication.
12
+ * {@linkcode IAuthenticationManager} authentication.
13
13
  */
14
- authentication: ArcGISIdentityManager;
14
+ authentication: IAuthenticationManager;
15
15
  title: string;
16
16
  owner?: string;
17
17
  typeKeywords?: string[];
@@ -31,9 +31,9 @@ export interface ICreateOAuthAppOption extends Omit<IRequestOptions, "params"> {
31
31
  */
32
32
  export interface IGetOAuthAppOptions extends Omit<IRequestOptions, "params"> {
33
33
  /**
34
- * {@linkcode ArcGISIdentityManager} authentication.
34
+ * {@linkcode IAuthenticationManager} authentication.
35
35
  */
36
- authentication: ArcGISIdentityManager;
36
+ authentication: IAuthenticationManager;
37
37
  /**
38
38
  * itemId of which OAuth2.0 app to be retrieved.
39
39
  */
@@ -44,9 +44,9 @@ export interface IGetOAuthAppOptions extends Omit<IRequestOptions, "params"> {
44
44
  */
45
45
  export interface IUpdateOAuthOptions extends Omit<IRequestOptions, "params"> {
46
46
  /**
47
- * {@linkcode ArcGISIdentityManager} authentication.
47
+ * {@linkcode IAuthenticationManager} authentication.
48
48
  */
49
- authentication: ArcGISIdentityManager;
49
+ authentication: IAuthenticationManager;
50
50
  /**
51
51
  * itemId of which OAuth2.0 app to be updated.
52
52
  */
@@ -81,9 +81,9 @@ export interface IOAuthApp extends IOAuthAppInfo {
81
81
  */
82
82
  export interface IDeleteOAuthAppOption extends Omit<IRequestOptions, "params"> {
83
83
  /**
84
- * {@linkcode ArcGISIdentityManager} authentication.
84
+ * {@linkcode IAuthenticationManager} authentication.
85
85
  */
86
- authentication: ArcGISIdentityManager;
86
+ authentication: IAuthenticationManager;
87
87
  /**
88
88
  * itemId of which OAuth2.0 app to be removed.
89
89
  */
@@ -1 +1 @@
1
- {"version":3,"file":"oAuthType.js","sourceRoot":"","sources":["../../../../src/shared/types/oAuthType.ts"],"names":[],"mappings":"","sourcesContent":["import { IItem } from \"@esri/arcgis-rest-portal\";\nimport {\n ArcGISIdentityManager,\n IRequestOptions,\n ISpatialReference\n} from \"@esri/arcgis-rest-request\";\n\n/**\n * Options to register an OAuth2.0 app.\n */\nexport interface ICreateOAuthAppOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * Redirect URIs set for this OAuth2.0 app.\n */\n redirect_uris?: string[];\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n title: string;\n owner?: string;\n typeKeywords?: string[];\n description?: string;\n snippet?: string;\n documentation?: string;\n extent?: number[][];\n categories?: string[];\n spatialReference?: ISpatialReference;\n culture?: string;\n properties?: any;\n url?: string;\n tags?: string[];\n}\n\n/**\n * Options to retrieve an OAuth2.0 app.\n */\nexport interface IGetOAuthAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which OAuth2.0 app to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Options to update an OAuth2.0 app.\n */\nexport interface IUpdateOAuthOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which OAuth2.0 app to be updated.\n */\n itemId: string;\n /**\n * Override previous `redirect_uris` if this value is provided.\n */\n redirect_uris?: string[];\n}\n\n/**\n * Represent only the OAuth2.0 app related properties from {@linkcode IApp}.\n */\nexport interface IOAuthAppInfo {\n itemId: string;\n client_id: string;\n client_secret: string;\n redirect_uris: string[];\n registered: Date;\n modified: Date;\n}\n\n/**\n * Return value of {@linkcode createOAuthApp}, {@linkcode getOAuthApp}, {@linkcode updateOAuthApp} representing an OAuth2.0 app entity.\n */\nexport interface IOAuthApp extends IOAuthAppInfo {\n /**\n * Represent item info attached to this OAuth2.0 app.\n */\n item: IItem;\n}\n\n/**\n * Options to delete an OAuth2.0 app.\n */\nexport interface IDeleteOAuthAppOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode ArcGISIdentityManager} authentication.\n */\n authentication: ArcGISIdentityManager;\n /**\n * itemId of which OAuth2.0 app to be removed.\n */\n itemId: string;\n}\n\n/**\n * Response of OAuth2.0 app deletion.\n */\nexport interface IDeleteOAuthAppResponse {\n /**\n * itemId of which OAuth2.0 app has been removed.\n */\n itemId: string;\n success: boolean;\n}\n"]}
1
+ {"version":3,"file":"oAuthType.js","sourceRoot":"","sources":["../../../../src/shared/types/oAuthType.ts"],"names":[],"mappings":"","sourcesContent":["import { IItem } from \"@esri/arcgis-rest-portal\";\nimport {\n IAuthenticationManager,\n IRequestOptions,\n ISpatialReference\n} from \"@esri/arcgis-rest-request\";\n\n/**\n * Options to register an OAuth2.0 app.\n */\nexport interface ICreateOAuthAppOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * Redirect URIs set for this OAuth2.0 app.\n */\n redirect_uris?: string[];\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n title: string;\n owner?: string;\n typeKeywords?: string[];\n description?: string;\n snippet?: string;\n documentation?: string;\n extent?: number[][];\n categories?: string[];\n spatialReference?: ISpatialReference;\n culture?: string;\n properties?: any;\n url?: string;\n tags?: string[];\n}\n\n/**\n * Options to retrieve an OAuth2.0 app.\n */\nexport interface IGetOAuthAppOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which OAuth2.0 app to be retrieved.\n */\n itemId: string;\n}\n\n/**\n * Options to update an OAuth2.0 app.\n */\nexport interface IUpdateOAuthOptions extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which OAuth2.0 app to be updated.\n */\n itemId: string;\n /**\n * Override previous `redirect_uris` if this value is provided.\n */\n redirect_uris?: string[];\n}\n\n/**\n * Represent only the OAuth2.0 app related properties from {@linkcode IApp}.\n */\nexport interface IOAuthAppInfo {\n itemId: string;\n client_id: string;\n client_secret: string;\n redirect_uris: string[];\n registered: Date;\n modified: Date;\n}\n\n/**\n * Return value of {@linkcode createOAuthApp}, {@linkcode getOAuthApp}, {@linkcode updateOAuthApp} representing an OAuth2.0 app entity.\n */\nexport interface IOAuthApp extends IOAuthAppInfo {\n /**\n * Represent item info attached to this OAuth2.0 app.\n */\n item: IItem;\n}\n\n/**\n * Options to delete an OAuth2.0 app.\n */\nexport interface IDeleteOAuthAppOption extends Omit<IRequestOptions, \"params\"> {\n /**\n * {@linkcode IAuthenticationManager} authentication.\n */\n authentication: IAuthenticationManager;\n /**\n * itemId of which OAuth2.0 app to be removed.\n */\n itemId: string;\n}\n\n/**\n * Response of OAuth2.0 app deletion.\n */\nexport interface IDeleteOAuthAppResponse {\n /**\n * itemId of which OAuth2.0 app has been removed.\n */\n itemId: string;\n success: boolean;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/arcgis-rest-developer-credentials",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Developer Credentials for @esri/arcgis-rest-js",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [