TypeScript SDK

Organizations

Manage organizations and members with @tektona/sdk.

tek.org manages organizations and their members. These are top-level calls and ignore the client's org/project scope — you pass the org name explicitly.

List

list returns one Page of the organizations you belong to. Use listAll to iterate every page:

const page = await tek.org.list({ limit: 50 });
for (const org of page.items) console.log(org.name, org.display_name);

for await (const org of tek.org.listAll()) console.log(org.name);

Get

const org = await tek.org.get('acme');

Create

const org = await tek.org.create({
  name: 'acme',             // URL-safe identifier
  display_name: 'Acme Inc',
});

Update

name and display_name are required; the other fields are left unchanged when omitted:

await tek.org.update('acme', {
  display_name: 'Acme Incorporated',
  // default_location_id: 'eu',
  // default_project_role: 'writer',
});

Members

listMembers returns one Page of an org's members; listAllMembers iterates every page:

const page = await tek.org.listMembers('acme', { limit: 50 });
for (const member of page.items) console.log(member.email, member.role);

for await (const member of tek.org.listAllMembers('acme')) console.log(member.user_id);

Sandbox settings

An organization's default sandbox settings — the allowed egress policies and the default policy new sandboxes get. Uses the client's default org (or a per-call { org }):

const settings = await tek.org.getSandboxSettings();
// { allowed_policies, default_policy }

await tek.org.updateSandboxSettings({ default_policy: 'tektona/dev' });

On this page