@flashbacktech/tsclient 0.4.69 → 0.4.71
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.cjs +18 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -732,6 +732,24 @@ var CredentialsClient = class {
|
|
|
732
732
|
deleteOrgNotify(credentialId) {
|
|
733
733
|
return this.http.delete(`/credentials/org-notify/${credentialId}`);
|
|
734
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
* adminDeliver seeds a credential into ANOTHER org's project — the
|
|
737
|
+
* platform-admin delivery path for eval-sandbox credentials. The caller
|
|
738
|
+
* must be a platform admin; the target org comes from the path (no
|
|
739
|
+
* impersonation involved) and the audit event lands in the target org's
|
|
740
|
+
* trail. The server accepts cloud (storage-capable) providers only.
|
|
741
|
+
* Optional `metadata.expiresAt` (RFC3339) marks a time-bound credential
|
|
742
|
+
* so the tenant UI can badge the upcoming sandbox expiry.
|
|
743
|
+
*/
|
|
744
|
+
async adminDeliver(orgId, body) {
|
|
745
|
+
const res = await this.http.post(
|
|
746
|
+
`/admin/orgs/${orgId}/credentials`,
|
|
747
|
+
{ body }
|
|
748
|
+
);
|
|
749
|
+
const value = res.data ?? res.credential;
|
|
750
|
+
if (!value) throw new Error("adminDeliver response missing body.");
|
|
751
|
+
return value;
|
|
752
|
+
}
|
|
735
753
|
/**
|
|
736
754
|
* providers fetches the server-side catalog. The tsclient ships its
|
|
737
755
|
* own catalog mirror in ./providers.ts that the frontend can use
|