@veloceapps/api 8.0.0-20 → 8.0.0-201

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 (55) hide show
  1. package/esm2020/index.mjs +6 -1
  2. package/esm2020/lib/api.module.mjs +16 -1
  3. package/esm2020/lib/services/account-api.service.mjs +8 -1
  4. package/esm2020/lib/services/configuration-api.service.mjs +45 -12
  5. package/esm2020/lib/services/configuration-processors-api.service.mjs +38 -0
  6. package/esm2020/lib/services/contracted-price-api.service.mjs +45 -0
  7. package/esm2020/lib/services/document-templates-api.service.mjs +6 -4
  8. package/esm2020/lib/services/flow-state-api.mjs +142 -0
  9. package/esm2020/lib/services/flows-api.service.mjs +9 -5
  10. package/esm2020/lib/services/org-info-api.service.mjs +45 -10
  11. package/esm2020/lib/services/portals-api.service.mjs +76 -0
  12. package/esm2020/lib/services/procedures-api.service.mjs +7 -1
  13. package/esm2020/lib/services/quote-api.service.mjs +18 -2
  14. package/esm2020/lib/services/rebate-program-api.service.mjs +1 -1
  15. package/esm2020/lib/services/rules-api.service.mjs +11 -2
  16. package/esm2020/lib/services/salesforce-api.service.mjs +4 -2
  17. package/esm2020/lib/services/sandbox-manager-api.service.mjs +94 -0
  18. package/esm2020/lib/services/scripts-api.service.mjs +6 -3
  19. package/esm2020/lib/services/stateful-configuration-api.mjs +1 -1
  20. package/esm2020/lib/services/ui-templates-api.service.mjs +6 -1
  21. package/esm2020/lib/services/veloce-objects-api.service.mjs +11 -1
  22. package/esm2020/lib/types/index.mjs +2 -1
  23. package/esm2020/lib/types/org-info.types.mjs +1 -1
  24. package/esm2020/lib/types/quote.types.mjs +2 -0
  25. package/esm2020/lib/types/stateful-configuration.types.mjs +1 -1
  26. package/esm2020/lib/utils/canvas.utils.mjs +33 -0
  27. package/fesm2015/veloceapps-api.mjs +566 -41
  28. package/fesm2015/veloceapps-api.mjs.map +1 -1
  29. package/fesm2020/veloceapps-api.mjs +581 -37
  30. package/fesm2020/veloceapps-api.mjs.map +1 -1
  31. package/index.d.ts +5 -0
  32. package/lib/services/account-api.service.d.ts +2 -1
  33. package/lib/services/configuration-api.service.d.ts +5 -0
  34. package/lib/services/configuration-processors-api.service.d.ts +14 -0
  35. package/lib/services/contracted-price-api.service.d.ts +16 -0
  36. package/lib/services/flow-state-api.d.ts +84 -0
  37. package/lib/services/flows-api.service.d.ts +1 -1
  38. package/lib/services/org-info-api.service.d.ts +13 -7
  39. package/lib/services/portals-api.service.d.ts +20 -0
  40. package/lib/services/procedures-api.service.d.ts +1 -0
  41. package/lib/services/quote-api.service.d.ts +13 -6
  42. package/lib/services/rebate-program-api.service.d.ts +1 -1
  43. package/lib/services/rules-api.service.d.ts +1 -0
  44. package/lib/services/salesforce-api.service.d.ts +1 -1
  45. package/lib/services/sandbox-manager-api.service.d.ts +24 -0
  46. package/lib/services/scripts-api.service.d.ts +1 -1
  47. package/lib/services/stateful-configuration-api.d.ts +2 -2
  48. package/lib/services/ui-templates-api.service.d.ts +1 -0
  49. package/lib/services/veloce-objects-api.service.d.ts +2 -1
  50. package/lib/types/index.d.ts +1 -0
  51. package/lib/types/org-info.types.d.ts +19 -0
  52. package/lib/types/quote.types.d.ts +8 -0
  53. package/lib/types/stateful-configuration.types.d.ts +1 -1
  54. package/lib/utils/canvas.utils.d.ts +18 -0
  55. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -4,18 +4,22 @@ export { VeloceAuthService } from './lib/services/auth.service';
