@forge/bridge
5.15.2-next.0-experimental-5b726e65.16.0-next.1
out/invoke/invoke.js~
out/invoke/invoke.jsModified+14−2
Index: package/out/invoke/invoke.js
===================================================================
--- package/out/invoke/invoke.js
+++ package/out/invoke/invoke.js
@@ -18,9 +18,21 @@
}
validatePayload(payload);
return callBridge('invoke', { functionKey, payload });
};
-exports.invoke = (0, utils_1.withRateLimiter)(_invoke, 500, 1000 * 25, 'Resolver calls are rate limited at 500req/25s');
+const limitedInvoke = (0, utils_1.withRateLimiter)(_invoke, 500, 1000 * 25, 'Resolver calls are rate limited at 500req/25s');
+/**
+ * Calls a backend resolver function by key.
+ */
+function invoke(functionKey, payload) {
+ return limitedInvoke(functionKey, payload);
+}
+exports.invoke = invoke;
+/**
+ * Specialises the invoke function to a given Definitions type.
+ *
+ * @returns An invoke function that can be used to call backend functions.
+ */
function makeInvoke() {
- return exports.invoke;
+ return invoke;
}
exports.makeInvoke = makeInvoke;