@dazn/kopytko-framework 2.1.0 → 2.1.2
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/package.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
' @param {String} responseData.failureReason
|
|
10
10
|
' @param {Object} responseData.headers
|
|
11
11
|
' @param {Integer} responseData.httpStatusCode
|
|
12
|
+
' @param {Object} responseData.rawData
|
|
12
13
|
' @param {Object} responseData.requestOptions
|
|
13
14
|
' @param {Integer} [responseData.time]
|
|
14
15
|
function HttpResponse(responseData as Object) as Object
|
|
@@ -25,7 +26,7 @@ function HttpResponse(responseData as Object) as Object
|
|
|
25
26
|
prototype._failureReason = getProperty(responseData, "failureReason", "OK")
|
|
26
27
|
prototype._headers = getProperty(responseData, "headers", {})
|
|
27
28
|
prototype._httpStatusCode = getProperty(responseData, "httpStatusCode", -1)
|
|
28
|
-
prototype._rawData = getProperty(responseData, "rawData"
|
|
29
|
+
prototype._rawData = getProperty(responseData, "rawData")
|
|
29
30
|
prototype._requestOptions = responseData.requestOptions
|
|
30
31
|
prototype._time = DateTime().asSeconds()
|
|
31
32
|
|
|
@@ -44,6 +45,7 @@ function HttpResponse(responseData as Object) as Object
|
|
|
44
45
|
isReusable: m.isReusable(),
|
|
45
46
|
isSuccess: m._isSuccess(),
|
|
46
47
|
maxAge: m.getMaxAge(),
|
|
48
|
+
raw: { data: m._rawData },
|
|
47
49
|
rawData: m._rawData,
|
|
48
50
|
requestOptions: m._requestOptions,
|
|
49
51
|
})
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
<field id="isReusable" type="boolean" />
|
|
10
10
|
<field id="isSuccess" type="boolean" />
|
|
11
11
|
<field id="maxAge" type="integer" />
|
|
12
|
-
<field id="
|
|
12
|
+
<field id="raw" type="assocarray" />
|
|
13
|
+
<field id="rawData" type="assocarray" /> <!-- @deprecated - raw field contains data key with rawData value now - raw = { data: <rawData value>} -->
|
|
13
14
|
<field id="requestOptions" type="assocarray" />
|
|
14
15
|
</interface>
|
|
15
16
|
</component>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
sub initKopytkoRoot(dynamicProps as Object)
|
|
2
2
|
m._dynamicProps = dynamicProps
|
|
3
3
|
|
|
4
|
-
for each prop in dynamicProps
|
|
5
|
-
m.top.observeFieldScoped(prop, "kopytkoRoot_dynamicPropChanged")
|
|
6
|
-
end for
|
|
7
|
-
|
|
8
4
|
dynamicPropsValues = {}
|
|
9
5
|
for each prop in dynamicProps
|
|
10
6
|
dynamicPropsValues[prop] = m.top[prop]
|
|
11
7
|
end for
|
|
12
8
|
|
|
13
9
|
initKopytko(dynamicPropsValues)
|
|
10
|
+
|
|
11
|
+
for each prop in dynamicProps
|
|
12
|
+
m.top.observeFieldScoped(prop, "kopytkoRoot_dynamicPropChanged")
|
|
13
|
+
end for
|
|
14
14
|
end sub
|
|
15
15
|
|
|
16
16
|
sub destroyKopytkoRoot()
|