4
4
  export { CatalogAdminApiService } from './lib/services/catalog-admin-api.service';
5
5
  export { CatalogApiService } from './lib/services/catalog-api.service';
6
6
  export { ConfigurationApiService } from './lib/services/configuration-api.service';
7
+ export { ConfigurationProcessorsApiService } from './lib/services/configuration-processors-api.service';
7
8
  export { ConfigurationSettingsApiService } from './lib/services/configuration-settings-api.service';
8
9
  export { ContextApiService } from './lib/services/context-api.service';
10
+ export { ContractedPriceApiService } from './lib/services/contracted-price-api.service';
9
11
  export { DeltaApiService } from './lib/services/delta-api.service';
10
12
  export { DocumentAttachmentApiService } from './lib/services/document-attachment-api.service';
11
13
  export { DocumentTemplatesApiService } from './lib/services/document-templates-api.service';
12
14
  export { EndpointsApiService } from './lib/services/endpoints-api.service';
15
+ export { FlowStateApiService } from './lib/services/flow-state-api';
13
16
  export { FlowsApiService } from './lib/services/flows-api.service';
14
17
  export { GuidedSellingsAdminApiService } from './lib/services/guided-sellings-admin-api.service';
15
18
  export { GuidedSellingApiService } from './lib/services/guided-sellings-api.service';
16
19
  export { OffersApiService } from './lib/services/offers-api.service';
17
20
  export { OrgInfoApiService } from './lib/services/org-info-api.service';
18
21
  export { PicklistsApiService } from './lib/services/picklists-api.service';
22
+ export { PortalsApiService } from './lib/services/portals-api.service';
19
23
  export { PriceApiService } from './lib/services/price-api.service';
20
24
  export { ProceduresApiService } from './lib/services/procedures-api.service';
21
25
  export { ProductApiService } from './lib/services/product-api.service';
@@ -34,4 +38,5 @@ export { StatefulConfigurationApiService } from './lib/services/stateful-configu
34
38
  export { UIDefinitionsApiService } from './lib/services/ui-definitions-api.service';
35
39
  export { UITemplatesApiService } from './lib/services/ui-templates-api.service';
36
40
  export { VeloceObjectsApiService } from './lib/services/veloce-objects-api.service';
41
+ export { SandboxManagerApiService } from './lib/services/sandbox-manager-api.service';
37
42
  export * from './lib/types';
@@ -1,4 +1,4 @@
1
- import { Account, BaseHttpService, HttpRequestConfigurableOptions, LineItem, Order, Quote } from '@veloceapps/core';
1
+ import { Account, AccountAssetsState, BaseHttpService, HttpRequestConfigurableOptions, LineItem, Order, Quote } from '@veloceapps/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { QuerySearchParams } from '../types';
4
4
  import * as i0 from "@angular/core";
