@veloceapps/api 3.1.1 → 3.1.2

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/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export { ApiModule } from './lib/api.module';
2
+ export { CatalogAdminApiService } from './lib/services/catalog-admin-api.service';
3
+ export { CatalogApiService } from './lib/services/catalog-api.service';
2
4
  export { ConfigurationApiService } from './lib/services/configuration-api.service';
3
5
  export { ConfigurationSettingsApiService } from './lib/services/configuration-settings-api.service';
4
6
  export { ContextApiService } from './lib/services/context-api.service';
@@ -7,6 +9,7 @@ export { DocumentTemplatesApiService } from './lib/services/document-templates-a
7
9
  export { FlowsApiService } from './lib/services/flows-api.service';
8
10
  export { PriceApiService } from './lib/services/price-api.service';
9
11
  export { ProceduresApiService } from './lib/services/procedures-api.service';
12
+ export { ProductApiService } from './lib/services/product-api.service';
10
13
  export { ProductModelApiService } from './lib/services/product-model-api.service';
11
14
  export { QuoteApiService } from './lib/services/quote-api.service';
12
15
  export { RampApiService } from './lib/services/ramp-api.service';
@@ -0,0 +1,34 @@
1
+ import { BaseHttpService, Catalog, Category, CategoryAttribute, CategoryRequestPayloadWithData, Expression, NewCatalog, NewCategory, NewCategoryAttribute, Product } from '@veloce/core';
2
+ import { Observable } from 'rxjs';
3
+ import { CloneRequest, QuerySearchParams } from '../types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class CatalogAdminApiService {
6
+ private baseHttpService;
7
+ static MAX_RESULTS: number;
8
+ private readonly serviceUrl;
9
+ constructor(baseHttpService: BaseHttpService);
10
+ fetchCatalogs$: (searchParams?: QuerySearchParams | undefined) => Observable<Catalog[]>;
11
+ searchCatalogs$: (searchParams?: QuerySearchParams | undefined, expression?: Expression | undefined) => Observable<Catalog[]>;
12
+ fetchCategories$: (catalogId: string) => Observable<Category[]>;
13
+ searchProducts$: (catalogId: string, categoryId: string) => Observable<Product[]>;
14
+ fetchAttributes$: (catalogId: string, categoryId: string) => Observable<CategoryAttribute[]>;
15
+ createNewCatalog$: (catalogData: NewCatalog) => Observable<Catalog>;
16
+ duplicateCatalog$: (cloneRequest: CloneRequest) => Observable<Catalog>;
17
+ updateCatalog$: (data: Catalog) => Observable<void>;
18
+ removeCatalog$: (id: string) => Observable<void>;
19
+ restoreCatalog$: (id: string) => Observable<void>;
20
+ createNewCategory$: (categoryData: NewCategory) => Observable<Category>;
21
+ updateCategory$: (category: Category) => Observable<void>;
22
+ duplicateCategory$: (catalogId: string, cloneRequest: CloneRequest) => Observable<string>;
23
+ removeCategory$: (id: string, catalogId: string) => Observable<void>;
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>;
29
+ searchProductCandidates$: (catalogId: string, categoryId: string, expression: Expression, searchParams: QuerySearchParams) => Observable<Product[]>;
30
+ addProduct$: (product: Product, catalogId: string, categoryId: string) => Observable<any>;
31
+ removeProduct$: ({ catalogId, categoryId, data }: CategoryRequestPayloadWithData<Product>) => Observable<string>;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<CatalogAdminApiService, never>;
33
+ static ɵprov: i0.ɵɵInjectableDeclaration<CatalogAdminApiService>;
34
+ }
@@ -0,0 +1,20 @@
1
+ import { BaseHttpService, Catalog, Category, ConfigurationContext, Expression, Product, SearchCriteria } from '@veloce/core';
2
+ import { Observable } from 'rxjs';
3
+ import { QuerySearchParams } from '../types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class CatalogApiService {
6
+ private service;
7
+ private readonly serviceUrl;
8
+ constructor(service: BaseHttpService);
9
+ fetchCatalogs$(): Observable<Catalog>;
10
+ searchCatalogs$(searchParams: QuerySearchParams, expression: Expression): Observable<Catalog[]>;
11
+ getCatalog$(id: string): Observable<Catalog>;
12
+ fetchCategories$(catalogId: string): Observable<Category[]>;
13
+ fetchCatalogProducts$(catalogId: string, searchParams: QuerySearchParams, context: ConfigurationContext): Observable<Product[]>;
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[]>;
16
+ fetchEligibleProducts$(searchParams: QuerySearchParams, context: ConfigurationContext): Observable<Product[]>;
17
+ fetchProducts$(searchParams: QuerySearchParams): Observable<Product[]>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<CatalogApiService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<CatalogApiService>;
20
+ }
@@ -1,4 +1,4 @@
1
- import { BaseHttpService, FileDownloadService, TemplateAttachment, TemplateAttachmentSearchRequest } from '@veloce/core';
1
+ import { Attachment, BaseHttpService, FileDownloadService, TemplateAttachmentSearchRequest } from '@veloce/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class DocumentAttachmentApiService {
@@ -6,9 +6,9 @@ export declare class DocumentAttachmentApiService {
6
6
  private fileDownloadService;
7
7
  private readonly SERVICE_URL;
8
8
  constructor(httpService: BaseHttpService, fileDownloadService: FileDownloadService);
9
- getAttachments(searchRequest: TemplateAttachmentSearchRequest): Observable<TemplateAttachment[]>;
10
- createAttachment(attachment: TemplateAttachment, file?: File, reportProgress?: boolean): Observable<TemplateAttachment>;
11
- updateAttachment(id: string, attachment: TemplateAttachment): Observable<TemplateAttachment>;
9
+ getAttachments(searchRequest: TemplateAttachmentSearchRequest): Observable<Attachment[]>;
10
+ createAttachment(attachment: Attachment, file?: File, reportProgress?: boolean): Observable<Attachment>;
11
+ updateAttachment(id: string, attachment: Attachment): Observable<Attachment>;
12
12
  getAttachmentFile(id: string, isPreventDownload?: boolean): Observable<any>;
13
13
  removeAttachment(id: string): Observable<unknown>;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentAttachmentApiService, never>;
@@ -1,5 +1,5 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
- import { BaseHttpService, DocumentTemplate, FileDownloadService, TemplateAttachment, TemplateAttachmentSearchRequest } from '@veloce/core';
2
+ import { Attachment, BaseHttpService, DocumentTemplate, FileDownloadService, TemplateAttachmentSearchRequest } from '@veloce/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { DocumentAttachmentApiService } from './document-attachment-api.service';
5
5
  import { QuoteApiService } from './quote-api.service';
@@ -32,9 +32,9 @@ export declare class DocumentTemplatesApiService {
32
32
  getTemplateFile(id: string): Observable<ArrayBuffer>;
33
33
  downloadTemplateFile(id: string): Observable<Blob>;
34
34
  mergeDocuments(document: Blob, attachments: ArrayBuffer[]): Observable<ArrayBuffer>;
35
- getAttachments(searchRequest: TemplateAttachmentSearchRequest): Observable<TemplateAttachment[]>;
35
+ getAttachments(searchRequest: TemplateAttachmentSearchRequest): Observable<Attachment[]>;
36
36
  getAttachmentFile(id: string): any;
37
- createAttachment(attachment: TemplateAttachment, file?: File, reportProgress?: boolean): Observable<TemplateAttachment>;
37
+ createAttachment(attachment: Attachment, file?: File, reportProgress?: boolean): Observable<Attachment>;
38
38
  removeAttachment(id: string): Observable<unknown>;
39
39
  generateDocumentData(template: DocumentTemplate, object: any, params?: DocumentGenerationParams): Observable<any>;
40
40
  generateDocument(template: DocumentTemplate, object: any, params?: DocumentGenerationParams): Observable<Blob>;
@@ -0,0 +1,30 @@
1
+ import { AttributeDefinition, BaseHttpService, Expression, LazyChunkRequest, NewAttributeDefinition, NewProduct, NewProductAttribute, Product, ProductAttribute } from '@veloce/core';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ProductApiService {
5
+ private baseHttpService;
6
+ private readonly serviceUrl;
7
+ constructor(baseHttpService: BaseHttpService);
8
+ fetchProducts$: (payload: LazyChunkRequest) => Observable<Product[]>;
9
+ searchProducts$: (expression: Expression, skip: number, count: number) => Observable<Product[]>;
10
+ fetchProduct$: (id: string) => Observable<Product>;
11
+ fetchAttributes$: () => Observable<AttributeDefinition[]>;
12
+ searchAttributes$: (expression: Expression, skip: number, count: number) => Observable<AttributeDefinition[]>;
13
+ fetchAttributesByModel: (modelId: string) => Observable<AttributeDefinition[]>;
14
+ createNewProduct$: (productData: NewProduct) => Observable<Product>;
15
+ updateProduct$: (body: Product) => Observable<Product>;
16
+ removeProduct$: (id: string) => Observable<string>;
17
+ restoreProduct$: (id: string) => Observable<void>;
18
+ createProductAttribute$: (attributeData: NewProductAttribute) => Observable<AttributeDefinition>;
19
+ updateProductAttribute$: (attributeData: ProductAttribute) => Observable<AttributeDefinition>;
20
+ removeProductAttribute$: (id: string) => Observable<void>;
21
+ createNewAttribute$: (attributeData: NewAttributeDefinition) => Observable<AttributeDefinition>;
22
+ updateAttribute$: (body: AttributeDefinition) => Observable<AttributeDefinition>;
23
+ removeAttribute$: (id: string) => Observable<void>;
24
+ restoreAttribute$: (id: string) => Observable<void>;
25
+ attachImage$(productId: string, file: File): Observable<void>;
26
+ removeImage$(productId: string): Observable<void>;
27
+ getImageUrl(productId: string): string;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProductApiService, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<ProductApiService>;
30
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './clone-request.types';
2
2
  export * from './ramp-request.types';
3
+ export * from './search-request.types';
@@ -0,0 +1,8 @@
1
+ export declare type QuerySearchParams = {
2
+ skip?: number;
3
+ count?: number;
4
+ sort?: string;
5
+ asc?: boolean;
6
+ } & {
7
+ [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloceapps/api",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0",