Adding TypeScript Functions to OSDK Resources in Developer Console

Title: Adding TypeScript Functions to OSDK Resources in Developer Console

Hi everyone,

I’m trying to add TypeScript Functions to my OSDK Resources in the Developer Console, but so far, I’ve only been able to add the Python Function versions that I’ve created. I suspect this is because I’m explicitly defining the apiName in the Python Functions, based on some documentation I found.

However, I haven’t been able to locate any documentation on how to define the apiName for TypeScript Functions (V1 or V2). When I use AIP Developer Assist, I get the following code snippet, which makes sense but is specific to V1. Even after adding it, I still can’t pull them into my OSDK Resources as expected.

import { Function, Integer } from "@foundry/functions-api";

export class MyFunctions {
    @Function({ apiName: "incrementNumber" })
    public incrementNumber(x: Integer): Integer {
        return x + 1;
    }
}

If my assumption is correct, how do I add the apiName to TypeScript Functions (V1 & V2)?

If it’s incorrect, can someone explain why I can’t add the TypeScript Functions to my OSDK Resources as expected?

Thanks in advance for your help!

You are correct that to use a Function in an OSDK it needs to have an API name.

To give a TypeScript V1 Function an API name see these docs.

There is currently no support for giving TypeScript V2 Functions API names.

Thanks.

From the documentation and what I’ve already attempted for V1, I’m gleaning that you can only add the apiName for Query Functions and not regular Functions. Can you confirm?

Either way Query Functions may work for my needs, but only the V2 flavor as I really need the link traversal aggregation features they provide. Any ETA on when the ability to add the apiName to V2 will be released?

This is correct!

I can’t provide a firm timeline at the moment, but it is being actively worked on now. I’ll update this thread when it is available.