oro-sdk-apis 5.15.4 → 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 +2 -2
- 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 +2 -2
- package/src/services/api.ts +4 -0
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "5.
|
2
|
+
"version": "5.16.0",
|
3
3
|
"main": "dist/index.js",
|
4
4
|
"typings": "dist/index.d.ts",
|
5
5
|
"files": [
|
@@ -41,7 +41,6 @@
|
|
41
41
|
"@size-limit/preset-small-lib": "^4.10.2",
|
42
42
|
"@types/jest": "^27.4.1",
|
43
43
|
"@types/sha.js": "^2.4.0",
|
44
|
-
"@types/uuid": "^8.3.0",
|
45
44
|
"prettier": "^2.6.1",
|
46
45
|
"prettier-plugin-svelte": "^2.3.0",
|
47
46
|
"size-limit": "^4.10.2",
|
@@ -50,9 +49,11 @@
|
|
50
49
|
"typescript": "^4.2.4"
|
51
50
|
},
|
52
51
|
"dependencies": {
|
52
|
+
"@types/uuid": "^8.3.0",
|
53
53
|
"axios": "^0.21.4",
|
54
54
|
"axios-auth-refresh": "^3.2.1",
|
55
55
|
"buffer": "^6.0.3",
|
56
|
-
"hash.js": "^1.1.7"
|
56
|
+
"hash.js": "^1.1.7",
|
57
|
+
"uuid": "^8.3.2"
|
57
58
|
}
|
58
59
|
}
|
package/src/models/workflow.ts
CHANGED
@@ -295,8 +295,8 @@ export interface WorkflowData {
|
|
295
295
|
hidePlanRules?: HidePlanRule[]
|
296
296
|
|
297
297
|
/**
|
298
|
-
|
299
|
-
|
298
|
+
* (optional) extension of another workflow referenced by uuid
|
299
|
+
*/
|
300
300
|
extendingWorkflow?: string
|
301
301
|
|
302
302
|
/**
|
package/src/services/api.ts
CHANGED
@@ -3,6 +3,7 @@ import createAuthRefreshInterceptor from 'axios-auth-refresh'
|
|
3
3
|
import { AuthRefreshFunc, Tokens } from '../models'
|
4
4
|
import { AxiosService } from './axios'
|
5
5
|
import { GuardRequestConfig } from './guard'
|
6
|
+
import { v4 as uuidv4 } from 'uuid'
|
6
7
|
|
7
8
|
export class APIService extends AxiosService {
|
8
9
|
private authRefreshFn?: AuthRefreshFunc
|
@@ -21,6 +22,7 @@ export class APIService extends AxiosService {
|
|
21
22
|
) {
|
22
23
|
super(config)
|
23
24
|
const self = this
|
25
|
+
const sessionId = uuidv4()
|
24
26
|
|
25
27
|
this.axios.interceptors.request.use(
|
26
28
|
(config) => {
|
@@ -31,6 +33,8 @@ export class APIService extends AxiosService {
|
|
31
33
|
config.headers = {
|
32
34
|
...config.headers,
|
33
35
|
Authorization: `Bearer ${token}`,
|
36
|
+
'X-Session-Id': sessionId,
|
37
|
+
'X-Request-Id': uuidv4(),
|
34
38
|
}
|
35
39
|
return config
|
36
40
|
},
|