@tai42/api-client 22.1.0 → 22.3.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/client/conversations-client.d.ts +5 -0
- package/dist/client/conversations-client.d.ts.map +1 -1
- package/dist/client/index.d.ts +42 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/interactions-client.d.ts +1 -0
- package/dist/client/interactions-client.d.ts.map +1 -1
- package/dist/client/states-client.d.ts +36 -0
- package/dist/client/states-client.d.ts.map +1 -1
- package/dist/client/states-client.js +12 -0
- package/dist/client/states-client.js.map +1 -1
- package/dist/generated/api-routes.d.ts +8 -0
- package/dist/generated/api-routes.d.ts.map +1 -1
- package/dist/generated/api-routes.js +2 -0
- package/dist/generated/api-routes.js.map +1 -1
- package/dist/generated/openapi-schemas.d.ts +124 -0
- package/dist/generated/openapi-schemas.d.ts.map +1 -1
- package/dist/generated/openapi-schemas.js +9 -3
- package/dist/generated/openapi-schemas.js.map +1 -1
- package/dist/generated/served-schemas.d.ts +12 -0
- package/dist/generated/served-schemas.d.ts.map +1 -1
- package/dist/generated/served-schemas.js +16 -0
- package/dist/generated/served-schemas.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/conversations.d.ts +6 -0
- package/dist/schemas/conversations.d.ts.map +1 -1
- package/dist/schemas/interactions.d.ts +9 -3
- package/dist/schemas/interactions.d.ts.map +1 -1
- package/dist/schemas/interactions.js +5 -3
- package/dist/schemas/interactions.js.map +1 -1
- package/dist/schemas/served.d.ts +12 -0
- package/dist/schemas/served.d.ts.map +1 -1
- package/dist/schemas/states.d.ts +86 -0
- package/dist/schemas/states.d.ts.map +1 -1
- package/dist/schemas/states.js +26 -0
- package/dist/schemas/states.js.map +1 -1
- package/package.json +1 -1
- package/src/client/states-client.ts +26 -0
- package/src/generated/api-routes.ts +2 -0
- package/src/generated/openapi-schemas.ts +17 -3
- package/src/generated/served-schemas.ts +16 -0
- package/src/index.ts +4 -0
- package/src/schemas/interactions.ts +5 -3
- package/src/schemas/states.ts +34 -0
|
@@ -88,7 +88,7 @@ export type PageCopy = z.infer<typeof pageCopy>;
|
|
|
88
88
|
export const answerPageWording = z.object({ "awaiting": pageCopy.nullable().default(null), "confirm": pageCopy.nullable().default(null), "done": pageCopy.nullable().default(null), "form": formPageWording.nullable().default(null), "submitted": pageCopy.nullable().default(null) }).strict();
|
|
89
89
|
export type AnswerPageWording = z.infer<typeof answerPageWording>;
|
|
90
90
|
|
|
91
|
-
export const formOption = z.object({ "label": z.string().nullable().default(null), "value": z.string() }).strict();
|
|
91
|
+
export const formOption = z.object({ "description": z.string().nullable().default(null), "label": z.string().nullable().default(null), "value": z.string() }).strict();
|
|
92
92
|
export type FormOption = z.infer<typeof formOption>;
|
|
93
93
|
|
|
94
94
|
export const formData = z.object({ "options": z.record(z.string(), z.array(formOption)).default({}), "values": z.record(z.string(), z.unknown()).default({}) }).strict();
|
|
@@ -682,7 +682,7 @@ export type PersonAddress = z.infer<typeof personAddress>;
|
|
|
682
682
|
export const person = z.object({ "addresses": z.array(personAddress).min(1), "created_at": z.string(), "locale": z.string().nullable().default(null), "person_id": z.string().min(1), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1) });
|
|
683
683
|
export type Person = z.infer<typeof person>;
|
|
684
684
|
|
|
685
|
-
export const personDeleteResult = z.object({ "erased": z.boolean(), "person_id": z.string(), "removed": z.number().int() });
|
|
685
|
+
export const personDeleteResult = z.object({ "erased": z.boolean(), "person_id": z.string(), "removed": z.number().int(), "states_erased": z.number().int() });
|
|
686
686
|
export type PersonDeleteResult = z.infer<typeof personDeleteResult>;
|
|
687
687
|
|
|
688
688
|
export const policyRollback = z.object({ "version": z.number().int() });
|
|
@@ -826,6 +826,18 @@ export type PublicRoutePin = z.infer<typeof publicRoutePin>;
|
|
|
826
826
|
export const publicRouteUnpin = z.object({ "url": z.string() });
|
|
827
827
|
export type PublicRouteUnpin = z.infer<typeof publicRouteUnpin>;
|
|
828
828
|
|
|
829
|
+
export const validationReason = z.object({ "message": z.string(), "path": z.string() }).strict();
|
|
830
|
+
export type ValidationReason = z.infer<typeof validationReason>;
|
|
831
|
+
|
|
832
|
+
export const recordCheckItem = z.object({ "reasons": z.array(validationReason).default([]), "subject": stateSubject, "updated_at": z.number() }).strict();
|
|
833
|
+
export type RecordCheckItem = z.infer<typeof recordCheckItem>;
|
|
834
|
+
|
|
835
|
+
export const recordCheckPage = z.object({ "checked": z.number().int(), "held": z.array(heldPendingSave).default([]), "items": z.array(recordCheckItem).default([]), "next_cursor": z.string().nullable().default(null) }).strict();
|
|
836
|
+
export type RecordCheckPage = z.infer<typeof recordCheckPage>;
|
|
837
|
+
|
|
838
|
+
export const recordValidation = z.object({ "fits": z.boolean(), "reasons": z.array(validationReason).default([]) }).strict();
|
|
839
|
+
export type RecordValidation = z.infer<typeof recordValidation>;
|
|
840
|
+
|
|
829
841
|
export const reloadConfig = z.object({ "targets": z.array(z.string()).nullable().default(null) });
|
|
830
842
|
export type ReloadConfig = z.infer<typeof reloadConfig>;
|
|
831
843
|
|
|
@@ -1159,7 +1171,7 @@ export type TemplateUpload = z.infer<typeof templateUpload>;
|
|
|
1159
1171
|
export const templateUploadResult = z.object({ "fanout": fanoutSummary, "path": z.string(), "uploaded": z.boolean() });
|
|
1160
1172
|
export type TemplateUploadResult = z.infer<typeof templateUploadResult>;
|
|
1161
1173
|
|
|
1162
|
-
export const threadDeleteResult = z.object({ "removed": z.number().int(), "route_name": z.string(), "thread_id": z.string() });
|
|
1174
|
+
export const threadDeleteResult = z.object({ "removed": z.number().int(), "route_name": z.string(), "states_erased": z.number().int(), "thread_id": z.string() });
|
|
1163
1175
|
export type ThreadDeleteResult = z.infer<typeof threadDeleteResult>;
|
|
1164
1176
|
|
|
1165
1177
|
export const threadMessageAck = z.object({ "message_id": z.string(), "thread_id": z.string() });
|
|
@@ -1414,6 +1426,7 @@ export const responseSchemas = {
|
|
|
1414
1426
|
get_api_states_name_attachments: stateAttachmentList,
|
|
1415
1427
|
get_api_states_name_attachments_template: stateAttachmentRow,
|
|
1416
1428
|
get_api_states_name_consumers: stateConsumerList,
|
|
1429
|
+
get_api_states_name_records_check: recordCheckPage,
|
|
1417
1430
|
get_api_states_name_records_target_kind_target_name_kind_key: stateRecordOrNull,
|
|
1418
1431
|
get_api_states_name_records_target_kind_target_name_kind_key_template_jq_program: templateJqResult,
|
|
1419
1432
|
get_api_states_name_records_target_kind_target_name_kind_key_writes: writesPage,
|
|
@@ -1511,6 +1524,7 @@ export const responseSchemas = {
|
|
|
1511
1524
|
post_api_states_name_records_target_kind_target_name_kind_key_deltas: applyResult,
|
|
1512
1525
|
post_api_states_name_records_target_kind_target_name_kind_key_fold: foldReport,
|
|
1513
1526
|
post_api_states_name_records_target_kind_target_name_kind_key_template_jq_program: templateJqApplyResult,
|
|
1527
|
+
post_api_states_name_records_validate: recordValidation,
|
|
1514
1528
|
post_api_storage_resources: resourceStored,
|
|
1515
1529
|
post_api_sub_mcp: subMcpRegistrationResult,
|
|
1516
1530
|
post_api_template: templateFetchView,
|
|
@@ -789,6 +789,10 @@ export const servedDocumentsJson = {
|
|
|
789
789
|
"gloss": "door=channel: the registry channel name",
|
|
790
790
|
"name": "channel"
|
|
791
791
|
},
|
|
792
|
+
{
|
|
793
|
+
"gloss": "the name of the conversation route the turn entered through",
|
|
794
|
+
"name": "route"
|
|
795
|
+
},
|
|
792
796
|
{
|
|
793
797
|
"gloss": "the turn's canonical thread id (the thread doors' id)",
|
|
794
798
|
"name": "thread_id"
|
|
@@ -1185,6 +1189,10 @@ export const servedDocumentsJson = {
|
|
|
1185
1189
|
"gloss": "door=channel: the registry channel name",
|
|
1186
1190
|
"name": "channel"
|
|
1187
1191
|
},
|
|
1192
|
+
{
|
|
1193
|
+
"gloss": "the name of the conversation route the turn entered through",
|
|
1194
|
+
"name": "route"
|
|
1195
|
+
},
|
|
1188
1196
|
{
|
|
1189
1197
|
"gloss": "the turn's canonical thread id (the thread doors' id)",
|
|
1190
1198
|
"name": "thread_id"
|
|
@@ -1674,6 +1682,10 @@ export const servedDocumentsJson = {
|
|
|
1674
1682
|
"gloss": "door=channel: the registry channel name",
|
|
1675
1683
|
"name": "channel"
|
|
1676
1684
|
},
|
|
1685
|
+
{
|
|
1686
|
+
"gloss": "the name of the conversation route the turn entered through",
|
|
1687
|
+
"name": "route"
|
|
1688
|
+
},
|
|
1677
1689
|
{
|
|
1678
1690
|
"gloss": "the turn's canonical thread id (the thread doors' id)",
|
|
1679
1691
|
"name": "thread_id"
|
|
@@ -2058,6 +2070,10 @@ export const servedDocumentsJson = {
|
|
|
2058
2070
|
"gloss": "door=channel: the registry channel name",
|
|
2059
2071
|
"name": "channel"
|
|
2060
2072
|
},
|
|
2073
|
+
{
|
|
2074
|
+
"gloss": "the name of the conversation route the turn entered through",
|
|
2075
|
+
"name": "route"
|
|
2076
|
+
},
|
|
2061
2077
|
{
|
|
2062
2078
|
"gloss": "the turn's canonical thread id (the thread doors' id)",
|
|
2063
2079
|
"name": "thread_id"
|
package/src/index.ts
CHANGED
|
@@ -242,7 +242,10 @@ export type {
|
|
|
242
242
|
ProviderView,
|
|
243
243
|
ReactionEvent,
|
|
244
244
|
ReactionEventKind,
|
|
245
|
+
RecordCheckItem,
|
|
246
|
+
RecordCheckPage,
|
|
245
247
|
RecordSearchPage,
|
|
248
|
+
RecordValidation,
|
|
246
249
|
RecycleEntry,
|
|
247
250
|
RecycleRoll,
|
|
248
251
|
RecycleStop,
|
|
@@ -324,6 +327,7 @@ export type {
|
|
|
324
327
|
TriggerLinkList,
|
|
325
328
|
TriggerLinkRecord,
|
|
326
329
|
ValidateConditionResult,
|
|
330
|
+
ValidationReason,
|
|
327
331
|
VisitOutcome,
|
|
328
332
|
Wording,
|
|
329
333
|
WorkerKind,
|
|
@@ -41,9 +41,11 @@ export type AttachmentMediaItem = z.infer<typeof attachmentMediaItem>;
|
|
|
41
41
|
/**
|
|
42
42
|
* One per-send choice for a `form` property whose schema is a string (or array of
|
|
43
43
|
* strings). `value` is what the answer carries; `label` (absent OR null both parse
|
|
44
|
-
* to no label) is the human text shown in its place
|
|
45
|
-
*
|
|
46
|
-
*
|
|
44
|
+
* to no label) is the human text shown in its place; `description` (absent OR null
|
|
45
|
+
* both parse to none) is the option's second line of supporting text. A send may
|
|
46
|
+
* replace a property's `enum` this way for one ask without republishing the form.
|
|
47
|
+
* Applied per property by the form preview (safeParsed), so a malformed entry is a
|
|
48
|
+
* loud notice, never silent.
|
|
47
49
|
*/
|
|
48
50
|
export const formOption = openapi.formOption;
|
|
49
51
|
export type FormOption = z.infer<typeof formOption>;
|
package/src/schemas/states.ts
CHANGED
|
@@ -126,6 +126,40 @@ export type SubjectPage = z.infer<typeof subjectPage>;
|
|
|
126
126
|
export const recordSearchPage = openapi.stateSearchPage;
|
|
127
127
|
export type RecordSearchPage = z.infer<typeof recordSearchPage>;
|
|
128
128
|
|
|
129
|
+
/**
|
|
130
|
+
* One way a candidate document does not fit a state's effective schema (mirrors
|
|
131
|
+
* ValidationReason): the JSON `path` of the offending node (`$` for the document root)
|
|
132
|
+
* and the validator's `message`. A document that fits has none.
|
|
133
|
+
*/
|
|
134
|
+
export const validationReason = openapi.validationReason;
|
|
135
|
+
export type ValidationReason = z.infer<typeof validationReason>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* `POST /api/states/{name}/records/validate` — whether a candidate document `fits` the
|
|
139
|
+
* state's effective schema, with every `reasons` entry it fails on (ordered by JSON
|
|
140
|
+
* path). A misfit is a 200 whose body says `fits:false`; a non-object body or a broken
|
|
141
|
+
* `$ref` is the route's 422.
|
|
142
|
+
*/
|
|
143
|
+
export const recordValidation = openapi.recordValidation;
|
|
144
|
+
export type RecordValidation = z.infer<typeof recordValidation>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* One stored record that does not fit its state's current effective schema (mirrors
|
|
148
|
+
* RecordCheckItem): the `subject` it belongs to, its last-write `updated_at` (epoch
|
|
149
|
+
* seconds) and every `reasons` entry it fails on.
|
|
150
|
+
*/
|
|
151
|
+
export const recordCheckItem = openapi.recordCheckItem;
|
|
152
|
+
export type RecordCheckItem = z.infer<typeof recordCheckItem>;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* `GET /api/states/{name}/records/check` — one keyset page of the state's records checked
|
|
156
|
+
* against its effective schema: `checked` (records read this page), `items` (the MISFITS
|
|
157
|
+
* ONLY), `next_cursor` (the cursor the next page reads from, `null` at the end) and `held`
|
|
158
|
+
* (the saves held by a failed pending save whose subjects the page skipped).
|
|
159
|
+
*/
|
|
160
|
+
export const recordCheckPage = openapi.recordCheckPage;
|
|
161
|
+
export type RecordCheckPage = z.infer<typeof recordCheckPage>;
|
|
162
|
+
|
|
129
163
|
/** A WriteEntry's origin completed by the platform chokepoint (mirrors CompletedOrigin). */
|
|
130
164
|
export const completedOrigin = openapi.completedOrigin;
|
|
131
165
|
export type CompletedOrigin = z.infer<typeof completedOrigin>;
|