@veloceapps/api 7.0.2-9 → 8.0.0-1

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.
Files changed (29) hide show
  1. package/esm2020/index.mjs +4 -1
  2. package/esm2020/lib/api.module.mjs +10 -1
  3. package/esm2020/lib/services/catalog-admin-api.service.mjs +28 -1
  4. package/esm2020/lib/services/catalog-api.service.mjs +3 -3
  5. package/esm2020/lib/services/configuration-api.service.mjs +14 -14
  6. package/esm2020/lib/services/guided-sellings-api.service.mjs +11 -1
  7. package/esm2020/lib/services/product-model-api.service.mjs +6 -1
  8. package/esm2020/lib/services/salesforce-api.service.mjs +24 -1
  9. package/esm2020/lib/services/stateful-configuration-api.mjs +51 -0
  10. package/esm2020/lib/services/ui-definitions-api.service.mjs +76 -0
  11. package/esm2020/lib/services/veloce-objects-api.service.mjs +80 -0
  12. package/esm2020/lib/types/index.mjs +1 -1
  13. package/esm2020/lib/types/stateful-configuration.types.mjs +2 -0
  14. package/fesm2015/veloceapps-api.mjs +275 -17
  15. package/fesm2015/veloceapps-api.mjs.map +1 -1
  16. package/fesm2020/veloceapps-api.mjs +281 -17
  17. package/fesm2020/veloceapps-api.mjs.map +1 -1
  18. package/index.d.ts +3 -0
  19. package/lib/services/catalog-admin-api.service.d.ts +11 -7
  20. package/lib/services/catalog-api.service.d.ts +2 -2
  21. package/lib/services/guided-sellings-api.service.d.ts +1 -0
  22. package/lib/services/product-model-api.service.d.ts +5 -0
  23. package/lib/services/salesforce-api.service.d.ts +8 -1
  24. package/lib/services/stateful-configuration-api.d.ts +30 -0
  25. package/lib/services/ui-definitions-api.service.d.ts +15 -0
  26. package/lib/services/veloce-objects-api.service.d.ts +22 -0
  27. package/lib/types/index.d.ts +0 -1
  28. package/lib/types/stateful-configuration.types.d.ts +11 -0
  29. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -26,5 +26,8 @@ export { RulesApiService } from './lib/services/rules-api.service';
26
26
  export { SalesforceApiService } from './lib/services/salesforce-api.service';
27
27
  export { ScriptsApiService } from './lib/services/scripts-api.service';
28
28
  export { ShoppingCartSettingsApiService } from './lib/services/shopping-cart-settings-api.service';
29
+ export { StatefulConfigurationApiService } from './lib/services/stateful-configuration-api';
30
+ export { UIDefinitionsApiService } from './lib/services/ui-definitions-api.service';
29
31
  export { UITemplatesApiService } from './lib/services/ui-templates-api.service';
32
+ export { VeloceObjectsApiService } from './lib/services/veloce-objects-api.service';
30
33
  export * from './lib/types';
@@ -1,4 +1,4 @@
1
- import { BaseHttpService, Catalog, Category, CategoryAttribute, CategoryRequestPayloadWithData, Expression, NewCatalog, NewCategory, NewCategoryAttribute, Product } from '@veloceapps/core';
1
+ import { BaseHttpService, Catalog, Category, CategoryFilter, CategoryRequestPayloadWithData, Expression, NewCatalog, NewCategory, NewCategoryFilter, Product } from '@veloceapps/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { CloneRequest, QuerySearchParams } from '../types';
4
4
  import * as i0 from "@angular/core";
