oro-sdk-apis 5.15.3 → 5.16.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/models/workflow.d.ts +32 -0
- package/dist/oro-sdk-apis.cjs.development.js +5 -1
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +5 -1
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/package.json +4 -3
- package/src/models/workflow.ts +51 -16
- package/src/services/api.ts +4 -0
@@ -179,6 +179,16 @@ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>, O = un
|
|
179
179
|
*/
|
180
180
|
options?: O;
|
181
181
|
messages?: string;
|
182
|
+
/**
|
183
|
+
* Overrides the read only ability of the question's answer
|
184
|
+
* populated by extended workflow feature
|
185
|
+
*/
|
186
|
+
readOnly?: boolean;
|
187
|
+
/**
|
188
|
+
* Overrides the fillable default of the question's answer
|
189
|
+
* populated by extended workflow feature
|
190
|
+
*/
|
191
|
+
defaultEmpty?: boolean;
|
182
192
|
}
|
183
193
|
export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {
|
184
194
|
inline?: boolean;
|
@@ -234,6 +244,28 @@ export interface WorkflowData {
|
|
234
244
|
* (optional) rules to hide certain payment plans depending on the workflow answers
|
235
245
|
*/
|
236
246
|
hidePlanRules?: HidePlanRule[];
|
247
|
+
/**
|
248
|
+
* (optional) extension of another workflow referenced by uuid
|
249
|
+
*/
|
250
|
+
extendingWorkflow?: string;
|
251
|
+
/**
|
252
|
+
* (optional) rules for the extension of another workflow
|
253
|
+
*/
|
254
|
+
extendingRules?: IndexedData<WorkflowExtendingRules>;
|
255
|
+
}
|
256
|
+
export interface WorkflowExtendingRules {
|
257
|
+
/**
|
258
|
+
* Whether the field becomes read only in the extended workflow
|
259
|
+
*/
|
260
|
+
readOnly?: boolean;
|
261
|
+
/**
|
262
|
+
* Whether the field becomes deselected/empty by default in the extended workflow
|
263
|
+
*/
|
264
|
+
defaultEmpty?: boolean;
|
265
|
+
/**
|
266
|
+
* Whether the field should be removed altogether in the extended workflow
|
267
|
+
*/
|
268
|
+
remove?: boolean;
|
237
269
|
}
|
238
270
|
export interface HidePlanRule {
|
239
271
|
/**
|
@@ -8,6 +8,7 @@ var hash_js = require('hash.js');
|
|
8
8
|
var _ = require('buffer/');
|
9
9
|
var createAuthRefreshInterceptor = _interopDefault(require('axios-auth-refresh'));
|
10
10
|
var axios = _interopDefault(require('axios'));
|
11
|
+
var uuid = require('uuid');
|
11
12
|
|
12
13
|
/**
|
13
14
|
* This function return a base64 string representation of a hashed string
|
@@ -549,10 +550,13 @@ var APIService = /*#__PURE__*/function (_AxiosService) {
|
|
549
550
|
_this.tokenRefreshFailureCallback = tokenRefreshFailureCallback;
|
550
551
|
_this.tokens = {};
|
551
552
|
var self = _assertThisInitialized(_this);
|
553
|
+
var sessionId = uuid.v4();
|
552
554
|
_this.axios.interceptors.request.use(function (config) {
|
553
555
|
var token = config.useRefreshToken ? self.getTokens().refreshToken : self.getTokens().accessToken;
|
554
556
|
config.headers = _extends({}, config.headers, {
|
555
|
-
Authorization: "Bearer " + token
|
557
|
+
Authorization: "Bearer " + token,
|
558
|
+
'X-Session-Id': sessionId,
|
559
|
+
'X-Request-Id': uuid.v4()
|
556
560
|
});
|
557
561
|
return config;
|
558
562
|
}, function (error) {
|