@veloceapps/api 2.0.15 → 2.0.16
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 +227 -228
- package/bundles/veloce-api.umd.js.map +1 -1
- package/esm2015/lib/services/document-attachment-api.service.js +7 -6
- package/esm2015/lib/services/document-templates-api.service.js +143 -154
- package/esm2015/lib/services/quote-api.service.js +12 -1
- package/esm2015/lib/services/rules-api.service.js +2 -2
- package/fesm2015/veloce-api.js +190 -190
- package/fesm2015/veloce-api.js.map +1 -1
- package/lib/services/document-attachment-api.service.d.ts +1 -0
- package/lib/services/document-templates-api.service.d.ts +22 -16
- package/lib/services/quote-api.service.d.ts +1 -0
- package/package.json +1 -1
@@ -4,6 +4,7 @@ import * as i0 from "@angular/core";
|
|
4
4
|
export declare class DocumentAttachmentApiService {
|
5
5
|
private httpService;
|
6
6
|
private fileDownloadService;
|
7
|
+
private readonly SERVICE_URL;
|
7
8
|
constructor(httpService: BaseHttpService, fileDownloadService: FileDownloadService);
|
8
9
|
getAttachments(searchRequest: TemplateAttachmentSearchRequest): Observable<TemplateAttachment[]>;
|
9
10
|
createAttachment(attachment: TemplateAttachment, file?: File, reportProgress?: boolean): Observable<TemplateAttachment>;
|
@@ -2,40 +2,46 @@ import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { BaseHttpService, DocumentTemplate, FileDownloadService, TemplateAttachment, TemplateAttachmentSearchRequest } from '@veloce/core';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
import { DocumentAttachmentApiService } from './document-attachment-api.service';
|
5
|
+
import { QuoteApiService } from './quote-api.service';
|
5
6
|
import { SalesforceApiService } from './salesforce-api.service';
|
6
7
|
import * as i0 from "@angular/core";
|
8
|
+
export interface DocumentGenerationParams {
|
9
|
+
attachToQuote?: boolean;
|
10
|
+
documentFormat?: 'DOCX';
|
11
|
+
shouldPreventDownload?: boolean;
|
12
|
+
}
|
7
13
|
export declare class DocumentTemplatesApiService {
|
8
14
|
private service;
|
9
|
-
private
|
15
|
+
private salesforceApiService;
|
10
16
|
private fileDownloadService;
|
11
17
|
private documentAttachmentService;
|
18
|
+
private quoteApiService;
|
12
19
|
private http;
|
13
|
-
private readonly
|
14
|
-
private readonly
|
15
|
-
|
20
|
+
private readonly SERVICE_URL;
|
21
|
+
private readonly DOC_GEN_URL_FALLBACK;
|
22
|
+
private readonly DOC_GEN_URL;
|
23
|
+
constructor(service: BaseHttpService, salesforceApiService: SalesforceApiService, fileDownloadService: FileDownloadService, documentAttachmentService: DocumentAttachmentApiService, quoteApiService: QuoteApiService, http: HttpClient);
|
16
24
|
getTemplates(tag?: string): Observable<DocumentTemplate[]>;
|
25
|
+
getTemplate(id: string): Observable<DocumentTemplate>;
|
17
26
|
upsertTemplate(template: DocumentTemplate, file?: File, reportProgress?: boolean): Observable<DocumentTemplate>;
|
18
27
|
removeTemplate(id: string): Observable<DocumentTemplate>;
|
19
28
|
restoreTemplate(id: string): Observable<void>;
|
20
29
|
cloneTemplate(id: string, propertiesToOverride?: Partial<DocumentTemplate>): Observable<{
|
21
30
|
clonedRecordId: string;
|
22
31
|
}>;
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
generateDocument(template: DocumentTemplate, object: any, params?: {
|
27
|
-
[param: string]: string | boolean;
|
28
|
-
}): Observable<any>;
|
29
|
-
generateDocumentNew(template: DocumentTemplate, object: any, params?: {
|
30
|
-
[param: string]: string | boolean;
|
31
|
-
}): Observable<any>;
|
32
|
+
getTemplateFile(id: string): Observable<ArrayBuffer>;
|
33
|
+
downloadTemplateFile(id: string): Observable<Blob>;
|
34
|
+
mergeDocuments(document: Blob, attachments: ArrayBuffer[]): Observable<ArrayBuffer>;
|
32
35
|
getAttachments(searchRequest: TemplateAttachmentSearchRequest): Observable<TemplateAttachment[]>;
|
33
36
|
getAttachmentFile(id: string): any;
|
34
37
|
createAttachment(attachment: TemplateAttachment, file?: File, reportProgress?: boolean): Observable<TemplateAttachment>;
|
35
38
|
removeAttachment(id: string): Observable<unknown>;
|
36
|
-
|
37
|
-
|
38
|
-
private
|
39
|
+
generateDocumentData(template: DocumentTemplate, object: any, params?: DocumentGenerationParams): Observable<any>;
|
40
|
+
generateDocument(template: DocumentTemplate, object: any, params?: DocumentGenerationParams): Observable<Blob>;
|
41
|
+
private generateDocumentDataLegacy;
|
42
|
+
private resolveAttachments$;
|
43
|
+
private mapSfQueryResult;
|
44
|
+
private mapBooleanIfAplicable;
|
39
45
|
private queryObject;
|
40
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentTemplatesApiService, never>;
|
41
47
|
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentTemplatesApiService>;
|
@@ -9,6 +9,7 @@ export declare class QuoteApiService {
|
|
9
9
|
getQuote(quoteId: string, params?: Dictionary<string>): Observable<QuoteDraft>;
|
10
10
|
upsertQuote(request: QuoteDraft): Observable<QuoteDraft>;
|
11
11
|
submitQuote(request: QuoteDraft): Observable<QuoteDraft>;
|
12
|
+
attachDocument(id: string, documentName: string, data: any): Observable<void>;
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<QuoteApiService, never>;
|
13
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<QuoteApiService>;
|
14
15
|
}
|