@@ -11,25 +11,29 @@ export declare class CatalogAdminApiService {
11
11
  searchCatalogs$: (searchParams?: QuerySearchParams, expression?: Expression) => Observable<Catalog[]>;
12
12
  fetchCategories$: (catalogId: string) => Observable<Category[]>;
13
13
  searchProducts$: (catalogId: string, categoryId: string) => Observable<Product[]>;
14
- fetchAttributes$: (catalogId: string, categoryId: string) => Observable<CategoryAttribute[]>;
14
+ fetchAttributes$: (catalogId: string, categoryId: string) => Observable<CategoryFilter[]>;
15
15
  createNewCatalog$: (catalogData: NewCatalog) => Observable<Catalog>;
16
16
  duplicateCatalog$: (cloneRequest: CloneRequest) => Observable<Catalog>;
17
17
  updateCatalog$: (data: Catalog) => Observable<void>;
18
18
  removeCatalog$: (id: string) => Observable<void>;
19
19
  restoreCatalog$: (id: string) => Observable<void>;
20
20
  createNewCategory$: (categoryData: NewCategory) => Observable<Category>;
21
- updateCategory$: (category: Category) => Observable<void>;
21
+ updateCategory$: (category: Category) => Observable<Category>;
22
22
  duplicateCategory$: (catalogId: string, cloneRequest: CloneRequest) => Observable<string>;
23
23
  removeCategory$: (id: string, catalogId: string) => Observable<void>;
24
24
  restoreCategory$: (id: string, catalogId: string) => Observable<void>;
25
- removeAttribute$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<CategoryAttribute>) => Observable<string>;
26
- restoreAttribute$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<CategoryAttribute>) => Observable<void>;
27
- createNewAttribute$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<NewCategoryAttribute>) => Observable<CategoryAttribute>;
28
- updateAttribute$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<CategoryAttribute>) => Observable<CategoryAttribute>;
25
+ removeAttribute$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<CategoryFilter>) => Observable<string>;
26
+ restoreAttribute$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<CategoryFilter>) => Observable<void>;
27
+ createNewAttribute$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<NewCategoryFilter>) => Observable<CategoryFilter>;
28
+ updateAttribute$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<CategoryFilter>) => Observable<CategoryFilter>;
29
29
  searchProductCandidates$: (catalogId: string, categoryId: string, expression: Expression, searchParams: QuerySearchParams) => Observable<Product[]>;
30
30
  addProduct$: (product: Product, catalogId: string, categoryId: string) => Observable<any>;
31
31
  updateProduct$: (product: Partial<Product>, catalogId: string, categoryId: string) => Observable<any>;
32
32
  removeProduct$: ({ catalogId, categoryId, data, }: CategoryRequestPayloadWithData<Product>) => Observable<string>;
33
+ attachImage$(catalogId: string, categoryId: string, file: File): Observable<void>;
34
+ removeImage$(catalogId: string, categoryId: string): Observable<void>;
35
+ fetchImage$(catalogId: string, categoryId: string): Observable<File>;
36
+ getImageUrl(catalogId: string, categoryId: string): string;
33
37
  static ɵfac: i0.ɵɵFactoryDeclaration<CatalogAdminApiService, never>;
34
38
  static ɵprov: i0.ɵɵInjectableDeclaration<CatalogAdminApiService>;
35
39
  }
@@ -1,4 +1,4 @@
1
- import { BaseHttpService, Catalog, Category, ConfigurationContext, Expression, Product, SearchCriteria } from '@veloceapps/core';
1
+ import { BaseHttpService, Catalog, Category, ConfigurationContext, Expression, Product, SearchRequest } from '@veloceapps/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { QuerySearchParams } from '../types';
4
4
  import * as i0 from "@angular/core";
