samva 0.34.0 → 0.35.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 +1 -1
- package/dist/client/sdk.gen.d.ts +224 -250
- package/dist/client/sdk.gen.js +84 -210
- package/dist/client/types.gen.d.ts +2894 -401
- package/dist/effect/agents.d.ts +28 -13
- package/dist/effect/agents.js +5 -1
- package/dist/effect/analytics.d.ts +15 -15
- package/dist/effect/api-keys.d.ts +27 -18
- package/dist/effect/campaigns.d.ts +721 -65
- package/dist/effect/categories.d.ts +3 -3
- package/dist/effect/contact-groups.d.ts +15 -15
- package/dist/effect/contacts.d.ts +56 -52
- package/dist/effect/conversations.d.ts +45 -45
- package/dist/effect/email.d.ts +82 -82
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +11 -11
- package/dist/effect/extensions.d.ts +16 -16
- package/dist/effect/generated/agents.d.ts +1063 -33
- package/dist/effect/generated/agents.js +133 -11
- package/dist/effect/generated/analytics.d.ts +109 -136
- package/dist/effect/generated/analytics.js +65 -36
- package/dist/effect/generated/api-keys.d.ts +240 -19
- package/dist/effect/generated/api-keys.js +24 -8
- package/dist/effect/generated/attachments.d.ts +89 -1
- package/dist/effect/generated/attachments.js +10 -2
- package/dist/effect/generated/brands.d.ts +133 -1
- package/dist/effect/generated/brands.js +22 -10
- package/dist/effect/generated/campaigns.d.ts +1442 -140
- package/dist/effect/generated/campaigns.js +82 -20
- package/dist/effect/generated/contact-events.d.ts +26 -4
- package/dist/effect/generated/contact-events.js +5 -3
- package/dist/effect/generated/contact-groups.d.ts +233 -13
- package/dist/effect/generated/contact-groups.js +33 -17
- package/dist/effect/generated/contacts.d.ts +634 -96
- package/dist/effect/generated/contacts.js +82 -20
- package/dist/effect/generated/conversations.d.ts +398 -106
- package/dist/effect/generated/conversations.js +96 -22
- package/dist/effect/generated/custom-fields.d.ts +89 -1
- package/dist/effect/generated/custom-fields.js +11 -3
- package/dist/effect/generated/email.d.ts +1447 -83
- package/dist/effect/generated/email.js +167 -43
- package/dist/effect/generated/events.d.ts +51 -7
- package/dist/effect/generated/events.js +9 -5
- package/dist/effect/generated/extension-installations.d.ts +208 -10
- package/dist/effect/generated/extension-installations.js +26 -8
- package/dist/effect/generated/extensions.d.ts +123 -13
- package/dist/effect/generated/extensions.js +20 -10
- package/dist/effect/generated/feedback.d.ts +23 -1
- package/dist/effect/generated/feedback.js +6 -4
- package/dist/effect/generated/journeys.d.ts +684 -16
- package/dist/effect/generated/journeys.js +37 -9
- package/dist/effect/generated/mailboxes.d.ts +3085 -627
- package/dist/effect/generated/mailboxes.js +340 -141
- package/dist/effect/generated/media.d.ts +125 -15
- package/dist/effect/generated/media.js +15 -2
- package/dist/effect/generated/messages.d.ts +2036 -117
- package/dist/effect/generated/messages.js +286 -54
- package/dist/effect/generated/namespaces.d.ts +209 -25
- package/dist/effect/generated/namespaces.js +27 -9
- package/dist/effect/generated/newsletter-domains.d.ts +98 -12
- package/dist/effect/generated/newsletter-domains.js +20 -13
- package/dist/effect/generated/newsletter-issues.d.ts +354 -19
- package/dist/effect/generated/newsletter-issues.js +162 -98
- package/dist/effect/generated/newsletters.d.ts +123 -13
- package/dist/effect/generated/newsletters.js +19 -9
- package/dist/effect/generated/operations.d.ts +76 -10
- package/dist/effect/generated/operations.js +12 -6
- package/dist/effect/generated/organizations.d.ts +287 -7
- package/dist/effect/generated/organizations.js +33 -5
- package/dist/effect/generated/scheduled-messages.d.ts +4427 -99
- package/dist/effect/generated/scheduled-messages.js +71 -12
- package/dist/effect/generated/shared.d.ts +2213 -190
- package/dist/effect/generated/shared.js +527 -76
- package/dist/effect/generated/subscriptions.d.ts +23 -1
- package/dist/effect/generated/subscriptions.js +6 -4
- package/dist/effect/generated/templates.d.ts +1718 -136
- package/dist/effect/generated/templates.js +421 -226
- package/dist/effect/generated/topic-forms.d.ts +111 -1
- package/dist/effect/generated/topic-forms.js +23 -13
- package/dist/effect/generated/topics.d.ts +353 -43
- package/dist/effect/generated/topics.js +67 -19
- package/dist/effect/generated/webhooks.d.ts +296 -38
- package/dist/effect/generated/webhooks.js +58 -16
- package/dist/effect/generated/whoami.d.ts +35 -1
- package/dist/effect/generated/whoami.js +4 -2
- package/dist/effect/generated-metadata.d.ts +20 -0
- package/dist/effect/generated-metadata.js +10 -0
- package/dist/effect/index.js +2 -2
- package/dist/effect/internal/client.js +1 -1
- package/dist/effect/internal/email-sender.d.ts +1 -1
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/journeys.d.ts +105 -19
- package/dist/effect/mailboxes.d.ts +405 -174
- package/dist/effect/media.d.ts +1 -1
- package/dist/effect/messages.d.ts +40 -40
- package/dist/effect/namespaces.d.ts +15 -15
- package/dist/effect/newsletter-domains.d.ts +5 -5
- package/dist/effect/newsletters.d.ts +1 -1
- package/dist/effect/operations.d.ts +11 -11
- package/dist/effect/organizations.d.ts +2 -2
- package/dist/effect/scheduled-messages.d.ts +863 -8
- package/dist/effect/templates.d.ts +37 -37
- package/dist/effect/topics.d.ts +21 -21
- package/dist/effect/webhooks.d.ts +22 -22
- package/dist/index.js +2 -2
- package/dist/normalize.js +13 -1
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +1 -1
- package/dist/promises/client.js +2 -2
- package/dist/promises/errors.gen.d.ts +22 -2
- package/dist/promises/errors.gen.js +60 -2
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +9 -0
- package/dist/service-map.js +5 -0
- package/package.json +9 -8
|
@@ -1,11 +1,30 @@
|
|
|
1
|
-
import { AgentDefinition, AgentName, ApiKeySecurityMiddleware,
|
|
1
|
+
import { AgentDefinition, AgentModel, AgentModelChoice, AgentName, AgentReasoning, ApiKeySecurityMiddleware, CatalogModelId, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, MonthlySpendCapDollars, NamespaceId, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/agents.ts
|
|
5
|
-
const AgentId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
5
|
+
const AgentId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^agt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
6
6
|
expected: "a string matching the RegExp ^agt_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
7
7
|
identifier: "AgentId"
|
|
8
8
|
})).pipe(Schema.brand("AgentId")))();
|
|
9
|
+
const AgentSpend = /* @__PURE__ */ (() => Schema.Struct({
|
|
10
|
+
month: Schema.String,
|
|
11
|
+
spentDollars: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
12
|
+
capReachedAt: Schema.Union([Schema.String, Schema.Null])
|
|
13
|
+
}).annotate({ identifier: "AgentSpend" }))();
|
|
14
|
+
const ModelFallbackReason = /* @__PURE__ */ (() => Schema.Union([
|
|
15
|
+
Schema.Literal("candidate"),
|
|
16
|
+
Schema.Literal("failed"),
|
|
17
|
+
Schema.Literal("retired"),
|
|
18
|
+
Schema.Literal("blocked"),
|
|
19
|
+
Schema.Literal("missing")
|
|
20
|
+
]).annotate({ identifier: "ModelFallbackReason" }))();
|
|
21
|
+
const AgentModelPrice = /* @__PURE__ */ (() => Schema.Struct({
|
|
22
|
+
inputPerMillionDollars: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
23
|
+
outputPerMillionDollars: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
24
|
+
cacheReadPerMillionDollars: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
|
|
25
|
+
cacheWritePerMillionDollars: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])
|
|
26
|
+
}).annotate({ identifier: "AgentModelPrice" }))();
|
|
27
|
+
const AgentModelAccess = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("included"), Schema.Literal("upgrade")]).annotate({ identifier: "AgentModelAccess" }))();
|
|
9
28
|
const DeleteAgentResponse = /* @__PURE__ */ (() => Schema.Struct({
|
|
10
29
|
id: AgentId,
|
|
11
30
|
deleted: Schema.Literal(true)
|
|
@@ -21,9 +40,22 @@ const AgentListItem = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
21
40
|
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
22
41
|
publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
|
|
23
42
|
publishedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
43
|
+
pausedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
44
|
+
creditsPausedAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
45
|
+
monthlySpendCapDollars: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
|
|
24
46
|
createdAt: Schema.String,
|
|
25
47
|
updatedAt: Schema.String
|
|
26
48
|
}).annotate({ identifier: "AgentListItem" }))();
|
|
49
|
+
const AgentModelReasoning = /* @__PURE__ */ (() => Schema.Struct({
|
|
50
|
+
level: AgentReasoning,
|
|
51
|
+
typicalReplyDollars: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
52
|
+
}).annotate({ identifier: "AgentModelReasoning" }))();
|
|
53
|
+
const AgentModelFallback = /* @__PURE__ */ (() => Schema.Struct({
|
|
54
|
+
from: CatalogModelId,
|
|
55
|
+
to: AgentModel,
|
|
56
|
+
reason: ModelFallbackReason,
|
|
57
|
+
since: Schema.String
|
|
58
|
+
}).annotate({ identifier: "AgentModelFallback" }))();
|
|
27
59
|
const AgentVersionPage = /* @__PURE__ */ (() => Schema.Struct({
|
|
28
60
|
items: Schema.Array(AgentVersionSummary),
|
|
29
61
|
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
@@ -32,6 +64,24 @@ const AgentPage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
32
64
|
items: Schema.Array(AgentListItem),
|
|
33
65
|
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
34
66
|
}).annotate({ identifier: "AgentPage" }))();
|
|
67
|
+
const AgentModelOption = /* @__PURE__ */ (() => Schema.Struct({
|
|
68
|
+
id: AgentModelChoice,
|
|
69
|
+
name: Schema.String,
|
|
70
|
+
alias: Schema.Boolean,
|
|
71
|
+
model: Schema.Struct({
|
|
72
|
+
id: CatalogModelId,
|
|
73
|
+
name: Schema.String
|
|
74
|
+
}),
|
|
75
|
+
contextWindow: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
76
|
+
inputModalities: Schema.Array(Schema.String),
|
|
77
|
+
price: AgentModelPrice,
|
|
78
|
+
reasoning: Schema.Array(AgentModelReasoning),
|
|
79
|
+
access: AgentModelAccess
|
|
80
|
+
}).annotate({ identifier: "AgentModelOption" }))();
|
|
81
|
+
const AgentModelCatalog = /* @__PURE__ */ (() => Schema.Struct({
|
|
82
|
+
replyFeeDollars: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
83
|
+
items: Schema.Array(AgentModelOption)
|
|
84
|
+
}).annotate({ identifier: "AgentModelCatalog" }))();
|
|
35
85
|
const Agent = /* @__PURE__ */ (() => Schema.Struct({
|
|
36
86
|
id: AgentId,
|
|
37
87
|
name: Schema.String,
|
|
@@ -40,6 +90,10 @@ const Agent = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
40
90
|
draft: AgentDefinition,
|
|
41
91
|
publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
|
|
42
92
|
publishedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
93
|
+
pausedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
94
|
+
creditsPausedAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
95
|
+
monthlySpendCapDollars: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
|
|
96
|
+
spend: AgentSpend,
|
|
43
97
|
createdAt: Schema.String,
|
|
44
98
|
updatedAt: Schema.String
|
|
45
99
|
}).annotate({ identifier: "Agent" }))();
|
|
@@ -47,7 +101,8 @@ const AgentVersion = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
47
101
|
agentId: AgentId,
|
|
48
102
|
version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
49
103
|
definition: AgentDefinition,
|
|
50
|
-
publishedAt: Schema.String
|
|
104
|
+
publishedAt: Schema.String,
|
|
105
|
+
modelFallback: Schema.Union([AgentModelFallback, Schema.Null])
|
|
51
106
|
}).annotate({ identifier: "AgentVersion" }))();
|
|
52
107
|
const PublishAgentResponse = /* @__PURE__ */ (() => Schema.Struct({
|
|
53
108
|
agent: Agent,
|
|
@@ -56,9 +111,10 @@ const PublishAgentResponse = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
56
111
|
}).annotate({ identifier: "PublishAgentResponse" }))();
|
|
57
112
|
const AgentsListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
58
113
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
59
|
-
cursor: Schema.optionalKey(Schema.
|
|
114
|
+
cursor: Schema.optionalKey(Schema.String)
|
|
60
115
|
}))();
|
|
61
116
|
const AgentsList200 = AgentPage;
|
|
117
|
+
const AgentsList400 = MalformedRequestError;
|
|
62
118
|
const AgentsList401 = UnauthorizedError;
|
|
63
119
|
const AgentsList403 = ForbiddenError;
|
|
64
120
|
const AgentsList422 = ValidationError;
|
|
@@ -68,21 +124,25 @@ const AgentsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
68
124
|
name: AgentName,
|
|
69
125
|
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the agent belongs to; it cannot move later. Omit for an organization-level agent. A namespace-scoped key always creates in its own namespace." })),
|
|
70
126
|
definition: Schema.optionalKey(Schema.Union([AgentDefinition, Schema.Null]).annotate({
|
|
71
|
-
description: "The first draft. Defaults to an agent with no instructions, knowledge, or endpoints, in supervised mode on the standard model.",
|
|
127
|
+
description: "The first draft. Defaults to an agent with no instructions, knowledge, or endpoints, in supervised mode on the standard model at auto reasoning.",
|
|
72
128
|
default: {
|
|
73
129
|
instructions: "",
|
|
74
130
|
knowledge: "",
|
|
131
|
+
knowledgeSourceIds: [],
|
|
75
132
|
endpointIds: [],
|
|
76
133
|
integrations: [],
|
|
77
134
|
mode: "supervised",
|
|
78
135
|
model: "standard",
|
|
136
|
+
reasoning: "auto",
|
|
79
137
|
workingHours: null,
|
|
80
138
|
takeoverTimeoutMinutes: 30
|
|
81
139
|
}
|
|
82
140
|
}))
|
|
83
141
|
}))();
|
|
84
142
|
const AgentsCreate201 = Agent;
|
|
143
|
+
const AgentsCreate400 = MalformedRequestError;
|
|
85
144
|
const AgentsCreate401 = UnauthorizedError;
|
|
145
|
+
const AgentsCreate402 = PaymentRequiredError;
|
|
86
146
|
const AgentsCreate403 = ForbiddenError;
|
|
87
147
|
const AgentsCreate404 = ResourceNotFoundError;
|
|
88
148
|
const AgentsCreate422 = ValidationError;
|
|
@@ -90,6 +150,7 @@ const AgentsCreate500 = InternalError;
|
|
|
90
150
|
const AgentsCreate504 = GatewayTimeoutError;
|
|
91
151
|
const AgentsGetPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: AgentId }))();
|
|
92
152
|
const AgentsGet200 = Agent;
|
|
153
|
+
const AgentsGet400 = MalformedRequestError;
|
|
93
154
|
const AgentsGet401 = UnauthorizedError;
|
|
94
155
|
const AgentsGet403 = ForbiddenError;
|
|
95
156
|
const AgentsGet404 = ResourceNotFoundError;
|
|
@@ -98,6 +159,7 @@ const AgentsGet500 = InternalError;
|
|
|
98
159
|
const AgentsGet504 = GatewayTimeoutError;
|
|
99
160
|
const AgentsRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: AgentId }))();
|
|
100
161
|
const AgentsRemove200 = DeleteAgentResponse;
|
|
162
|
+
const AgentsRemove400 = MalformedRequestError;
|
|
101
163
|
const AgentsRemove401 = UnauthorizedError;
|
|
102
164
|
const AgentsRemove403 = ForbiddenError;
|
|
103
165
|
const AgentsRemove404 = ResourceNotFoundError;
|
|
@@ -105,21 +167,37 @@ const AgentsRemove422 = ValidationError;
|
|
|
105
167
|
const AgentsRemove500 = InternalError;
|
|
106
168
|
const AgentsRemove504 = GatewayTimeoutError;
|
|
107
169
|
const AgentsUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: AgentId }))();
|
|
108
|
-
const AgentsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
170
|
+
const AgentsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
171
|
+
name: Schema.optionalKey(Schema.Union([AgentName, Schema.Null])),
|
|
172
|
+
monthlySpendCapDollars: Schema.optionalKey(Schema.Union([MonthlySpendCapDollars, Schema.Null]).annotate({ description: "The most the agent may spend in a calendar month (UTC), in dollars and whole cents. Null removes the cap. Takes effect at once, without publishing." }))
|
|
173
|
+
}))();
|
|
109
174
|
const AgentsUpdate200 = Agent;
|
|
175
|
+
const AgentsUpdate400 = MalformedRequestError;
|
|
110
176
|
const AgentsUpdate401 = UnauthorizedError;
|
|
111
177
|
const AgentsUpdate403 = ForbiddenError;
|
|
112
178
|
const AgentsUpdate404 = ResourceNotFoundError;
|
|
113
179
|
const AgentsUpdate422 = ValidationError;
|
|
114
180
|
const AgentsUpdate500 = InternalError;
|
|
115
181
|
const AgentsUpdate504 = GatewayTimeoutError;
|
|
182
|
+
const AgentsContinueOnStandardPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: AgentId }))();
|
|
183
|
+
const AgentsContinueOnStandard200 = PublishAgentResponse;
|
|
184
|
+
const AgentsContinueOnStandard400 = MalformedRequestError;
|
|
185
|
+
const AgentsContinueOnStandard401 = UnauthorizedError;
|
|
186
|
+
const AgentsContinueOnStandard403 = ForbiddenError;
|
|
187
|
+
const AgentsContinueOnStandard404 = ResourceNotFoundError;
|
|
188
|
+
const AgentsContinueOnStandard409 = ConflictError;
|
|
189
|
+
const AgentsContinueOnStandard422 = ValidationError;
|
|
190
|
+
const AgentsContinueOnStandard500 = InternalError;
|
|
191
|
+
const AgentsContinueOnStandard504 = GatewayTimeoutError;
|
|
116
192
|
const AgentsReplaceDraftPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: AgentId }))();
|
|
117
193
|
const AgentsReplaceDraftRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
118
194
|
revision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
119
195
|
definition: AgentDefinition
|
|
120
196
|
}))();
|
|
121
197
|
const AgentsReplaceDraft200 = Agent;
|
|
198
|
+
const AgentsReplaceDraft400 = MalformedRequestError;
|
|
122
199
|
const AgentsReplaceDraft401 = UnauthorizedError;
|
|
200
|
+
const AgentsReplaceDraft402 = PaymentRequiredError;
|
|
123
201
|
const AgentsReplaceDraft403 = ForbiddenError;
|
|
124
202
|
const AgentsReplaceDraft404 = ResourceNotFoundError;
|
|
125
203
|
const AgentsReplaceDraft409 = ConflictError;
|
|
@@ -129,6 +207,7 @@ const AgentsReplaceDraft504 = GatewayTimeoutError;
|
|
|
129
207
|
const AgentsPublishPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: AgentId }))();
|
|
130
208
|
const AgentsPublishRequestJson = /* @__PURE__ */ (() => Schema.Struct({ revision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) }))();
|
|
131
209
|
const AgentsPublish200 = PublishAgentResponse;
|
|
210
|
+
const AgentsPublish400 = MalformedRequestError;
|
|
132
211
|
const AgentsPublish401 = UnauthorizedError;
|
|
133
212
|
const AgentsPublish403 = ForbiddenError;
|
|
134
213
|
const AgentsPublish404 = ResourceNotFoundError;
|
|
@@ -139,9 +218,10 @@ const AgentsPublish504 = GatewayTimeoutError;
|
|
|
139
218
|
const AgentsListVersionsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: AgentId }))();
|
|
140
219
|
const AgentsListVersionsQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
141
220
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
142
|
-
cursor: Schema.optionalKey(Schema.
|
|
221
|
+
cursor: Schema.optionalKey(Schema.String)
|
|
143
222
|
}))();
|
|
144
223
|
const AgentsListVersions200 = AgentVersionPage;
|
|
224
|
+
const AgentsListVersions400 = MalformedRequestError;
|
|
145
225
|
const AgentsListVersions401 = UnauthorizedError;
|
|
146
226
|
const AgentsListVersions403 = ForbiddenError;
|
|
147
227
|
const AgentsListVersions404 = ResourceNotFoundError;
|
|
@@ -153,16 +233,25 @@ const AgentsGetVersionPathParams = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
153
233
|
version: Schema.String
|
|
154
234
|
}))();
|
|
155
235
|
const AgentsGetVersion200 = AgentVersion;
|
|
236
|
+
const AgentsGetVersion400 = MalformedRequestError;
|
|
156
237
|
const AgentsGetVersion401 = UnauthorizedError;
|
|
157
238
|
const AgentsGetVersion403 = ForbiddenError;
|
|
158
239
|
const AgentsGetVersion404 = ResourceNotFoundError;
|
|
159
240
|
const AgentsGetVersion422 = ValidationError;
|
|
160
241
|
const AgentsGetVersion500 = InternalError;
|
|
161
242
|
const AgentsGetVersion504 = GatewayTimeoutError;
|
|
243
|
+
const AgentsListModels200 = AgentModelCatalog;
|
|
244
|
+
const AgentsListModels400 = MalformedRequestError;
|
|
245
|
+
const AgentsListModels401 = UnauthorizedError;
|
|
246
|
+
const AgentsListModels403 = ForbiddenError;
|
|
247
|
+
const AgentsListModels422 = ValidationError;
|
|
248
|
+
const AgentsListModels500 = InternalError;
|
|
249
|
+
const AgentsListModels504 = GatewayTimeoutError;
|
|
162
250
|
var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.get("agentsList", "/v1/agents", {
|
|
163
251
|
query: AgentsListQuery,
|
|
164
252
|
success: AgentsList200,
|
|
165
253
|
error: [
|
|
254
|
+
AgentsList400.pipe(HttpApiSchema.status(400)),
|
|
166
255
|
AgentsList401.pipe(HttpApiSchema.status(401)),
|
|
167
256
|
AgentsList403.pipe(HttpApiSchema.status(403)),
|
|
168
257
|
AgentsList422.pipe(HttpApiSchema.status(422)),
|
|
@@ -173,7 +262,9 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
173
262
|
payload: AgentsCreateRequestJson,
|
|
174
263
|
success: AgentsCreate201.pipe(HttpApiSchema.status(201)),
|
|
175
264
|
error: [
|
|
265
|
+
AgentsCreate400.pipe(HttpApiSchema.status(400)),
|
|
176
266
|
AgentsCreate401.pipe(HttpApiSchema.status(401)),
|
|
267
|
+
AgentsCreate402.pipe(HttpApiSchema.status(402)),
|
|
177
268
|
AgentsCreate403.pipe(HttpApiSchema.status(403)),
|
|
178
269
|
AgentsCreate404.pipe(HttpApiSchema.status(404)),
|
|
179
270
|
AgentsCreate422.pipe(HttpApiSchema.status(422)),
|
|
@@ -184,6 +275,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
184
275
|
params: AgentsGetPathParams,
|
|
185
276
|
success: AgentsGet200,
|
|
186
277
|
error: [
|
|
278
|
+
AgentsGet400.pipe(HttpApiSchema.status(400)),
|
|
187
279
|
AgentsGet401.pipe(HttpApiSchema.status(401)),
|
|
188
280
|
AgentsGet403.pipe(HttpApiSchema.status(403)),
|
|
189
281
|
AgentsGet404.pipe(HttpApiSchema.status(404)),
|
|
@@ -195,6 +287,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
195
287
|
params: AgentsRemovePathParams,
|
|
196
288
|
success: AgentsRemove200,
|
|
197
289
|
error: [
|
|
290
|
+
AgentsRemove400.pipe(HttpApiSchema.status(400)),
|
|
198
291
|
AgentsRemove401.pipe(HttpApiSchema.status(401)),
|
|
199
292
|
AgentsRemove403.pipe(HttpApiSchema.status(403)),
|
|
200
293
|
AgentsRemove404.pipe(HttpApiSchema.status(404)),
|
|
@@ -207,6 +300,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
207
300
|
payload: AgentsUpdateRequestJson,
|
|
208
301
|
success: AgentsUpdate200,
|
|
209
302
|
error: [
|
|
303
|
+
AgentsUpdate400.pipe(HttpApiSchema.status(400)),
|
|
210
304
|
AgentsUpdate401.pipe(HttpApiSchema.status(401)),
|
|
211
305
|
AgentsUpdate403.pipe(HttpApiSchema.status(403)),
|
|
212
306
|
AgentsUpdate404.pipe(HttpApiSchema.status(404)),
|
|
@@ -214,12 +308,27 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
214
308
|
AgentsUpdate500,
|
|
215
309
|
AgentsUpdate504.pipe(HttpApiSchema.status(504))
|
|
216
310
|
]
|
|
217
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.update").annotate(OpenApi.Summary, "
|
|
311
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.update").annotate(OpenApi.Summary, "Update an agent").annotate(OpenApi.Description, "Renames an agent or sets its monthly spend cap. Both take effect at once, without publishing. At the cap the agent pauses and its conversations wait for your team until the month turns (UTC) or the cap is raised or removed."), HttpApiEndpoint.post("agentsContinueOnStandard", "/v1/agents/:id/continue-on-standard", {
|
|
312
|
+
params: AgentsContinueOnStandardPathParams,
|
|
313
|
+
success: AgentsContinueOnStandard200,
|
|
314
|
+
error: [
|
|
315
|
+
AgentsContinueOnStandard400.pipe(HttpApiSchema.status(400)),
|
|
316
|
+
AgentsContinueOnStandard401.pipe(HttpApiSchema.status(401)),
|
|
317
|
+
AgentsContinueOnStandard403.pipe(HttpApiSchema.status(403)),
|
|
318
|
+
AgentsContinueOnStandard404.pipe(HttpApiSchema.status(404)),
|
|
319
|
+
AgentsContinueOnStandard409.pipe(HttpApiSchema.status(409)),
|
|
320
|
+
AgentsContinueOnStandard422.pipe(HttpApiSchema.status(422)),
|
|
321
|
+
AgentsContinueOnStandard500,
|
|
322
|
+
AgentsContinueOnStandard504.pipe(HttpApiSchema.status(504))
|
|
323
|
+
]
|
|
324
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.continueOnStandard").annotate(OpenApi.Summary, "Continue an agent on Standard").annotate(OpenApi.Description, "Publishes the live version again with its model set to standard, as the next immutable version, then removes the monthly spend cap. Use it when the agent pauses at its cap on a pinned model and should keep answering on Standard. The draft is left as it is, so its unpublished changes stay unpublished. The live version's reasoning level is kept when Standard supports it, and is auto otherwise. A live version already on standard publishes nothing and answers published false; the cap is still removed. An agent with no published version returns 422; a version published while the request runs returns 409."), HttpApiEndpoint.put("agentsReplaceDraft", "/v1/agents/:id/draft", {
|
|
218
325
|
params: AgentsReplaceDraftPathParams,
|
|
219
326
|
payload: AgentsReplaceDraftRequestJson,
|
|
220
327
|
success: AgentsReplaceDraft200,
|
|
221
328
|
error: [
|
|
329
|
+
AgentsReplaceDraft400.pipe(HttpApiSchema.status(400)),
|
|
222
330
|
AgentsReplaceDraft401.pipe(HttpApiSchema.status(401)),
|
|
331
|
+
AgentsReplaceDraft402.pipe(HttpApiSchema.status(402)),
|
|
223
332
|
AgentsReplaceDraft403.pipe(HttpApiSchema.status(403)),
|
|
224
333
|
AgentsReplaceDraft404.pipe(HttpApiSchema.status(404)),
|
|
225
334
|
AgentsReplaceDraft409.pipe(HttpApiSchema.status(409)),
|
|
@@ -227,11 +336,12 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
227
336
|
AgentsReplaceDraft500,
|
|
228
337
|
AgentsReplaceDraft504.pipe(HttpApiSchema.status(504))
|
|
229
338
|
]
|
|
230
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.replaceDraft").annotate(OpenApi.Summary, "Replace an agent draft").annotate(OpenApi.Description, "Replaces the whole draft and returns the agent with a new revision. The request names the revision it read; a stale revision returns 409. Published versions, and the conversations answered on them, do not change. An endpoint answers for one agent at a time: a draft that names an endpoint another agent answers on returns 409."), HttpApiEndpoint.post("agentsPublish", "/v1/agents/:id/publish", {
|
|
339
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.replaceDraft").annotate(OpenApi.Summary, "Replace an agent draft").annotate(OpenApi.Description, "Replaces the whole draft and returns the agent with a new revision. The request names the revision it read; a stale revision returns 409. Published versions, and the conversations answered on them, do not change. An endpoint answers for one agent at a time: a draft that names an endpoint another agent answers on returns 409. A draft that pins a catalog model returns 402 unless your plan is Growth or Scale, and 422 when the model is not available or does not support the reasoning level."), HttpApiEndpoint.post("agentsPublish", "/v1/agents/:id/publish", {
|
|
231
340
|
params: AgentsPublishPathParams,
|
|
232
341
|
payload: AgentsPublishRequestJson,
|
|
233
342
|
success: AgentsPublish200,
|
|
234
343
|
error: [
|
|
344
|
+
AgentsPublish400.pipe(HttpApiSchema.status(400)),
|
|
235
345
|
AgentsPublish401.pipe(HttpApiSchema.status(401)),
|
|
236
346
|
AgentsPublish403.pipe(HttpApiSchema.status(403)),
|
|
237
347
|
AgentsPublish404.pipe(HttpApiSchema.status(404)),
|
|
@@ -245,6 +355,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
245
355
|
query: AgentsListVersionsQuery,
|
|
246
356
|
success: AgentsListVersions200,
|
|
247
357
|
error: [
|
|
358
|
+
AgentsListVersions400.pipe(HttpApiSchema.status(400)),
|
|
248
359
|
AgentsListVersions401.pipe(HttpApiSchema.status(401)),
|
|
249
360
|
AgentsListVersions403.pipe(HttpApiSchema.status(403)),
|
|
250
361
|
AgentsListVersions404.pipe(HttpApiSchema.status(404)),
|
|
@@ -256,6 +367,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
256
367
|
params: AgentsGetVersionPathParams,
|
|
257
368
|
success: AgentsGetVersion200,
|
|
258
369
|
error: [
|
|
370
|
+
AgentsGetVersion400.pipe(HttpApiSchema.status(400)),
|
|
259
371
|
AgentsGetVersion401.pipe(HttpApiSchema.status(401)),
|
|
260
372
|
AgentsGetVersion403.pipe(HttpApiSchema.status(403)),
|
|
261
373
|
AgentsGetVersion404.pipe(HttpApiSchema.status(404)),
|
|
@@ -263,7 +375,17 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
|
|
|
263
375
|
AgentsGetVersion500,
|
|
264
376
|
AgentsGetVersion504.pipe(HttpApiSchema.status(504))
|
|
265
377
|
]
|
|
266
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.getVersion").annotate(OpenApi.Summary, "Get a published agent version").annotate(OpenApi.Description, "Returns the immutable definition of one published version.")
|
|
267
|
-
|
|
378
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.getVersion").annotate(OpenApi.Summary, "Get a published agent version").annotate(OpenApi.Description, "Returns the immutable definition of one published version."), HttpApiEndpoint.get("agentsListModels", "/v1/agents/models", {
|
|
379
|
+
success: AgentsListModels200,
|
|
380
|
+
error: [
|
|
381
|
+
AgentsListModels400.pipe(HttpApiSchema.status(400)),
|
|
382
|
+
AgentsListModels401.pipe(HttpApiSchema.status(401)),
|
|
383
|
+
AgentsListModels403.pipe(HttpApiSchema.status(403)),
|
|
384
|
+
AgentsListModels422.pipe(HttpApiSchema.status(422)),
|
|
385
|
+
AgentsListModels500,
|
|
386
|
+
AgentsListModels504.pipe(HttpApiSchema.status(504))
|
|
387
|
+
]
|
|
388
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.listModels").annotate(OpenApi.Summary, "List agent models").annotate(OpenApi.Description, "Returns the models an agent can run on: the standard and max aliases, each with the model it points at today, then every catalog model an agent can pin. Each entry has its price per million tokens, the reasoning levels it accepts with an estimate of a typical reply at each, and whether your plan includes it. Pinning a catalog model needs the Growth or Scale plan.")).annotate(OpenApi.Description, "Agents that answer conversations on your mailbox endpoints, with a draft, published versions, and rules for supervision, hours, and staff takeover") {};
|
|
389
|
+
export { Agent, AgentId, AgentListItem, AgentModelAccess, AgentModelCatalog, AgentModelFallback, AgentModelOption, AgentModelPrice, AgentModelReasoning, AgentPage, AgentSpend, AgentVersion, AgentVersionPage, AgentVersionSummary, AgentsContinueOnStandard200, AgentsContinueOnStandard400, AgentsContinueOnStandard401, AgentsContinueOnStandard403, AgentsContinueOnStandard404, AgentsContinueOnStandard409, AgentsContinueOnStandard422, AgentsContinueOnStandard500, AgentsContinueOnStandard504, AgentsContinueOnStandardPathParams, AgentsCreate201, AgentsCreate400, AgentsCreate401, AgentsCreate402, AgentsCreate403, AgentsCreate404, AgentsCreate422, AgentsCreate500, AgentsCreate504, AgentsCreateRequestJson, AgentsGet200, AgentsGet400, AgentsGet401, AgentsGet403, AgentsGet404, AgentsGet422, AgentsGet500, AgentsGet504, AgentsGetPathParams, AgentsGetVersion200, AgentsGetVersion400, AgentsGetVersion401, AgentsGetVersion403, AgentsGetVersion404, AgentsGetVersion422, AgentsGetVersion500, AgentsGetVersion504, AgentsGetVersionPathParams, AgentsGroup, AgentsList200, AgentsList400, AgentsList401, AgentsList403, AgentsList422, AgentsList500, AgentsList504, AgentsListModels200, AgentsListModels400, AgentsListModels401, AgentsListModels403, AgentsListModels422, AgentsListModels500, AgentsListModels504, AgentsListQuery, AgentsListVersions200, AgentsListVersions400, AgentsListVersions401, AgentsListVersions403, AgentsListVersions404, AgentsListVersions422, AgentsListVersions500, AgentsListVersions504, AgentsListVersionsPathParams, AgentsListVersionsQuery, AgentsPublish200, AgentsPublish400, AgentsPublish401, AgentsPublish403, AgentsPublish404, AgentsPublish409, AgentsPublish422, AgentsPublish500, AgentsPublish504, AgentsPublishPathParams, AgentsPublishRequestJson, AgentsRemove200, AgentsRemove400, AgentsRemove401, AgentsRemove403, AgentsRemove404, AgentsRemove422, AgentsRemove500, AgentsRemove504, AgentsRemovePathParams, AgentsReplaceDraft200, AgentsReplaceDraft400, AgentsReplaceDraft401, AgentsReplaceDraft402, AgentsReplaceDraft403, AgentsReplaceDraft404, AgentsReplaceDraft409, AgentsReplaceDraft422, AgentsReplaceDraft500, AgentsReplaceDraft504, AgentsReplaceDraftPathParams, AgentsReplaceDraftRequestJson, AgentsUpdate200, AgentsUpdate400, AgentsUpdate401, AgentsUpdate403, AgentsUpdate404, AgentsUpdate422, AgentsUpdate500, AgentsUpdate504, AgentsUpdatePathParams, AgentsUpdateRequestJson, DeleteAgentResponse, ModelFallbackReason, PublishAgentResponse };
|
|
268
390
|
|
|
269
391
|
//# sourceMappingURL=agents.js.map
|