@veloceapps/api 12.0.0-12 → 12.0.0-14
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/{fesm2020 → fesm2022}/veloceapps-api-v2.mjs +128 -127
- package/fesm2022/veloceapps-api-v2.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/veloceapps-api.mjs +70 -70
- package/fesm2022/veloceapps-api.mjs.map +1 -0
- package/index.d.ts +382 -1
- package/package.json +7 -19
- package/v2/index.d.ts +562 -3
- package/esm2020/index.mjs +0 -2
- package/esm2020/src/index.mjs +0 -16
- package/esm2020/src/lib/api.module.mjs +0 -60
- package/esm2020/src/lib/services/account-api.service.mjs +0 -87
- package/esm2020/src/lib/services/auth.service.mjs +0 -22
- package/esm2020/src/lib/services/contracted-price-api.service.mjs +0 -45
- package/esm2020/src/lib/services/flow-state-api.mjs +0 -142
- package/esm2020/src/lib/services/offers-api.service.mjs +0 -76
- package/esm2020/src/lib/services/org-info-api.service.mjs +0 -54
- package/esm2020/src/lib/services/portals-api.service.mjs +0 -76
- package/esm2020/src/lib/services/promotions-api.service.mjs +0 -68
- package/esm2020/src/lib/services/rebate-program-api.service.mjs +0 -68
- package/esm2020/src/lib/services/rebate-type-api.service.mjs +0 -68
- package/esm2020/src/lib/services/sandbox-manager-api.service.mjs +0 -94
- package/esm2020/src/lib/services/stateful-configuration-api.mjs +0 -51
- package/esm2020/src/lib/types/auth.types.mjs +0 -2
- package/esm2020/src/lib/types/clone-request.types.mjs +0 -2
- package/esm2020/src/lib/types/delta-request.types.mjs +0 -2
- package/esm2020/src/lib/types/dto/offers-dto.types.mjs +0 -2
- package/esm2020/src/lib/types/index.mjs +0 -6
- package/esm2020/src/lib/types/org-info.types.mjs +0 -2
- package/esm2020/src/lib/types/search-request.types.mjs +0 -2
- package/esm2020/src/lib/types/stateful-configuration.types.mjs +0 -2
- package/esm2020/src/lib/utils/canvas.utils.mjs +0 -33
- package/esm2020/src/lib/utils/index.mjs +0 -2
- package/esm2020/v2/api-v2.module.mjs +0 -70
- package/esm2020/v2/index.mjs +0 -4
- package/esm2020/v2/services/cache-api.service.mjs +0 -22
- package/esm2020/v2/services/catalog-admin-api.service.mjs +0 -192
- package/esm2020/v2/services/catalog-api.service.mjs +0 -90
- package/esm2020/v2/services/configuration-processors-api.service.mjs +0 -38
- package/esm2020/v2/services/configuration-settings-api.service.mjs +0 -89
- package/esm2020/v2/services/context-definition-admin-api.service.mjs +0 -78
- package/esm2020/v2/services/document-attachment-api.service.mjs +0 -66
- package/esm2020/v2/services/endpoints-admin-api.service.mjs +0 -79
- package/esm2020/v2/services/flows-api.service.mjs +0 -29
- package/esm2020/v2/services/functions-admin-api.service.mjs +0 -116
- package/esm2020/v2/services/guided-sellings-admin-api.service.mjs +0 -65
- package/esm2020/v2/services/guided-sellings-api.service.mjs +0 -37
- package/esm2020/v2/services/index.mjs +0 -24
- package/esm2020/v2/services/orchestrations-admin-api.service.mjs +0 -87
- package/esm2020/v2/services/orchestrations-api.service.mjs +0 -23
- package/esm2020/v2/services/pcm-api.service.mjs +0 -38
- package/esm2020/v2/services/picklists-admin-api.service.mjs +0 -41
- package/esm2020/v2/services/products-admin-api.service.mjs +0 -90
- package/esm2020/v2/services/sales-transactions-api.service.mjs +0 -52
- package/esm2020/v2/services/salesforce-api.service.mjs +0 -83
- package/esm2020/v2/services/shopping-cart-settings-api.service.mjs +0 -28
- package/esm2020/v2/services/ui-definitions-admin-api.service.mjs +0 -70
- package/esm2020/v2/services/ui-templates-admin-api.service.mjs +0 -286
- package/esm2020/v2/services/veloce-objects-api.service.mjs +0 -90
- package/esm2020/v2/types/attachment.types.mjs +0 -2
- package/esm2020/v2/types/clone-request.types.mjs +0 -2
- package/esm2020/v2/types/dto/configuration-settings-dto.types.mjs +0 -22
- package/esm2020/v2/types/dto/ui-definition-dto.types.mjs +0 -2
- package/esm2020/v2/types/dto/ui-template-dto.types.mjs +0 -2
- package/esm2020/v2/types/event-logs.types.mjs +0 -2
- package/esm2020/v2/types/function.types.mjs +0 -2
- package/esm2020/v2/types/index.mjs +0 -8
- package/esm2020/v2/types/pcm.types.mjs +0 -2
- package/esm2020/v2/types/procedure.types.mjs +0 -2
- package/esm2020/v2/types/sales-transaction.types.mjs +0 -2
- package/esm2020/v2/types/search-request.types.mjs +0 -2
- package/esm2020/v2/utils/ui-definition.utils.mjs +0 -23
- package/esm2020/v2/utils/ui-template.utils.mjs +0 -13
- package/esm2020/v2/veloceapps-api-v2.mjs +0 -5
- package/esm2020/veloceapps-api.mjs +0 -5
- package/fesm2015/veloceapps-api-v2.mjs +0 -1726
- package/fesm2015/veloceapps-api-v2.mjs.map +0 -1
- package/fesm2015/veloceapps-api.mjs +0 -853
- package/fesm2015/veloceapps-api.mjs.map +0 -1
- package/fesm2020/veloceapps-api-v2.mjs.map +0 -1
- package/fesm2020/veloceapps-api.mjs.map +0 -1
- package/src/index.d.ts +0 -15
- package/src/lib/api.module.d.ts +0 -8
- package/src/lib/services/account-api.service.d.ts +0 -23
- package/src/lib/services/auth.service.d.ts +0 -11
- package/src/lib/services/contracted-price-api.service.d.ts +0 -16
- package/src/lib/services/flow-state-api.d.ts +0 -84
- package/src/lib/services/offers-api.service.d.ts +0 -19
- package/src/lib/services/org-info-api.service.d.ts +0 -19
- package/src/lib/services/portals-api.service.d.ts +0 -20
- package/src/lib/services/promotions-api.service.d.ts +0 -19
- package/src/lib/services/rebate-program-api.service.d.ts +0 -19
- package/src/lib/services/rebate-type-api.service.d.ts +0 -19
- package/src/lib/services/sandbox-manager-api.service.d.ts +0 -24
- package/src/lib/services/stateful-configuration-api.d.ts +0 -30
- package/src/lib/types/auth.types.d.ts +0 -4
- package/src/lib/types/clone-request.types.d.ts +0 -5
- package/src/lib/types/delta-request.types.d.ts +0 -5
- package/src/lib/types/dto/offers-dto.types.d.ts +0 -9
- package/src/lib/types/index.d.ts +0 -5
- package/src/lib/types/org-info.types.d.ts +0 -43
- package/src/lib/types/search-request.types.d.ts +0 -8
- package/src/lib/types/stateful-configuration.types.d.ts +0 -10
- package/src/lib/utils/canvas.utils.d.ts +0 -18
- package/src/lib/utils/index.d.ts +0 -1
- package/v2/api-v2.module.d.ts +0 -7
- package/v2/services/cache-api.service.d.ts +0 -11
- package/v2/services/catalog-admin-api.service.d.ts +0 -39
- package/v2/services/catalog-api.service.d.ts +0 -20
- package/v2/services/configuration-processors-api.service.d.ts +0 -14
- package/v2/services/configuration-settings-api.service.d.ts +0 -18
- package/v2/services/context-definition-admin-api.service.d.ts +0 -16
- package/v2/services/document-attachment-api.service.d.ts +0 -17
- package/v2/services/endpoints-admin-api.service.d.ts +0 -20
- package/v2/services/flows-api.service.d.ts +0 -13
- package/v2/services/functions-admin-api.service.d.ts +0 -25
- package/v2/services/guided-sellings-admin-api.service.d.ts +0 -20
- package/v2/services/guided-sellings-api.service.d.ts +0 -13
- package/v2/services/index.d.ts +0 -23
- package/v2/services/orchestrations-admin-api.service.d.ts +0 -21
- package/v2/services/orchestrations-api.service.d.ts +0 -12
- package/v2/services/pcm-api.service.d.ts +0 -12
- package/v2/services/picklists-admin-api.service.d.ts +0 -17
- package/v2/services/products-admin-api.service.d.ts +0 -21
- package/v2/services/sales-transactions-api.service.d.ts +0 -26
- package/v2/services/salesforce-api.service.d.ts +0 -26
- package/v2/services/shopping-cart-settings-api.service.d.ts +0 -14
- package/v2/services/ui-definitions-admin-api.service.d.ts +0 -18
- package/v2/services/ui-templates-admin-api.service.d.ts +0 -50
- package/v2/services/veloce-objects-api.service.d.ts +0 -23
- package/v2/types/attachment.types.d.ts +0 -4
- package/v2/types/clone-request.types.d.ts +0 -5
- package/v2/types/dto/configuration-settings-dto.types.d.ts +0 -9
- package/v2/types/dto/ui-definition-dto.types.d.ts +0 -7
- package/v2/types/dto/ui-template-dto.types.d.ts +0 -6
- package/v2/types/event-logs.types.d.ts +0 -9
- package/v2/types/function.types.d.ts +0 -17
- package/v2/types/index.d.ts +0 -7
- package/v2/types/pcm.types.d.ts +0 -10
- package/v2/types/procedure.types.d.ts +0 -61
- package/v2/types/sales-transaction.types.d.ts +0 -13
- package/v2/types/search-request.types.d.ts +0 -8
- package/v2/utils/ui-definition.utils.d.ts +0 -5
- package/v2/utils/ui-template.utils.d.ts +0 -3
package/index.d.ts
CHANGED
@@ -1 +1,382 @@
|
|
1
|
-
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import * as i1 from '@angular/common/http';
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
4
|
+
import * as i2 from '@veloceapps/api/v2';
|
5
|
+
import { LineItem, BaseHttpService, HttpRequestConfigurableOptions, Account, AccountAssetsState, Order, Quote, ContractedPrice, NewContractedPrice, Expression, GuidedSelling, FlowStateInitRequest, FlowStateInitResponse, FlowState, FlowStateExecutionRequestDTO, FlowStateExecutionResult, ConfigurationStateNewRequest, ConfigurationStateStartRequest, ConfigurationStateExecuteRequest, NewOffer, Offer, OfferProduct, NewOfferProduct, NewPortal, Portal, PortalCustomization, Promotion, NewPromotion, RebateProgram, NewRebateProgram, RebateType, NewRebateType, SalesforceOrganization, NewSalesforceOrganization, QuoteDraft, ConfigurationExecuteRequest, ConfigurationExecuteResponse } from '@veloceapps/core';
|
6
|
+
import { Observable } from 'rxjs';
|
7
|
+
import { MessageService } from 'primeng/api';
|
8
|
+
import { Dictionary } from 'lodash';
|
9
|
+
|
10
|
+
declare class ApiModule {
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiModule, never>;
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ApiModule, never, [typeof i1.HttpClientModule, typeof i2.ApiV2Module], never>;
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ApiModule>;
|
14
|
+
}
|
15
|
+
|
16
|
+
interface VeloceAuthResponse {
|
17
|
+
token: string;
|
18
|
+
serverUrl: string;
|
19
|
+
}
|
20
|
+
|
21
|
+
interface CloneRequest {
|
22
|
+
id: string;
|
23
|
+
propertiesToOverride: Dictionary<any>;
|
24
|
+
}
|
25
|
+
|
26
|
+
interface CalculateDeltaRequest {
|
27
|
+
initialState: LineItem[];
|
28
|
+
currentState: LineItem[];
|
29
|
+
}
|
30
|
+
|
31
|
+
interface OrgInfo {
|
32
|
+
Name: string;
|
33
|
+
EnvID: string;
|
34
|
+
Client: string;
|
35
|
+
Prefix: string;
|
36
|
+
Deleted: boolean;
|
37
|
+
OrgID: string;
|
38
|
+
BackendURL: string;
|
39
|
+
FrontendURL: string;
|
40
|
+
StudioURL: string;
|
41
|
+
IntegrationURL: string;
|
42
|
+
ShoppingCartURL: string;
|
43
|
+
CatalogURL: string;
|
44
|
+
DefaultDataURL: string;
|
45
|
+
BackendVersion: string;
|
46
|
+
FrontendVersion: string;
|
47
|
+
StudioVersion: string;
|
48
|
+
IntegrationVersion: string;
|
49
|
+
ShoppingCartVersion: string;
|
50
|
+
CatalogVersion: string;
|
51
|
+
DefaultDataVersion: string;
|
52
|
+
SelfRegistered: boolean;
|
53
|
+
SelfRegisteredExpireAt: string;
|
54
|
+
Scratch: boolean;
|
55
|
+
}
|
56
|
+
interface AvailableVersionsInfo {
|
57
|
+
orgId: string;
|
58
|
+
name: string;
|
59
|
+
envId: string;
|
60
|
+
client: string;
|
61
|
+
currentVersion: VersionInfo;
|
62
|
+
availableVersions: VersionInfo[];
|
63
|
+
}
|
64
|
+
interface VersionInfo {
|
65
|
+
release: string;
|
66
|
+
integrationVersion?: string;
|
67
|
+
componentVersions: ComponentVersionInfo[];
|
68
|
+
}
|
69
|
+
interface ComponentVersionInfo {
|
70
|
+
name: string;
|
71
|
+
displayName: string;
|
72
|
+
version: string;
|
73
|
+
}
|
74
|
+
|
75
|
+
type QuerySearchParams = {
|
76
|
+
skip?: number;
|
77
|
+
count?: number;
|
78
|
+
sort?: string;
|
79
|
+
asc?: boolean;
|
80
|
+
} & {
|
81
|
+
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
82
|
+
};
|
83
|
+
|
84
|
+
declare class AccountApiService {
|
85
|
+
private httpService;
|
86
|
+
private readonly SERVICE_URL;
|
87
|
+
constructor(httpService: BaseHttpService);
|
88
|
+
getAccounts$(options?: HttpRequestConfigurableOptions): Observable<Account[]>;
|
89
|
+
searchAccounts$(searchParams?: QuerySearchParams, options?: HttpRequestConfigurableOptions): Observable<Account[]>;
|
90
|
+
getAccount$(id: string, options?: HttpRequestConfigurableOptions): Observable<Account>;
|
91
|
+
getAssetsState(accountId: string, options?: HttpRequestConfigurableOptions): Observable<AccountAssetsState>;
|
92
|
+
getAssets(accountId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem[]>;
|
93
|
+
getOrders(accountId: string, options?: HttpRequestConfigurableOptions): Observable<Order[]>;
|
94
|
+
getQuotes(accountId: string, options?: HttpRequestConfigurableOptions): Observable<Quote[]>;
|
95
|
+
getAsset(accountId: string, assetId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem>;
|
96
|
+
getOrder(accountId: string, orderId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem[]>;
|
97
|
+
getQuote(accountId: string, quoteId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem[]>;
|
98
|
+
quoteToOrder(accountId: string, quoteId: string, options?: HttpRequestConfigurableOptions): Observable<any>;
|
99
|
+
orderToAsset(accountId: string, orderId: string, options?: HttpRequestConfigurableOptions): Observable<any>;
|
100
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AccountApiService, never>;
|
101
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AccountApiService>;
|
102
|
+
}
|
103
|
+
|
104
|
+
declare class VeloceAuthService {
|
105
|
+
private http;
|
106
|
+
constructor(http: HttpClient);
|
107
|
+
auth$(instanceUrl: string, accessToken: string): Observable<VeloceAuthResponse>;
|
108
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VeloceAuthService, never>;
|
109
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VeloceAuthService>;
|
110
|
+
}
|
111
|
+
|
112
|
+
declare class ContractedPriceApiService {
|
113
|
+
private baseHttpService;
|
114
|
+
private readonly serviceUrl;
|
115
|
+
constructor(baseHttpService: BaseHttpService);
|
116
|
+
fetchContractedPrices$: () => Observable<ContractedPrice[]>;
|
117
|
+
fetchContractedPrice$: (id: string) => Observable<ContractedPrice>;
|
118
|
+
createContractedPrice$: (data: NewContractedPrice) => Observable<ContractedPrice>;
|
119
|
+
updateContractedPrice$: (data: ContractedPrice) => Observable<ContractedPrice>;
|
120
|
+
searchContractedPrices$: (searchParams?: QuerySearchParams, expression?: Expression) => Observable<GuidedSelling[]>;
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContractedPriceApiService, never>;
|
122
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ContractedPriceApiService>;
|
123
|
+
}
|
124
|
+
|
125
|
+
declare class FlowStateApiService {
|
126
|
+
private httpService;
|
127
|
+
private readonly SERVICE_URL;
|
128
|
+
constructor(httpService: BaseHttpService);
|
129
|
+
/**
|
130
|
+
* Initialize flow state
|
131
|
+
* @param request Request
|
132
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
133
|
+
*/
|
134
|
+
init(request: FlowStateInitRequest): Observable<FlowStateInitResponse>;
|
135
|
+
/**
|
136
|
+
* Get existing state by ID
|
137
|
+
* @param id ID
|
138
|
+
* @returns Flow State
|
139
|
+
*/
|
140
|
+
get(id: string): Observable<FlowState>;
|
141
|
+
/**
|
142
|
+
* Execute actions/selectors
|
143
|
+
* @param id State ID
|
144
|
+
* @param request Request
|
145
|
+
* @returns Execute result
|
146
|
+
*/
|
147
|
+
execute(id: string, request: FlowStateExecutionRequestDTO): Observable<FlowStateExecutionResult>;
|
148
|
+
/**
|
149
|
+
* Save Quote in the state
|
150
|
+
* @param id State ID
|
151
|
+
*/
|
152
|
+
save(id: string): Observable<{
|
153
|
+
quoteId: string;
|
154
|
+
}>;
|
155
|
+
/**
|
156
|
+
* Submit Quote in the state
|
157
|
+
* @param id State ID
|
158
|
+
*/
|
159
|
+
submit(id: string): Observable<{
|
160
|
+
quoteId: string;
|
161
|
+
}>;
|
162
|
+
/**
|
163
|
+
* Close Flow state
|
164
|
+
* @param id State ID
|
165
|
+
*/
|
166
|
+
cancel(id: string): Observable<void>;
|
167
|
+
/**
|
168
|
+
* Initialize stateful configuration
|
169
|
+
* @param stateId string
|
170
|
+
* @param request Request
|
171
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
172
|
+
*/
|
173
|
+
newConfiguration(stateId: string, request: ConfigurationStateNewRequest): Observable<FlowStateExecutionResult>;
|
174
|
+
/**
|
175
|
+
* Start stateful configuration
|
176
|
+
* @param stateId string
|
177
|
+
* @param request Request
|
178
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
179
|
+
*/
|
180
|
+
startConfiguration(stateId: string, request: ConfigurationStateStartRequest): Observable<FlowStateExecutionResult>;
|
181
|
+
/**
|
182
|
+
* Execute stateful configuration
|
183
|
+
* @param stateId string
|
184
|
+
* @param configurationId string
|
185
|
+
* @param request Request
|
186
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
187
|
+
*/
|
188
|
+
executeConfiguration(stateId: string, configurationId: string, request: ConfigurationStateExecuteRequest): Observable<FlowStateExecutionResult>;
|
189
|
+
/**
|
190
|
+
* Save stateful configuration
|
191
|
+
* @param stateId string
|
192
|
+
* @param configurationId string
|
193
|
+
*/
|
194
|
+
saveConfiguration(stateId: string, configurationId: string): Observable<{
|
195
|
+
quoteId: string;
|
196
|
+
}>;
|
197
|
+
/**
|
198
|
+
* Cancel stateful configuration
|
199
|
+
* @param stateId string
|
200
|
+
* @param configurationId string
|
201
|
+
*/
|
202
|
+
cancelConfiguration(stateId: string, configurationId: string): Observable<void>;
|
203
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowStateApiService, never>;
|
204
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FlowStateApiService>;
|
205
|
+
}
|
206
|
+
|
207
|
+
declare class OffersApiService {
|
208
|
+
private baseHttpService;
|
209
|
+
static MAX_RESULTS: number;
|
210
|
+
private readonly serviceUrl;
|
211
|
+
constructor(baseHttpService: BaseHttpService);
|
212
|
+
createOffer$(body: NewOffer): Observable<Offer>;
|
213
|
+
fetchOffers$(): Observable<Offer[]>;
|
214
|
+
fetchOffer$(id: string): Observable<Offer>;
|
215
|
+
updateOffer$(offer: Offer): Observable<Offer>;
|
216
|
+
removeOffer$(id: string): Observable<void>;
|
217
|
+
searchOffers$(expression: Expression, skip: number, count: number): Observable<Offer[]>;
|
218
|
+
fetchOfferProducts$(id: string): Observable<OfferProduct[]>;
|
219
|
+
upsertOfferProducts$(id: string, products: (OfferProduct | NewOfferProduct)[]): Observable<OfferProduct[]>;
|
220
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OffersApiService, never>;
|
221
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OffersApiService>;
|
222
|
+
}
|
223
|
+
|
224
|
+
declare class OrgInfoApiService {
|
225
|
+
private messageService;
|
226
|
+
constructor(messageService: MessageService);
|
227
|
+
getOrgInfo$(): Observable<OrgInfo | undefined>;
|
228
|
+
getAvailableVersionsInfo$(): Observable<AvailableVersionsInfo | undefined>;
|
229
|
+
upgradeVersion$(targetVersion: string): Observable<OrgInfo | undefined>;
|
230
|
+
/**
|
231
|
+
* Shows an error message using the message service.
|
232
|
+
*
|
233
|
+
* @param {string} message - the error message to be published.
|
234
|
+
*/
|
235
|
+
private publishErrorMessage;
|
236
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrgInfoApiService, never>;
|
237
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OrgInfoApiService>;
|
238
|
+
}
|
239
|
+
|
240
|
+
declare class PortalsApiService {
|
241
|
+
private baseHttpService;
|
242
|
+
static MAX_RESULTS: number;
|
243
|
+
private readonly serviceUrl;
|
244
|
+
constructor(baseHttpService: BaseHttpService);
|
245
|
+
createNewPortal$(body: NewPortal): Observable<Portal>;
|
246
|
+
updatePortal$(portal: Portal, settings: PortalCustomization): Observable<Portal>;
|
247
|
+
getPortals$: (skip?: number, name?: string) => Observable<Portal[]>;
|
248
|
+
searchPortals$: (skip?: number, expression?: Expression) => Observable<Portal[]>;
|
249
|
+
removePortal$: (id: string) => Observable<string>;
|
250
|
+
restore$: (id: string) => Observable<void>;
|
251
|
+
duplicatePortal$: (cloneRequest: CloneRequest) => Observable<string>;
|
252
|
+
getPortal$: (id: string) => Observable<Portal>;
|
253
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PortalsApiService, never>;
|
254
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PortalsApiService>;
|
255
|
+
}
|
256
|
+
|
257
|
+
declare class PromotionsApiService {
|
258
|
+
private baseHttpService;
|
259
|
+
private readonly serviceUrl;
|
260
|
+
constructor(baseHttpService: BaseHttpService);
|
261
|
+
fetchAll$: () => Observable<Promotion>;
|
262
|
+
search$(expression: Expression, skip?: number, count?: number): Observable<Promotion[]>;
|
263
|
+
fetchOne$: (id: string) => Observable<Promotion>;
|
264
|
+
create$(body: NewPromotion): Observable<Promotion>;
|
265
|
+
update$(body: Promotion): Observable<Promotion>;
|
266
|
+
remove$: (id: string) => Observable<string>;
|
267
|
+
restore$: (id: string) => Observable<void>;
|
268
|
+
duplicate$: (body: CloneRequest) => Observable<string>;
|
269
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromotionsApiService, never>;
|
270
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PromotionsApiService>;
|
271
|
+
}
|
272
|
+
|
273
|
+
declare class RebateProgramApiService {
|
274
|
+
private baseHttpService;
|
275
|
+
private readonly serviceUrl;
|
276
|
+
constructor(baseHttpService: BaseHttpService);
|
277
|
+
fetchAll$: () => Observable<RebateProgram[]>;
|
278
|
+
search$(expression: Expression, skip?: number, count?: number): Observable<RebateProgram[]>;
|
279
|
+
fetchOne$: (id: string) => Observable<RebateProgram>;
|
280
|
+
create$(body: NewRebateProgram): Observable<RebateProgram>;
|
281
|
+
update$(body: RebateProgram): Observable<RebateProgram>;
|
282
|
+
remove$: (id: string) => Observable<string>;
|
283
|
+
restore$: (id: string) => Observable<void>;
|
284
|
+
duplicate$: (body: CloneRequest) => Observable<string>;
|
285
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RebateProgramApiService, never>;
|
286
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RebateProgramApiService>;
|
287
|
+
}
|
288
|
+
|
289
|
+
declare class RebateTypeApiService {
|
290
|
+
private baseHttpService;
|
291
|
+
private readonly serviceUrl;
|
292
|
+
constructor(baseHttpService: BaseHttpService);
|
293
|
+
fetchAll$: () => Observable<RebateType>;
|
294
|
+
search$(expression: Expression, skip?: number, count?: number): Observable<RebateType[]>;
|
295
|
+
fetchOne$: (id: string) => Observable<RebateType>;
|
296
|
+
create$(body: NewRebateType): Observable<RebateType>;
|
297
|
+
update$(body: RebateType): Observable<RebateType>;
|
298
|
+
remove$: (id: string) => Observable<string>;
|
299
|
+
restore$: (id: string) => Observable<void>;
|
300
|
+
duplicate$: (body: CloneRequest) => Observable<string>;
|
301
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RebateTypeApiService, never>;
|
302
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RebateTypeApiService>;
|
303
|
+
}
|
304
|
+
|
305
|
+
declare class SandboxManagerApiService {
|
306
|
+
private messageService;
|
307
|
+
constructor(messageService: MessageService);
|
308
|
+
getSalesforceOrganizations$(): Observable<SalesforceOrganization[]>;
|
309
|
+
getAvailableSalesforceOrganizationSizes$(): Observable<Dictionary<number>>;
|
310
|
+
createSalesforceOrganization$(payload: NewSalesforceOrganization): Observable<SalesforceOrganization | undefined>;
|
311
|
+
updateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
|
312
|
+
deleteSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
|
313
|
+
activateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
|
314
|
+
deactivateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
|
315
|
+
/**
|
316
|
+
* Shows an error message using the message service.
|
317
|
+
*
|
318
|
+
* @param {string} message - the error message to be published.
|
319
|
+
*/
|
320
|
+
private publishErrorMessage;
|
321
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SandboxManagerApiService, never>;
|
322
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SandboxManagerApiService>;
|
323
|
+
}
|
324
|
+
|
325
|
+
interface ConfigurationProcessorOverride {
|
326
|
+
name: string;
|
327
|
+
script: string;
|
328
|
+
}
|
329
|
+
interface StatefulConfigurationRequest {
|
330
|
+
item: unknown;
|
331
|
+
actions?: ConfigurationProcessorOverride[];
|
332
|
+
selectors?: ConfigurationProcessorOverride[];
|
333
|
+
}
|
334
|
+
|
335
|
+
declare class StatefulConfigurationApiService {
|
336
|
+
private httpService;
|
337
|
+
private readonly SERVICE_URL;
|
338
|
+
constructor(httpService: BaseHttpService);
|
339
|
+
/**
|
340
|
+
* Initialize configuration state
|
341
|
+
* @param request Request
|
342
|
+
* @returns ID of new configuration state
|
343
|
+
*/
|
344
|
+
init(request: StatefulConfigurationRequest): Observable<string>;
|
345
|
+
/**
|
346
|
+
* Get existing state by ID
|
347
|
+
* @param id ID
|
348
|
+
* @returns Configuration State
|
349
|
+
*/
|
350
|
+
get(id: string): Observable<QuoteDraft>;
|
351
|
+
/**
|
352
|
+
* Execute actions/selectors
|
353
|
+
* @param id State ID
|
354
|
+
* @param request Request
|
355
|
+
* @returns Execute result
|
356
|
+
*/
|
357
|
+
execute(id: string, request: ConfigurationExecuteRequest): Observable<ConfigurationExecuteResponse>;
|
358
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StatefulConfigurationApiService, never>;
|
359
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StatefulConfigurationApiService>;
|
360
|
+
}
|
361
|
+
|
362
|
+
/**
|
363
|
+
* Parses the response from Canvas and checks for errors.
|
364
|
+
* - If an error is found, publishes an error message and returns the failover value.
|
365
|
+
* - If no error is found, returns the parsed response.
|
366
|
+
*
|
367
|
+
* Note! The API call first goes to APEX before reaching the Canvas, so errors can originate from either APEX or Canvas.
|
368
|
+
*
|
369
|
+
* @param {string} response - The JSON string response from the Canvas call.
|
370
|
+
* @param {T} failover - The value to return in case of error.
|
371
|
+
* @returns {T | K} The parsed response or the failover value.
|
372
|
+
*
|
373
|
+
* @template T The expected type of the parsed response.
|
374
|
+
* @template K The type of the failover value.
|
375
|
+
*
|
376
|
+
* @remarks If there's an Apex error, the response data can be an array.
|
377
|
+
* In such cases, the function extracts the first element of the array.
|
378
|
+
*/
|
379
|
+
declare const handleCanvasResponse: <T, K>(response: string, failover: K, errorPublisher: (message: string) => void) => T | K;
|
380
|
+
|
381
|
+
export { AccountApiService, ApiModule, ContractedPriceApiService, FlowStateApiService, OffersApiService, OrgInfoApiService, PortalsApiService, PromotionsApiService, RebateProgramApiService, RebateTypeApiService, SandboxManagerApiService, StatefulConfigurationApiService, VeloceAuthService, handleCanvasResponse };
|
382
|
+
export type { AvailableVersionsInfo, CalculateDeltaRequest, CloneRequest, ComponentVersionInfo, OrgInfo, QuerySearchParams, VeloceAuthResponse, VersionInfo };
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@veloceapps/api",
|
3
|
-
"version": "12.0.0-
|
3
|
+
"version": "12.0.0-14",
|
4
4
|
"private": false,
|
5
5
|
"peerDependencies": {
|
6
|
-
"@angular/common": "~
|
7
|
-
"@angular/core": "~
|
8
|
-
"@veloceapps/core": "
|
6
|
+
"@angular/common": "~20.1.4",
|
7
|
+
"@angular/core": "~20.1.4",
|
8
|
+
"@veloceapps/core": "12.0.0-0",
|
9
9
|
"lodash": "^4.17.21",
|
10
10
|
"moment": "^2.29.1",
|
11
11
|
"rxjs": "~7.8.0"
|
@@ -17,11 +17,7 @@
|
|
17
17
|
"publishConfig": {
|
18
18
|
"access": "public"
|
19
19
|
},
|
20
|
-
"module": "
|
21
|
-
"es2020": "fesm2020/veloceapps-api.mjs",
|
22
|
-
"esm2020": "esm2020/veloceapps-api.mjs",
|
23
|
-
"fesm2020": "fesm2020/veloceapps-api.mjs",
|
24
|
-
"fesm2015": "fesm2015/veloceapps-api.mjs",
|
20
|
+
"module": "fesm2022/veloceapps-api.mjs",
|
25
21
|
"typings": "index.d.ts",
|
26
22
|
"exports": {
|
27
23
|
"./package.json": {
|
@@ -29,19 +25,11 @@
|
|
29
25
|
},
|
30
26
|
".": {
|
31
27
|
"types": "./index.d.ts",
|
32
|
-
"
|
33
|
-
"es2020": "./fesm2020/veloceapps-api.mjs",
|
34
|
-
"es2015": "./fesm2015/veloceapps-api.mjs",
|
35
|
-
"node": "./fesm2015/veloceapps-api.mjs",
|
36
|
-
"default": "./fesm2020/veloceapps-api.mjs"
|
28
|
+
"default": "./fesm2022/veloceapps-api.mjs"
|
37
29
|
},
|
38
30
|
"./v2": {
|
39
31
|
"types": "./v2/index.d.ts",
|
40
|
-
"
|
41
|
-
"es2020": "./fesm2020/veloceapps-api-v2.mjs",
|
42
|
-
"es2015": "./fesm2015/veloceapps-api-v2.mjs",
|
43
|
-
"node": "./fesm2015/veloceapps-api-v2.mjs",
|
44
|
-
"default": "./fesm2020/veloceapps-api-v2.mjs"
|
32
|
+
"default": "./fesm2022/veloceapps-api-v2.mjs"
|
45
33
|
}
|
46
34
|
}
|
47
35
|
}
|