@friggframework/api-module-frigg-scale-test 0.2.0-next.1 → 0.2.0-next.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/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/defintion.js +12 -0
- package/package.json +2 -2
package/dist/api.d.ts
CHANGED
package/dist/api.js
CHANGED
package/dist/defintion.js
CHANGED
|
@@ -14,6 +14,18 @@ const definition = {
|
|
|
14
14
|
const apiKey = params.data?.apiKey || params.data?.access_token;
|
|
15
15
|
return { access_token: apiKey };
|
|
16
16
|
},
|
|
17
|
+
setAuthParams: async (api, params) => {
|
|
18
|
+
// For API key authentication, set the key on the API instance
|
|
19
|
+
// params IS the data object, so access apiKey directly
|
|
20
|
+
const apiKey = params.apiKey || params.access_token;
|
|
21
|
+
if (!apiKey) {
|
|
22
|
+
throw new Error("API key is required for Scale Test authentication");
|
|
23
|
+
}
|
|
24
|
+
// Set the apiKey on the API instance (assuming it has an opts property)
|
|
25
|
+
api.opts = { ...api.opts, apiKey };
|
|
26
|
+
api.access_token = apiKey;
|
|
27
|
+
return { access_token: apiKey };
|
|
28
|
+
},
|
|
17
29
|
getEntityDetails: async (api, callbackParams, tokenResponse, userId) => {
|
|
18
30
|
const healthCheck = await api.health();
|
|
19
31
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/api-module-frigg-scale-test",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "b53d00114b4de22467911f442b09fc15c4f9a8fe"
|
|
32
32
|
}
|