@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/bundles/veloce-api.umd.js +400 -0
- package/bundles/veloce-api.umd.js.map +1 -1
- package/esm2015/index.js +4 -1
- package/esm2015/lib/api.module.js +10 -1
- package/esm2015/lib/services/catalog-admin-api.service.js +159 -0
- package/esm2015/lib/services/catalog-api.service.js +90 -0
- package/esm2015/lib/services/document-attachment-api.service.js +1 -1
- package/esm2015/lib/services/document-templates-api.service.js +1 -1
- package/esm2015/lib/services/product-api.service.js +144 -0
- package/esm2015/lib/types/index.js +2 -1
- package/esm2015/lib/types/search-request.types.js +2 -0
- package/fesm2015/veloce-api.js +388 -1
- package/fesm2015/veloce-api.js.map +1 -1
- package/index.d.ts +3 -0
- package/lib/services/catalog-admin-api.service.d.ts +34 -0
- package/lib/services/catalog-api.service.d.ts +20 -0
- package/lib/services/document-attachment-api.service.d.ts +4 -4
- package/lib/services/document-templates-api.service.d.ts +3 -3
- package/lib/services/product-api.service.d.ts +30 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/search-request.types.d.ts +8 -0
- package/package.json +1 -1
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,
|
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<
|
10
|
-
createAttachment(attachment:
|
11
|
-
updateAttachment(id: string, attachment:
|
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,
|
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<
|
35
|
+
getAttachments(searchRequest: TemplateAttachmentSearchRequest): Observable<Attachment[]>;
|
36
36
|
getAttachmentFile(id: string): any;
|
37
|
-
createAttachment(attachment:
|
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
|
+
}
|
package/lib/types/index.d.ts
CHANGED