samva 0.26.0 → 0.27.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 +2 -0
- package/dist/client/sdk.gen.js +245 -1
- package/dist/effect/agents.d.ts +121 -0
- package/dist/effect/agents.js +29 -0
- package/dist/effect/analytics.js +1 -1
- package/dist/effect/generated/agents.js +271 -0
- package/dist/effect/generated/email.d.ts +15 -30
- package/dist/effect/generated/email.js +3 -6
- package/dist/effect/generated/index.d.ts +1 -1
- package/dist/effect/generated/mailboxes.d.ts +294 -588
- package/dist/effect/generated/shared.d.ts +35 -70
- package/dist/effect/generated/shared.js +49 -22
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +2 -1
- package/dist/effect/internal/operation.js +1 -0
- package/dist/effect/journeys.d.ts +112 -112
- package/dist/package.js +1 -1
- package/dist/promises/index.d.ts +3 -1
- package/dist/promises/index.js +3 -1
- package/dist/service-map.d.ts +45 -0
- package/dist/service-map.js +30 -0
- package/package.json +7 -3
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { AgentDefinition, AgentName, ApiKeySecurityMiddleware, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, NamespaceId, ResourceNotFoundError, UnauthorizedError, ValidationError, VersionCursor } from "./shared.js";
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
//#region src/effect/generated/agents.ts
|
|
5
|
+
const AgentId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^agt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
6
|
+
expected: "a string matching the RegExp ^agt_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
7
|
+
identifier: "AgentId"
|
|
8
|
+
})).pipe(Schema.brand("AgentId"));
|
|
9
|
+
const DeleteAgentResponse = /* @__PURE__ */ Schema.Struct({
|
|
10
|
+
id: AgentId,
|
|
11
|
+
deleted: Schema.Literal(true)
|
|
12
|
+
}).annotate({ identifier: "DeleteAgentResponse" });
|
|
13
|
+
const AgentVersionSummary = /* @__PURE__ */ Schema.Struct({
|
|
14
|
+
agentId: AgentId,
|
|
15
|
+
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" })),
|
|
16
|
+
publishedAt: Schema.String
|
|
17
|
+
}).annotate({ identifier: "AgentVersionSummary" });
|
|
18
|
+
const AgentListItem = /* @__PURE__ */ Schema.Struct({
|
|
19
|
+
id: AgentId,
|
|
20
|
+
name: Schema.String,
|
|
21
|
+
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
22
|
+
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
|
+
publishedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
24
|
+
createdAt: Schema.String,
|
|
25
|
+
updatedAt: Schema.String
|
|
26
|
+
}).annotate({ identifier: "AgentListItem" });
|
|
27
|
+
const AgentVersionPage = /* @__PURE__ */ Schema.Struct({
|
|
28
|
+
items: Schema.Array(AgentVersionSummary),
|
|
29
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
30
|
+
}).annotate({ identifier: "AgentVersionPage" });
|
|
31
|
+
const AgentPage = /* @__PURE__ */ Schema.Struct({
|
|
32
|
+
items: Schema.Array(AgentListItem),
|
|
33
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
34
|
+
}).annotate({ identifier: "AgentPage" });
|
|
35
|
+
const Agent = /* @__PURE__ */ Schema.Struct({
|
|
36
|
+
id: AgentId,
|
|
37
|
+
name: Schema.String,
|
|
38
|
+
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
39
|
+
revision: Schema.String,
|
|
40
|
+
draft: AgentDefinition,
|
|
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]),
|
|
42
|
+
publishedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
43
|
+
createdAt: Schema.String,
|
|
44
|
+
updatedAt: Schema.String
|
|
45
|
+
}).annotate({ identifier: "Agent" });
|
|
46
|
+
const AgentVersion = /* @__PURE__ */ Schema.Struct({
|
|
47
|
+
agentId: AgentId,
|
|
48
|
+
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
|
+
definition: AgentDefinition,
|
|
50
|
+
publishedAt: Schema.String
|
|
51
|
+
}).annotate({ identifier: "AgentVersion" });
|
|
52
|
+
const PublishAgentResponse = /* @__PURE__ */ Schema.Struct({
|
|
53
|
+
agent: Agent,
|
|
54
|
+
version: AgentVersion,
|
|
55
|
+
published: Schema.Boolean
|
|
56
|
+
}).annotate({ identifier: "PublishAgentResponse" });
|
|
57
|
+
const AgentsListQuery = /* @__PURE__ */ Schema.Struct({
|
|
58
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
59
|
+
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
|
|
60
|
+
});
|
|
61
|
+
const AgentsList200 = AgentPage;
|
|
62
|
+
const AgentsList401 = UnauthorizedError;
|
|
63
|
+
const AgentsList403 = ForbiddenError;
|
|
64
|
+
const AgentsList422 = ValidationError;
|
|
65
|
+
const AgentsList500 = InternalError;
|
|
66
|
+
const AgentsList504 = GatewayTimeoutError;
|
|
67
|
+
const AgentsCreateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
68
|
+
name: AgentName,
|
|
69
|
+
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
|
+
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.",
|
|
72
|
+
default: {
|
|
73
|
+
instructions: "",
|
|
74
|
+
knowledge: "",
|
|
75
|
+
endpointIds: [],
|
|
76
|
+
integrationIds: [],
|
|
77
|
+
mode: "supervised",
|
|
78
|
+
model: "standard",
|
|
79
|
+
approvalPolicy: "toolActions",
|
|
80
|
+
workingHours: null,
|
|
81
|
+
takeoverTimeoutMinutes: 30
|
|
82
|
+
}
|
|
83
|
+
}))
|
|
84
|
+
});
|
|
85
|
+
const AgentsCreate201 = Agent;
|
|
86
|
+
const AgentsCreate401 = UnauthorizedError;
|
|
87
|
+
const AgentsCreate403 = ForbiddenError;
|
|
88
|
+
const AgentsCreate404 = ResourceNotFoundError;
|
|
89
|
+
const AgentsCreate422 = ValidationError;
|
|
90
|
+
const AgentsCreate500 = InternalError;
|
|
91
|
+
const AgentsCreate504 = GatewayTimeoutError;
|
|
92
|
+
const AgentsGetPathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
|
|
93
|
+
const AgentsGet200 = Agent;
|
|
94
|
+
const AgentsGet401 = UnauthorizedError;
|
|
95
|
+
const AgentsGet403 = ForbiddenError;
|
|
96
|
+
const AgentsGet404 = ResourceNotFoundError;
|
|
97
|
+
const AgentsGet422 = ValidationError;
|
|
98
|
+
const AgentsGet500 = InternalError;
|
|
99
|
+
const AgentsGet504 = GatewayTimeoutError;
|
|
100
|
+
const AgentsRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
|
|
101
|
+
const AgentsRemove200 = DeleteAgentResponse;
|
|
102
|
+
const AgentsRemove401 = UnauthorizedError;
|
|
103
|
+
const AgentsRemove403 = ForbiddenError;
|
|
104
|
+
const AgentsRemove404 = ResourceNotFoundError;
|
|
105
|
+
const AgentsRemove422 = ValidationError;
|
|
106
|
+
const AgentsRemove500 = InternalError;
|
|
107
|
+
const AgentsRemove504 = GatewayTimeoutError;
|
|
108
|
+
const AgentsUpdatePathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
|
|
109
|
+
const AgentsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({ name: AgentName });
|
|
110
|
+
const AgentsUpdate200 = Agent;
|
|
111
|
+
const AgentsUpdate401 = UnauthorizedError;
|
|
112
|
+
const AgentsUpdate403 = ForbiddenError;
|
|
113
|
+
const AgentsUpdate404 = ResourceNotFoundError;
|
|
114
|
+
const AgentsUpdate422 = ValidationError;
|
|
115
|
+
const AgentsUpdate500 = InternalError;
|
|
116
|
+
const AgentsUpdate504 = GatewayTimeoutError;
|
|
117
|
+
const AgentsReplaceDraftPathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
|
|
118
|
+
const AgentsReplaceDraftRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
119
|
+
revision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
120
|
+
definition: AgentDefinition
|
|
121
|
+
});
|
|
122
|
+
const AgentsReplaceDraft200 = Agent;
|
|
123
|
+
const AgentsReplaceDraft401 = UnauthorizedError;
|
|
124
|
+
const AgentsReplaceDraft403 = ForbiddenError;
|
|
125
|
+
const AgentsReplaceDraft404 = ResourceNotFoundError;
|
|
126
|
+
const AgentsReplaceDraft409 = ConflictError;
|
|
127
|
+
const AgentsReplaceDraft422 = ValidationError;
|
|
128
|
+
const AgentsReplaceDraft500 = InternalError;
|
|
129
|
+
const AgentsReplaceDraft504 = GatewayTimeoutError;
|
|
130
|
+
const AgentsPublishPathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
|
|
131
|
+
const AgentsPublishRequestJson = /* @__PURE__ */ Schema.Struct({ revision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) });
|
|
132
|
+
const AgentsPublish200 = PublishAgentResponse;
|
|
133
|
+
const AgentsPublish401 = UnauthorizedError;
|
|
134
|
+
const AgentsPublish403 = ForbiddenError;
|
|
135
|
+
const AgentsPublish404 = ResourceNotFoundError;
|
|
136
|
+
const AgentsPublish409 = ConflictError;
|
|
137
|
+
const AgentsPublish422 = ValidationError;
|
|
138
|
+
const AgentsPublish500 = InternalError;
|
|
139
|
+
const AgentsPublish504 = GatewayTimeoutError;
|
|
140
|
+
const AgentsListVersionsPathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
|
|
141
|
+
const AgentsListVersionsQuery = /* @__PURE__ */ Schema.Struct({
|
|
142
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
143
|
+
cursor: Schema.optionalKey(Schema.Union([VersionCursor, Schema.Null]))
|
|
144
|
+
});
|
|
145
|
+
const AgentsListVersions200 = AgentVersionPage;
|
|
146
|
+
const AgentsListVersions401 = UnauthorizedError;
|
|
147
|
+
const AgentsListVersions403 = ForbiddenError;
|
|
148
|
+
const AgentsListVersions404 = ResourceNotFoundError;
|
|
149
|
+
const AgentsListVersions422 = ValidationError;
|
|
150
|
+
const AgentsListVersions500 = InternalError;
|
|
151
|
+
const AgentsListVersions504 = GatewayTimeoutError;
|
|
152
|
+
const AgentsGetVersionPathParams = /* @__PURE__ */ Schema.Struct({
|
|
153
|
+
id: AgentId,
|
|
154
|
+
version: Schema.String
|
|
155
|
+
});
|
|
156
|
+
const AgentsGetVersion200 = AgentVersion;
|
|
157
|
+
const AgentsGetVersion401 = UnauthorizedError;
|
|
158
|
+
const AgentsGetVersion403 = ForbiddenError;
|
|
159
|
+
const AgentsGetVersion404 = ResourceNotFoundError;
|
|
160
|
+
const AgentsGetVersion422 = ValidationError;
|
|
161
|
+
const AgentsGetVersion500 = InternalError;
|
|
162
|
+
const AgentsGetVersion504 = GatewayTimeoutError;
|
|
163
|
+
var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.get("agentsList", "/v1/agents", {
|
|
164
|
+
query: AgentsListQuery,
|
|
165
|
+
success: AgentsList200,
|
|
166
|
+
error: [
|
|
167
|
+
AgentsList401.pipe(HttpApiSchema.status(401)),
|
|
168
|
+
AgentsList403.pipe(HttpApiSchema.status(403)),
|
|
169
|
+
AgentsList422.pipe(HttpApiSchema.status(422)),
|
|
170
|
+
AgentsList500,
|
|
171
|
+
AgentsList504.pipe(HttpApiSchema.status(504))
|
|
172
|
+
]
|
|
173
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.list").annotate(OpenApi.Summary, "List agents").annotate(OpenApi.Description, "Returns the agents the caller can reach, newest first, without their drafts. Pass nextCursor back as cursor for the next page."), HttpApiEndpoint.post("agentsCreate", "/v1/agents", {
|
|
174
|
+
payload: AgentsCreateRequestJson,
|
|
175
|
+
success: AgentsCreate201.pipe(HttpApiSchema.status(201)),
|
|
176
|
+
error: [
|
|
177
|
+
AgentsCreate401.pipe(HttpApiSchema.status(401)),
|
|
178
|
+
AgentsCreate403.pipe(HttpApiSchema.status(403)),
|
|
179
|
+
AgentsCreate404.pipe(HttpApiSchema.status(404)),
|
|
180
|
+
AgentsCreate422.pipe(HttpApiSchema.status(422)),
|
|
181
|
+
AgentsCreate500,
|
|
182
|
+
AgentsCreate504.pipe(HttpApiSchema.status(504))
|
|
183
|
+
]
|
|
184
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.create").annotate(OpenApi.Summary, "Create an agent").annotate(OpenApi.Description, "Creates an agent with a draft and returns it with status 201. The agent answers nothing until its draft is published. A new agent starts in supervised mode, so each reply waits for a person to approve it. The namespace is set at creation and cannot change."), HttpApiEndpoint.get("agentsGet", "/v1/agents/:id", {
|
|
185
|
+
params: AgentsGetPathParams,
|
|
186
|
+
success: AgentsGet200,
|
|
187
|
+
error: [
|
|
188
|
+
AgentsGet401.pipe(HttpApiSchema.status(401)),
|
|
189
|
+
AgentsGet403.pipe(HttpApiSchema.status(403)),
|
|
190
|
+
AgentsGet404.pipe(HttpApiSchema.status(404)),
|
|
191
|
+
AgentsGet422.pipe(HttpApiSchema.status(422)),
|
|
192
|
+
AgentsGet500,
|
|
193
|
+
AgentsGet504.pipe(HttpApiSchema.status(504))
|
|
194
|
+
]
|
|
195
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.get").annotate(OpenApi.Summary, "Get an agent").annotate(OpenApi.Description, "Returns an agent with its draft, its current revision, and its newest published version number."), HttpApiEndpoint.delete("agentsRemove", "/v1/agents/:id", {
|
|
196
|
+
params: AgentsRemovePathParams,
|
|
197
|
+
success: AgentsRemove200,
|
|
198
|
+
error: [
|
|
199
|
+
AgentsRemove401.pipe(HttpApiSchema.status(401)),
|
|
200
|
+
AgentsRemove403.pipe(HttpApiSchema.status(403)),
|
|
201
|
+
AgentsRemove404.pipe(HttpApiSchema.status(404)),
|
|
202
|
+
AgentsRemove422.pipe(HttpApiSchema.status(422)),
|
|
203
|
+
AgentsRemove500,
|
|
204
|
+
AgentsRemove504.pipe(HttpApiSchema.status(504))
|
|
205
|
+
]
|
|
206
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.remove").annotate(OpenApi.Summary, "Delete an agent").annotate(OpenApi.Description, "Deletes an agent with its draft and published versions. The endpoints it answered on stop being answered by an agent. A reply already running finishes on the version it started on."), HttpApiEndpoint.patch("agentsUpdate", "/v1/agents/:id", {
|
|
207
|
+
params: AgentsUpdatePathParams,
|
|
208
|
+
payload: AgentsUpdateRequestJson,
|
|
209
|
+
success: AgentsUpdate200,
|
|
210
|
+
error: [
|
|
211
|
+
AgentsUpdate401.pipe(HttpApiSchema.status(401)),
|
|
212
|
+
AgentsUpdate403.pipe(HttpApiSchema.status(403)),
|
|
213
|
+
AgentsUpdate404.pipe(HttpApiSchema.status(404)),
|
|
214
|
+
AgentsUpdate422.pipe(HttpApiSchema.status(422)),
|
|
215
|
+
AgentsUpdate500,
|
|
216
|
+
AgentsUpdate504.pipe(HttpApiSchema.status(504))
|
|
217
|
+
]
|
|
218
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.update").annotate(OpenApi.Summary, "Rename an agent").annotate(OpenApi.Description, "Renames an agent."), HttpApiEndpoint.put("agentsReplaceDraft", "/v1/agents/:id/draft", {
|
|
219
|
+
params: AgentsReplaceDraftPathParams,
|
|
220
|
+
payload: AgentsReplaceDraftRequestJson,
|
|
221
|
+
success: AgentsReplaceDraft200,
|
|
222
|
+
error: [
|
|
223
|
+
AgentsReplaceDraft401.pipe(HttpApiSchema.status(401)),
|
|
224
|
+
AgentsReplaceDraft403.pipe(HttpApiSchema.status(403)),
|
|
225
|
+
AgentsReplaceDraft404.pipe(HttpApiSchema.status(404)),
|
|
226
|
+
AgentsReplaceDraft409.pipe(HttpApiSchema.status(409)),
|
|
227
|
+
AgentsReplaceDraft422.pipe(HttpApiSchema.status(422)),
|
|
228
|
+
AgentsReplaceDraft500,
|
|
229
|
+
AgentsReplaceDraft504.pipe(HttpApiSchema.status(504))
|
|
230
|
+
]
|
|
231
|
+
}).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", {
|
|
232
|
+
params: AgentsPublishPathParams,
|
|
233
|
+
payload: AgentsPublishRequestJson,
|
|
234
|
+
success: AgentsPublish200,
|
|
235
|
+
error: [
|
|
236
|
+
AgentsPublish401.pipe(HttpApiSchema.status(401)),
|
|
237
|
+
AgentsPublish403.pipe(HttpApiSchema.status(403)),
|
|
238
|
+
AgentsPublish404.pipe(HttpApiSchema.status(404)),
|
|
239
|
+
AgentsPublish409.pipe(HttpApiSchema.status(409)),
|
|
240
|
+
AgentsPublish422.pipe(HttpApiSchema.status(422)),
|
|
241
|
+
AgentsPublish500,
|
|
242
|
+
AgentsPublish504.pipe(HttpApiSchema.status(504))
|
|
243
|
+
]
|
|
244
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.publish").annotate(OpenApi.Summary, "Publish an agent").annotate(OpenApi.Description, "Publishes the draft as the next immutable version. Each conversation moves to it from its next agent reply; a reply already running finishes on the version it started on. The request names the revision it read; a stale revision returns 409. Publishing a draft identical to the newest version changes nothing and answers published false. An endpoint answers for one agent at a time: publishing a draft whose endpoint another agent answers on returns 409. In supervised mode each reply waits for a person to approve it."), HttpApiEndpoint.get("agentsListVersions", "/v1/agents/:id/versions", {
|
|
245
|
+
params: AgentsListVersionsPathParams,
|
|
246
|
+
query: AgentsListVersionsQuery,
|
|
247
|
+
success: AgentsListVersions200,
|
|
248
|
+
error: [
|
|
249
|
+
AgentsListVersions401.pipe(HttpApiSchema.status(401)),
|
|
250
|
+
AgentsListVersions403.pipe(HttpApiSchema.status(403)),
|
|
251
|
+
AgentsListVersions404.pipe(HttpApiSchema.status(404)),
|
|
252
|
+
AgentsListVersions422.pipe(HttpApiSchema.status(422)),
|
|
253
|
+
AgentsListVersions500,
|
|
254
|
+
AgentsListVersions504.pipe(HttpApiSchema.status(504))
|
|
255
|
+
]
|
|
256
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.listVersions").annotate(OpenApi.Summary, "List published agent versions").annotate(OpenApi.Description, "Returns an agent's published versions, newest first, without their definitions. Pass nextCursor back as cursor for the next page."), HttpApiEndpoint.get("agentsGetVersion", "/v1/agents/:id/versions/:version", {
|
|
257
|
+
params: AgentsGetVersionPathParams,
|
|
258
|
+
success: AgentsGetVersion200,
|
|
259
|
+
error: [
|
|
260
|
+
AgentsGetVersion401.pipe(HttpApiSchema.status(401)),
|
|
261
|
+
AgentsGetVersion403.pipe(HttpApiSchema.status(403)),
|
|
262
|
+
AgentsGetVersion404.pipe(HttpApiSchema.status(404)),
|
|
263
|
+
AgentsGetVersion422.pipe(HttpApiSchema.status(422)),
|
|
264
|
+
AgentsGetVersion500,
|
|
265
|
+
AgentsGetVersion504.pipe(HttpApiSchema.status(504))
|
|
266
|
+
]
|
|
267
|
+
}).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.")).annotate(OpenApi.Description, "Agents that answer conversations on your mailbox endpoints, with a draft, published versions, and rules for supervision, hours, and staff takeover") {};
|
|
268
|
+
//#endregion
|
|
269
|
+
export { Agent, AgentId, AgentListItem, AgentPage, AgentVersion, AgentVersionPage, AgentVersionSummary, AgentsCreate201, AgentsCreate401, AgentsCreate403, AgentsCreate404, AgentsCreate422, AgentsCreate500, AgentsCreate504, AgentsCreateRequestJson, AgentsGet200, AgentsGet401, AgentsGet403, AgentsGet404, AgentsGet422, AgentsGet500, AgentsGet504, AgentsGetPathParams, AgentsGetVersion200, AgentsGetVersion401, AgentsGetVersion403, AgentsGetVersion404, AgentsGetVersion422, AgentsGetVersion500, AgentsGetVersion504, AgentsGetVersionPathParams, AgentsGroup, AgentsList200, AgentsList401, AgentsList403, AgentsList422, AgentsList500, AgentsList504, AgentsListQuery, AgentsListVersions200, AgentsListVersions401, AgentsListVersions403, AgentsListVersions404, AgentsListVersions422, AgentsListVersions500, AgentsListVersions504, AgentsListVersionsPathParams, AgentsListVersionsQuery, AgentsPublish200, AgentsPublish401, AgentsPublish403, AgentsPublish404, AgentsPublish409, AgentsPublish422, AgentsPublish500, AgentsPublish504, AgentsPublishPathParams, AgentsPublishRequestJson, AgentsRemove200, AgentsRemove401, AgentsRemove403, AgentsRemove404, AgentsRemove422, AgentsRemove500, AgentsRemove504, AgentsRemovePathParams, AgentsReplaceDraft200, AgentsReplaceDraft401, AgentsReplaceDraft403, AgentsReplaceDraft404, AgentsReplaceDraft409, AgentsReplaceDraft422, AgentsReplaceDraft500, AgentsReplaceDraft504, AgentsReplaceDraftPathParams, AgentsReplaceDraftRequestJson, AgentsUpdate200, AgentsUpdate401, AgentsUpdate403, AgentsUpdate404, AgentsUpdate422, AgentsUpdate500, AgentsUpdate504, AgentsUpdatePathParams, AgentsUpdateRequestJson, DeleteAgentResponse, PublishAgentResponse };
|
|
270
|
+
|
|
271
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -897,22 +897,19 @@ export declare const EmailDomainVerification: Schema.Struct<{
|
|
|
897
897
|
readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
898
898
|
}>;
|
|
899
899
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
900
|
-
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.
|
|
901
|
-
readonly _tag: Schema.Literal<"PublicDns">;
|
|
900
|
+
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"PublicDns", {
|
|
902
901
|
readonly resolver: Schema.String;
|
|
903
902
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
904
903
|
readonly values: Schema.$Array<Schema.String>;
|
|
905
904
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
906
905
|
readonly observedAt: Schema.String;
|
|
907
|
-
}>, Schema.
|
|
908
|
-
readonly _tag: Schema.Literal<"Provider">;
|
|
906
|
+
}>, Schema.TaggedStruct<"Provider", {
|
|
909
907
|
readonly provider: Schema.String;
|
|
910
908
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
911
909
|
readonly values: Schema.$Array<Schema.String>;
|
|
912
910
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
913
911
|
readonly observedAt: Schema.String;
|
|
914
|
-
}>, Schema.
|
|
915
|
-
readonly _tag: Schema.Literal<"Host">;
|
|
912
|
+
}>, Schema.TaggedStruct<"Host", {
|
|
916
913
|
readonly source: Schema.String;
|
|
917
914
|
readonly status: Schema.Union<readonly [Schema.Literal<"ok">, Schema.Literal<"pending">, Schema.Literal<"failed">]>;
|
|
918
915
|
readonly label: Schema.String;
|
|
@@ -2316,22 +2313,19 @@ export declare const EmailGetDomainVerification200: Schema.Struct<{
|
|
|
2316
2313
|
readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
2317
2314
|
}>;
|
|
2318
2315
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
2319
|
-
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.
|
|
2320
|
-
readonly _tag: Schema.Literal<"PublicDns">;
|
|
2316
|
+
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"PublicDns", {
|
|
2321
2317
|
readonly resolver: Schema.String;
|
|
2322
2318
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
2323
2319
|
readonly values: Schema.$Array<Schema.String>;
|
|
2324
2320
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2325
2321
|
readonly observedAt: Schema.String;
|
|
2326
|
-
}>, Schema.
|
|
2327
|
-
readonly _tag: Schema.Literal<"Provider">;
|
|
2322
|
+
}>, Schema.TaggedStruct<"Provider", {
|
|
2328
2323
|
readonly provider: Schema.String;
|
|
2329
2324
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
2330
2325
|
readonly values: Schema.$Array<Schema.String>;
|
|
2331
2326
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2332
2327
|
readonly observedAt: Schema.String;
|
|
2333
|
-
}>, Schema.
|
|
2334
|
-
readonly _tag: Schema.Literal<"Host">;
|
|
2328
|
+
}>, Schema.TaggedStruct<"Host", {
|
|
2335
2329
|
readonly source: Schema.String;
|
|
2336
2330
|
readonly status: Schema.Union<readonly [Schema.Literal<"ok">, Schema.Literal<"pending">, Schema.Literal<"failed">]>;
|
|
2337
2331
|
readonly label: Schema.String;
|
|
@@ -2448,22 +2442,19 @@ export declare const EmailAdvanceDomainVerification200: Schema.Struct<{
|
|
|
2448
2442
|
readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
2449
2443
|
}>;
|
|
2450
2444
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
2451
|
-
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.
|
|
2452
|
-
readonly _tag: Schema.Literal<"PublicDns">;
|
|
2445
|
+
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"PublicDns", {
|
|
2453
2446
|
readonly resolver: Schema.String;
|
|
2454
2447
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
2455
2448
|
readonly values: Schema.$Array<Schema.String>;
|
|
2456
2449
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2457
2450
|
readonly observedAt: Schema.String;
|
|
2458
|
-
}>, Schema.
|
|
2459
|
-
readonly _tag: Schema.Literal<"Provider">;
|
|
2451
|
+
}>, Schema.TaggedStruct<"Provider", {
|
|
2460
2452
|
readonly provider: Schema.String;
|
|
2461
2453
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
2462
2454
|
readonly values: Schema.$Array<Schema.String>;
|
|
2463
2455
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2464
2456
|
readonly observedAt: Schema.String;
|
|
2465
|
-
}>, Schema.
|
|
2466
|
-
readonly _tag: Schema.Literal<"Host">;
|
|
2457
|
+
}>, Schema.TaggedStruct<"Host", {
|
|
2467
2458
|
readonly source: Schema.String;
|
|
2468
2459
|
readonly status: Schema.Union<readonly [Schema.Literal<"ok">, Schema.Literal<"pending">, Schema.Literal<"failed">]>;
|
|
2469
2460
|
readonly label: Schema.String;
|
|
@@ -4429,22 +4420,19 @@ declare const EmailGroup_base: HttpApiGroup.HttpApiGroup<"Email", HttpApiEndpoin
|
|
|
4429
4420
|
readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
4430
4421
|
}>;
|
|
4431
4422
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
4432
|
-
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.
|
|
4433
|
-
readonly _tag: Schema.Literal<"PublicDns">;
|
|
4423
|
+
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"PublicDns", {
|
|
4434
4424
|
readonly resolver: Schema.String;
|
|
4435
4425
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
4436
4426
|
readonly values: Schema.$Array<Schema.String>;
|
|
4437
4427
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4438
4428
|
readonly observedAt: Schema.String;
|
|
4439
|
-
}>, Schema.
|
|
4440
|
-
readonly _tag: Schema.Literal<"Provider">;
|
|
4429
|
+
}>, Schema.TaggedStruct<"Provider", {
|
|
4441
4430
|
readonly provider: Schema.String;
|
|
4442
4431
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
4443
4432
|
readonly values: Schema.$Array<Schema.String>;
|
|
4444
4433
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
4445
4434
|
readonly observedAt: Schema.String;
|
|
4446
|
-
}>, Schema.
|
|
4447
|
-
readonly _tag: Schema.Literal<"Host">;
|
|
4435
|
+
}>, Schema.TaggedStruct<"Host", {
|
|
4448
4436
|
readonly source: Schema.String;
|
|
4449
4437
|
readonly status: Schema.Union<readonly [Schema.Literal<"ok">, Schema.Literal<"pending">, Schema.Literal<"failed">]>;
|
|
4450
4438
|
readonly label: Schema.String;
|
|
@@ -7374,22 +7362,19 @@ declare const EmailGroup_base: HttpApiGroup.HttpApiGroup<"Email", HttpApiEndpoin
|
|
|
7374
7362
|
readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
7375
7363
|
}>;
|
|
7376
7364
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
7377
|
-
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.
|
|
7378
|
-
readonly _tag: Schema.Literal<"PublicDns">;
|
|
7365
|
+
readonly evidence: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"PublicDns", {
|
|
7379
7366
|
readonly resolver: Schema.String;
|
|
7380
7367
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
7381
7368
|
readonly values: Schema.$Array<Schema.String>;
|
|
7382
7369
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
7383
7370
|
readonly observedAt: Schema.String;
|
|
7384
|
-
}>, Schema.
|
|
7385
|
-
readonly _tag: Schema.Literal<"Provider">;
|
|
7371
|
+
}>, Schema.TaggedStruct<"Provider", {
|
|
7386
7372
|
readonly provider: Schema.String;
|
|
7387
7373
|
readonly status: Schema.Union<readonly [Schema.Literal<"satisfied">, Schema.Literal<"missing">, Schema.Literal<"mismatch">, Schema.Literal<"unknown">]>;
|
|
7388
7374
|
readonly values: Schema.$Array<Schema.String>;
|
|
7389
7375
|
readonly detail: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
7390
7376
|
readonly observedAt: Schema.String;
|
|
7391
|
-
}>, Schema.
|
|
7392
|
-
readonly _tag: Schema.Literal<"Host">;
|
|
7377
|
+
}>, Schema.TaggedStruct<"Host", {
|
|
7393
7378
|
readonly source: Schema.String;
|
|
7394
7379
|
readonly status: Schema.Union<readonly [Schema.Literal<"ok">, Schema.Literal<"pending">, Schema.Literal<"failed">]>;
|
|
7395
7380
|
readonly label: Schema.String;
|
|
@@ -644,8 +644,7 @@ const EmailDomainVerification = /* @__PURE__ */ Schema.Struct({
|
|
|
644
644
|
Schema.Literal("unknown")
|
|
645
645
|
]),
|
|
646
646
|
evidence: Schema.Array(Schema.Union([
|
|
647
|
-
Schema.
|
|
648
|
-
_tag: Schema.Literal("PublicDns"),
|
|
647
|
+
Schema.TaggedStruct("PublicDns", {
|
|
649
648
|
resolver: Schema.String,
|
|
650
649
|
status: Schema.Union([
|
|
651
650
|
Schema.Literal("satisfied"),
|
|
@@ -657,8 +656,7 @@ const EmailDomainVerification = /* @__PURE__ */ Schema.Struct({
|
|
|
657
656
|
detail: Schema.Union([Schema.String, Schema.Null]),
|
|
658
657
|
observedAt: Schema.String
|
|
659
658
|
}),
|
|
660
|
-
Schema.
|
|
661
|
-
_tag: Schema.Literal("Provider"),
|
|
659
|
+
Schema.TaggedStruct("Provider", {
|
|
662
660
|
provider: Schema.String,
|
|
663
661
|
status: Schema.Union([
|
|
664
662
|
Schema.Literal("satisfied"),
|
|
@@ -670,8 +668,7 @@ const EmailDomainVerification = /* @__PURE__ */ Schema.Struct({
|
|
|
670
668
|
detail: Schema.Union([Schema.String, Schema.Null]),
|
|
671
669
|
observedAt: Schema.String
|
|
672
670
|
}),
|
|
673
|
-
Schema.
|
|
674
|
-
_tag: Schema.Literal("Host"),
|
|
671
|
+
Schema.TaggedStruct("Host", {
|
|
675
672
|
source: Schema.String,
|
|
676
673
|
status: Schema.Union([
|
|
677
674
|
Schema.Literal("ok"),
|
|
@@ -58,6 +58,6 @@ export * from "./templates";
|
|
|
58
58
|
export * from "./unsubscribe-groups";
|
|
59
59
|
export * from "./webhooks";
|
|
60
60
|
export * from "./whoami";
|
|
61
|
-
declare const SamvaApi_base: HttpApi.HttpApi<"SamvaApi", typeof
|
|
61
|
+
declare const SamvaApi_base: HttpApi.HttpApi<"SamvaApi", typeof AgentsGroup | typeof AnalyticsGroup | typeof APIKeysGroup | typeof AttachmentsGroup | typeof BrandsGroup | typeof CampaignsGroup | typeof ContactEventsGroup | typeof ContactGroupsGroup | typeof ContactsGroup | typeof ConversationsGroup | typeof CustomFieldsGroup | typeof EmailGroup | typeof EventsGroup | typeof ExtensionInstallationsGroup | typeof ExtensionsGroup | typeof FeedbackGroup | typeof JourneysGroup | typeof MailboxesGroup | typeof MediaGroup | typeof MessagesGroup | typeof NamespacesGroup | typeof OperationsGroup | typeof OrganizationsGroup | typeof ScheduledMessagesGroup | typeof SubscriptionsGroup | typeof TemplatesGroup | typeof UnsubscribeGroupsGroup | typeof WebhooksGroup | typeof WhoamiGroup>;
|
|
62
62
|
export declare class SamvaApi extends SamvaApi_base {
|
|
63
63
|
}
|