@opengeni/sdk 3.1.0 → 3.1.2
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/README.md +1037 -71
- package/dist/accounts.d.ts +5 -1
- package/dist/accounts.js +13 -1
- package/dist/accounts.js.map +1 -1
- package/dist/adapters/express.d.ts +31 -0
- package/dist/adapters/express.js +87 -0
- package/dist/adapters/express.js.map +1 -0
- package/dist/adapters/hono.d.ts +16 -0
- package/dist/adapters/hono.js +8 -0
- package/dist/adapters/hono.js.map +1 -0
- package/dist/adapters/next.d.ts +29 -0
- package/dist/adapters/next.js +22 -0
- package/dist/adapters/next.js.map +1 -0
- package/dist/allowance-refusal.d.ts +2 -0
- package/dist/allowance-refusal.js +50 -0
- package/dist/allowance-refusal.js.map +1 -0
- package/dist/app-links.d.ts +42 -0
- package/dist/app-links.js +66 -0
- package/dist/app-links.js.map +1 -0
- package/dist/artifact-catalog.d.ts +40 -0
- package/dist/artifact-client.d.ts +20 -8
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +8 -6
- package/dist/automations.js +8 -2
- package/dist/automations.js.map +1 -1
- package/dist/azure-live-transport.d.ts +32 -0
- package/dist/browser.d.ts +7 -2
- package/dist/browser.js +27 -5
- package/dist/chat/fold.d.ts +75 -0
- package/dist/chat/handler.d.ts +41 -0
- package/dist/chat/http.d.ts +67 -0
- package/dist/chat/ids.d.ts +34 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +1703 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/openai.d.ts +30 -0
- package/dist/chat/opengeni.d.ts +129 -0
- package/dist/chat/types.d.ts +207 -0
- package/dist/chat/vercel.d.ts +49 -0
- package/dist/chats.d.ts +8 -0
- package/dist/chunk-4AHR4KGA.js +301 -0
- package/dist/chunk-4AHR4KGA.js.map +1 -0
- package/dist/chunk-6HZGAIUE.js +1665 -0
- package/dist/chunk-6HZGAIUE.js.map +1 -0
- package/dist/chunk-7EWT3PV6.js +368 -0
- package/dist/chunk-7EWT3PV6.js.map +1 -0
- package/dist/{chunk-VYCTL62C.js → chunk-GZQSWAKD.js} +1 -1
- package/dist/chunk-GZQSWAKD.js.map +1 -0
- package/dist/chunk-JXXCTW5W.js +1392 -0
- package/dist/chunk-JXXCTW5W.js.map +1 -0
- package/dist/{chunk-YTAWBDO2.js → chunk-KADZ5PGG.js} +28 -2
- package/dist/chunk-KADZ5PGG.js.map +1 -0
- package/dist/{chunk-YKZME56C.js → chunk-KWADQ227.js} +3 -3
- package/dist/{chunk-YKZME56C.js.map → chunk-KWADQ227.js.map} +1 -1
- package/dist/{chunk-7ZXBPJZP.js → chunk-NEM5N6C6.js} +3902 -1457
- package/dist/chunk-NEM5N6C6.js.map +1 -0
- package/dist/{chunk-GW3EJ2GP.js → chunk-O7KANXC3.js} +86 -13
- package/dist/chunk-O7KANXC3.js.map +1 -0
- package/dist/{chunk-VUQZAB3O.js → chunk-OAKHWFSV.js} +28 -32
- package/dist/chunk-OAKHWFSV.js.map +1 -0
- package/dist/chunk-P7UWKORG.js +561 -0
- package/dist/chunk-P7UWKORG.js.map +1 -0
- package/dist/chunk-QGEIL4TR.js +195 -0
- package/dist/chunk-QGEIL4TR.js.map +1 -0
- package/dist/chunk-RJHCBZF7.js +270 -0
- package/dist/chunk-RJHCBZF7.js.map +1 -0
- package/dist/chunk-S3D75WSQ.js +340 -0
- package/dist/chunk-S3D75WSQ.js.map +1 -0
- package/dist/chunk-UM4ZXXJR.js +9 -0
- package/dist/chunk-UM4ZXXJR.js.map +1 -0
- package/dist/chunk-VPVMLM7Q.js +15 -0
- package/dist/chunk-VPVMLM7Q.js.map +1 -0
- package/dist/{chunk-C2H7HBNP.js → chunk-WVCJRSGJ.js} +119 -14
- package/dist/chunk-WVCJRSGJ.js.map +1 -0
- package/dist/chunk-XA7HVIHI.js +126 -0
- package/dist/chunk-XA7HVIHI.js.map +1 -0
- package/dist/{chunk-TX3EIENU.js → chunk-YDVPI7WT.js} +73 -2
- package/dist/chunk-YDVPI7WT.js.map +1 -0
- package/dist/chunk-YKIHNLWD.js +153 -0
- package/dist/chunk-YKIHNLWD.js.map +1 -0
- package/dist/chunk-ZDUBPV33.js +277 -0
- package/dist/chunk-ZDUBPV33.js.map +1 -0
- package/dist/client.d.ts +1065 -124
- package/dist/codex-realtime-controller.d.ts +13 -0
- package/dist/codex-realtime-controller.js +4 -2
- package/dist/codex-realtime-v3-wire.d.ts +3 -2
- package/dist/codex-realtime.d.ts +5 -1
- package/dist/company-brain.d.ts +1 -11
- package/dist/company-profile.d.ts +13 -0
- package/dist/core.d.ts +7 -2
- package/dist/core.js +25 -6
- package/dist/deprecation.d.ts +47 -0
- package/dist/document-authority-client.d.ts +24 -2
- package/dist/document-authority.js +7 -5
- package/dist/editable-artifacts/index.d.ts +1 -1
- package/dist/editable-artifacts/types.d.ts +12 -2
- package/dist/editable-artifacts.js +19 -3
- package/dist/editable-artifacts.js.map +1 -1
- package/dist/embedding-client.d.ts +129 -0
- package/dist/errors.d.ts +76 -1
- package/dist/feedback.d.ts +23 -0
- package/dist/gateway-realtime-transport.js +1 -1
- package/dist/github-repositories.d.ts +10 -0
- package/dist/github-repositories.js +36 -0
- package/dist/github-repositories.js.map +1 -0
- package/dist/index.d.ts +64 -11
- package/dist/index.js +566 -141
- package/dist/index.js.map +1 -1
- package/dist/insights-usage.d.ts +33 -0
- package/dist/insights-usage.js +7 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/interaction.d.ts +103 -71
- package/dist/interaction.js +4 -2
- package/dist/knowledge.d.ts +7 -0
- package/dist/knowledge.js +20 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/known-tools.d.ts +4 -0
- package/dist/message-links.d.ts +68 -0
- package/dist/model-context.d.ts +68 -0
- package/dist/model-display.d.ts +2 -0
- package/dist/model-display.js +17 -0
- package/dist/model-display.js.map +1 -0
- package/dist/model-picker-order.d.ts +1 -0
- package/dist/model-picker-order.js +10 -0
- package/dist/model-picker-order.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +26 -0
- package/dist/organization-integration-policy.js +26 -0
- package/dist/organization-integration-policy.js.map +1 -0
- package/dist/pr-review-client.d.ts +1 -1
- package/dist/pr-review.d.ts +1 -1
- package/dist/pr-review.js.map +1 -1
- package/dist/preference-registry.d.ts +1 -1
- package/dist/prepared-mcp-setup.d.ts +5 -0
- package/dist/proxy.d.ts +13 -11
- package/dist/realtime.d.ts +4 -2
- package/dist/realtime.js +253 -7
- package/dist/realtime.js.map +1 -1
- package/dist/session-history-import.d.ts +22 -0
- package/dist/session-history-import.js +36 -0
- package/dist/session-history-import.js.map +1 -0
- package/dist/session-list-entries.d.ts +1 -0
- package/dist/session-list-entries.js +7 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-message-search.d.ts +53 -0
- package/dist/session-proxy-client.d.ts +28 -0
- package/dist/session-proxy.d.ts +334 -0
- package/dist/session-proxy.js +24 -0
- package/dist/session-proxy.js.map +1 -0
- package/dist/session-titles.d.ts +2 -0
- package/dist/session-usage-limits.d.ts +10 -0
- package/dist/session-usage-limits.js +43 -0
- package/dist/session-usage-limits.js.map +1 -0
- package/dist/shared-catalog-loader.d.ts +34 -0
- package/dist/site-bridge-host.d.ts +112 -0
- package/dist/site-bridge-host.js +285 -0
- package/dist/site-bridge-host.js.map +1 -0
- package/dist/site-browser-entry.d.ts +1 -0
- package/dist/site-browser-runtime.gen.d.ts +1 -0
- package/dist/site-data.d.ts +178 -0
- package/dist/site-document.d.ts +5 -0
- package/dist/site-document.js +20 -0
- package/dist/site-document.js.map +1 -0
- package/dist/site-document.test.d.ts +1 -0
- package/dist/site-http.d.ts +17 -0
- package/dist/site-sql.d.ts +31 -0
- package/dist/site-tool-bridge.d.ts +57 -0
- package/dist/site.d.ts +182 -0
- package/dist/site.js +62 -0
- package/dist/site.js.map +1 -0
- package/dist/skills.d.ts +75 -0
- package/dist/sse.d.ts +1 -1
- package/dist/stream.d.ts +2 -0
- package/dist/tenant-workspaces.d.ts +47 -0
- package/dist/tenant-workspaces.js +8 -0
- package/dist/tenant-workspaces.js.map +1 -0
- package/dist/tool-auth.d.ts +87 -0
- package/dist/tool-auth.js +23 -0
- package/dist/tool-auth.js.map +1 -0
- package/dist/tool-display-metadata.d.ts +3 -0
- package/dist/tools-37DCTCNZ.js +12 -0
- package/dist/tools-37DCTCNZ.js.map +1 -0
- package/dist/tools.d.ts +81 -0
- package/dist/transcription.d.ts +1 -1
- package/dist/types.d.ts +2848 -573
- package/dist/usage-allowances.d.ts +36 -0
- package/dist/usage-allowances.js +80 -0
- package/dist/usage-allowances.js.map +1 -0
- package/dist/vault-types.d.ts +236 -0
- package/dist/vaults-api.d.ts +57 -0
- package/dist/workspace-artifacts.d.ts +47 -5
- package/dist/workspace-instruction-policies.d.ts +2 -2
- package/dist/workspace-integrations.d.ts +74 -0
- package/dist/workspace-integrations.js +65 -0
- package/dist/workspace-integrations.js.map +1 -0
- package/dist/workspace-state.d.ts +8 -71
- package/package.json +99 -5
- package/src/accounts.ts +18 -0
- package/src/adapters/express.ts +136 -0
- package/src/adapters/hono.ts +18 -0
- package/src/adapters/next.ts +42 -0
- package/src/allowance-refusal.ts +5 -0
- package/src/app-links.ts +117 -0
- package/src/artifact-catalog.ts +51 -0
- package/src/artifact-client.ts +40 -49
- package/src/artifacts.ts +1 -0
- package/src/automations-client.ts +8 -2
- package/src/azure-live-transport.ts +286 -0
- package/src/browser.ts +37 -0
- package/src/chat/fold.ts +431 -0
- package/src/chat/handler.ts +240 -0
- package/src/chat/http.ts +257 -0
- package/src/chat/ids.ts +85 -0
- package/src/chat/index.ts +88 -0
- package/src/chat/openai.ts +439 -0
- package/src/chat/opengeni.ts +737 -0
- package/src/chat/types.ts +219 -0
- package/src/chat/vercel.ts +204 -0
- package/src/chats.ts +16 -0
- package/src/client.ts +5822 -1847
- package/src/codex-realtime-controller.ts +163 -8
- package/src/codex-realtime-v3-wire.ts +4 -3
- package/src/codex-realtime-v3.ts +12 -3
- package/src/codex-realtime.ts +11 -3
- package/src/company-brain.ts +0 -40
- package/src/company-profile.ts +13 -0
- package/src/core.ts +20 -0
- package/src/deprecation.ts +149 -0
- package/src/document-authority-client.ts +104 -1
- package/src/editable-artifacts/controller.ts +36 -2
- package/src/editable-artifacts/index.ts +1 -0
- package/src/editable-artifacts/types.ts +29 -16
- package/src/embedding-client.ts +519 -0
- package/src/errors.ts +303 -4
- package/src/feedback.ts +20 -0
- package/src/gateway-realtime-transport.ts +3 -3
- package/src/github-repositories.ts +60 -0
- package/src/index.ts +611 -64
- package/src/insights-usage.ts +61 -0
- package/src/interaction.ts +274 -93
- package/src/knowledge.ts +72 -0
- package/src/known-tools.ts +279 -0
- package/src/message-links.ts +178 -0
- package/src/model-context.ts +113 -0
- package/src/model-display.ts +11 -0
- package/src/model-picker-order.ts +6 -0
- package/src/organization-integration-policy.ts +54 -0
- package/src/pr-review-client.ts +1 -1
- package/src/pr-review.ts +1 -1
- package/src/preference-registry.ts +2 -0
- package/src/prepared-mcp-setup.ts +123 -0
- package/src/proxy.ts +23 -12
- package/src/realtime.ts +16 -6
- package/src/session-history-import.ts +84 -0
- package/src/session-list-entries.ts +1 -0
- package/src/session-message-search.ts +47 -0
- package/src/session-proxy-client.ts +68 -0
- package/src/session-proxy.ts +2098 -0
- package/src/session-titles.ts +10 -0
- package/src/session-usage-limits.ts +71 -0
- package/src/shared-catalog-loader.ts +169 -0
- package/src/site-bridge-host.ts +422 -0
- package/src/site-browser-entry.ts +6 -0
- package/src/site-browser-runtime.gen.ts +2 -0
- package/src/site-data.ts +372 -0
- package/src/site-document.test.ts +64 -0
- package/src/site-document.ts +18 -0
- package/src/site-http.ts +171 -0
- package/src/site-sql.ts +153 -0
- package/src/site-tool-bridge.ts +401 -0
- package/src/site.ts +867 -0
- package/src/skills.ts +69 -0
- package/src/sse.ts +9 -3
- package/src/stream.ts +33 -10
- package/src/tenant-workspaces.ts +148 -0
- package/src/tool-auth.ts +301 -0
- package/src/tool-display-metadata.ts +27 -0
- package/src/tools.ts +452 -0
- package/src/transcription.ts +3 -0
- package/src/types.ts +3216 -581
- package/src/usage-allowances.ts +189 -0
- package/src/vault-types.ts +293 -0
- package/src/vaults-api.ts +288 -0
- package/src/workspace-artifacts.ts +55 -6
- package/src/workspace-instruction-policies.ts +2 -1
- package/src/workspace-integrations.ts +402 -0
- package/src/workspace-state.ts +8 -82
- package/dist/chunk-7ZXBPJZP.js.map +0 -1
- package/dist/chunk-C2H7HBNP.js.map +0 -1
- package/dist/chunk-C4DJPZRU.js +0 -119
- package/dist/chunk-C4DJPZRU.js.map +0 -1
- package/dist/chunk-GW3EJ2GP.js.map +0 -1
- package/dist/chunk-TX3EIENU.js.map +0 -1
- package/dist/chunk-VUQZAB3O.js.map +0 -1
- package/dist/chunk-VYCTL62C.js.map +0 -1
- package/dist/chunk-YTAWBDO2.js.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { OpenGeniClient, OpenGeniRequestOptions } from "./client.js";
|
|
2
|
+
import type { ClearWorkspaceAllowanceRequest, ClearWorkspaceAllowanceResponse, GetMyUsageRequest, GetUsageRequest, GrantWorkspaceCreditsRequest, MemberAllowance, SetMemberAllowanceRequest, SetWorkspaceAllowanceRequest, WorkspaceAllowance, WorkspaceAllowanceState, WorkspaceCreditGrant, WorkspaceUsageResponse } from "@opengeni/contracts/usage-allowances";
|
|
3
|
+
export type { AllowanceExhaustedRefusal, ClearWorkspaceAllowanceRequest, ClearWorkspaceAllowanceResponse, GetMyUsageRequest, GetUsageRequest, GrantWorkspaceCreditsRequest, MemberAllowance, MemberAllowanceDefault, MemberAllowanceRule, MemberAllowanceUsage, SetMemberAllowanceRequest, SetWorkspaceAllowanceRequest, UsageAllowancePeriod, UsageAllowanceStatus, UsageAllowanceWindow, WorkspaceAllowance, WorkspaceAllowanceConfig, WorkspaceAllowanceState, WorkspaceAllowanceUsage, WorkspaceCreditGrant, WorkspaceUsageResponse, } from "@opengeni/contracts/usage-allowances";
|
|
4
|
+
/** The one client capability these functions need. */
|
|
5
|
+
export type UsageAllowanceRequestClient = Pick<OpenGeniClient, "requestJson">;
|
|
6
|
+
/** A member target: canonical subject id, or an external identity. */
|
|
7
|
+
export type UsageAllowanceMemberTarget = string | {
|
|
8
|
+
source: string;
|
|
9
|
+
externalId: string;
|
|
10
|
+
};
|
|
11
|
+
/** Query strings for usage reads: only defined values, stringified. */
|
|
12
|
+
export declare function usageAllowanceQuery(query: GetUsageRequest): Record<string, string>;
|
|
13
|
+
/** Configuration, or null when no ceiling is configured. Budget-read authority. */
|
|
14
|
+
export declare function getWorkspaceAllowance(client: UsageAllowanceRequestClient, workspaceId: string): Promise<WorkspaceAllowance | null>;
|
|
15
|
+
/** Lifecycle version plus configuration; version survives a clear. Budget-read authority. */
|
|
16
|
+
export declare function getWorkspaceAllowanceState(client: UsageAllowanceRequestClient, workspaceId: string): Promise<WorkspaceAllowanceState>;
|
|
17
|
+
/**
|
|
18
|
+
* Set the workspace ceiling with exact-version compare-and-set. Requires a
|
|
19
|
+
* verified organization administrator or a full-access organization key.
|
|
20
|
+
*/
|
|
21
|
+
export declare function setWorkspaceAllowance(client: UsageAllowanceRequestClient, workspaceId: string, request: SetWorkspaceAllowanceRequest): Promise<WorkspaceAllowance>;
|
|
22
|
+
/** Remove the ceiling (not a refund or counter reset). Returns the next lifecycle version. */
|
|
23
|
+
export declare function clearWorkspaceAllowance(client: UsageAllowanceRequestClient, workspaceId: string, request: ClearWorkspaceAllowanceRequest): Promise<ClearWorkspaceAllowanceResponse>;
|
|
24
|
+
/** One-off credits on top of the included amount. Reuse the operationId to retry. */
|
|
25
|
+
export declare function grantWorkspaceCredits(client: UsageAllowanceRequestClient, workspaceId: string, request: GrantWorkspaceCreditsRequest): Promise<WorkspaceCreditGrant>;
|
|
26
|
+
/**
|
|
27
|
+
* Set or restore (`rule: null`) one member's ceiling with exact-version CAS.
|
|
28
|
+
* Shares may oversubscribe the pool; the workspace ceiling still binds.
|
|
29
|
+
*/
|
|
30
|
+
export declare function setMemberAllowance(client: UsageAllowanceRequestClient, workspaceId: string, member: UsageAllowanceMemberTarget, request: SetMemberAllowanceRequest): Promise<MemberAllowance>;
|
|
31
|
+
/** The paginated roster page. Workspace admin, organization admin, or org-key read. */
|
|
32
|
+
export declare function getUsage(client: UsageAllowanceRequestClient, workspaceId: string, query?: GetUsageRequest, options?: OpenGeniRequestOptions): Promise<WorkspaceUsageResponse>;
|
|
33
|
+
/** The caller's own row plus the workspace aggregate. Any authenticated member. */
|
|
34
|
+
export declare function getMyUsage(client: UsageAllowanceRequestClient, workspaceId: string, query?: GetMyUsageRequest, options?: OpenGeniRequestOptions): Promise<WorkspaceUsageResponse>;
|
|
35
|
+
/** Every roster page for one period (follows `nextCursor`). */
|
|
36
|
+
export declare function getAllUsage(client: UsageAllowanceRequestClient, workspaceId: string, query?: Omit<GetUsageRequest, "cursor">, options?: OpenGeniRequestOptions): Promise<WorkspaceUsageResponse>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// src/usage-allowances.ts
|
|
2
|
+
function workspacePath(workspaceId) {
|
|
3
|
+
return `/v1/workspaces/${encodeURIComponent(workspaceId)}`;
|
|
4
|
+
}
|
|
5
|
+
function usageAllowanceQuery(query) {
|
|
6
|
+
return Object.fromEntries(
|
|
7
|
+
Object.entries(query).filter(([, value]) => value !== void 0).map(([key, value]) => [key, String(value)])
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
async function getWorkspaceAllowance(client, workspaceId) {
|
|
11
|
+
return await client.requestJson("GET", `${workspacePath(workspaceId)}/allowance`);
|
|
12
|
+
}
|
|
13
|
+
async function getWorkspaceAllowanceState(client, workspaceId) {
|
|
14
|
+
return await client.requestJson("GET", `${workspacePath(workspaceId)}/allowance/state`);
|
|
15
|
+
}
|
|
16
|
+
async function setWorkspaceAllowance(client, workspaceId, request) {
|
|
17
|
+
return await client.requestJson("PUT", `${workspacePath(workspaceId)}/allowance`, request);
|
|
18
|
+
}
|
|
19
|
+
async function clearWorkspaceAllowance(client, workspaceId, request) {
|
|
20
|
+
return await client.requestJson("DELETE", `${workspacePath(workspaceId)}/allowance`, request);
|
|
21
|
+
}
|
|
22
|
+
async function grantWorkspaceCredits(client, workspaceId, request) {
|
|
23
|
+
return await client.requestJson(
|
|
24
|
+
"POST",
|
|
25
|
+
`${workspacePath(workspaceId)}/allowance/grants`,
|
|
26
|
+
request
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
async function setMemberAllowance(client, workspaceId, member, request) {
|
|
30
|
+
const path = typeof member === "string" ? encodeURIComponent(member) : `external/${encodeURIComponent(member.source)}/${encodeURIComponent(member.externalId)}`;
|
|
31
|
+
return await client.requestJson(
|
|
32
|
+
"PUT",
|
|
33
|
+
`${workspacePath(workspaceId)}/members/${path}/allowance`,
|
|
34
|
+
request
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
async function getUsage(client, workspaceId, query = {}, options = {}) {
|
|
38
|
+
return await client.requestJson(
|
|
39
|
+
"GET",
|
|
40
|
+
`${workspacePath(workspaceId)}/usage`,
|
|
41
|
+
void 0,
|
|
42
|
+
usageAllowanceQuery(query),
|
|
43
|
+
options
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
async function getMyUsage(client, workspaceId, query = {}, options = {}) {
|
|
47
|
+
return await client.requestJson(
|
|
48
|
+
"GET",
|
|
49
|
+
`${workspacePath(workspaceId)}/usage/me`,
|
|
50
|
+
void 0,
|
|
51
|
+
usageAllowanceQuery(query),
|
|
52
|
+
options
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
async function getAllUsage(client, workspaceId, query = {}, options = {}) {
|
|
56
|
+
const first = await getUsage(client, workspaceId, { limit: 200, ...query }, options);
|
|
57
|
+
const members = [...first.members];
|
|
58
|
+
let cursor = first.nextCursor;
|
|
59
|
+
const seen = /* @__PURE__ */ new Set();
|
|
60
|
+
while (cursor && !seen.has(cursor)) {
|
|
61
|
+
seen.add(cursor);
|
|
62
|
+
const page = await getUsage(client, workspaceId, { limit: 200, ...query, cursor }, options);
|
|
63
|
+
members.push(...page.members);
|
|
64
|
+
cursor = page.nextCursor;
|
|
65
|
+
}
|
|
66
|
+
return { ...first, members, nextCursor: null };
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
clearWorkspaceAllowance,
|
|
70
|
+
getAllUsage,
|
|
71
|
+
getMyUsage,
|
|
72
|
+
getUsage,
|
|
73
|
+
getWorkspaceAllowance,
|
|
74
|
+
getWorkspaceAllowanceState,
|
|
75
|
+
grantWorkspaceCredits,
|
|
76
|
+
setMemberAllowance,
|
|
77
|
+
setWorkspaceAllowance,
|
|
78
|
+
usageAllowanceQuery
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=usage-allowances.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/usage-allowances.ts"],"sourcesContent":["// @opengeni/sdk/usage-allowances — usage allowance reads and administration as\n// free functions over any client's `requestJson`, so a browser console can use\n// them without widening the native browser client. The root `OpenGeniClient`\n// methods of the same names call the same routes.\n//\n// Amounts are integer USD micros (1 USD = 1,000,000). Display `fraction` and\n// `status` in products that must not show money; see docs/usage-allowances.md.\nimport type { OpenGeniClient, OpenGeniRequestOptions } from \"./client\";\nimport type {\n ClearWorkspaceAllowanceRequest,\n ClearWorkspaceAllowanceResponse,\n GetMyUsageRequest,\n GetUsageRequest,\n GrantWorkspaceCreditsRequest,\n MemberAllowance,\n SetMemberAllowanceRequest,\n SetWorkspaceAllowanceRequest,\n WorkspaceAllowance,\n WorkspaceAllowanceState,\n WorkspaceCreditGrant,\n WorkspaceUsageResponse,\n} from \"@opengeni/contracts/usage-allowances\";\n\nexport type {\n AllowanceExhaustedRefusal,\n ClearWorkspaceAllowanceRequest,\n ClearWorkspaceAllowanceResponse,\n GetMyUsageRequest,\n GetUsageRequest,\n GrantWorkspaceCreditsRequest,\n MemberAllowance,\n MemberAllowanceDefault,\n MemberAllowanceRule,\n MemberAllowanceUsage,\n SetMemberAllowanceRequest,\n SetWorkspaceAllowanceRequest,\n UsageAllowancePeriod,\n UsageAllowanceStatus,\n UsageAllowanceWindow,\n WorkspaceAllowance,\n WorkspaceAllowanceConfig,\n WorkspaceAllowanceState,\n WorkspaceAllowanceUsage,\n WorkspaceCreditGrant,\n WorkspaceUsageResponse,\n} from \"@opengeni/contracts/usage-allowances\";\n\n/** The one client capability these functions need. */\nexport type UsageAllowanceRequestClient = Pick<OpenGeniClient, \"requestJson\">;\n\n/** A member target: canonical subject id, or an external identity. */\nexport type UsageAllowanceMemberTarget = string | { source: string; externalId: string };\n\nfunction workspacePath(workspaceId: string): string {\n return `/v1/workspaces/${encodeURIComponent(workspaceId)}`;\n}\n\n/** Query strings for usage reads: only defined values, stringified. */\nexport function usageAllowanceQuery(query: GetUsageRequest): Record<string, string> {\n return Object.fromEntries(\n Object.entries(query)\n .filter(([, value]) => value !== undefined)\n .map(([key, value]) => [key, String(value)]),\n );\n}\n\n/** Configuration, or null when no ceiling is configured. Budget-read authority. */\nexport async function getWorkspaceAllowance(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n): Promise<WorkspaceAllowance | null> {\n return await client.requestJson(\"GET\", `${workspacePath(workspaceId)}/allowance`);\n}\n\n/** Lifecycle version plus configuration; version survives a clear. Budget-read authority. */\nexport async function getWorkspaceAllowanceState(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n): Promise<WorkspaceAllowanceState> {\n return await client.requestJson(\"GET\", `${workspacePath(workspaceId)}/allowance/state`);\n}\n\n/**\n * Set the workspace ceiling with exact-version compare-and-set. Requires a\n * verified organization administrator or a full-access organization key.\n */\nexport async function setWorkspaceAllowance(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n request: SetWorkspaceAllowanceRequest,\n): Promise<WorkspaceAllowance> {\n return await client.requestJson(\"PUT\", `${workspacePath(workspaceId)}/allowance`, request);\n}\n\n/** Remove the ceiling (not a refund or counter reset). Returns the next lifecycle version. */\nexport async function clearWorkspaceAllowance(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n request: ClearWorkspaceAllowanceRequest,\n): Promise<ClearWorkspaceAllowanceResponse> {\n return await client.requestJson(\"DELETE\", `${workspacePath(workspaceId)}/allowance`, request);\n}\n\n/** One-off credits on top of the included amount. Reuse the operationId to retry. */\nexport async function grantWorkspaceCredits(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n request: GrantWorkspaceCreditsRequest,\n): Promise<WorkspaceCreditGrant> {\n return await client.requestJson(\n \"POST\",\n `${workspacePath(workspaceId)}/allowance/grants`,\n request,\n );\n}\n\n/**\n * Set or restore (`rule: null`) one member's ceiling with exact-version CAS.\n * Shares may oversubscribe the pool; the workspace ceiling still binds.\n */\nexport async function setMemberAllowance(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n member: UsageAllowanceMemberTarget,\n request: SetMemberAllowanceRequest,\n): Promise<MemberAllowance> {\n const path =\n typeof member === \"string\"\n ? encodeURIComponent(member)\n : `external/${encodeURIComponent(member.source)}/${encodeURIComponent(member.externalId)}`;\n return await client.requestJson(\n \"PUT\",\n `${workspacePath(workspaceId)}/members/${path}/allowance`,\n request,\n );\n}\n\n/** The paginated roster page. Workspace admin, organization admin, or org-key read. */\nexport async function getUsage(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n query: GetUsageRequest = {},\n options: OpenGeniRequestOptions = {},\n): Promise<WorkspaceUsageResponse> {\n return await client.requestJson(\n \"GET\",\n `${workspacePath(workspaceId)}/usage`,\n undefined,\n usageAllowanceQuery(query),\n options,\n );\n}\n\n/** The caller's own row plus the workspace aggregate. Any authenticated member. */\nexport async function getMyUsage(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n query: GetMyUsageRequest = {},\n options: OpenGeniRequestOptions = {},\n): Promise<WorkspaceUsageResponse> {\n return await client.requestJson(\n \"GET\",\n `${workspacePath(workspaceId)}/usage/me`,\n undefined,\n usageAllowanceQuery(query),\n options,\n );\n}\n\n/** Every roster page for one period (follows `nextCursor`). */\nexport async function getAllUsage(\n client: UsageAllowanceRequestClient,\n workspaceId: string,\n query: Omit<GetUsageRequest, \"cursor\"> = {},\n options: OpenGeniRequestOptions = {},\n): Promise<WorkspaceUsageResponse> {\n const first = await getUsage(client, workspaceId, { limit: 200, ...query }, options);\n const members = [...first.members];\n let cursor = first.nextCursor;\n // Bounded: a cursor that repeats would otherwise loop forever.\n const seen = new Set<string>();\n while (cursor && !seen.has(cursor)) {\n seen.add(cursor);\n const page = await getUsage(client, workspaceId, { limit: 200, ...query, cursor }, options);\n members.push(...page.members);\n cursor = page.nextCursor;\n }\n return { ...first, members, nextCursor: null };\n}\n"],"mappings":";AAqDA,SAAS,cAAc,aAA6B;AAClD,SAAO,kBAAkB,mBAAmB,WAAW,CAAC;AAC1D;AAGO,SAAS,oBAAoB,OAAgD;AAClF,SAAO,OAAO;AAAA,IACZ,OAAO,QAAQ,KAAK,EACjB,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS,EACzC,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,OAAO,KAAK,CAAC,CAAC;AAAA,EAC/C;AACF;AAGA,eAAsB,sBACpB,QACA,aACoC;AACpC,SAAO,MAAM,OAAO,YAAY,OAAO,GAAG,cAAc,WAAW,CAAC,YAAY;AAClF;AAGA,eAAsB,2BACpB,QACA,aACkC;AAClC,SAAO,MAAM,OAAO,YAAY,OAAO,GAAG,cAAc,WAAW,CAAC,kBAAkB;AACxF;AAMA,eAAsB,sBACpB,QACA,aACA,SAC6B;AAC7B,SAAO,MAAM,OAAO,YAAY,OAAO,GAAG,cAAc,WAAW,CAAC,cAAc,OAAO;AAC3F;AAGA,eAAsB,wBACpB,QACA,aACA,SAC0C;AAC1C,SAAO,MAAM,OAAO,YAAY,UAAU,GAAG,cAAc,WAAW,CAAC,cAAc,OAAO;AAC9F;AAGA,eAAsB,sBACpB,QACA,aACA,SAC+B;AAC/B,SAAO,MAAM,OAAO;AAAA,IAClB;AAAA,IACA,GAAG,cAAc,WAAW,CAAC;AAAA,IAC7B;AAAA,EACF;AACF;AAMA,eAAsB,mBACpB,QACA,aACA,QACA,SAC0B;AAC1B,QAAM,OACJ,OAAO,WAAW,WACd,mBAAmB,MAAM,IACzB,YAAY,mBAAmB,OAAO,MAAM,CAAC,IAAI,mBAAmB,OAAO,UAAU,CAAC;AAC5F,SAAO,MAAM,OAAO;AAAA,IAClB;AAAA,IACA,GAAG,cAAc,WAAW,CAAC,YAAY,IAAI;AAAA,IAC7C;AAAA,EACF;AACF;AAGA,eAAsB,SACpB,QACA,aACA,QAAyB,CAAC,GAC1B,UAAkC,CAAC,GACF;AACjC,SAAO,MAAM,OAAO;AAAA,IAClB;AAAA,IACA,GAAG,cAAc,WAAW,CAAC;AAAA,IAC7B;AAAA,IACA,oBAAoB,KAAK;AAAA,IACzB;AAAA,EACF;AACF;AAGA,eAAsB,WACpB,QACA,aACA,QAA2B,CAAC,GAC5B,UAAkC,CAAC,GACF;AACjC,SAAO,MAAM,OAAO;AAAA,IAClB;AAAA,IACA,GAAG,cAAc,WAAW,CAAC;AAAA,IAC7B;AAAA,IACA,oBAAoB,KAAK;AAAA,IACzB;AAAA,EACF;AACF;AAGA,eAAsB,YACpB,QACA,aACA,QAAyC,CAAC,GAC1C,UAAkC,CAAC,GACF;AACjC,QAAM,QAAQ,MAAM,SAAS,QAAQ,aAAa,EAAE,OAAO,KAAK,GAAG,MAAM,GAAG,OAAO;AACnF,QAAM,UAAU,CAAC,GAAG,MAAM,OAAO;AACjC,MAAI,SAAS,MAAM;AAEnB,QAAM,OAAO,oBAAI,IAAY;AAC7B,SAAO,UAAU,CAAC,KAAK,IAAI,MAAM,GAAG;AAClC,SAAK,IAAI,MAAM;AACf,UAAM,OAAO,MAAM,SAAS,QAAQ,aAAa,EAAE,OAAO,KAAK,GAAG,OAAO,OAAO,GAAG,OAAO;AAC1F,YAAQ,KAAK,GAAG,KAAK,OAAO;AAC5B,aAAS,KAAK;AAAA,EAChB;AACA,SAAO,EAAE,GAAG,OAAO,SAAS,YAAY,KAAK;AAC/C;","names":[]}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { VaultPolicy } from "./types.js";
|
|
2
|
+
export type { VaultPolicy };
|
|
3
|
+
export type VaultOwnerKind = "user" | "workspace" | "organization" | "task";
|
|
4
|
+
export type VaultSource = "opengeni" | "onepassword" | "host";
|
|
5
|
+
export type VaultMode = "read_write" | "read_only";
|
|
6
|
+
export type VaultSyncStatus = "ok" | "syncing" | "error" | "auth_expired" | "rate_limited";
|
|
7
|
+
export type VaultItemType = "login" | "api_key" | "note" | "file" | "passkey";
|
|
8
|
+
export type VaultFieldKind = "text" | "concealed" | "totp" | "file";
|
|
9
|
+
export type VaultAvailability = {
|
|
10
|
+
/** null = every workspace in the organization. */
|
|
11
|
+
allowedWorkspaceIds: string[] | null;
|
|
12
|
+
allowPersonalWorkspaces: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type VaultSummary = {
|
|
15
|
+
id: string;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
ownerKind: VaultOwnerKind;
|
|
18
|
+
ownerLabel: string;
|
|
19
|
+
rootSessionId: string | null;
|
|
20
|
+
name: string;
|
|
21
|
+
description: string | null;
|
|
22
|
+
source: VaultSource;
|
|
23
|
+
mode: VaultMode;
|
|
24
|
+
syncStatus: VaultSyncStatus;
|
|
25
|
+
syncErrorCode: string | null;
|
|
26
|
+
syncErrorMessage: string | null;
|
|
27
|
+
lastSyncedAt: string | null;
|
|
28
|
+
rateLimitedUntil: string | null;
|
|
29
|
+
providerConnectionId: string | null;
|
|
30
|
+
availability: VaultAvailability | null;
|
|
31
|
+
isDefault: boolean;
|
|
32
|
+
itemCount: number;
|
|
33
|
+
canWrite: boolean;
|
|
34
|
+
canManage: boolean;
|
|
35
|
+
generation: number;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
};
|
|
39
|
+
export type VaultItemReferences = {
|
|
40
|
+
primary: string | null;
|
|
41
|
+
otp: string | null;
|
|
42
|
+
byField: Record<string, string>;
|
|
43
|
+
};
|
|
44
|
+
export type VaultItemSummary = {
|
|
45
|
+
id: string;
|
|
46
|
+
vaultId: string;
|
|
47
|
+
type: VaultItemType;
|
|
48
|
+
name: string;
|
|
49
|
+
websites: string[];
|
|
50
|
+
username: string | null;
|
|
51
|
+
hasTotp: boolean;
|
|
52
|
+
hasPasskey: boolean;
|
|
53
|
+
expiresAt: string | null;
|
|
54
|
+
archivedAt: string | null;
|
|
55
|
+
lastUsedAt: string | null;
|
|
56
|
+
updatedAt: string;
|
|
57
|
+
references: VaultItemReferences;
|
|
58
|
+
};
|
|
59
|
+
export type VaultItemField = {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
kind: VaultFieldKind;
|
|
63
|
+
position: number;
|
|
64
|
+
/** null for provider fields. */
|
|
65
|
+
currentVersion: number | null;
|
|
66
|
+
/** Plaintext only for kind "text"; null otherwise. */
|
|
67
|
+
value: string | null;
|
|
68
|
+
fileName: string | null;
|
|
69
|
+
fileSize: number | null;
|
|
70
|
+
reference: string;
|
|
71
|
+
updatedAt: string;
|
|
72
|
+
};
|
|
73
|
+
export type PasskeySummary = {
|
|
74
|
+
rpId: string;
|
|
75
|
+
userName: string | null;
|
|
76
|
+
credentialIdSuffix: string;
|
|
77
|
+
signCount: number;
|
|
78
|
+
leasedUntil: string | null;
|
|
79
|
+
lastUsedAt: string | null;
|
|
80
|
+
};
|
|
81
|
+
export type VaultItem = VaultItemSummary & {
|
|
82
|
+
fields: VaultItemField[];
|
|
83
|
+
passkey: PasskeySummary | null;
|
|
84
|
+
aliases: string[];
|
|
85
|
+
primaryFieldId: string | null;
|
|
86
|
+
createdBySubjectId: string | null;
|
|
87
|
+
createdAt: string;
|
|
88
|
+
generation: number;
|
|
89
|
+
};
|
|
90
|
+
export type VaultVersionCreatedByKind = "human" | "agent" | "api_key" | "migration" | "provider" | "system";
|
|
91
|
+
export type VaultFieldVersionMeta = {
|
|
92
|
+
version: number;
|
|
93
|
+
current: boolean;
|
|
94
|
+
createdAt: string;
|
|
95
|
+
createdByKind: VaultVersionCreatedByKind;
|
|
96
|
+
createdBySubjectId: string | null;
|
|
97
|
+
};
|
|
98
|
+
export type GeneratePasswordOptions = {
|
|
99
|
+
length?: number | undefined;
|
|
100
|
+
lowercase?: boolean | undefined;
|
|
101
|
+
uppercase?: boolean | undefined;
|
|
102
|
+
digits?: boolean | undefined;
|
|
103
|
+
symbols?: boolean | undefined;
|
|
104
|
+
symbolSet?: string | undefined;
|
|
105
|
+
excludeAmbiguous?: boolean | undefined;
|
|
106
|
+
requireEachClass?: boolean | undefined;
|
|
107
|
+
};
|
|
108
|
+
export type CreateVaultRequest = {
|
|
109
|
+
name: string;
|
|
110
|
+
description?: string | undefined;
|
|
111
|
+
ownerKind: "user" | "workspace" | "organization";
|
|
112
|
+
availability?: VaultAvailability | undefined;
|
|
113
|
+
};
|
|
114
|
+
export type UpdateVaultRequest = {
|
|
115
|
+
expectedGeneration: number;
|
|
116
|
+
name?: string | undefined;
|
|
117
|
+
description?: string | null | undefined;
|
|
118
|
+
availability?: VaultAvailability | undefined;
|
|
119
|
+
};
|
|
120
|
+
export type VaultFieldInput = {
|
|
121
|
+
fieldId?: string | undefined;
|
|
122
|
+
name: string;
|
|
123
|
+
kind?: VaultFieldKind | undefined;
|
|
124
|
+
value?: string | undefined;
|
|
125
|
+
generate?: GeneratePasswordOptions | undefined;
|
|
126
|
+
fromReference?: string | undefined;
|
|
127
|
+
fileBase64?: string | undefined;
|
|
128
|
+
fileName?: string | undefined;
|
|
129
|
+
restoreVersion?: number | undefined;
|
|
130
|
+
remove?: true | undefined;
|
|
131
|
+
};
|
|
132
|
+
export type CreateVaultItemRequest = {
|
|
133
|
+
type: VaultItemType;
|
|
134
|
+
name: string;
|
|
135
|
+
websites?: string[] | undefined;
|
|
136
|
+
expiresAt?: string | null | undefined;
|
|
137
|
+
fields: VaultFieldInput[];
|
|
138
|
+
primaryFieldName?: string | undefined;
|
|
139
|
+
};
|
|
140
|
+
export type UpdateVaultItemRequest = Partial<CreateVaultItemRequest> & {
|
|
141
|
+
expectedGeneration: number;
|
|
142
|
+
};
|
|
143
|
+
export type MoveVaultItemRequest = {
|
|
144
|
+
targetVaultId: string;
|
|
145
|
+
mode: "move" | "copy";
|
|
146
|
+
newName?: string | undefined;
|
|
147
|
+
};
|
|
148
|
+
export type RevealVaultFieldResponse = {
|
|
149
|
+
value: string;
|
|
150
|
+
encoding: "utf8" | "base64";
|
|
151
|
+
version: number | null;
|
|
152
|
+
totp: {
|
|
153
|
+
code: string;
|
|
154
|
+
periodSeconds: number;
|
|
155
|
+
expiresAt: string;
|
|
156
|
+
} | null;
|
|
157
|
+
};
|
|
158
|
+
export type ListVaultItemsQuery = {
|
|
159
|
+
q?: string | undefined;
|
|
160
|
+
type?: VaultItemType | undefined;
|
|
161
|
+
includeArchived?: boolean | undefined;
|
|
162
|
+
cursor?: string | undefined;
|
|
163
|
+
limit?: number | undefined;
|
|
164
|
+
};
|
|
165
|
+
export type SessionSecretsVault = VaultSummary & {
|
|
166
|
+
selected: boolean;
|
|
167
|
+
selectable: boolean;
|
|
168
|
+
};
|
|
169
|
+
export type SessionSecretsView = {
|
|
170
|
+
capabilityEnabled: boolean;
|
|
171
|
+
policy: VaultPolicy;
|
|
172
|
+
effectiveVaultIds: string[];
|
|
173
|
+
/** Nearest ancestor that narrowed, if any. */
|
|
174
|
+
narrowedBySessionId: string | null;
|
|
175
|
+
taskVault: VaultSummary | null;
|
|
176
|
+
taskItems: VaultItemSummary[];
|
|
177
|
+
reachableVaults: SessionSecretsVault[];
|
|
178
|
+
};
|
|
179
|
+
export type OnePasswordPlanTier = "family" | "teams" | "business";
|
|
180
|
+
export type InstallOnePasswordRequest = {
|
|
181
|
+
token: string;
|
|
182
|
+
ownership: "user" | "workspace" | "organization";
|
|
183
|
+
planTier?: OnePasswordPlanTier | undefined;
|
|
184
|
+
label?: string | undefined;
|
|
185
|
+
};
|
|
186
|
+
export type ProviderVaultMeta = {
|
|
187
|
+
externalVaultId: string;
|
|
188
|
+
name: string;
|
|
189
|
+
itemCount: number | null;
|
|
190
|
+
linkedVaultId: string | null;
|
|
191
|
+
};
|
|
192
|
+
export type InstallOnePasswordResponse = {
|
|
193
|
+
connectionId: string;
|
|
194
|
+
accountName: string | null;
|
|
195
|
+
vaults: ProviderVaultMeta[];
|
|
196
|
+
};
|
|
197
|
+
/** A 1Password service account connected in a workspace. Never carries the token. */
|
|
198
|
+
export type OnePasswordConnectionSummary = {
|
|
199
|
+
id: string;
|
|
200
|
+
/** Who can use the vaults linked through it. */
|
|
201
|
+
ownership: "user" | "workspace" | "organization";
|
|
202
|
+
/** Sign-in host from the token, for example "my.1password.com". */
|
|
203
|
+
accountName: string | null;
|
|
204
|
+
label: string | null;
|
|
205
|
+
planTier: OnePasswordPlanTier;
|
|
206
|
+
/** When the current token was last checked against 1Password. */
|
|
207
|
+
verifiedAt: string;
|
|
208
|
+
createdAt: string;
|
|
209
|
+
createdBySubjectId: string | null;
|
|
210
|
+
/** The caller can link vaults, replace the token and disconnect it. */
|
|
211
|
+
canManage: boolean;
|
|
212
|
+
};
|
|
213
|
+
/** A new token for an existing connection; its linked vaults keep working. */
|
|
214
|
+
export type ReplaceOnePasswordTokenRequest = {
|
|
215
|
+
token: string;
|
|
216
|
+
planTier?: OnePasswordPlanTier | undefined;
|
|
217
|
+
};
|
|
218
|
+
export type DisconnectOnePasswordResponse = {
|
|
219
|
+
/** The Opengeni vaults that were unlinked. Nothing is deleted in 1Password. */
|
|
220
|
+
unlinkedVaultIds: string[];
|
|
221
|
+
};
|
|
222
|
+
export type LinkProviderVaultRequest = {
|
|
223
|
+
provider: "onepassword" | "host";
|
|
224
|
+
connectionId?: string | undefined;
|
|
225
|
+
externalVaultId: string;
|
|
226
|
+
ownerKind: "user" | "workspace" | "organization";
|
|
227
|
+
mode: VaultMode;
|
|
228
|
+
name?: string | undefined;
|
|
229
|
+
availability?: VaultAvailability | undefined;
|
|
230
|
+
};
|
|
231
|
+
export type CreateManagedProviderVaultRequest = {
|
|
232
|
+
name: string;
|
|
233
|
+
ownerKind: "user" | "workspace" | "organization";
|
|
234
|
+
groupId?: string | undefined;
|
|
235
|
+
};
|
|
236
|
+
export type VaultErrorCode = "vault_not_found" | "vault_item_not_found" | "vault_field_not_found" | "vault_name_conflict" | "vault_item_name_conflict" | "vault_limit_reached" | "vault_read_only" | "vault_generation_conflict" | "vault_permission_denied" | "vault_reveal_requires_human" | "vault_policy_outside_parent" | "encryption_key_missing" | "provider_auth_invalid" | "provider_auth_expired" | "provider_rate_limited" | "provider_unavailable" | "provider_conflict" | "variable_sets_removed" | "secret_save_forbidden" | "invalid_secret_name" | "secret_value_too_large" | "human_auth_required" | "secret_search_cursor_invalid";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { OpenGeniClient } from "./client.js";
|
|
2
|
+
import type { VaultPolicy } from "./types.js";
|
|
3
|
+
import type { CreateManagedProviderVaultRequest, CreateVaultItemRequest, CreateVaultRequest, DisconnectOnePasswordResponse, InstallOnePasswordRequest, InstallOnePasswordResponse, LinkProviderVaultRequest, ListVaultItemsQuery, MoveVaultItemRequest, OnePasswordConnectionSummary, ProviderVaultMeta, ReplaceOnePasswordTokenRequest, RevealVaultFieldResponse, SessionSecretsView, UpdateVaultItemRequest, UpdateVaultRequest, VaultErrorCode, VaultFieldVersionMeta, VaultItem, VaultItemSummary, VaultSummary } from "./vault-types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Vault REST routes over the client's JSON transport. Responses carry metadata
|
|
6
|
+
* only; plaintext comes back only from `revealField`, and callers keep it in
|
|
7
|
+
* memory for as long as they need it, never in a cache.
|
|
8
|
+
*/
|
|
9
|
+
export type VaultClientLike = Pick<OpenGeniClient, "requestJson">;
|
|
10
|
+
/**
|
|
11
|
+
* The client's JSON transport. A client without one still renders (a disabled
|
|
12
|
+
* hook never calls it); each request then fails with a clear error.
|
|
13
|
+
*/
|
|
14
|
+
export declare function asVaultClient(client: unknown): VaultClientLike;
|
|
15
|
+
export declare function vaultsApi(client: VaultClientLike, workspaceId: string): {
|
|
16
|
+
listVaults: (signal?: AbortSignal) => Promise<VaultSummary[]>;
|
|
17
|
+
getVault: (vaultId: string, signal?: AbortSignal) => Promise<VaultSummary>;
|
|
18
|
+
createVault: (request: CreateVaultRequest) => Promise<VaultSummary>;
|
|
19
|
+
updateVault: (vaultId: string, request: UpdateVaultRequest) => Promise<VaultSummary>;
|
|
20
|
+
deleteVault: (vaultId: string, confirmName: string) => Promise<void>;
|
|
21
|
+
syncVault: (vaultId: string) => Promise<VaultSummary>;
|
|
22
|
+
listItems: (vaultId: string, query?: ListVaultItemsQuery, signal?: AbortSignal) => Promise<{
|
|
23
|
+
items: VaultItemSummary[];
|
|
24
|
+
nextCursor: string | null;
|
|
25
|
+
}>;
|
|
26
|
+
getItem: (vaultId: string, itemId: string, signal?: AbortSignal) => Promise<VaultItem>;
|
|
27
|
+
createItem: (vaultId: string, request: CreateVaultItemRequest) => Promise<VaultItem>;
|
|
28
|
+
updateItem: (vaultId: string, itemId: string, request: UpdateVaultItemRequest) => Promise<VaultItem>;
|
|
29
|
+
/** Archives; `permanent` deletes an archived item. */
|
|
30
|
+
deleteItem: (vaultId: string, itemId: string, permanent?: boolean) => Promise<void>;
|
|
31
|
+
restoreItem: (vaultId: string, itemId: string) => Promise<VaultItem>;
|
|
32
|
+
moveItem: (vaultId: string, itemId: string, request: MoveVaultItemRequest) => Promise<VaultItem>;
|
|
33
|
+
/** Plaintext. Audited server-side. Never cache the result. */
|
|
34
|
+
revealField: (vaultId: string, itemId: string, fieldId: string, version?: number) => Promise<RevealVaultFieldResponse>;
|
|
35
|
+
listFieldVersions: (vaultId: string, itemId: string, fieldId: string, signal?: AbortSignal) => Promise<VaultFieldVersionMeta[]>;
|
|
36
|
+
restoreFieldVersion: (vaultId: string, itemId: string, fieldId: string, version: number) => Promise<VaultItem>;
|
|
37
|
+
getSessionSecrets: (sessionId: string, signal?: AbortSignal) => Promise<SessionSecretsView>;
|
|
38
|
+
setSessionVaultPolicy: (sessionId: string, policy: VaultPolicy) => Promise<SessionSecretsView>;
|
|
39
|
+
installOnePassword: (request: InstallOnePasswordRequest) => Promise<InstallOnePasswordResponse>;
|
|
40
|
+
/** The 1Password connections the caller can see. */
|
|
41
|
+
listOnePasswordConnections: (signal?: AbortSignal) => Promise<OnePasswordConnectionSummary[]>;
|
|
42
|
+
/** Checks a new service account token and stores it on the same connection. */
|
|
43
|
+
replaceOnePasswordToken: (connectionId: string, request: ReplaceOnePasswordTokenRequest) => Promise<InstallOnePasswordResponse>;
|
|
44
|
+
/** Unlinks the connection's vaults (nothing is deleted in 1Password) and removes its token. */
|
|
45
|
+
disconnectOnePassword: (connectionId: string) => Promise<DisconnectOnePasswordResponse>;
|
|
46
|
+
listProviderVaults: (connectionId: string, signal?: AbortSignal) => Promise<ProviderVaultMeta[]>;
|
|
47
|
+
linkProviderVault: (request: LinkProviderVaultRequest) => Promise<VaultSummary>;
|
|
48
|
+
createManagedProviderVault: (connectionId: string, request: CreateManagedProviderVaultRequest) => Promise<VaultSummary>;
|
|
49
|
+
};
|
|
50
|
+
export type VaultsApi = ReturnType<typeof vaultsApi>;
|
|
51
|
+
/**
|
|
52
|
+
* The vault error code of a failed call, from either `{error: {code}}` or the
|
|
53
|
+
* vault routes' `{error: "<code>", message}` body. Null for anything else.
|
|
54
|
+
*/
|
|
55
|
+
export declare function vaultErrorCode(error: unknown): VaultErrorCode | null;
|
|
56
|
+
/** Server-side detail of a vault error (for example `retryAt` on a rate limit). */
|
|
57
|
+
export declare function vaultErrorDetail(error: unknown, key: string): unknown;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import type { ToolGatewayIdentity } from "./types.js";
|
|
2
|
+
export type WorkspaceArtifactSourceFile = {
|
|
3
|
+
path: string;
|
|
4
|
+
content: string;
|
|
5
|
+
};
|
|
6
|
+
export type WorkspaceArtifactSourceBundle = {
|
|
7
|
+
entrypoint: string;
|
|
8
|
+
files: WorkspaceArtifactSourceFile[];
|
|
9
|
+
};
|
|
1
10
|
export type WorkspaceArtifactVersion = {
|
|
2
11
|
id: string;
|
|
3
12
|
accountId: string;
|
|
@@ -5,8 +14,11 @@ export type WorkspaceArtifactVersion = {
|
|
|
5
14
|
artifactId: string;
|
|
6
15
|
revision: number;
|
|
7
16
|
contentType: "text/html";
|
|
8
|
-
contentSha256: string;
|
|
17
|
+
contentSha256: string | null;
|
|
9
18
|
sizeBytes: number;
|
|
19
|
+
sourceSha256: string | null;
|
|
20
|
+
sourceSizeBytes: number | null;
|
|
21
|
+
requestedTools: ToolGatewayIdentity[];
|
|
10
22
|
sourceSessionId: string | null;
|
|
11
23
|
sourceTurnId: string | null;
|
|
12
24
|
sourceAttemptId: string | null;
|
|
@@ -14,6 +26,8 @@ export type WorkspaceArtifactVersion = {
|
|
|
14
26
|
createdBySubjectId: string;
|
|
15
27
|
createdAt: string;
|
|
16
28
|
};
|
|
29
|
+
/** Who can see a Site: everyone in the workspace, or only its owner ("Only me"). */
|
|
30
|
+
export type WorkspaceArtifactVisibility = "private" | "workspace";
|
|
17
31
|
export type WorkspaceArtifact = {
|
|
18
32
|
id: string;
|
|
19
33
|
accountId: string;
|
|
@@ -22,6 +36,10 @@ export type WorkspaceArtifact = {
|
|
|
22
36
|
title: string;
|
|
23
37
|
description: string | null;
|
|
24
38
|
status: "active" | "archived";
|
|
39
|
+
/** Absent from older servers, where every Site is visible to the workspace. */
|
|
40
|
+
visibility?: WorkspaceArtifactVisibility;
|
|
41
|
+
/** The person the Site belongs to; only they can change its audience. */
|
|
42
|
+
ownerSubjectId?: string | null;
|
|
25
43
|
currentVersion: WorkspaceArtifactVersion | null;
|
|
26
44
|
createdBySubjectId: string;
|
|
27
45
|
createdAt: string;
|
|
@@ -32,7 +50,7 @@ export type WorkspaceArtifactEvent = {
|
|
|
32
50
|
accountId: string;
|
|
33
51
|
workspaceId: string;
|
|
34
52
|
artifactId: string;
|
|
35
|
-
type: "published" | "rolled_back";
|
|
53
|
+
type: "published" | "rolled_back" | "archived" | "restored";
|
|
36
54
|
fromVersionId: string | null;
|
|
37
55
|
toVersionId: string;
|
|
38
56
|
sourceSessionId: string | null;
|
|
@@ -44,8 +62,10 @@ export type WorkspaceArtifactEvent = {
|
|
|
44
62
|
createdAt: string;
|
|
45
63
|
};
|
|
46
64
|
export type WorkspaceArtifactListOptions = {
|
|
65
|
+
sourceSessionId?: string;
|
|
47
66
|
limit?: number;
|
|
48
67
|
cursor?: string;
|
|
68
|
+
status?: WorkspaceArtifact["status"];
|
|
49
69
|
};
|
|
50
70
|
export type WorkspaceArtifactListResponse = {
|
|
51
71
|
artifacts: WorkspaceArtifact[];
|
|
@@ -63,8 +83,10 @@ export type WorkspaceArtifactContentResponse = {
|
|
|
63
83
|
artifactId: string;
|
|
64
84
|
versionId: string;
|
|
65
85
|
contentType: "text/html";
|
|
66
|
-
contentSha256: string;
|
|
86
|
+
contentSha256: string | null;
|
|
67
87
|
html: string;
|
|
88
|
+
source: WorkspaceArtifactSourceBundle;
|
|
89
|
+
requestedTools: ToolGatewayIdentity[];
|
|
68
90
|
};
|
|
69
91
|
export type WorkspaceArtifactMutationResponse = {
|
|
70
92
|
artifact: WorkspaceArtifact;
|
|
@@ -76,13 +98,21 @@ export type CreateWorkspaceArtifactRequest = {
|
|
|
76
98
|
slug?: string;
|
|
77
99
|
title: string;
|
|
78
100
|
description?: string | null;
|
|
79
|
-
html
|
|
101
|
+
html?: string;
|
|
102
|
+
uploadId?: string;
|
|
103
|
+
source?: WorkspaceArtifactSourceBundle;
|
|
104
|
+
requestedTools?: ToolGatewayIdentity[];
|
|
105
|
+
/** Who can see the new Site. Omitted: the whole workspace. */
|
|
106
|
+
visibility?: WorkspaceArtifactVisibility;
|
|
80
107
|
idempotencyKey: string;
|
|
81
108
|
};
|
|
82
109
|
export type PublishWorkspaceArtifactVersionRequest = {
|
|
83
110
|
title?: string;
|
|
84
111
|
description?: string | null;
|
|
85
|
-
html
|
|
112
|
+
html?: string;
|
|
113
|
+
uploadId?: string;
|
|
114
|
+
source?: WorkspaceArtifactSourceBundle;
|
|
115
|
+
requestedTools?: ToolGatewayIdentity[];
|
|
86
116
|
expectedCurrentVersionId: string;
|
|
87
117
|
idempotencyKey: string;
|
|
88
118
|
};
|
|
@@ -92,3 +122,15 @@ export type RollbackWorkspaceArtifactRequest = {
|
|
|
92
122
|
reason: string;
|
|
93
123
|
idempotencyKey: string;
|
|
94
124
|
};
|
|
125
|
+
export type SetWorkspaceArtifactStatusRequest = {
|
|
126
|
+
status: "active" | "archived";
|
|
127
|
+
expectedCurrentVersionId: string;
|
|
128
|
+
reason: string;
|
|
129
|
+
idempotencyKey: string;
|
|
130
|
+
};
|
|
131
|
+
export type UpdateWorkspaceArtifactVisibilityRequest = {
|
|
132
|
+
visibility: WorkspaceArtifactVisibility;
|
|
133
|
+
};
|
|
134
|
+
export type UpdateWorkspaceArtifactVisibilityResponse = {
|
|
135
|
+
artifact: WorkspaceArtifact;
|
|
136
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const WORKSPACE_INSTRUCTION_POLICY_CONTENT_MAX_CHARS = 262144;
|
|
2
2
|
export type WorkspaceInstructionPolicyKind = "charter" | "policy";
|
|
3
3
|
export type WorkspaceInstructionPolicyScope = "global" | "role";
|
|
4
|
-
export type WorkspaceInstructionPolicyProvenanceSource = "human" | "onboarding" | "knowledge_proposal" | "legacy_import";
|
|
5
|
-
export type WorkspaceInstructionPolicyDraftProvenanceSource = Exclude<WorkspaceInstructionPolicyProvenanceSource, "legacy_import">;
|
|
4
|
+
export type WorkspaceInstructionPolicyProvenanceSource = "human" | "onboarding" | "agent_learning" | "knowledge_proposal" | "legacy_import";
|
|
5
|
+
export type WorkspaceInstructionPolicyDraftProvenanceSource = Exclude<WorkspaceInstructionPolicyProvenanceSource, "legacy_import" | "agent_learning">;
|
|
6
6
|
export type WorkspaceInstructionPolicyActivationType = "activate" | "rollback";
|
|
7
7
|
export declare function normalizeWorkspaceInstructionPolicyRoleKey(value: string): string;
|
|
8
8
|
export type WorkspaceInstructionPolicyTarget = {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { CredentialProviderRequest, WorkspaceWebhookEvent } from "@opengeni/contracts";
|
|
2
|
+
import type { OpenGeniClient } from "./client.js";
|
|
3
|
+
import type { CreateOrganizationWebhookRequest, CreateOrganizationWebhookResponse, GetOrganizationCredentialProviderResponse, ListOrganizationWebhookDeliveriesResponse, ListOrganizationWebhooksResponse, OrganizationWebhook, OrganizationWebhookDelivery, PutOrganizationCredentialProviderRequest, PutOrganizationCredentialProviderResponse, RotateWorkspaceCredentialProviderSecretResponse, RotateOrganizationCredentialProviderSecretResponse, RotateWorkspaceWebhookSecretResponse, RotateOrganizationWebhookSecretResponse, TestWorkspaceCredentialProviderResponse, TestWorkspaceWebhookResponse, UpdateOrganizationWebhookRequest, WorkspaceInheritedIntegrationsResponse, WorkspaceWebhook } from "@opengeni/contracts";
|
|
4
|
+
export type { CreateOrganizationWebhookRequest, CreateOrganizationWebhookResponse, CreateWorkspaceWebhookRequest, CreateWorkspaceWebhookResponse, CredentialProviderRequest, CredentialProviderInitiatorContext, CredentialProviderResponse, CredentialProviderMcpHeaders, CredentialProviderMcpMaterial, GetOrganizationCredentialProviderResponse, GetWorkspaceCredentialProviderResponse, InitiatingHuman, IntegrationEndpointTestResult, IntegrationWorkspaceFilter, ListOrganizationWebhookDeliveriesResponse, ListOrganizationWebhooksResponse, ListWorkspaceWebhookDeliveriesResponse, ListWorkspaceWebhooksResponse, PutWorkspaceCredentialProviderRequest, PutWorkspaceCredentialProviderResponse, PutOrganizationCredentialProviderRequest, PutOrganizationCredentialProviderResponse, RotateWorkspaceCredentialProviderSecretResponse, RotateOrganizationCredentialProviderSecretResponse, RotateWorkspaceWebhookSecretResponse, RotateOrganizationWebhookSecretResponse, TestWorkspaceCredentialProviderResponse, TestWorkspaceWebhookResponse, OrganizationCredentialProvider, OrganizationWebhook, OrganizationWebhookDelivery, UpdateOrganizationWebhookRequest, UpdateWorkspaceWebhookRequest, WorkspaceCredentialProvider, WorkspaceInheritedIntegrationsResponse, WorkspaceTestWebhookEvent, WorkspaceWebhook, WorkspaceWebhookDelivery, WorkspaceWebhookEvent, WorkspaceWebhookEventType, SessionWorkspaceWebhookEvent, WorkspaceUsageWebhookEvent, } from "@opengeni/contracts";
|
|
5
|
+
export { OPENGENI_DELIVERY_ID_HEADER, OPENGENI_EVENT_ID_HEADER, OPENGENI_SIGNATURE_HEADER, OPENGENI_TEST_REQUEST_NIL_ID, OPENGENI_WEBHOOK_TEST_EVENT_TYPE, WORKSPACE_WEBHOOK_EVENT_TYPES, signOpenGeniPayload, verifyOpenGeniSignature, } from "@opengeni/contracts/workspace-integration-wire";
|
|
6
|
+
export type WorkspaceSandboxImages = {
|
|
7
|
+
images: string[];
|
|
8
|
+
selected: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare class OpenGeniSignatureError extends Error {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
type SignedRequest = {
|
|
14
|
+
/** The exact raw request body. Parse it only after verification. */
|
|
15
|
+
body: string;
|
|
16
|
+
headers: Headers | Record<string, string | string[] | undefined>;
|
|
17
|
+
secret: string;
|
|
18
|
+
toleranceSeconds?: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Verify and parse one webhook delivery. Delivery is at least once: dedupe on
|
|
22
|
+
* `event.id` (also sent as the `OpenGeni-Event-Id` header). A `webhook.test`
|
|
23
|
+
* event (from "Send test event") names no session: acknowledge it with 2xx.
|
|
24
|
+
*/
|
|
25
|
+
export declare function verifyWebhookEvent(input: SignedRequest): Promise<{
|
|
26
|
+
event: WorkspaceWebhookEvent;
|
|
27
|
+
deliveryId: string | null;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Verify the exact bytes and parse a provider request, including its frozen
|
|
31
|
+
* initiatorContext when sent by an upgraded worker. Provenance grants no access.
|
|
32
|
+
*/
|
|
33
|
+
export declare function verifyCredentialProviderRequest(input: SignedRequest): Promise<CredentialProviderRequest>;
|
|
34
|
+
/** Identity header names, for receivers that log or dedupe. */
|
|
35
|
+
export declare const OPENGENI_WEBHOOK_HEADERS: {
|
|
36
|
+
readonly signature: "OpenGeni-Signature";
|
|
37
|
+
readonly eventId: "OpenGeni-Event-Id";
|
|
38
|
+
readonly deliveryId: "OpenGeni-Delivery-Id";
|
|
39
|
+
};
|
|
40
|
+
/** Server-side integration administration is opt-in, outside the eager browser client. */
|
|
41
|
+
export declare function getOrganizationCredentialProvider(client: Pick<OpenGeniClient, "requestJson">, organizationId: string): Promise<GetOrganizationCredentialProviderResponse>;
|
|
42
|
+
/** Replace configuration; explicit filter required. Store the first returned signing secret. */
|
|
43
|
+
export declare function putOrganizationCredentialProvider(client: Pick<OpenGeniClient, "requestJson">, organizationId: string, request: PutOrganizationCredentialProviderRequest): Promise<PutOrganizationCredentialProviderResponse>;
|
|
44
|
+
export declare function deleteOrganizationCredentialProvider(client: Pick<OpenGeniClient, "requestJson">, organizationId: string): Promise<void>;
|
|
45
|
+
export declare function listOrganizationWebhooks(client: Pick<OpenGeniClient, "requestJson">, organizationId: string): Promise<ListOrganizationWebhooksResponse>;
|
|
46
|
+
/** Create a webhook and return its signing secret once. */
|
|
47
|
+
export declare function createOrganizationWebhook(client: Pick<OpenGeniClient, "requestJson">, organizationId: string, request: CreateOrganizationWebhookRequest): Promise<CreateOrganizationWebhookResponse>;
|
|
48
|
+
export declare function getOrganizationWebhook(client: Pick<OpenGeniClient, "requestJson">, organizationId: string, webhookId: string): Promise<OrganizationWebhook>;
|
|
49
|
+
export declare function updateOrganizationWebhook(client: Pick<OpenGeniClient, "requestJson">, organizationId: string, webhookId: string, request: UpdateOrganizationWebhookRequest): Promise<OrganizationWebhook>;
|
|
50
|
+
export declare function deleteOrganizationWebhook(client: Pick<OpenGeniClient, "requestJson">, organizationId: string, webhookId: string): Promise<void>;
|
|
51
|
+
export declare function listOrganizationWebhookDeliveries(client: Pick<OpenGeniClient, "requestJson">, organizationId: string, webhookId: string, options?: {
|
|
52
|
+
limit?: number;
|
|
53
|
+
}): Promise<ListOrganizationWebhookDeliveriesResponse>;
|
|
54
|
+
/** Requeue a settled delivery with a fresh attempt budget. */
|
|
55
|
+
export declare function redeliverOrganizationWebhookDelivery(client: Pick<OpenGeniClient, "requestJson">, organizationId: string, webhookId: string, deliveryId: string): Promise<OrganizationWebhookDelivery>;
|
|
56
|
+
export declare function getWorkspaceWebhook(client: Pick<OpenGeniClient, "requestJson">, workspaceId: string, webhookId: string): Promise<WorkspaceWebhook>;
|
|
57
|
+
/** Rotate immediately. Store the new secret; the old signing secret stops working. */
|
|
58
|
+
export declare function rotateWorkspaceCredentialProviderSecret(client: Pick<OpenGeniClient, "requestJson">, workspaceId: string): Promise<RotateWorkspaceCredentialProviderSecretResponse>;
|
|
59
|
+
export declare function rotateOrganizationCredentialProviderSecret(client: Pick<OpenGeniClient, "requestJson">, organizationId: string): Promise<RotateOrganizationCredentialProviderSecretResponse>;
|
|
60
|
+
export declare function rotateOrganizationWebhookSecret(client: Pick<OpenGeniClient, "requestJson">, organizationId: string, webhookId: string): Promise<RotateOrganizationWebhookSecretResponse>;
|
|
61
|
+
export declare function rotateWorkspaceWebhookSecret(client: Pick<OpenGeniClient, "requestJson">, workspaceId: string, webhookId: string): Promise<RotateWorkspaceWebhookSecretResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Send one signed `webhook.test` event to a workspace webhook now and return
|
|
64
|
+
* what the endpoint answered. Nothing is queued or retried.
|
|
65
|
+
*/
|
|
66
|
+
export declare function testWorkspaceWebhook(client: Pick<OpenGeniClient, "requestJson">, workspaceId: string, webhookId: string): Promise<TestWorkspaceWebhookResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Send one signed `purpose: "test"` request to the credential provider this
|
|
69
|
+
* workspace's runs use (its own, else the organization's). Only the names of
|
|
70
|
+
* returned credentials come back, never their values.
|
|
71
|
+
*/
|
|
72
|
+
export declare function testWorkspaceCredentialProvider(client: Pick<OpenGeniClient, "requestJson">, workspaceId: string): Promise<TestWorkspaceCredentialProviderResponse>;
|
|
73
|
+
/** Organization registrations that reach this workspace. Workspace administrators only. */
|
|
74
|
+
export declare function getWorkspaceInheritedIntegrations(client: Pick<OpenGeniClient, "requestJson">, workspaceId: string): Promise<WorkspaceInheritedIntegrationsResponse>;
|