import {
CloudApiClient,
defaultArkorCloudApiUrl,
ensureCredentials,
} from "arkor";
const credentials = await ensureCredentials();
const client = new CloudApiClient({
baseUrl: defaultArkorCloudApiUrl(credentials),
credentials,
});
const scope = { orgSlug: "my-org", projectSlug: "my-project" };
const { deployment } = await client.createDeployment(scope, {
slug: "support-bot",
target: { kind: "adapter", adapter: { kind: "final", jobId: "<uuid>" } },
authMode: "fixed_api_key",
});
const { key } = await client.createDeploymentKey(deployment.id, scope, {
label: "production",
});
console.log(key.plaintext); // 表示は **1 回限り**。今すぐ保存