codai-sdk 0.63.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 +436 -251
- package/dist/index.js +35 -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 {
|
|
@@ -6541,6 +6569,8 @@ const OPERATION_METHODS = {
|
|
|
6541
6569
|
getReferrals: "referrals.get",
|
|
6542
6570
|
getSettings: "settings.get",
|
|
6543
6571
|
patchSettings: "settings.update",
|
|
6572
|
+
getPolicy: "osGate.policy",
|
|
6573
|
+
recordOsGateEvent: "osGate.recordEvent",
|
|
6544
6574
|
getReceipt: "receipt.get",
|
|
6545
6575
|
submitFeedback: "feedback.submit",
|
|
6546
6576
|
listPhoneModels: "phoneModels.list"
|
|
@@ -6790,6 +6820,7 @@ var CodaiApps = class {
|
|
|
6790
6820
|
* client.tasks.* client.sessions.* (events, controls, lease, shares, stream)
|
|
6791
6821
|
* client.devices.* / client.hosts.* client.orgs.* / client.account / client.receipt
|
|
6792
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)
|
|
6793
6824
|
* client.billing.get / .invoices / .watchBalance (READ-ONLY billing overview; never starts a payment)
|
|
6794
6825
|
* client.referrals.get / .redeem / .setConsent (referral stats + invitees; mutations via PATCH /v1/account)
|
|
6795
6826
|
* client.usage.get / client.keys.list / .setTags (own usage breakdown + API keys)
|
|
@@ -6897,6 +6928,8 @@ var Codai = class {
|
|
|
6897
6928
|
account;
|
|
6898
6929
|
/** Account-level settings shared by every device (`settings.get()`, `settings.update(partial, { version })`). */
|
|
6899
6930
|
settings;
|
|
6931
|
+
/** OS protection gate: `osGate.policy()` (org override policy) and `osGate.recordEvent(event)` (audit). */
|
|
6932
|
+
osGate;
|
|
6900
6933
|
/** READ-ONLY billing: plan, wallet, invoices, `watchBalance` (pay via the returned links, never via the SDK). */
|
|
6901
6934
|
billing;
|
|
6902
6935
|
/** Referral stats and invitees; `redeem(code)` / `setConsent(bool)` go through `PATCH /v1/account`. */
|
|
@@ -6977,6 +7010,7 @@ var Codai = class {
|
|
|
6977
7010
|
this.verify = new Verify(http);
|
|
6978
7011
|
this.account = new Account(http);
|
|
6979
7012
|
this.settings = new Settings(http);
|
|
7013
|
+
this.osGate = new OsGate(http);
|
|
6980
7014
|
this.billing = new Billing(http);
|
|
6981
7015
|
this.referrals = new Referrals(http);
|
|
6982
7016
|
this.receipt = new Receipts(http);
|
|
@@ -7071,5 +7105,5 @@ function allKeys(obj) {
|
|
|
7071
7105
|
}
|
|
7072
7106
|
|
|
7073
7107
|
//#endregion
|
|
7074
|
-
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 };
|
|
7075
7109
|
//# sourceMappingURL=index.js.map
|