@@ -12,7 +12,7 @@ export declare class CatalogApiService {
12
12
  fetchCategories$(catalogId: string): Observable<Category[]>;
13
13
  fetchCatalogProducts$(catalogId: string, searchParams?: QuerySearchParams, context?: ConfigurationContext): Observable<Product[]>;
14
14
  fetchCategoryProducts$(catalogId: string, categoryId: string, searchParams?: QuerySearchParams, context?: ConfigurationContext): Observable<Product[]>;
15
- searchCategoryProducts$(catalogId: string, categoryId: string, searchParams?: QuerySearchParams, searchCriteria?: SearchCriteria, context?: ConfigurationContext): Observable<Product[]>;
15
+ searchCategoryProducts$(catalogId: string, categoryId: string, searchParams?: QuerySearchParams, searchRequest?: SearchRequest, context?: ConfigurationContext): Observable<Product[]>;
16
16
  fetchEligibleProducts$(searchParams?: QuerySearchParams, context?: ConfigurationContext): Observable<Product[]>;
17
17
  fetchProducts$(searchParams?: QuerySearchParams): Observable<Product[]>;
18
18
  static ɵfac: i0.ɵɵFactoryDeclaration<CatalogApiService, never>;
@@ -7,6 +7,7 @@ export declare class GuidedSellingApiService {
7
7
  private readonly serviceUrl;
8
8
  constructor(http: BaseHttpService);
9
9
  searchByName$(name: string, searchParams?: QuerySearchParams): Observable<GuidedSelling[]>;
10
+ searchById$(id: string, searchParams?: QuerySearchParams): Observable<GuidedSelling[]>;
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<GuidedSellingApiService, never>;
11
12
  static ɵprov: i0.ɵɵInjectableDeclaration<GuidedSellingApiService>;
12
13
  }
@@ -13,6 +13,11 @@ export declare class ProductModelApiService {
13
13
  getModel(id: string, version?: string): Observable<ProductModel>;
14
14
  getModels(skipCount: number, searchText: string): Observable<ProductModel[]>;
15
15
  getLinkedModels(id: string, version?: string): Observable<ProductModel[]>;
16
+ /**
17
+ *
18
+ * @deprecated
19
+ * Will be removed in next major release
20
+ */
16
21
  load(id: string, version?: string): Observable<ProductModelsContainer>;
17
22
  getPML(modelId: string, version?: string): Observable<any>;
18
23
  savePML(modelId: string, pml: string, comment: string): Observable<any>;
@@ -1,5 +1,5 @@
1
1
  import { HttpParams } from '@angular/common/http';
2
- import { BaseHttpService, HttpRequestConfigurableOptions, SalesforceField, SalesforceObject, SearchRequest } from '@veloceapps/core';
2
+ import { BaseHttpService, GlobalPicklist, GlobalPicklistValue, HttpRequestConfigurableOptions, SalesforceField, SalesforceObject, SearchRequest } from '@veloceapps/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class SalesforceApiService {
@@ -13,10 +13,17 @@ export declare class SalesforceApiService {
13
13
  }, options?: HttpRequestConfigurableOptions): Observable<{
14
14
  searchRecords: T[];
15
15
  }>;
16
+ /**
17
+ * @deprecated
18
+ */
16
19
  describe(objectName: string, fieldName?: string, options?: HttpRequestConfigurableOptions): Observable<SalesforceField[]>;
20
+ describeObject(objectName: string, options?: HttpRequestConfigurableOptions): Observable<SalesforceField[]>;
21
+ describeField(objectName: string, fieldName: string, options?: HttpRequestConfigurableOptions): Observable<SalesforceField>;
17
22
  describe2<T>(objectName: string, fields: string[], options?: HttpRequestConfigurableOptions): Observable<T>;
18
23
  apexGetRequest<T>(path: string, params: HttpParams, options?: HttpRequestConfigurableOptions): Observable<T>;
19
24
  apexPostRequest<T, S>(path: string, body: S, options?: HttpRequestConfigurableOptions): Observable<T>;
25
+ getGlobalPicklists(): Observable<GlobalPicklist[]>;
26
+ getGlobalPicklistValues(id: string): Observable<GlobalPicklistValue[]>;
20
27
  static ɵfac: i0.ɵɵFactoryDeclaration<SalesforceApiService, never>;
21
28
  static ɵprov: i0.ɵɵInjectableDeclaration<SalesforceApiService>;
22
29
  }
