@esri/hub-common 11.0.0 → 11.3.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.
- package/dist/esm/core/HubItemEntity.js +202 -0
- package/dist/esm/core/HubItemEntity.js.map +1 -0
- package/dist/esm/core/_internal/getBasePropertyMap.js +57 -0
- package/dist/esm/core/_internal/getBasePropertyMap.js.map +1 -0
- package/dist/esm/core/behaviors/IWithThumbnailBehavior.js +1 -0
- package/dist/esm/core/behaviors/IWithThumbnailBehavior.js.map +1 -0
- package/dist/esm/core/traits/IWithCatalog.js +1 -0
- package/dist/esm/core/traits/IWithCatalog.js.map +1 -0
- package/dist/esm/core/traits/index.js +1 -0
- package/dist/esm/core/traits/index.js.map +1 -1
- package/dist/esm/core/types/IEntityResource.js +1 -0
- package/dist/esm/core/types/IEntityResource.js.map +1 -0
- package/dist/esm/core/types/IItemResource.js +1 -0
- package/dist/esm/core/types/IItemResource.js.map +1 -0
- package/dist/esm/core/types/index.js +0 -2
- package/dist/esm/core/types/index.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initiatives/HubInitiative.js +149 -0
- package/dist/esm/initiatives/HubInitiative.js.map +1 -0
- package/dist/esm/initiatives/HubInitiatives.js +205 -0
- package/dist/esm/initiatives/HubInitiatives.js.map +1 -0
- package/dist/esm/initiatives/defaults.js +31 -0
- package/dist/esm/initiatives/defaults.js.map +1 -0
- package/dist/esm/initiatives/index.js +3 -0
- package/dist/esm/initiatives/index.js.map +1 -0
- package/dist/esm/items/setItemThumbnail.js +1 -0
- package/dist/esm/items/setItemThumbnail.js.map +1 -1
- package/dist/esm/projects/HubProject.js +9 -65
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/HubProjects.js +13 -54
- package/dist/esm/projects/HubProjects.js.map +1 -1
- package/dist/esm/projects/defaults.js +2 -1
- package/dist/esm/projects/defaults.js.map +1 -1
- package/dist/esm/urls/get-campaign-url.js +25 -0
- package/dist/esm/urls/get-campaign-url.js.map +1 -0
- package/dist/esm/urls/index.js +1 -0
- package/dist/esm/urls/index.js.map +1 -1
- package/dist/node/core/HubItemEntity.js +206 -0
- package/dist/node/core/HubItemEntity.js.map +1 -0
- package/dist/node/core/_internal/getBasePropertyMap.js +61 -0
- package/dist/node/core/_internal/getBasePropertyMap.js.map +1 -0
- package/dist/node/core/{traits/IWithCatalogDefinition.js → behaviors/IWithThumbnailBehavior.js} +1 -1
- package/dist/node/core/behaviors/IWithThumbnailBehavior.js.map +1 -0
- package/dist/node/core/{types/IHubEntityManager.js → traits/IWithCatalog.js} +1 -1
- package/dist/node/core/traits/IWithCatalog.js.map +1 -0
- package/dist/node/core/traits/index.js +1 -0
- package/dist/node/core/traits/index.js.map +1 -1
- package/dist/node/core/types/{IHubItemEntityManager.js → IEntityResource.js} +1 -1
- package/dist/node/core/types/IEntityResource.js.map +1 -0
- package/dist/node/core/types/IItemResource.js +3 -0
- package/dist/node/core/types/IItemResource.js.map +1 -0
- package/dist/node/core/types/index.js +0 -2
- package/dist/node/core/types/index.js.map +1 -1
- package/dist/node/index.js +1 -2
- package/dist/node/index.js.map +1 -1
- package/dist/node/initiatives/HubInitiative.js +153 -0
- package/dist/node/initiatives/HubInitiative.js.map +1 -0
- package/dist/node/initiatives/HubInitiatives.js +214 -0
- package/dist/node/initiatives/HubInitiatives.js.map +1 -0
- package/dist/node/initiatives/defaults.js +34 -0
- package/dist/node/initiatives/defaults.js.map +1 -0
- package/dist/node/initiatives/index.js +6 -0
- package/dist/node/initiatives/index.js.map +1 -0
- package/dist/node/items/setItemThumbnail.js +1 -0
- package/dist/node/items/setItemThumbnail.js.map +1 -1
- package/dist/node/projects/HubProject.js +9 -65
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/HubProjects.js +13 -54
- package/dist/node/projects/HubProjects.js.map +1 -1
- package/dist/node/projects/defaults.js +2 -1
- package/dist/node/projects/defaults.js.map +1 -1
- package/dist/node/urls/get-campaign-url.js +29 -0
- package/dist/node/urls/get-campaign-url.js.map +1 -0
- package/dist/node/urls/index.js +1 -0
- package/dist/node/urls/index.js.map +1 -1
- package/dist/types/content/_internal.d.ts +9 -8
- package/dist/types/core/HubItemEntity.d.ts +83 -0
- package/dist/types/core/_internal/getBasePropertyMap.d.ts +7 -0
- package/dist/types/core/behaviors/IWithStoreBehavior.d.ts +10 -0
- package/dist/types/core/behaviors/IWithThumbnailBehavior.d.ts +21 -0
- package/dist/types/core/traits/{IWithCatalogDefinition.d.ts → IWithCatalog.d.ts} +0 -0
- package/dist/types/core/traits/IWithPermissions.d.ts +1 -1
- package/dist/types/core/traits/index.d.ts +1 -0
- package/dist/types/core/types/IEntityResource.d.ts +21 -0
- package/dist/types/core/types/IHubContent.d.ts +1 -1
- package/dist/types/core/types/IHubInitiative.d.ts +2 -2
- package/dist/types/core/types/IHubItemEntity.d.ts +29 -16
- package/dist/types/core/types/IHubProject.d.ts +3 -3
- package/dist/types/core/types/IItemResource.d.ts +9 -0
- package/dist/types/core/types/index.d.ts +0 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/initiatives/HubInitiative.d.ts +67 -0
- package/dist/types/initiatives/HubInitiatives.d.ts +55 -0
- package/dist/types/initiatives/defaults.d.ts +11 -0
- package/dist/types/initiatives/index.d.ts +2 -0
- package/dist/types/projects/HubProject.d.ts +7 -33
- package/dist/types/urls/get-campaign-url.d.ts +22 -0
- package/dist/types/urls/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/core/traits/IWithCatalogDefinition.js +0 -1
- package/dist/esm/core/traits/IWithCatalogDefinition.js.map +0 -1
- package/dist/esm/core/types/IHubEntityManager.js +0 -1
- package/dist/esm/core/types/IHubEntityManager.js.map +0 -1
- package/dist/esm/core/types/IHubItemEntityManager.js +0 -1
- package/dist/esm/core/types/IHubItemEntityManager.js.map +0 -1
- package/dist/node/core/traits/IWithCatalogDefinition.js.map +0 -1
- package/dist/node/core/types/IHubEntityManager.js.map +0 -1
- package/dist/node/core/types/IHubItemEntityManager.js.map +0 -1
- package/dist/types/core/types/IHubEntityManager.d.ts +0 -46
- package/dist/types/core/types/IHubItemEntityManager.d.ts +0 -25
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
-
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
|
-
import { IHubSearchOptions } from "../../search/types/IHubSearchOptions";
|
|
4
|
-
import { IHubSearchResponse, IQuery } from "../../search";
|
|
5
|
-
/**
|
|
6
|
-
* Baseline CRUD+Search functions required for all Store classes
|
|
7
|
-
*/
|
|
8
|
-
export interface IHubEntityManager<T> {
|
|
9
|
-
/**
|
|
10
|
-
* Create and Store a new Entity
|
|
11
|
-
* @param obj
|
|
12
|
-
* @param requestOptions
|
|
13
|
-
*/
|
|
14
|
-
create(obj: T, requestOptions: IUserRequestOptions): Promise<T>;
|
|
15
|
-
/**
|
|
16
|
-
* Update an existing Entity
|
|
17
|
-
* @param obj
|
|
18
|
-
* @param requestOptions
|
|
19
|
-
*/
|
|
20
|
-
update(obj: T, requestOptions: IUserRequestOptions): Promise<T>;
|
|
21
|
-
/**
|
|
22
|
-
* Destroy an Entity
|
|
23
|
-
* @param id
|
|
24
|
-
* @param requestOptions
|
|
25
|
-
*/
|
|
26
|
-
delete(id: string, requestOptions: IUserRequestOptions): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Get an entity by an identifier. Implementations can handle this
|
|
29
|
-
* differently as needed. i.e. a HubProject can be fetched by item id (guid)
|
|
30
|
-
* or by a slug.
|
|
31
|
-
* @param identifier
|
|
32
|
-
* @param requestOptions
|
|
33
|
-
*/
|
|
34
|
-
fetch(identifier: string, requestOptions: IRequestOptions): Promise<T>;
|
|
35
|
-
/**
|
|
36
|
-
* Search for Entitys of type `T`
|
|
37
|
-
*
|
|
38
|
-
* Note: When implementing, this should be a search for things of type `T`
|
|
39
|
-
* not searching "within" the `T`.
|
|
40
|
-
*
|
|
41
|
-
* i.e. Searching for Teams, not searching for content shared to a team.
|
|
42
|
-
* @param query
|
|
43
|
-
* @param opts
|
|
44
|
-
*/
|
|
45
|
-
search(query: IQuery, opts: IHubSearchOptions): Promise<IHubSearchResponse<T>>;
|
|
46
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
-
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
|
-
import { IItem } from "@esri/arcgis-rest-types";
|
|
4
|
-
/**
|
|
5
|
-
* Item specific functions that must be implemented by Managers which operate against
|
|
6
|
-
* items stored in the Portal API
|
|
7
|
-
*/
|
|
8
|
-
export interface IHubItemEntityManager<T> {
|
|
9
|
-
/**
|
|
10
|
-
* Add a thumbnail to an item
|
|
11
|
-
* @param entity
|
|
12
|
-
* @param file
|
|
13
|
-
* @param name
|
|
14
|
-
* @param requestOptions
|
|
15
|
-
*/
|
|
16
|
-
updateThumbnail(entity: T, file: any, filename: string, requestOptions?: IUserRequestOptions): Promise<T>;
|
|
17
|
-
/**
|
|
18
|
-
* Given an item, do any additional data fetching and return
|
|
19
|
-
* a type `T`
|
|
20
|
-
*
|
|
21
|
-
* @param item
|
|
22
|
-
* @param requestOptions
|
|
23
|
-
*/
|
|
24
|
-
fromItem(item: IItem, requestOptions: IRequestOptions): Promise<T>;
|
|
25
|
-
}
|