codai-sdk 0.62.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +506 -252
- package/dist/index.js +48 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4450,6 +4450,34 @@ var Settings = class {
|
|
|
4450
4450
|
}
|
|
4451
4451
|
};
|
|
4452
4452
|
|
|
4453
|
+
//#endregion
|
|
4454
|
+
//#region src/resources/os-gate.ts
|
|
4455
|
+
var OsGate = class {
|
|
4456
|
+
http;
|
|
4457
|
+
constructor(http) {
|
|
4458
|
+
this.http = http;
|
|
4459
|
+
}
|
|
4460
|
+
/** `GET /v1/policy` — `{ os_gate: { allow_override } }` folded over every org of the caller (strictest wins). */
|
|
4461
|
+
policy(opts = {}) {
|
|
4462
|
+
return this.http.json("/v1/policy", {
|
|
4463
|
+
ext: opts.ext,
|
|
4464
|
+
signal: opts.signal
|
|
4465
|
+
});
|
|
4466
|
+
}
|
|
4467
|
+
/**
|
|
4468
|
+
* `POST /v1/os-gate/events` — record that the user granted or revoked an override of `checks` on `surface`.
|
|
4469
|
+
* The body is strict: unknown keys, unknown check ids or an empty `checks` list throw a 400 `CodaiError`.
|
|
4470
|
+
*/
|
|
4471
|
+
recordEvent(event, opts = {}) {
|
|
4472
|
+
return this.http.json("/v1/os-gate/events", {
|
|
4473
|
+
method: "POST",
|
|
4474
|
+
body: event,
|
|
4475
|
+
ext: opts.ext,
|
|
4476
|
+
signal: opts.signal
|
|
4477
|
+
});
|
|
4478
|
+
}
|
|
4479
|
+
};
|
|
4480
|
+
|
|
4453
4481
|
//#endregion
|
|
4454
4482
|
//#region src/resources/sfx.ts
|
|
4455
4483
|
var Sfx = class {
|
|
@@ -5272,6 +5300,18 @@ var Memory = class {
|
|
|
5272
5300
|
signal: opts.signal
|
|
5273
5301
|
});
|
|
5274
5302
|
}
|
|
5303
|
+
/**
|
|
5304
|
+
* `DELETE /v1/memory?confirm=all` — erase EVERY memory of your account (all tiers). Irreversible; returns the
|
|
5305
|
+
* counts per tier and the total. Allowed on every plan.
|
|
5306
|
+
*/
|
|
5307
|
+
deleteAll(opts = {}) {
|
|
5308
|
+
return this.http.json("/v1/memory", {
|
|
5309
|
+
method: "DELETE",
|
|
5310
|
+
query: { confirm: "all" },
|
|
5311
|
+
ext: opts.ext,
|
|
5312
|
+
signal: opts.signal
|
|
5313
|
+
});
|
|
5314
|
+
}
|
|
5275
5315
|
};
|
|
5276
5316
|
|
|
5277
5317
|
//#endregion
|
|
@@ -6431,6 +6471,7 @@ const OPERATION_METHODS = {
|
|
|
6431
6471
|
searchMemories: "memory.search",
|
|
6432
6472
|
createMemory: "memory.create",
|
|
6433
6473
|
deleteMemory: "memory.delete",
|
|
6474
|
+
deleteAllMemories: "memory.deleteAll",
|
|
6434
6475
|
createSandbox: "sandboxes.create",
|
|
6435
6476
|
listSandboxes: "sandboxes.list",
|
|
6436
6477
|
getSandbox: "sandboxes.retrieve",
|
|
@@ -6528,6 +6569,8 @@ const OPERATION_METHODS = {
|
|
|
6528
6569
|
getReferrals: "referrals.get",
|
|
6529
6570
|
getSettings: "settings.get",
|
|
6530
6571
|
patchSettings: "settings.update",
|
|
6572
|
+
getPolicy: "osGate.policy",
|
|
6573
|
+
recordOsGateEvent: "osGate.recordEvent",
|
|
6531
6574
|
getReceipt: "receipt.get",
|
|
6532
6575
|
submitFeedback: "feedback.submit",
|
|
6533
6576
|
listPhoneModels: "phoneModels.list"
|
|
@@ -6777,6 +6820,7 @@ var CodaiApps = class {
|
|
|
6777
6820
|
* client.tasks.* client.sessions.* (events, controls, lease, shares, stream)
|
|
6778
6821
|
* client.devices.* / client.hosts.* client.orgs.* / client.account / client.receipt
|
|
6779
6822
|
* client.settings.get / .update (account-level settings shared by every device)
|
|
6823
|
+
* client.osGate.policy / .recordEvent (OS protection gate: org override policy + override audit events)
|
|
6780
6824
|
* client.billing.get / .invoices / .watchBalance (READ-ONLY billing overview; never starts a payment)
|
|
6781
6825
|
* client.referrals.get / .redeem / .setConsent (referral stats + invitees; mutations via PATCH /v1/account)
|
|
6782
6826
|
* client.usage.get / client.keys.list / .setTags (own usage breakdown + API keys)
|
|
@@ -6884,6 +6928,8 @@ var Codai = class {
|
|
|
6884
6928
|
account;
|
|
6885
6929
|
/** Account-level settings shared by every device (`settings.get()`, `settings.update(partial, { version })`). */
|
|
6886
6930
|
settings;
|
|
6931
|
+
/** OS protection gate: `osGate.policy()` (org override policy) and `osGate.recordEvent(event)` (audit). */
|
|
6932
|
+
osGate;
|
|
6887
6933
|
/** READ-ONLY billing: plan, wallet, invoices, `watchBalance` (pay via the returned links, never via the SDK). */
|
|
6888
6934
|
billing;
|
|
6889
6935
|
/** Referral stats and invitees; `redeem(code)` / `setConsent(bool)` go through `PATCH /v1/account`. */
|
|
@@ -6964,6 +7010,7 @@ var Codai = class {
|
|
|
6964
7010
|
this.verify = new Verify(http);
|
|
6965
7011
|
this.account = new Account(http);
|
|
6966
7012
|
this.settings = new Settings(http);
|
|
7013
|
+
this.osGate = new OsGate(http);
|
|
6967
7014
|
this.billing = new Billing(http);
|
|
6968
7015
|
this.referrals = new Referrals(http);
|
|
6969
7016
|
this.receipt = new Receipts(http);
|
|
@@ -7058,5 +7105,5 @@ function allKeys(obj) {
|
|
|
7058
7105
|
}
|
|
7059
7106
|
|
|
7060
7107
|
//#endregion
|
|
7061
|
-
export { AbuseReports, Account, AgentRuns, Agents, Assets, Audio, Batches, Billing, BrandKits, Cards, Chat, ChatCompletions, Codai, Codai as default, CodaiApps, CodaiError, Creatives, Devices, Documents, Embeddings, EnvironmentFiles, EnvironmentJobs, EnvironmentMembers, EnvironmentPorts, EnvironmentSecrets, EnvironmentTasks, Environments, Exports, Feedback, Health, Heartbeats, Hosts, HttpClient, Images, Keys, Lists, Memory, Messages, Models, Music, Notifications, OPERATION_METHODS, OrgMembers, Orgs, PROVENANCE_MAX_BYTES, PhoneModels, Productions, Projects, Prompts, Provenance, RESOLVE_ATTESTATION_PAYLOAD_TYPE, RESOLVE_OPERATION_METHODS, RESOLVE_TERMINAL_STATUSES, Realtime, RealtimeSession, Receipts, Referrals, Renders, Research, Resolve, ResolveError, ResolveInsufficientFundsError, Responses, STREAMING_OPERATIONS, SandboxFiles, Sandboxes, ScheduleExecutor, SchedulerHosts, Schedules, SessionControls, SessionEvents, SessionLease, SessionShares, Sessions, Settings, Sfx, Shares, SystemOne, TUS_CHUNK_BYTES, Tasks, Templates, Tokens, Tools, Transcripts, Triggers, Usage, Vault, VaultDevices, Verify, Videos, VoiceRevocations, extensionHeaders, frameJson, isAssetDto, isProductionFinished, isResearchFinished, mergeToolCall, readSse, realtimeUrl, resolveAttestationStatement, settingsConflictCurrent, shareTokenFrom, uploadIdFromLocation, verifyAttestationWithKeys, verifyResolveWebhook };
|
|
7108
|
+
export { AbuseReports, Account, AgentRuns, Agents, Assets, Audio, Batches, Billing, BrandKits, Cards, Chat, ChatCompletions, Codai, Codai as default, CodaiApps, CodaiError, Creatives, Devices, Documents, Embeddings, EnvironmentFiles, EnvironmentJobs, EnvironmentMembers, EnvironmentPorts, EnvironmentSecrets, EnvironmentTasks, Environments, Exports, Feedback, Health, Heartbeats, Hosts, HttpClient, Images, Keys, Lists, Memory, Messages, Models, Music, Notifications, OPERATION_METHODS, OrgMembers, Orgs, OsGate, PROVENANCE_MAX_BYTES, PhoneModels, Productions, Projects, Prompts, Provenance, RESOLVE_ATTESTATION_PAYLOAD_TYPE, RESOLVE_OPERATION_METHODS, RESOLVE_TERMINAL_STATUSES, Realtime, RealtimeSession, Receipts, Referrals, Renders, Research, Resolve, ResolveError, ResolveInsufficientFundsError, Responses, STREAMING_OPERATIONS, SandboxFiles, Sandboxes, ScheduleExecutor, SchedulerHosts, Schedules, SessionControls, SessionEvents, SessionLease, SessionShares, Sessions, Settings, Sfx, Shares, SystemOne, TUS_CHUNK_BYTES, Tasks, Templates, Tokens, Tools, Transcripts, Triggers, Usage, Vault, VaultDevices, Verify, Videos, VoiceRevocations, extensionHeaders, frameJson, isAssetDto, isProductionFinished, isResearchFinished, mergeToolCall, readSse, realtimeUrl, resolveAttestationStatement, settingsConflictCurrent, shareTokenFrom, uploadIdFromLocation, verifyAttestationWithKeys, verifyResolveWebhook };
|
|
7062
7109
|
//# sourceMappingURL=index.js.map
|