@@ -0,0 +1,30 @@
1
+ import { BaseHttpService, ConfigurationExecuteRequest, ConfigurationExecuteResponse, StatefulConfigurationState } from '@veloceapps/core';
2
+ import { Observable } from 'rxjs';
3
+ import { StatefulConfigurationRequest } from '../types/stateful-configuration.types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class StatefulConfigurationApiService {
6
+ private httpService;
7
+ private readonly SERVICE_URL;
8
+ constructor(httpService: BaseHttpService);
9
+ /**
10
+ * Initialize configuration state
11
+ * @param request Request
12
+ * @returns ID of new configuration state
13
+ */
14
+ init(request: StatefulConfigurationRequest): Observable<string>;
15
+ /**
16
+ * Get existing state by ID
17
+ * @param id ID
18
+ * @returns Configuration State
19
+ */
20
+ get(id: string): Observable<StatefulConfigurationState>;
21
+ /**
22
+ * Execute actions/selectors
23
+ * @param id State ID
24
+ * @param request Request
25
+ * @returns Execute result
26
+ */
27
+ execute(id: string, request: ConfigurationExecuteRequest): Observable<ConfigurationExecuteResponse>;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatefulConfigurationApiService, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<StatefulConfigurationApiService>;
30
+ }
@@ -0,0 +1,15 @@
1
+ import { BaseHttpService, NewUIDefinitionContainer, UIDefinitionContainer } from '@veloceapps/core';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class UIDefinitionsApiService {
5
+ private baseHttpService;
6
+ constructor(baseHttpService: BaseHttpService);
7
+ fetch$(modelId: string, version?: number): Observable<UIDefinitionContainer[]>;
8
+ create$(modelId: string, uiDefinitionContainer: NewUIDefinitionContainer): Observable<UIDefinitionContainer>;
9
+ get$(modelId: string, uiDefinitionId: string): Observable<UIDefinitionContainer | null>;
10
+ update$(uiDefinitionContainer: UIDefinitionContainer): Observable<UIDefinitionContainer>;
11
+ delete$(uiDefinitionContainer: UIDefinitionContainer): Observable<void>;
12
+ private getServiceUrl;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<UIDefinitionsApiService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<UIDefinitionsApiService>;
15
+ }
@@ -0,0 +1,22 @@
1
+ import { BaseHttpService, Expression, NewVeloceObject, NewVeloceObjectCategory, VeloceObject, VeloceObjectCategory } from '@veloceapps/core';
2
+ import { Observable } from 'rxjs';
3
+ import { QuerySearchParams } from '../types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class VeloceObjectsApiService {
6
+ private baseHttpService;
7
+ private readonly serviceUrl;
8
+ constructor(baseHttpService: BaseHttpService);
9
+ fetchCategories$(): Observable<VeloceObjectCategory[]>;
10
+ createCategory$(category: NewVeloceObjectCategory): Observable<VeloceObjectCategory>;
11
+ updateCategory$: (category: VeloceObjectCategory) => Observable<VeloceObjectCategory>;
12
+ deleteCategory$: (id: string) => Observable<void>;
13
+ fetchObjects$(): Observable<VeloceObject[]>;
14
+ fetchObject$(id: string): Observable<VeloceObject>;
15
+ searchObjects$: (searchParams?: QuerySearchParams, expression?: Expression) => Observable<VeloceObject[]>;
16
+ createObject$(object: NewVeloceObject): Observable<VeloceObject>;
17
+ updateObject$(object: VeloceObject): Observable<VeloceObject>;
18
+ deleteObject$: (id: string) => Observable<void>;
19
+ restoreObject$: (id: string) => Observable<void>;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<VeloceObjectsApiService, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<VeloceObjectsApiService>;
22
+ }
@@ -1,6 +1,5 @@
1
1
  export * from './clone-request.types';
2
2
  export * from './delta-request.types';
3
- export {} from './dto/offers-dto.types';
4
3
  export * from './org-info.types';
5
4
  export * from './ramp-request.types';
6
5
  export * from './search-request.types';
@@ -0,0 +1,11 @@
1
+ import { ConfigurationRequest } from '@veloceapps/core';
2
+ interface ConfigurationProcessorOverride {
3
+ name: string;
4
+ script: string;
5
+ }
6
+ export interface StatefulConfigurationRequest {
7
+ request: ConfigurationRequest;
8
+ actions?: ConfigurationProcessorOverride[];
9
+ selectors?: ConfigurationProcessorOverride[];
10
+ }
11
+ export {};
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@veloceapps/api",
3
- "version": "7.0.2-9",
3
+ "version": "8.0.0-1",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "~15.2.0",
7
7
  "@angular/core": "~15.2.0",
8
- "@veloceapps/core": "^7.0.2-0",
8
+ "@veloceapps/core": "^8.0.0-0",
9
9
  "lodash": "^4.17.21",
10
10
  "moment": "^2.29.1",
11
11
  "rxjs": "~7.8.0"