@flashbacktech/tsclient 0.4.68 → 0.4.70

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.cts CHANGED
@@ -939,6 +939,16 @@ declare class CredentialsClient {
939
939
  */
940
940
  createOrgNotify(body: Omit<CreateCredentialRequest, 'projectId' | 'workspaceId'>): Promise<Credential>;
941
941
  deleteOrgNotify(credentialId: string): Promise<SimpleKeysResponse>;
942
+ /**
943
+ * adminDeliver seeds a credential into ANOTHER org's project — the
944
+ * platform-admin delivery path for eval-sandbox credentials. The caller
945
+ * must be a platform admin; the target org comes from the path (no
946
+ * impersonation involved) and the audit event lands in the target org's
947
+ * trail. The server accepts cloud (storage-capable) providers only.
948
+ * Optional `metadata.expiresAt` (RFC3339) marks a time-bound credential
949
+ * so the tenant UI can badge the upcoming sandbox expiry.
950
+ */
951
+ adminDeliver(orgId: string, body: CreateCredentialRequest): Promise<Credential>;
942
952
  /**
943
953
  * providers fetches the server-side catalog. The tsclient ships its
944
954
  * own catalog mirror in ./providers.ts that the frontend can use
@@ -971,7 +981,7 @@ interface ChatScope {
971
981
  /** @deprecated Use `projectId`. Carried only to ease the cutover. */
972
982
  workspaceId?: string;
973
983
  }
974
- type ChatSessionSource = 'adhoc' | 'template';
984
+ type ChatSessionSource = 'adhoc' | 'template' | 'mcp';
975
985
  type ChatMessageRole = 'user' | 'assistant' | 'system';
976
986
  /**
977
987
  * Status of a single chat turn (agent_chat_turns.status). The first four are
package/dist/index.d.ts CHANGED
@@ -939,6 +939,16 @@ declare class CredentialsClient {
939
939
  */
940
940
  createOrgNotify(body: Omit<CreateCredentialRequest, 'projectId' | 'workspaceId'>): Promise<Credential>;
941
941
  deleteOrgNotify(credentialId: string): Promise<SimpleKeysResponse>;
942
+ /**
943
+ * adminDeliver seeds a credential into ANOTHER org's project — the
944
+ * platform-admin delivery path for eval-sandbox credentials. The caller
945
+ * must be a platform admin; the target org comes from the path (no
946
+ * impersonation involved) and the audit event lands in the target org's
947
+ * trail. The server accepts cloud (storage-capable) providers only.
948
+ * Optional `metadata.expiresAt` (RFC3339) marks a time-bound credential
949
+ * so the tenant UI can badge the upcoming sandbox expiry.
950
+ */
951
+ adminDeliver(orgId: string, body: CreateCredentialRequest): Promise<Credential>;
942
952
  /**
943
953
  * providers fetches the server-side catalog. The tsclient ships its
944
954
  * own catalog mirror in ./providers.ts that the frontend can use
@@ -971,7 +981,7 @@ interface ChatScope {
971
981
  /** @deprecated Use `projectId`. Carried only to ease the cutover. */
972
982
  workspaceId?: string;
973
983
  }
974
- type ChatSessionSource = 'adhoc' | 'template';
984
+ type ChatSessionSource = 'adhoc' | 'template' | 'mcp';
975
985
  type ChatMessageRole = 'user' | 'assistant' | 'system';
976
986
  /**
977
987
  * Status of a single chat turn (agent_chat_turns.status). The first four are
package/dist/index.js CHANGED
@@ -730,6 +730,24 @@ var CredentialsClient = class {
730
730
  deleteOrgNotify(credentialId) {
731
731
  return this.http.delete(`/credentials/org-notify/${credentialId}`);
732
732
  }
733
+ /**
734
+ * adminDeliver seeds a credential into ANOTHER org's project — the
735
+ * platform-admin delivery path for eval-sandbox credentials. The caller
736
+ * must be a platform admin; the target org comes from the path (no
737
+ * impersonation involved) and the audit event lands in the target org's
738
+ * trail. The server accepts cloud (storage-capable) providers only.
739
+ * Optional `metadata.expiresAt` (RFC3339) marks a time-bound credential
740
+ * so the tenant UI can badge the upcoming sandbox expiry.
741
+ */
742
+ async adminDeliver(orgId, body) {
743
+ const res = await this.http.post(
744
+ `/admin/orgs/${orgId}/credentials`,
745
+ { body }
746
+ );
747
+ const value = res.data ?? res.credential;
748
+ if (!value) throw new Error("adminDeliver response missing body.");
749
+ return value;
750
+ }
733
751
  /**
734
752
  * providers fetches the server-side catalog. The tsclient ships its
735
753
  * own catalog mirror in ./providers.ts that the frontend can use