@@ -9,6 +9,7 @@ export declare class AccountApiService {
9
9
  getAccounts$(options?: HttpRequestConfigurableOptions): Observable<Account[]>;
10
10
  searchAccounts$(searchParams?: QuerySearchParams, options?: HttpRequestConfigurableOptions): Observable<Account[]>;
11
11
  getAccount$(id: string, options?: HttpRequestConfigurableOptions): Observable<Account>;
12
+ getAssetsState(accountId: string, options?: HttpRequestConfigurableOptions): Observable<AccountAssetsState>;
12
13
  getAssets(accountId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem[]>;
13
14
  getOrders(accountId: string, options?: HttpRequestConfigurableOptions): Observable<Order[]>;
14
15
  getQuotes(accountId: string, options?: HttpRequestConfigurableOptions): Observable<Quote[]>;
@@ -10,6 +10,11 @@ export declare class ConfigurationApiService {
10
10
  runtimeModel?: RuntimeModel;
11
11
  pricingEnabled?: boolean;
12
12
  }): Observable<ConfigurePrice>;
13
+ customConfigurePrice({ url, configurationRequest, runtimeModel, }: {
14
+ url: string;
15
+ configurationRequest: ConfigurationRequest;
16
+ runtimeModel?: RuntimeModel;
17
+ }): Observable<ConfigurePrice>;
13
18
  getRuntimeDataByProductId(productId: string, offeringId?: string): Observable<RuntimeData>;
14
19
  getRuntimeDataByModelId(modelId: string): Observable<RuntimeData>;
15
20
  private updatePortDomains;
@@ -0,0 +1,14 @@
1
+ import { BaseHttpService, ConfigurationProcessor } from '@veloceapps/core';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ConfigurationProcessorsApiService {
5
+ private baseHttpService;
6
+ private readonly serviceUrl;
7
+ constructor(baseHttpService: BaseHttpService);
8
+ fetchConfigurationProcessors$: (ownerId: string) => Observable<ConfigurationProcessor[]>;
9
+ createConfigurationProcessors$: (configurationProcessor: ConfigurationProcessor) => Observable<ConfigurationProcessor>;
10
+ updateConfigurationProcessors$: (configurationProcessor: ConfigurationProcessor) => Observable<ConfigurationProcessor>;
11
+ deleteConfigurationProcessors$: (configurationProcessor: ConfigurationProcessor) => Observable<void>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationProcessorsApiService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationProcessorsApiService>;
14
+ }
@@ -0,0 +1,16 @@
1
+ import { BaseHttpService, ContractedPrice, Expression, GuidedSelling, NewContractedPrice } from '@veloceapps/core';
2
+ import { Observable } from 'rxjs';
3
+ import { QuerySearchParams } from '../types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ContractedPriceApiService {
6
+ private baseHttpService;
7
+ private readonly serviceUrl;
8
+ constructor(baseHttpService: BaseHttpService);
9
+ fetchContractedPrices$: () => Observable<ContractedPrice[]>;
10
+ fetchContractedPrice$: (id: string) => Observable<ContractedPrice>;
11
+ createContractedPrice$: (data: NewContractedPrice) => Observable<ContractedPrice>;
12
+ updateContractedPrice$: (data: ContractedPrice) => Observable<ContractedPrice>;
13
+ searchContractedPrices$: (searchParams?: QuerySearchParams, expression?: Expression) => Observable<GuidedSelling[]>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContractedPriceApiService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<ContractedPriceApiService>;
16
+ }
@@ -0,0 +1,84 @@
1
+ import { BaseHttpService, ConfigurationStateExecuteRequest, ConfigurationStateNewRequest, ConfigurationStateStartRequest, FlowState, FlowStateExecutionRequestDTO, FlowStateExecutionResult, FlowStateInitRequest, FlowStateInitResponse } from '@veloceapps/core';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FlowStateApiService {
5
+ private httpService;
6
+ private readonly SERVICE_URL;
7
+ constructor(httpService: BaseHttpService);
8
+ /**
9
+ * Initialize flow state
10
+ * @param request Request
11
+ * @returns Flow initialization response, which contains session ID and result of selectors
12
+ */
13
+ init(request: FlowStateInitRequest): Observable<FlowStateInitResponse>;
14
+ /**
15
+ * Get existing state by ID
16
+ * @param id ID
17
+ * @returns Flow State
18
+ */
19
+ get(id: string): Observable<FlowState>;
20
+ /**
21
+ * Execute actions/selectors
22
+ * @param id State ID
23
+ * @param request Request
24
+ * @returns Execute result
25
+ */
26
+ execute(id: string, request: FlowStateExecutionRequestDTO): Observable<FlowStateExecutionResult>;
27
+ /**
28
+ * Save Quote in the state
29
+ * @param id State ID
30
+ */
31
+ save(id: string): Observable<{
32
+ quoteId: string;
33
+ }>;
34
+ /**
35
+ * Submit Quote in the state
36
+ * @param id State ID
37
+ */
38
+ submit(id: string): Observable<{
39
+ quoteId: string;
40
+ }>;
41
+ /**
42
+ * Close Flow state
43
+ * @param id State ID
44
+ */
45
+ cancel(id: string): Observable<void>;
46
+ /**
47
+ * Initialize stateful configuration
48
+ * @param stateId string
49
+ * @param request Request
50
+ * @returns Flow initialization response, which contains session ID and result of selectors
51
+ */
52
+ newConfiguration(stateId: string, request: ConfigurationStateNewRequest): Observable<FlowStateExecutionResult>;
53
+ /**
54
+ * Start stateful configuration
55
+ * @param stateId string
56
+ * @param request Request
57
+ * @returns Flow initialization response, which contains session ID and result of selectors
58
+ */
59
+ startConfiguration(stateId: string, request: ConfigurationStateStartRequest): Observable<FlowStateExecutionResult>;
60
+ /**
61
+ * Execute stateful configuration
62
+ * @param stateId string
63
+ * @param configurationId string
64
+ * @param request Request
65
+ * @returns Flow initialization response, which contains session ID and result of selectors
66
+ */
67
+ executeConfiguration(stateId: string, configurationId: string, request: ConfigurationStateExecuteRequest): Observable<FlowStateExecutionResult>;
68
+ /**
69
+ * Save stateful configuration
70
+ * @param stateId string
71
+ * @param configurationId string
72
+ */
73
+ saveConfiguration(stateId: string, configurationId: string): Observable<{
74
+ quoteId: string;
75
+ }>;
76
+ /**
77
+ * Cancel stateful configuration
78
+ * @param stateId string
79
+ * @param configurationId string
80
+ */
81
+ cancelConfiguration(stateId: string, configurationId: string): Observable<void>;
82
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowStateApiService, never>;
83
+ static ɵprov: i0.ɵɵInjectableDeclaration<FlowStateApiService>;
84
+ }
@@ -6,7 +6,7 @@ export declare class FlowsApiService {
6
6
  private configurationSettingsApiService;
7
7
  private readonly flowsKey;
8
8
  constructor(configurationSettingsApiService: ConfigurationSettingsApiService);
9
- getFlow(id: string): Observable<Flow | undefined>;
9
+ getFlow(id: string): Observable<Flow>;
10
10
  fetchFlows(): Observable<Flow[]>;
11
11
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsApiService, never>;
12
12
  static ɵprov: i0.ɵɵInjectableDeclaration<FlowsApiService>;
@@ -1,13 +1,19 @@
1
- import { HttpClient } from '@angular/common/http';
1
+ import { MessageService } from 'primeng/api';
2
2
  import { Observable } from 'rxjs';
3
- import { OrgInfo } from '../types/org-info.types';
3
+ import { AvailableVersionsInfo, OrgInfo } from '../types/org-info.types';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class OrgInfoApiService {
6
- private http;
7
- private readonly CANVAS_URL_FALLBACK;
8
- private readonly hostUrl;
9
- constructor(http: HttpClient);
10
- getOrgInfo$(organizationId: string): Observable<OrgInfo>;
6
+ private messageService;
7
+ constructor(messageService: MessageService);
8
+ getOrgInfo$(): Observable<OrgInfo | undefined>;
9
+ getAvailableVersionsInfo$(): Observable<AvailableVersionsInfo | undefined>;
10
+ upgradeVersion$(targetVersion: string): Observable<OrgInfo | undefined>;
11
+ /**
12
+ * Shows an error message using the message service.
13
+ *
14
+ * @param {string} message - the error message to be published.
15
+ */
16
+ private publishErrorMessage;
11
17
  static ɵfac: i0.ɵɵFactoryDeclaration<OrgInfoApiService, never>;
12
18
  static ɵprov: i0.ɵɵInjectableDeclaration<OrgInfoApiService>;
13
19
  }
@@ -0,0 +1,20 @@
1
+ import { BaseHttpService, Expression, NewPortal, Portal, PortalCustomization } from '@veloceapps/core';
2
+ import { Observable } from 'rxjs';
3
+ import { CloneRequest } from '../types/clone-request.types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class PortalsApiService {
6
+ private baseHttpService;
7
+ static MAX_RESULTS: number;
8
+ private readonly serviceUrl;
9
+ constructor(baseHttpService: BaseHttpService);
10
+ createNewPortal$(body: NewPortal): Observable<Portal>;
11
+ updatePortal$(portal: Portal, settings: PortalCustomization): Observable<Portal>;
12
+ getPortals$: (skip?: number, name?: string) => Observable<Portal[]>;
13
+ searchPortals$: (skip?: number, expression?: Expression) => Observable<Portal[]>;
14
+ removePortal$: (id: string) => Observable<string>;
15
+ restore$: (id: string) => Observable<void>;
16
+ duplicatePortal$: (cloneRequest: CloneRequest) => Observable<string>;
17
+ getPortal$: (id: string) => Observable<Portal>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<PortalsApiService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<PortalsApiService>;
20
+ }
@@ -23,6 +23,7 @@ export declare class ProceduresApiService {
23
23
  * @returns
24
24
  */
25
25
  apply$(body: QuoteDraft): Observable<QuoteDraft>;
26
+ fetchDefaultPricingSteps$(): Observable<any>;
26
27
  static ɵfac: i0.ɵɵFactoryDeclaration<ProceduresApiService, never>;
27
28
  static ɵprov: i0.ɵɵInjectableDeclaration<ProceduresApiService>;
28
29
  }
