@ingram-cloud/sdk 1.0.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/README.md +74 -0
- package/dist/client.js +460 -0
- package/dist/events.js +108 -0
- package/dist/index.js +19 -0
- package/dist/responses.js +12 -0
- package/dist/schemas.js +4 -0
- package/dist/zod/_page.js +17 -0
- package/dist/zod/agents.js +176 -0
- package/dist/zod/approvals.js +38 -0
- package/dist/zod/budgets.js +62 -0
- package/dist/zod/catalog.js +49 -0
- package/dist/zod/connections.js +75 -0
- package/dist/zod/conversations.js +91 -0
- package/dist/zod/customers.js +53 -0
- package/dist/zod/deployments.js +81 -0
- package/dist/zod/discord.js +32 -0
- package/dist/zod/email.js +45 -0
- package/dist/zod/files.js +55 -0
- package/dist/zod/index.js +35 -0
- package/dist/zod/mcp.js +107 -0
- package/dist/zod/memories.js +43 -0
- package/dist/zod/observability.js +133 -0
- package/dist/zod/projects.js +58 -0
- package/dist/zod/runs.js +119 -0
- package/dist/zod/schedules.js +71 -0
- package/dist/zod/slack.js +69 -0
- package/dist/zod/smith-revisions.js +42 -0
- package/dist/zod/smiths.js +108 -0
- package/dist/zod/telegram.js +36 -0
- package/dist/zod/tenant.js +219 -0
- package/dist/zod/vector-stores.js +251 -0
- package/dist/zod/whatsapp.js +47 -0
- package/package.json +56 -0
- package/ts/client.ts +1187 -0
- package/ts/events.ts +119 -0
- package/ts/index.ts +20 -0
- package/ts/responses.ts +83 -0
- package/ts/schemas.ts +4 -0
- package/ts/zod/_page.ts +18 -0
- package/ts/zod/agents.ts +202 -0
- package/ts/zod/approvals.ts +44 -0
- package/ts/zod/budgets.ts +75 -0
- package/ts/zod/catalog.ts +57 -0
- package/ts/zod/connections.ts +87 -0
- package/ts/zod/conversations.ts +103 -0
- package/ts/zod/customers.ts +62 -0
- package/ts/zod/deployments.ts +93 -0
- package/ts/zod/discord.ts +39 -0
- package/ts/zod/email.ts +52 -0
- package/ts/zod/files.ts +62 -0
- package/ts/zod/index.ts +35 -0
- package/ts/zod/mcp.ts +123 -0
- package/ts/zod/memories.ts +53 -0
- package/ts/zod/observability.ts +155 -0
- package/ts/zod/projects.ts +68 -0
- package/ts/zod/runs.ts +135 -0
- package/ts/zod/schedules.ts +82 -0
- package/ts/zod/slack.ts +79 -0
- package/ts/zod/smith-revisions.ts +50 -0
- package/ts/zod/smiths.ts +118 -0
- package/ts/zod/telegram.ts +43 -0
- package/ts/zod/tenant.ts +267 -0
- package/ts/zod/vector-stores.ts +296 -0
- package/ts/zod/whatsapp.ts +54 -0
package/ts/zod/smiths.ts
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-authored Zod schemas for the `smiths` resource — the wire's source of
|
|
3
|
+
* truth, replacing the loose generated `schemas.ts` shapes for this resource.
|
|
4
|
+
*
|
|
5
|
+
* One source, three outputs: the API imports these into its `createRoute`
|
|
6
|
+
* definitions (validation + emitted OpenAPI), and the consumer-facing `IC*`
|
|
7
|
+
* types are `z.infer`red from them here and re-exported by `../responses`. No
|
|
8
|
+
* Zod is pulled into a type-only consumer — `responses.ts` re-exports these as
|
|
9
|
+
* `export type`.
|
|
10
|
+
*
|
|
11
|
+
* A smith is one running clone of an agent (`/v1/smiths`, `smt_` ids), the unit
|
|
12
|
+
* of data isolation. Its identity fields live alongside its *effective* agent
|
|
13
|
+
* config (model/instructions/tools), flattened onto the resource. Memory is a
|
|
14
|
+
* separate sub-resource (`/v1/smiths/{id}/memory`, schemas in `./memories`).
|
|
15
|
+
*
|
|
16
|
+
* `.meta({ id })` names the component so the emitted OpenAPI references it as
|
|
17
|
+
* `#/components/schemas/<id>` rather than inlining it.
|
|
18
|
+
*/
|
|
19
|
+
import { z } from "zod";
|
|
20
|
+
|
|
21
|
+
// ── Smith response ───────────────────────────────────────────────────────────
|
|
22
|
+
|
|
23
|
+
export const SmithOut = z
|
|
24
|
+
.object({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
external_id: z.string().nullable(),
|
|
27
|
+
display_name: z.string().nullable(),
|
|
28
|
+
locale: z.string().nullable(),
|
|
29
|
+
timezone: z.string().nullable(),
|
|
30
|
+
/** The customer (billable party) this smith's usage rolls up to. */
|
|
31
|
+
customer_id: z.string().nullish(),
|
|
32
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
33
|
+
// The *effective* agent config (agent-resolved when attached).
|
|
34
|
+
model: z.string(),
|
|
35
|
+
/** The raw instructions template (may contain {{ variables }}). */
|
|
36
|
+
instructions: z.string(),
|
|
37
|
+
/** What this smith actually runs with — {{ variables }} bound per-smith. */
|
|
38
|
+
rendered_instructions: z.string().nullish(),
|
|
39
|
+
enabled_hosted_tools: z.array(z.string()).optional(),
|
|
40
|
+
vector_store_ids: z.array(z.string()).optional(),
|
|
41
|
+
auto_memory: z.boolean().optional(),
|
|
42
|
+
memory_consolidation: z.boolean().optional(),
|
|
43
|
+
/** How the config resolved: by reference, with overrides, or embedded. */
|
|
44
|
+
config_source: z.enum(["agent", "override", "custom"]).optional(),
|
|
45
|
+
agent_id: z.string().nullish(),
|
|
46
|
+
agent_version: z.number().int().nullish(),
|
|
47
|
+
pin: z.number().int().nullish(),
|
|
48
|
+
/** Which config fields this smith overrides on top of its agent version.
|
|
49
|
+
* The rest track the agent. Empty for a clean reference or a standalone
|
|
50
|
+
* smith. Clear an override by PATCHing that field to `null`. */
|
|
51
|
+
override_keys: z.array(z.string()).optional(),
|
|
52
|
+
/** What each field reverts to — the agent version's value, before this
|
|
53
|
+
* smith's overrides. `null` for a standalone smith (nothing to inherit). */
|
|
54
|
+
inherited: z
|
|
55
|
+
.object({
|
|
56
|
+
model: z.string(),
|
|
57
|
+
instructions: z.string().nullable(),
|
|
58
|
+
enabled_hosted_tools: z.array(z.string()),
|
|
59
|
+
vector_store_ids: z.array(z.string()),
|
|
60
|
+
auto_memory: z.boolean().nullable(),
|
|
61
|
+
memory_consolidation: z.boolean().nullable(),
|
|
62
|
+
})
|
|
63
|
+
.nullish(),
|
|
64
|
+
created_at: z.string(),
|
|
65
|
+
})
|
|
66
|
+
.meta({ id: "SmithOut" });
|
|
67
|
+
|
|
68
|
+
/** Cursor-paginated smith list: `data` + `has_more` (+ opaque `next_cursor`). */
|
|
69
|
+
export const SmithListOut = z
|
|
70
|
+
.object({
|
|
71
|
+
data: z.array(SmithOut),
|
|
72
|
+
has_more: z.boolean(),
|
|
73
|
+
next_cursor: z.string().nullish(),
|
|
74
|
+
})
|
|
75
|
+
.meta({ id: "SmithListOut" });
|
|
76
|
+
|
|
77
|
+
// ── Request bodies ──────────────────────────────────────────────────────────
|
|
78
|
+
|
|
79
|
+
export const SmithCreate = z
|
|
80
|
+
.object({
|
|
81
|
+
external_id: z.string().nullish(),
|
|
82
|
+
display_name: z.string().nullish(),
|
|
83
|
+
locale: z.string().nullish(),
|
|
84
|
+
timezone: z.string().nullish(),
|
|
85
|
+
customer_id: z.string().nullish(),
|
|
86
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
87
|
+
agent_id: z.string().nullish(),
|
|
88
|
+
pin: z.number().int().nullish(),
|
|
89
|
+
model: z.string().nullish(),
|
|
90
|
+
instructions: z.string().nullish(),
|
|
91
|
+
enabled_hosted_tools: z.array(z.string()).nullish(),
|
|
92
|
+
vector_store_ids: z.array(z.string()).nullish(),
|
|
93
|
+
auto_memory: z.boolean().nullish(),
|
|
94
|
+
memory_consolidation: z.boolean().nullish(),
|
|
95
|
+
})
|
|
96
|
+
.meta({ id: "SmithCreate" });
|
|
97
|
+
|
|
98
|
+
export const SmithPatch = z
|
|
99
|
+
.object({
|
|
100
|
+
display_name: z.string().nullish(),
|
|
101
|
+
locale: z.string().nullish(),
|
|
102
|
+
timezone: z.string().nullish(),
|
|
103
|
+
customer_id: z.string().nullish(),
|
|
104
|
+
metadata: z.record(z.string(), z.unknown()).nullish(),
|
|
105
|
+
agent_id: z.string().nullish(),
|
|
106
|
+
pin: z.number().int().nullish(),
|
|
107
|
+
model: z.string().nullish(),
|
|
108
|
+
instructions: z.string().nullish(),
|
|
109
|
+
enabled_hosted_tools: z.array(z.string()).nullish(),
|
|
110
|
+
vector_store_ids: z.array(z.string()).nullish(),
|
|
111
|
+
auto_memory: z.boolean().nullish(),
|
|
112
|
+
memory_consolidation: z.boolean().nullish(),
|
|
113
|
+
})
|
|
114
|
+
.meta({ id: "SmithPatch" });
|
|
115
|
+
|
|
116
|
+
// ── Inferred consumer-facing types (re-exported by ../responses) ─────────────
|
|
117
|
+
|
|
118
|
+
export type ICSmith = z.infer<typeof SmithOut>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-authored Zod schemas for the `telegram` channel-config resource — the
|
|
3
|
+
* wire's source of truth, replacing the loose generated shapes for this
|
|
4
|
+
* resource.
|
|
5
|
+
*
|
|
6
|
+
* One source, three outputs: the API imports these into its `createRoute`
|
|
7
|
+
* definitions (validation + emitted OpenAPI), and the consumer-facing `IC*`
|
|
8
|
+
* types are `z.infer`red from them here and re-exported by `../responses`. No
|
|
9
|
+
* Zod is pulled into a type-only consumer — `responses.ts` re-exports these as
|
|
10
|
+
* `export type`.
|
|
11
|
+
*
|
|
12
|
+
* `.meta({ id })` names the component so the emitted OpenAPI references it as
|
|
13
|
+
* `#/components/schemas/<id>` rather than inlining it.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The tenant's Telegram bot config status. The token itself is never returned;
|
|
19
|
+
* the optional fields are present only once `configured` is true (`has_token`
|
|
20
|
+
* appears on the read path, not the just-configured write response).
|
|
21
|
+
*/
|
|
22
|
+
export const TelegramBotOut = z
|
|
23
|
+
.object({
|
|
24
|
+
configured: z.boolean(),
|
|
25
|
+
bot_username: z.string().optional(),
|
|
26
|
+
bot_id: z.number().int().optional(),
|
|
27
|
+
has_token: z.boolean().optional(),
|
|
28
|
+
webhook_url: z.string().optional(),
|
|
29
|
+
})
|
|
30
|
+
.meta({ id: "TelegramBotOut" });
|
|
31
|
+
|
|
32
|
+
// ── Request bodies ──────────────────────────────────────────────────────────
|
|
33
|
+
|
|
34
|
+
export const TelegramBotIn = z
|
|
35
|
+
.object({
|
|
36
|
+
bot_token: z.string(),
|
|
37
|
+
webhook_secret: z.string().nullish(),
|
|
38
|
+
})
|
|
39
|
+
.meta({ id: "TelegramBotIn" });
|
|
40
|
+
|
|
41
|
+
// ── Inferred consumer-facing types (re-exported by ../responses) ─────────────
|
|
42
|
+
|
|
43
|
+
export type ICTelegramBot = z.infer<typeof TelegramBotOut>;
|
package/ts/zod/tenant.ts
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-authored Zod schemas for the `tenant` config plane — the grab-bag router
|
|
3
|
+
* (`api/src/routes/tenant.ts`) serving the events feed, hosted-tool catalog,
|
|
4
|
+
* BYOK model keys, the model catalog, OAuth client providers, minted tokens, the
|
|
5
|
+
* usage summary, and webhooks.
|
|
6
|
+
*
|
|
7
|
+
* One source, three outputs: the API imports these into its `createRoute`
|
|
8
|
+
* definitions (validation + emitted OpenAPI), and the consumer-facing `IC*`
|
|
9
|
+
* types are `z.infer`red from them here and re-exported by `../responses`.
|
|
10
|
+
*
|
|
11
|
+
* `.meta({ id })` names the component so the emitted OpenAPI references it as
|
|
12
|
+
* `#/components/schemas/<id>` rather than inlining it.
|
|
13
|
+
*/
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
import { pageOut } from "./_page.js";
|
|
16
|
+
|
|
17
|
+
// ── Events (poll mirror of the webhook firehose) ─────────────────────────────
|
|
18
|
+
|
|
19
|
+
/** One event in the `/v1/events` feed — the `{v:1}` envelope (sans `tenant_id`,
|
|
20
|
+
* which the feed omits since the tenant is implicit in the token). */
|
|
21
|
+
export const EventOut = z
|
|
22
|
+
.object({
|
|
23
|
+
/** Envelope schema version (always `1` today). */
|
|
24
|
+
v: z.number().int(),
|
|
25
|
+
id: z.string(),
|
|
26
|
+
type: z.string(),
|
|
27
|
+
smith_id: z.string().nullable(),
|
|
28
|
+
data: z.record(z.string(), z.unknown()),
|
|
29
|
+
created_at: z.string().nullable(),
|
|
30
|
+
})
|
|
31
|
+
.meta({ id: "EventOut" });
|
|
32
|
+
|
|
33
|
+
export const EventListOut = pageOut(EventOut, "EventListOut");
|
|
34
|
+
|
|
35
|
+
// ── Webhooks ─────────────────────────────────────────────────────────────────
|
|
36
|
+
|
|
37
|
+
export const WebhookOut = z
|
|
38
|
+
.object({
|
|
39
|
+
id: z.string(),
|
|
40
|
+
url: z.string(),
|
|
41
|
+
events: z.array(z.string()),
|
|
42
|
+
active: z.boolean(),
|
|
43
|
+
created_at: z.string().nullable(),
|
|
44
|
+
})
|
|
45
|
+
.meta({ id: "WebhookOut" });
|
|
46
|
+
|
|
47
|
+
export const WebhookListOut = pageOut(WebhookOut, "WebhookListOut");
|
|
48
|
+
|
|
49
|
+
/** The create response — the signing `secret` is returned EXACTLY ONCE, here. */
|
|
50
|
+
export const WebhookCreateOut = z
|
|
51
|
+
.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
url: z.string(),
|
|
54
|
+
events: z.array(z.string()),
|
|
55
|
+
active: z.boolean(),
|
|
56
|
+
secret: z.string(),
|
|
57
|
+
})
|
|
58
|
+
.meta({ id: "WebhookCreateOut" });
|
|
59
|
+
|
|
60
|
+
/** The patch/delete-adjacent ack shape (just the id). */
|
|
61
|
+
export const WebhookIdOut = z
|
|
62
|
+
.object({ id: z.string() })
|
|
63
|
+
.meta({ id: "WebhookIdOut" });
|
|
64
|
+
|
|
65
|
+
export const WebhookIn = z
|
|
66
|
+
.object({
|
|
67
|
+
url: z.string(),
|
|
68
|
+
events: z.array(z.string()).default([]),
|
|
69
|
+
active: z.boolean().default(true),
|
|
70
|
+
})
|
|
71
|
+
.meta({ id: "WebhookIn" });
|
|
72
|
+
|
|
73
|
+
export const WebhookPatch = z
|
|
74
|
+
.object({
|
|
75
|
+
url: z.string().nullish(),
|
|
76
|
+
events: z.array(z.string()).nullish(),
|
|
77
|
+
active: z.boolean().nullish(),
|
|
78
|
+
})
|
|
79
|
+
.meta({ id: "WebhookPatch" });
|
|
80
|
+
|
|
81
|
+
// ── Tokens (mint / list / revoke RS256 JWTs) ─────────────────────────────────
|
|
82
|
+
|
|
83
|
+
/** A minted-token *summary* — the list/listing shape. The secret `token` is
|
|
84
|
+
* NEVER echoed here; it only appears in {@link MintedTokenOut} on create. */
|
|
85
|
+
export const TokenOut = z
|
|
86
|
+
.object({
|
|
87
|
+
id: z.string(),
|
|
88
|
+
name: z.string().nullable(),
|
|
89
|
+
sub: z.string(),
|
|
90
|
+
scopes: z.array(z.string()),
|
|
91
|
+
prefix: z.string().nullable(),
|
|
92
|
+
created_at: z.string().nullable(),
|
|
93
|
+
expires_at: z.string().nullable(),
|
|
94
|
+
revoked_at: z.string().nullable(),
|
|
95
|
+
})
|
|
96
|
+
.meta({ id: "TokenOut" });
|
|
97
|
+
|
|
98
|
+
export const TokenListOut = pageOut(TokenOut, "TokenListOut");
|
|
99
|
+
|
|
100
|
+
/** The create response — carries the secret `token` exactly once. */
|
|
101
|
+
export const MintedTokenOut = z
|
|
102
|
+
.object({
|
|
103
|
+
id: z.string(),
|
|
104
|
+
token: z.string(),
|
|
105
|
+
scope: z.string(),
|
|
106
|
+
sub: z.string(),
|
|
107
|
+
scopes: z.array(z.string()),
|
|
108
|
+
expires_at: z.string().nullable(),
|
|
109
|
+
})
|
|
110
|
+
.meta({ id: "MintedTokenOut" });
|
|
111
|
+
|
|
112
|
+
export const TokenIn = z
|
|
113
|
+
.object({
|
|
114
|
+
scope: z.string().default("smith"),
|
|
115
|
+
smith_id: z.string().nullish(),
|
|
116
|
+
permissions: z.array(z.string()).nullish(),
|
|
117
|
+
ttl_seconds: z.number().int().nullish(),
|
|
118
|
+
name: z.string().nullish(),
|
|
119
|
+
})
|
|
120
|
+
.meta({ id: "TokenIn" });
|
|
121
|
+
|
|
122
|
+
// ── Usage (aggregated token usage across the tenant's runs, by day) ──────────
|
|
123
|
+
|
|
124
|
+
export const UsageOut = z
|
|
125
|
+
.object({
|
|
126
|
+
totals: z.object({
|
|
127
|
+
runs: z.number().int(),
|
|
128
|
+
input_tokens: z.number().int(),
|
|
129
|
+
output_tokens: z.number().int(),
|
|
130
|
+
total_tokens: z.number().int(),
|
|
131
|
+
}),
|
|
132
|
+
series: z.array(
|
|
133
|
+
z.object({
|
|
134
|
+
date: z.string(),
|
|
135
|
+
runs: z.number().int(),
|
|
136
|
+
total_tokens: z.number().int(),
|
|
137
|
+
}),
|
|
138
|
+
),
|
|
139
|
+
})
|
|
140
|
+
.meta({ id: "UsageOut" });
|
|
141
|
+
|
|
142
|
+
// ── Model catalog + BYOK keys ────────────────────────────────────────────────
|
|
143
|
+
|
|
144
|
+
/** One selectable model in the `/v1/tenant/models` catalog. */
|
|
145
|
+
export const ModelOut = z
|
|
146
|
+
.object({
|
|
147
|
+
id: z.string(),
|
|
148
|
+
provider: z.string(),
|
|
149
|
+
label: z.string(),
|
|
150
|
+
available: z.boolean(),
|
|
151
|
+
/** Whose key a run would use: the tenant's ("byok") or Ingram-hosted ("hosted"). */
|
|
152
|
+
source: z.enum(["byok", "hosted"]).nullish(),
|
|
153
|
+
})
|
|
154
|
+
.meta({ id: "ModelOut" });
|
|
155
|
+
|
|
156
|
+
/** A runnable backend in the model catalog (NB `base_url` is a *bool flag* — does
|
|
157
|
+
* the provider accept a base-url override — not a URL). */
|
|
158
|
+
export const ModelProviderOut = z
|
|
159
|
+
.object({
|
|
160
|
+
id: z.string(),
|
|
161
|
+
label: z.string(),
|
|
162
|
+
base_url: z.boolean(),
|
|
163
|
+
/** True when Ingram hosts a key for this provider (runnable without a tenant key). */
|
|
164
|
+
hosted: z.boolean().optional(),
|
|
165
|
+
})
|
|
166
|
+
.meta({ id: "ModelProviderOut" });
|
|
167
|
+
|
|
168
|
+
export const ModelsListOut = z
|
|
169
|
+
.object({
|
|
170
|
+
data: z.array(ModelOut),
|
|
171
|
+
providers: z.array(ModelProviderOut),
|
|
172
|
+
})
|
|
173
|
+
.meta({ id: "ModelsListOut" });
|
|
174
|
+
|
|
175
|
+
/** A BYOK model key — the `api_key` is NEVER echoed, only its presence. */
|
|
176
|
+
export const ModelKeyOut = z
|
|
177
|
+
.object({
|
|
178
|
+
provider: z.string(),
|
|
179
|
+
base_url: z.string().nullable(),
|
|
180
|
+
has_key: z.boolean(),
|
|
181
|
+
updated_at: z.string().nullable(),
|
|
182
|
+
})
|
|
183
|
+
.meta({ id: "ModelKeyOut" });
|
|
184
|
+
|
|
185
|
+
export const ModelKeyListOut = z
|
|
186
|
+
.object({ data: z.array(ModelKeyOut) })
|
|
187
|
+
.meta({ id: "ModelKeyListOut" });
|
|
188
|
+
|
|
189
|
+
/** The PUT ack — never echoes the key, only presence + the (non-secret) base_url. */
|
|
190
|
+
export const ModelKeyConfiguredOut = z
|
|
191
|
+
.object({
|
|
192
|
+
provider: z.string(),
|
|
193
|
+
configured: z.boolean(),
|
|
194
|
+
base_url: z.string().nullable(),
|
|
195
|
+
})
|
|
196
|
+
.meta({ id: "ModelKeyConfiguredOut" });
|
|
197
|
+
|
|
198
|
+
export const ModelKeyIn = z
|
|
199
|
+
.object({
|
|
200
|
+
api_key: z.string(),
|
|
201
|
+
base_url: z.string().nullish(),
|
|
202
|
+
})
|
|
203
|
+
.meta({ id: "ModelKeyIn" });
|
|
204
|
+
|
|
205
|
+
// ── Providers (tenant OAuth client credentials) ──────────────────────────────
|
|
206
|
+
|
|
207
|
+
/** A provider's OAuth client config — the `client_secret` is NEVER echoed, only
|
|
208
|
+
* `has_client_secret`. */
|
|
209
|
+
export const ProviderOut = z
|
|
210
|
+
.object({
|
|
211
|
+
provider: z.string(),
|
|
212
|
+
client_id: z.string().nullable(),
|
|
213
|
+
token_uri: z.string().nullable(),
|
|
214
|
+
scopes_allowed: z.array(z.string()),
|
|
215
|
+
refresh_webhook: z.string().nullable(),
|
|
216
|
+
has_client_secret: z.boolean(),
|
|
217
|
+
})
|
|
218
|
+
.meta({ id: "ProviderOut" });
|
|
219
|
+
|
|
220
|
+
export const ProviderListOut = z
|
|
221
|
+
.object({ data: z.array(ProviderOut) })
|
|
222
|
+
.meta({ id: "ProviderListOut" });
|
|
223
|
+
|
|
224
|
+
/** The PUT ack. */
|
|
225
|
+
export const ProviderConfiguredOut = z
|
|
226
|
+
.object({
|
|
227
|
+
provider: z.string(),
|
|
228
|
+
configured: z.boolean(),
|
|
229
|
+
})
|
|
230
|
+
.meta({ id: "ProviderConfiguredOut" });
|
|
231
|
+
|
|
232
|
+
export const ProviderIn = z
|
|
233
|
+
.object({
|
|
234
|
+
client_id: z.string().nullish(),
|
|
235
|
+
client_secret: z.string().nullish(),
|
|
236
|
+
token_uri: z.string().nullish(),
|
|
237
|
+
scopes_allowed: z.array(z.string()).default([]),
|
|
238
|
+
refresh_webhook: z.string().nullish(),
|
|
239
|
+
})
|
|
240
|
+
.meta({ id: "ProviderIn" });
|
|
241
|
+
|
|
242
|
+
// ── Hosted-tool catalog ──────────────────────────────────────────────────────
|
|
243
|
+
|
|
244
|
+
/** One tool hosted by Ingram Cloud that the catalog advertises. */
|
|
245
|
+
export const HostedToolOut = z
|
|
246
|
+
.object({
|
|
247
|
+
name: z.string(),
|
|
248
|
+
description: z.string(),
|
|
249
|
+
})
|
|
250
|
+
.meta({ id: "HostedToolOut" });
|
|
251
|
+
|
|
252
|
+
export const HostedToolsListOut = z
|
|
253
|
+
.object({ data: z.array(HostedToolOut) })
|
|
254
|
+
.meta({ id: "HostedToolsListOut" });
|
|
255
|
+
|
|
256
|
+
// ── Inferred consumer-facing types (re-exported by ../responses) ─────────────
|
|
257
|
+
|
|
258
|
+
export type ICEvent = z.infer<typeof EventOut>;
|
|
259
|
+
export type ICWebhook = z.infer<typeof WebhookOut>;
|
|
260
|
+
export type ICToken = z.infer<typeof TokenOut>;
|
|
261
|
+
export type ICMintedToken = z.infer<typeof MintedTokenOut>;
|
|
262
|
+
export type ICUsage = z.infer<typeof UsageOut>;
|
|
263
|
+
export type ICModel = z.infer<typeof ModelOut>;
|
|
264
|
+
export type ICModelProvider = z.infer<typeof ModelProviderOut>;
|
|
265
|
+
export type ICModelCatalog = z.infer<typeof ModelsListOut>;
|
|
266
|
+
export type ICModelKey = z.infer<typeof ModelKeyOut>;
|
|
267
|
+
export type ICProvider = z.infer<typeof ProviderOut>;
|