@ziggs-ai/contracts 0.1.0 → 0.4.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/generated/agents.d.ts +14 -0
- package/dist/generated/agents.js +2 -0
- package/dist/generated/artifacts.d.ts +49 -0
- package/dist/generated/artifacts.js +2 -0
- package/dist/generated/connections.d.ts +18 -0
- package/dist/generated/connections.js +2 -0
- package/dist/generated/grants.d.ts +43 -0
- package/dist/generated/grants.js +2 -0
- package/dist/generated/payments.d.ts +21 -0
- package/dist/generated/payments.js +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/package.json +4 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED from the backend OpenAPI spec — do not edit.
|
|
3
|
+
* Family: agents. Regenerate: backend 'pnpm docs:generate' then this script.
|
|
4
|
+
*/
|
|
5
|
+
export type OwnedAgent = {
|
|
6
|
+
agentId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
isDelegate: boolean;
|
|
9
|
+
connected: boolean;
|
|
10
|
+
lastSeenAt: string | null;
|
|
11
|
+
};
|
|
12
|
+
export type OwnedAgentsResponse = {
|
|
13
|
+
agents: Array<OwnedAgent>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED from the backend OpenAPI spec — do not edit.
|
|
3
|
+
* Family: artifacts. Regenerate: backend 'pnpm docs:generate' then this script.
|
|
4
|
+
*/
|
|
5
|
+
export type ArtifactSenderPersona = {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
image: string | null;
|
|
9
|
+
};
|
|
10
|
+
export type ArtifactSenderPresentation = {
|
|
11
|
+
persona: ArtifactSenderPersona;
|
|
12
|
+
mode: "persona" | "chain";
|
|
13
|
+
};
|
|
14
|
+
export type ArtifactSender = {
|
|
15
|
+
id: string;
|
|
16
|
+
type: "user" | "agent" | "service" | "system";
|
|
17
|
+
presentation?: ArtifactSenderPresentation;
|
|
18
|
+
};
|
|
19
|
+
export type ArtifactLinks = {
|
|
20
|
+
chatIds: Array<string>;
|
|
21
|
+
agreementIds: Array<string>;
|
|
22
|
+
taskIds: Array<string>;
|
|
23
|
+
};
|
|
24
|
+
export type ReachableArtifactEntry = {
|
|
25
|
+
artifactId: string;
|
|
26
|
+
text: string;
|
|
27
|
+
sender: ArtifactSender;
|
|
28
|
+
contentType: string;
|
|
29
|
+
visibility: "chat" | "agent-private";
|
|
30
|
+
timestamp: string;
|
|
31
|
+
service?: unknown;
|
|
32
|
+
linkRole?: "input" | "output";
|
|
33
|
+
reach: Array<"authored" | "chat" | "agreement" | "task" | "grant">;
|
|
34
|
+
links: ArtifactLinks;
|
|
35
|
+
filename?: string | null;
|
|
36
|
+
mime?: string | null;
|
|
37
|
+
byteSize?: number | null;
|
|
38
|
+
checksum?: string | null;
|
|
39
|
+
format?: "pdf" | "docx" | "hwpx" | "md" | "txt" | "html" | null;
|
|
40
|
+
extractionStatus?: "none" | "pending" | "ok" | "failed" | null;
|
|
41
|
+
extractionError?: string | null;
|
|
42
|
+
truncated?: boolean | null;
|
|
43
|
+
extractedArtifactId?: string | null;
|
|
44
|
+
};
|
|
45
|
+
export type ListReachableArtifactsResult = {
|
|
46
|
+
artifacts: Array<ReachableArtifactEntry>;
|
|
47
|
+
latestSequence: string | null;
|
|
48
|
+
truncated: Array<string>;
|
|
49
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED from the backend OpenAPI spec — do not edit.
|
|
3
|
+
* Family: connections. Regenerate: backend 'pnpm docs:generate' then this script.
|
|
4
|
+
*/
|
|
5
|
+
export type ConnectionView = {
|
|
6
|
+
connectionId: string;
|
|
7
|
+
ownerId: string;
|
|
8
|
+
provider: string;
|
|
9
|
+
externalAccountLabel?: string | null;
|
|
10
|
+
externalAccountId?: string | null;
|
|
11
|
+
scopesGranted?: Array<string>;
|
|
12
|
+
mcpServerUrl?: string | null;
|
|
13
|
+
status: string;
|
|
14
|
+
createdAt?: string;
|
|
15
|
+
};
|
|
16
|
+
export type ConnectionsListResponse = {
|
|
17
|
+
connections: Array<ConnectionView>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED from the backend OpenAPI spec — do not edit.
|
|
3
|
+
* Family: grants. Regenerate: backend 'pnpm docs:generate' then this script.
|
|
4
|
+
*/
|
|
5
|
+
export type GrantScopeView = {
|
|
6
|
+
kind: "chat" | "agreement" | "org" | "artifact" | "task" | "connection" | "wallet" | "consent" | "inbox";
|
|
7
|
+
id: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
};
|
|
10
|
+
export type GrantCaveatView = {
|
|
11
|
+
type: string;
|
|
12
|
+
value: unknown;
|
|
13
|
+
};
|
|
14
|
+
export type GrantBasis = {
|
|
15
|
+
kind: "creation" | "publication" | "membership" | "acceptance" | "agreement";
|
|
16
|
+
id: string | null;
|
|
17
|
+
};
|
|
18
|
+
export type GrantView = {
|
|
19
|
+
grantId: string;
|
|
20
|
+
issuerId: string;
|
|
21
|
+
holderId: string;
|
|
22
|
+
parentGrantId: string | null;
|
|
23
|
+
agreementId: string | null;
|
|
24
|
+
scope: GrantScopeView;
|
|
25
|
+
caveats: Array<GrantCaveatView>;
|
|
26
|
+
revoked: boolean;
|
|
27
|
+
expiresAt: string | null;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
health: "active" | "expired" | "revoked";
|
|
30
|
+
holderKind?: "user" | "org" | "agent";
|
|
31
|
+
access?: "read" | "write" | "admit";
|
|
32
|
+
basis?: GrantBasis;
|
|
33
|
+
};
|
|
34
|
+
export type UnreadableRail = {
|
|
35
|
+
rail: string;
|
|
36
|
+
requiredScope: string;
|
|
37
|
+
};
|
|
38
|
+
export type ListGrantsResult = {
|
|
39
|
+
items: Array<GrantView>;
|
|
40
|
+
nextCursor: string | null;
|
|
41
|
+
hasMore: boolean;
|
|
42
|
+
unreadableRails?: Array<UnreadableRail>;
|
|
43
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED from the backend OpenAPI spec — do not edit.
|
|
3
|
+
* Family: payments. Regenerate: backend 'pnpm docs:generate' then this script.
|
|
4
|
+
*/
|
|
5
|
+
export type WalletRef = {
|
|
6
|
+
walletId: string;
|
|
7
|
+
ownerId: string;
|
|
8
|
+
orgId: string | null;
|
|
9
|
+
currency: string;
|
|
10
|
+
status: string;
|
|
11
|
+
};
|
|
12
|
+
export type WalletListEntry = {
|
|
13
|
+
wallet: WalletRef;
|
|
14
|
+
balance: number;
|
|
15
|
+
availableBalance: number;
|
|
16
|
+
orgId: string | null;
|
|
17
|
+
isPrimary: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type WalletsMineResponse = {
|
|
20
|
+
wallets: Array<WalletListEntry>;
|
|
21
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -11,3 +11,8 @@ export * from './chat';
|
|
|
11
11
|
export * from './inbox';
|
|
12
12
|
export * from './error';
|
|
13
13
|
export * from './socket';
|
|
14
|
+
export * from './generated/agents';
|
|
15
|
+
export * from './generated/grants';
|
|
16
|
+
export * from './generated/payments';
|
|
17
|
+
export * from './generated/connections';
|
|
18
|
+
export * from './generated/artifacts';
|
package/dist/index.js
CHANGED
|
@@ -27,3 +27,9 @@ __exportStar(require("./chat"), exports);
|
|
|
27
27
|
__exportStar(require("./inbox"), exports);
|
|
28
28
|
__exportStar(require("./error"), exports);
|
|
29
29
|
__exportStar(require("./socket"), exports);
|
|
30
|
+
// Generated from the backend OpenAPI spec (ZIG-1668). See scripts/generate-wire.mjs.
|
|
31
|
+
__exportStar(require("./generated/agents"), exports);
|
|
32
|
+
__exportStar(require("./generated/grants"), exports);
|
|
33
|
+
__exportStar(require("./generated/payments"), exports);
|
|
34
|
+
__exportStar(require("./generated/connections"), exports);
|
|
35
|
+
__exportStar(require("./generated/artifacts"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Wire contracts for the Ziggs API — response shapes, error body, and socket events, shared by every client.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc -p tsconfig.json",
|
|
13
13
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
14
|
-
"prepack": "rm -rf dist && npm run build"
|
|
14
|
+
"prepack": "rm -rf dist && npm run build",
|
|
15
|
+
"generate": "node scripts/generate-wire.mjs",
|
|
16
|
+
"check:generated": "node scripts/check-generated.mjs"
|
|
15
17
|
},
|
|
16
18
|
"engines": {
|
|
17
19
|
"node": ">=18"
|