@@ -1,18 +1,25 @@
1
1
  import { BaseHttpService, HttpRequestConfigurableOptions, QuoteDraft } from '@veloceapps/core';
2
2
  import { Dictionary } from 'lodash';
3
3
  import { Observable } from 'rxjs';
4
+ import { SaveQuoteResponse, SubmitQuoteResponse } from '../types';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class QuoteApiService {
6
7
  private httpService;
7
8
  private readonly SERVICE_URL;
8
9
  constructor(httpService: BaseHttpService);
10
+ /**
11
+ * @deprecated Use getQuoteState instead
12
+ */
9
13
  getQuoteDraft(objectId: string, params?: Dictionary<string>, errorHandler?: (error: any) => void): Observable<QuoteDraft>;
10
- upsertQuote(request: QuoteDraft, options?: HttpRequestConfigurableOptions): Observable<{
11
- quoteId: string;
12
- }>;
13
- submitQuote(request: QuoteDraft, options?: HttpRequestConfigurableOptions): Observable<{
14
- quoteId: string;
15
- }>;
14
+ /**
15
+ * Comparing to deprecated `getQuoteDraft` this endpoint doesn't include orders and assets
16
+ * @param objectId quoteId | accountId | opportunityId | orderId
17
+ * @param params Query params
18
+ * @param options Request options
19
+ */
20
+ getQuoteState(objectId: string, params?: Dictionary<string>, options?: HttpRequestConfigurableOptions): Observable<QuoteDraft>;
21
+ upsertQuote(request: QuoteDraft, options?: HttpRequestConfigurableOptions): Observable<SaveQuoteResponse>;
22
+ submitQuote(request: QuoteDraft, options?: HttpRequestConfigurableOptions): Observable<SubmitQuoteResponse>;
16
23
  attachDocument(id: string, documentName: string, data: any): Observable<void>;
17
24
  static ɵfac: i0.ɵɵFactoryDeclaration<QuoteApiService, never>;
18
25
  static ɵprov: i0.ɵɵInjectableDeclaration<QuoteApiService>;
@@ -6,7 +6,7 @@ export declare class RebateProgramApiService {
6
6
  private baseHttpService;
7
7
  private readonly serviceUrl;
8
8
  constructor(baseHttpService: BaseHttpService);
9
- fetchAll$: () => Observable<RebateProgram>;
9
+ fetchAll$: () => Observable<RebateProgram[]>;
10
10
  search$(expression: Expression, skip?: number, count?: number): Observable<RebateProgram[]>;
11
11
  fetchOne$: (id: string) => Observable<RebateProgram>;
12
12
  create$(body: NewRebateProgram): Observable<RebateProgram>;
@@ -16,6 +16,7 @@ export declare class RulesApiService {
16
16
  fetchRule$(id: string): Observable<Rule>;
17
17
  fetchHeaderFields$(): Observable<HeaderField[]>;
18
18
  execute$(body: RuleExecuteRequest): Observable<string[]>;
19
+ private getExecuteRuleUrl;
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<RulesApiService, never>;
20
21
  static ɵprov: i0.ɵɵInjectableDeclaration<RulesApiService>;
21
22
  }
@@ -20,7 +20,7 @@ export declare class SalesforceApiService {
20
20
  describeObject(objectName: string, options?: HttpRequestConfigurableOptions): Observable<SalesforceField[]>;
21
21
  describeField(objectName: string, fieldName: string, options?: HttpRequestConfigurableOptions): Observable<SalesforceField>;
22
22
  describe2<T>(objectName: string, fields: string[], options?: HttpRequestConfigurableOptions): Observable<T>;
23
- apexGetRequest<T>(path: string, params: HttpParams, options?: HttpRequestConfigurableOptions): Observable<T>;
23
+ apexGetRequest<T>(path: string, params: HttpParams | Record<string, any>, options?: HttpRequestConfigurableOptions): Observable<T>;
24
24
  apexPostRequest<T, S>(path: string, body: S, options?: HttpRequestConfigurableOptions): Observable<T>;
25
25
  getGlobalPicklists(): Observable<GlobalPicklist[]>;
26
26
  getGlobalPicklistValues(id: string): Observable<GlobalPicklistValue[]>;
@@ -0,0 +1,24 @@
1
+ import { NewSalesforceOrganization, SalesforceOrganization } from '@veloceapps/core';
2
+ import { Dictionary } from 'lodash';
3
+ import { MessageService } from 'primeng/api';
4
+ import { Observable } from 'rxjs';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SandboxManagerApiService {
7
+ private messageService;
8
+ constructor(messageService: MessageService);
9
+ getSalesforceOrganizations$(): Observable<SalesforceOrganization[]>;
10
+ getAvailableSalesforceOrganizationSizes$(): Observable<Dictionary<number>>;
11
+ createSalesforceOrganization$(payload: NewSalesforceOrganization): Observable<SalesforceOrganization | undefined>;
12
+ updateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
13
+ deleteSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
14
+ activateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
15
+ deactivateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
16
+ /**
17
+ * Shows an error message using the message service.
18
+ *
19
+ * @param {string} message - the error message to be published.
20
+ */
21
+ private publishErrorMessage;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<SandboxManagerApiService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<SandboxManagerApiService>;
24
+ }
@@ -10,7 +10,7 @@ export declare class ScriptsApiService {
10
10
  searchScripts$: (expression: Expression, skip?: number, count?: number) => Observable<Script[]>;
11
11
  fetchScript$: (id: string) => Observable<ScriptDetails>;
12
12
  createScript$: (script: NewScript) => Observable<Script>;
13
- updateScriptMeta$: (script: Script) => Observable<Script>;
13
+ updateScriptMeta$: (script: Script) => Observable<ScriptDetails>;
14
14
  updateScriptDetails$: (script: ScriptDetails) => Observable<ScriptDetails>;
15
15
  cloneScript$: (cloneRequest: CloneRequest) => Observable<string>;
16
16
  removeScript$: (id: string) => Observable<string>;
@@ -1,4 +1,4 @@
1
- import { BaseHttpService, ConfigurationExecuteRequest, ConfigurationExecuteResponse, StatefulConfigurationState } from '@veloceapps/core';
1
+ import { BaseHttpService, ConfigurationExecuteRequest, ConfigurationExecuteResponse, QuoteDraft } from '@veloceapps/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { StatefulConfigurationRequest } from '../types/stateful-configuration.types';
4
4
  import * as i0 from "@angular/core";
@@ -17,7 +17,7 @@ export declare class StatefulConfigurationApiService {
17
17
  * @param id ID
18
18
  * @returns Configuration State
19
19
  */
20
- get(id: string): Observable<StatefulConfigurationState>;
20
+ get(id: string): Observable<QuoteDraft>;
21
21
  /**
22
22
  * Execute actions/selectors
23
23
  * @param id State ID
@@ -42,6 +42,7 @@ export declare class UITemplatesApiService {
42
42
  attachTemplateThumbnail$(templateId: string, file: File): Observable<any>;
43
43
  removeTemplateThumbnail$(templateId: string): Observable<any>;
44
44
  fetchComponentAttachments$: (templateId: string, component: TemplateComponent) => Observable<ComponentAttachments>;
45
+ fetchComponentsAttachments$: (templateId: string) => Observable<ComponentAttachments[]>;
45
46
  private fetchComponentAttachmentFile$;
46
47
  uploadComponentAttachments$: (templateId: string, componentId: string, attachments: ComponentAttachments) => Observable<void>;
47
48
  static ɵfac: i0.ɵɵFactoryDeclaration<UITemplatesApiService, never>;
@@ -1,6 +1,6 @@
1
1
  import { BaseHttpService, Expression, NewVeloceObject, NewVeloceObjectCategory, VeloceObject, VeloceObjectCategory } from '@veloceapps/core';
2
2
  import { Observable } from 'rxjs';
3
- import { QuerySearchParams } from '../types';
3
+ import { CloneRequest, QuerySearchParams } from '../types';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class VeloceObjectsApiService {
6
6
  private baseHttpService;
@@ -16,6 +16,7 @@ export declare class VeloceObjectsApiService {
16
16
  createObject$(object: NewVeloceObject): Observable<VeloceObject>;
17
17
  updateObject$(object: VeloceObject): Observable<VeloceObject>;
18
18
  deleteObject$: (id: string) => Observable<void>;
19
+ duplicateObject$: (body: CloneRequest) => Observable<string>;
19
20
  restoreObject$: (id: string) => Observable<void>;
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<VeloceObjectsApiService, never>;
21
22
  static ɵprov: i0.ɵɵInjectableDeclaration<VeloceObjectsApiService>;
@@ -2,5 +2,6 @@ export * from './auth.types';
2
2
  export * from './clone-request.types';
3
3
  export * from './delta-request.types';
4
4
  export * from './org-info.types';
5
+ export * from './quote.types';
5
6
  export * from './ramp-request.types';
6
7
  export * from './search-request.types';
@@ -23,4 +23,23 @@ export interface OrgInfo {
23
23
  DefaultDataVersion: string;
24
24
  SelfRegistered: boolean;
25
25
  SelfRegisteredExpireAt: string;
26
+ Scratch: boolean;
27
+ }
28
+ export interface AvailableVersionsInfo {
29
+ orgId: string;
30
+ name: string;
31
+ envId: string;
32
+ client: string;
33
+ currentVersion: VersionInfo;
34
+ availableVersions: VersionInfo[];
35
+ }
36
+ export interface VersionInfo {
37
+ release: string;
38
+ integrationVersion?: string;
39
+ componentVersions: ComponentVersionInfo[];
40
+ }
41
+ export interface ComponentVersionInfo {
42
+ name: string;
43
+ displayName: string;
44
+ version: string;
26
45
  }
@@ -0,0 +1,8 @@
1
+ export interface SaveQuoteResponse {
2
+ quoteId: string;
3
+ configurationId?: string;
4
+ }
5
+ export interface SubmitQuoteResponse {
6
+ quoteId: string;
7
+ configurationId?: string;
8
+ }
@@ -4,7 +4,7 @@ interface ConfigurationProcessorOverride {
4
4
  script: string;
5
5
  }
6
6
  export interface StatefulConfigurationRequest {
7
- request: ConfigurationRequest;
7
+ item: ConfigurationRequest;
8
8
  actions?: ConfigurationProcessorOverride[];
9
9
  selectors?: ConfigurationProcessorOverride[];
10
10
  }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Parses the response from Canvas and checks for errors.
3
+ * - If an error is found, publishes an error message and returns the failover value.
4
+ * - If no error is found, returns the parsed response.
5
+ *
6
+ * Note! The API call first goes to APEX before reaching the Canvas, so errors can originate from either APEX or Canvas.
7
+ *
8
+ * @param {string} response - The JSON string response from the Canvas call.
9
+ * @param {T} failover - The value to return in case of error.
10
+ * @returns {T | K} The parsed response or the failover value.
11
+ *
12
+ * @template T The expected type of the parsed response.
13
+ * @template K The type of the failover value.
14
+ *
15
+ * @remarks If there's an Apex error, the response data can be an array.
16
+ * In such cases, the function extracts the first element of the array.
17
+ */
18
+ export declare const handleCanvasResponse: <T, K>(response: string, failover: K, errorPublisher: (message: string) => void) => T | K;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloceapps/api",
3
- "version": "8.0.0-20",
3
+ "version": "8.0.0-201",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "~15.2.0",