@veloceapps/api 12.0.0-18 → 12.0.0-19
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/esm2020/index.mjs +2 -0
- package/esm2020/src/index.mjs +16 -0
- package/esm2020/src/lib/api.module.mjs +60 -0
- package/esm2020/src/lib/services/account-api.service.mjs +87 -0
- package/esm2020/src/lib/services/auth.service.mjs +22 -0
- package/esm2020/src/lib/services/contracted-price-api.service.mjs +45 -0
- package/esm2020/src/lib/services/flow-state-api.mjs +142 -0
- package/esm2020/src/lib/services/offers-api.service.mjs +76 -0
- package/esm2020/src/lib/services/org-info-api.service.mjs +54 -0
- package/esm2020/src/lib/services/portals-api.service.mjs +76 -0
- package/esm2020/src/lib/services/promotions-api.service.mjs +68 -0
- package/esm2020/src/lib/services/rebate-program-api.service.mjs +68 -0
- package/esm2020/src/lib/services/rebate-type-api.service.mjs +68 -0
- package/esm2020/src/lib/services/sandbox-manager-api.service.mjs +94 -0
- package/esm2020/src/lib/services/stateful-configuration-api.mjs +51 -0
- package/esm2020/src/lib/types/auth.types.mjs +2 -0
- package/esm2020/src/lib/types/clone-request.types.mjs +2 -0
- package/esm2020/src/lib/types/delta-request.types.mjs +2 -0
- package/esm2020/src/lib/types/dto/offers-dto.types.mjs +2 -0
- package/esm2020/src/lib/types/index.mjs +6 -0
- package/esm2020/src/lib/types/org-info.types.mjs +2 -0
- package/esm2020/src/lib/types/search-request.types.mjs +2 -0
- package/esm2020/src/lib/types/stateful-configuration.types.mjs +2 -0
- package/esm2020/src/lib/utils/canvas.utils.mjs +33 -0
- package/esm2020/src/lib/utils/index.mjs +2 -0
- package/esm2020/v2/api-v2.module.mjs +70 -0
- package/esm2020/v2/index.mjs +4 -0
- package/esm2020/v2/services/cache-api.service.mjs +22 -0
- package/esm2020/v2/services/catalog-admin-api.service.mjs +192 -0
- package/esm2020/v2/services/catalog-api.service.mjs +90 -0
- package/esm2020/v2/services/configuration-processors-api.service.mjs +38 -0
- package/esm2020/v2/services/configuration-settings-api.service.mjs +89 -0
- package/esm2020/v2/services/context-definition-admin-api.service.mjs +78 -0
- package/esm2020/v2/services/document-attachment-api.service.mjs +66 -0
- package/esm2020/v2/services/endpoints-admin-api.service.mjs +79 -0
- package/esm2020/v2/services/flows-api.service.mjs +29 -0
- package/esm2020/v2/services/functions-admin-api.service.mjs +116 -0
- package/esm2020/v2/services/guided-sellings-admin-api.service.mjs +65 -0
- package/esm2020/v2/services/guided-sellings-api.service.mjs +37 -0
- package/esm2020/v2/services/index.mjs +24 -0
- package/esm2020/v2/services/orchestrations-admin-api.service.mjs +87 -0
- package/esm2020/v2/services/orchestrations-api.service.mjs +23 -0
- package/esm2020/v2/services/pcm-api.service.mjs +38 -0
- package/esm2020/v2/services/picklists-admin-api.service.mjs +41 -0
- package/esm2020/v2/services/products-admin-api.service.mjs +90 -0
- package/esm2020/v2/services/sales-transactions-api.service.mjs +52 -0
- package/esm2020/v2/services/salesforce-api.service.mjs +83 -0
- package/esm2020/v2/services/shopping-cart-settings-api.service.mjs +28 -0
- package/esm2020/v2/services/ui-definitions-admin-api.service.mjs +70 -0
- package/esm2020/v2/services/ui-templates-admin-api.service.mjs +286 -0
- package/esm2020/v2/services/veloce-objects-api.service.mjs +90 -0
- package/esm2020/v2/types/attachment.types.mjs +2 -0
- package/esm2020/v2/types/clone-request.types.mjs +2 -0
- package/esm2020/v2/types/dto/configuration-settings-dto.types.mjs +22 -0
- package/esm2020/v2/types/dto/ui-definition-dto.types.mjs +2 -0
- package/esm2020/v2/types/dto/ui-template-dto.types.mjs +2 -0
- package/esm2020/v2/types/function.types.mjs +2 -0
- package/esm2020/v2/types/index.mjs +7 -0
- package/esm2020/v2/types/pcm.types.mjs +2 -0
- package/esm2020/v2/types/procedure.types.mjs +2 -0
- package/esm2020/v2/types/sales-transaction.types.mjs +2 -0
- package/esm2020/v2/types/search-request.types.mjs +2 -0
- package/esm2020/v2/utils/ui-definition.utils.mjs +23 -0
- package/esm2020/v2/utils/ui-template.utils.mjs +13 -0
- package/esm2020/v2/veloceapps-api-v2.mjs +5 -0
- package/esm2020/veloceapps-api.mjs +5 -0
- package/fesm2015/veloceapps-api-v2.mjs +1726 -0
- package/fesm2015/veloceapps-api-v2.mjs.map +1 -0
- package/fesm2015/veloceapps-api.mjs +853 -0
- package/fesm2015/veloceapps-api.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/veloceapps-api-v2.mjs +127 -128
- package/fesm2020/veloceapps-api-v2.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/veloceapps-api.mjs +70 -70
- package/fesm2020/veloceapps-api.mjs.map +1 -0
- package/index.d.ts +1 -382
- package/package.json +19 -7
- package/src/index.d.ts +15 -0
- package/src/lib/api.module.d.ts +8 -0
- package/src/lib/services/account-api.service.d.ts +23 -0
- package/src/lib/services/auth.service.d.ts +11 -0
- package/src/lib/services/contracted-price-api.service.d.ts +16 -0
- package/src/lib/services/flow-state-api.d.ts +84 -0
- package/src/lib/services/offers-api.service.d.ts +19 -0
- package/src/lib/services/org-info-api.service.d.ts +19 -0
- package/src/lib/services/portals-api.service.d.ts +20 -0
- package/src/lib/services/promotions-api.service.d.ts +19 -0
- package/src/lib/services/rebate-program-api.service.d.ts +19 -0
- package/src/lib/services/rebate-type-api.service.d.ts +19 -0
- package/src/lib/services/sandbox-manager-api.service.d.ts +24 -0
- package/src/lib/services/stateful-configuration-api.d.ts +30 -0
- package/src/lib/types/auth.types.d.ts +4 -0
- package/src/lib/types/clone-request.types.d.ts +5 -0
- package/src/lib/types/delta-request.types.d.ts +5 -0
- package/src/lib/types/dto/offers-dto.types.d.ts +9 -0
- package/src/lib/types/index.d.ts +5 -0
- package/src/lib/types/org-info.types.d.ts +43 -0
- package/src/lib/types/search-request.types.d.ts +8 -0
- package/src/lib/types/stateful-configuration.types.d.ts +10 -0
- package/src/lib/utils/canvas.utils.d.ts +18 -0
- package/src/lib/utils/index.d.ts +1 -0
- package/v2/api-v2.module.d.ts +7 -0
- package/v2/index.d.ts +3 -562
- package/v2/services/cache-api.service.d.ts +11 -0
- package/v2/services/catalog-admin-api.service.d.ts +39 -0
- package/v2/services/catalog-api.service.d.ts +20 -0
- package/v2/services/configuration-processors-api.service.d.ts +14 -0
- package/v2/services/configuration-settings-api.service.d.ts +18 -0
- package/v2/services/context-definition-admin-api.service.d.ts +16 -0
- package/v2/services/document-attachment-api.service.d.ts +17 -0
- package/v2/services/endpoints-admin-api.service.d.ts +20 -0
- package/v2/services/flows-api.service.d.ts +13 -0
- package/v2/services/functions-admin-api.service.d.ts +25 -0
- package/v2/services/guided-sellings-admin-api.service.d.ts +20 -0
- package/v2/services/guided-sellings-api.service.d.ts +13 -0
- package/v2/services/index.d.ts +23 -0
- package/v2/services/orchestrations-admin-api.service.d.ts +21 -0
- package/v2/services/orchestrations-api.service.d.ts +12 -0
- package/v2/services/pcm-api.service.d.ts +12 -0
- package/v2/services/picklists-admin-api.service.d.ts +17 -0
- package/v2/services/products-admin-api.service.d.ts +21 -0
- package/v2/services/sales-transactions-api.service.d.ts +26 -0
- package/v2/services/salesforce-api.service.d.ts +26 -0
- package/v2/services/shopping-cart-settings-api.service.d.ts +14 -0
- package/v2/services/ui-definitions-admin-api.service.d.ts +18 -0
- package/v2/services/ui-templates-admin-api.service.d.ts +50 -0
- package/v2/services/veloce-objects-api.service.d.ts +23 -0
- package/v2/types/attachment.types.d.ts +4 -0
- package/v2/types/clone-request.types.d.ts +5 -0
- package/v2/types/dto/configuration-settings-dto.types.d.ts +9 -0
- package/v2/types/dto/ui-definition-dto.types.d.ts +7 -0
- package/v2/types/dto/ui-template-dto.types.d.ts +6 -0
- package/v2/types/function.types.d.ts +14 -0
- package/v2/types/index.d.ts +6 -0
- package/v2/types/pcm.types.d.ts +10 -0
- package/v2/types/procedure.types.d.ts +61 -0
- package/v2/types/sales-transaction.types.d.ts +13 -0
- package/v2/types/search-request.types.d.ts +8 -0
- package/v2/utils/ui-definition.utils.d.ts +5 -0
- package/v2/utils/ui-template.utils.d.ts +3 -0
- package/fesm2022/veloceapps-api-v2.mjs.map +0 -1
- package/fesm2022/veloceapps-api.mjs.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseHttpService, Expression, NewPromotion, Promotion } from '@veloceapps/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CloneRequest } from '../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class PromotionsApiService {
|
|
6
|
+
private baseHttpService;
|
|
7
|
+
private readonly serviceUrl;
|
|
8
|
+
constructor(baseHttpService: BaseHttpService);
|
|
9
|
+
fetchAll$: () => Observable<Promotion>;
|
|
10
|
+
search$(expression: Expression, skip?: number, count?: number): Observable<Promotion[]>;
|
|
11
|
+
fetchOne$: (id: string) => Observable<Promotion>;
|
|
12
|
+
create$(body: NewPromotion): Observable<Promotion>;
|
|
13
|
+
update$(body: Promotion): Observable<Promotion>;
|
|
14
|
+
remove$: (id: string) => Observable<string>;
|
|
15
|
+
restore$: (id: string) => Observable<void>;
|
|
16
|
+
duplicate$: (body: CloneRequest) => Observable<string>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromotionsApiService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PromotionsApiService>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseHttpService, Expression, NewRebateProgram, RebateProgram } from '@veloceapps/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CloneRequest } from '../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class RebateProgramApiService {
|
|
6
|
+
private baseHttpService;
|
|
7
|
+
private readonly serviceUrl;
|
|
8
|
+
constructor(baseHttpService: BaseHttpService);
|
|
9
|
+
fetchAll$: () => Observable<RebateProgram[]>;
|
|
10
|
+
search$(expression: Expression, skip?: number, count?: number): Observable<RebateProgram[]>;
|
|
11
|
+
fetchOne$: (id: string) => Observable<RebateProgram>;
|
|
12
|
+
create$(body: NewRebateProgram): Observable<RebateProgram>;
|
|
13
|
+
update$(body: RebateProgram): Observable<RebateProgram>;
|
|
14
|
+
remove$: (id: string) => Observable<string>;
|
|
15
|
+
restore$: (id: string) => Observable<void>;
|
|
16
|
+
duplicate$: (body: CloneRequest) => Observable<string>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RebateProgramApiService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RebateProgramApiService>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseHttpService, Expression, NewRebateType, RebateType } from '@veloceapps/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CloneRequest } from '../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class RebateTypeApiService {
|
|
6
|
+
private baseHttpService;
|
|
7
|
+
private readonly serviceUrl;
|
|
8
|
+
constructor(baseHttpService: BaseHttpService);
|
|
9
|
+
fetchAll$: () => Observable<RebateType>;
|
|
10
|
+
search$(expression: Expression, skip?: number, count?: number): Observable<RebateType[]>;
|
|
11
|
+
fetchOne$: (id: string) => Observable<RebateType>;
|
|
12
|
+
create$(body: NewRebateType): Observable<RebateType>;
|
|
13
|
+
update$(body: RebateType): Observable<RebateType>;
|
|
14
|
+
remove$: (id: string) => Observable<string>;
|
|
15
|
+
restore$: (id: string) => Observable<void>;
|
|
16
|
+
duplicate$: (body: CloneRequest) => Observable<string>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RebateTypeApiService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RebateTypeApiService>;
|
|
19
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseHttpService, ConfigurationExecuteRequest, ConfigurationExecuteResponse, QuoteDraft } 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<QuoteDraft>;
|
|
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,9 @@
|
|
|
1
|
+
import { OfferProduct } from '@veloceapps/core';
|
|
2
|
+
export interface OfferProductsUpsertRequest {
|
|
3
|
+
products: (OfferProductNew | OfferProductUpdate)[];
|
|
4
|
+
}
|
|
5
|
+
export interface OfferProductsUpsertResponse {
|
|
6
|
+
products: OfferProduct[];
|
|
7
|
+
}
|
|
8
|
+
export type OfferProductNew = Pick<OfferProduct, 'productId' | 'portName' | 'portOwner' | 'priceAdjustment'>;
|
|
9
|
+
export type OfferProductUpdate = Pick<OfferProduct, 'id' | 'productId' | 'portName' | 'portOwner' | 'priceAdjustment'>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface OrgInfo {
|
|
2
|
+
Name: string;
|
|
3
|
+
EnvID: string;
|
|
4
|
+
Client: string;
|
|
5
|
+
Prefix: string;
|
|
6
|
+
Deleted: boolean;
|
|
7
|
+
OrgID: string;
|
|
8
|
+
BackendURL: string;
|
|
9
|
+
FrontendURL: string;
|
|
10
|
+
StudioURL: string;
|
|
11
|
+
IntegrationURL: string;
|
|
12
|
+
ShoppingCartURL: string;
|
|
13
|
+
CatalogURL: string;
|
|
14
|
+
DefaultDataURL: string;
|
|
15
|
+
BackendVersion: string;
|
|
16
|
+
FrontendVersion: string;
|
|
17
|
+
StudioVersion: string;
|
|
18
|
+
IntegrationVersion: string;
|
|
19
|
+
ShoppingCartVersion: string;
|
|
20
|
+
CatalogVersion: string;
|
|
21
|
+
DefaultDataVersion: string;
|
|
22
|
+
SelfRegistered: boolean;
|
|
23
|
+
SelfRegisteredExpireAt: string;
|
|
24
|
+
Scratch: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface AvailableVersionsInfo {
|
|
27
|
+
orgId: string;
|
|
28
|
+
name: string;
|
|
29
|
+
envId: string;
|
|
30
|
+
client: string;
|
|
31
|
+
currentVersion: VersionInfo;
|
|
32
|
+
availableVersions: VersionInfo[];
|
|
33
|
+
}
|
|
34
|
+
export interface VersionInfo {
|
|
35
|
+
release: string;
|
|
36
|
+
integrationVersion?: string;
|
|
37
|
+
componentVersions: ComponentVersionInfo[];
|
|
38
|
+
}
|
|
39
|
+
export interface ComponentVersionInfo {
|
|
40
|
+
name: string;
|
|
41
|
+
displayName: string;
|
|
42
|
+
version: string;
|
|
43
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './canvas.utils';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common/http";
|
|
3
|
+
export declare class ApiV2Module {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiV2Module, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ApiV2Module, never, [typeof i1.HttpClientModule], never>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ApiV2Module>;
|
|
7
|
+
}
|