Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/internal/builtins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
* limitations under the License.
*/

import { RequestFlow } from './RequestFlow';
import { ModuleConfig } from './moduleConfig';
import { RequestFlowBuilder } from './RequestFlowBuilder';
import { FluenceClient } from 'src/api.unstable';
import { FluenceClient as Unstable } from '../api.unstable';
import { FluenceClient as Stable } from '..';

// HACK:: A little hack to supress compiler errors in proto-distributor.
// Will be wiped out when the HLL is ready
type FluenceClient = Unstable | Stable;

const nodeIdentityCall = (client: FluenceClient): string => {
return `(call "${client.relayPeerId}" ("op" "identity") [])`;
Expand Down Expand Up @@ -60,7 +64,7 @@ const requestResponse = async <T>(
.withVariables(data)
.withTTL(ttl)
.buildAsFetch<any[]>('_callback', name);
await client.initiateFlow(request);
await (client as any).initiateFlow(request);
const res = await promise;
return handleResponse(res);
};
Expand All @@ -87,7 +91,7 @@ export const getModules = async (client: FluenceClient, ttl?: number): Promise<s
})
.withTTL(ttl)
.buildAsFetch<[string[]]>('_callback', callbackFn);
client.initiateFlow(req);
(client as any).initiateFlow(req);

const [res] = await promise;
return res;
Expand Down Expand Up @@ -127,7 +131,7 @@ export const getInterfaces = async (client: FluenceClient, ttl?: number): Promis
.withTTL(ttl)
.buildAsFetch<[string[]]>('_callback', callbackFn);

client.initiateFlow(req);
(client as any).initiateFlow(req);

const [res] = await promise;
return res;
Expand Down Expand Up @@ -180,7 +184,7 @@ export const uploadModule = async (
.withTTL(ttl)
.buildAsFetch<[string[]]>('_callback', 'getModules');

await client.initiateFlow(req);
await (client as any).initiateFlow(req);
await promise;
};

Expand Down