@anchrd/colab-sdk 0.1.61 → 0.1.63
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/operators/operators.d.ts +4 -0
- package/dist/operators/operators.js +4 -0
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.js +1 -1
- package/dist/skills/skills.d.ts +10 -0
- package/dist/skills/skills.js +31 -0
- package/package.json +1 -1
|
@@ -2091,6 +2091,7 @@ export declare const ClosureLine: z.ZodObject<{
|
|
|
2091
2091
|
reported: z.ZodBoolean;
|
|
2092
2092
|
processId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>>;
|
|
2093
2093
|
actionId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`action_${string}`>>>;
|
|
2094
|
+
standing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
2094
2095
|
outside: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2095
2096
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
2096
2097
|
use: z.ZodEnum<{
|
|
@@ -2272,6 +2273,7 @@ export declare const OperatorRun: z.ZodObject<{
|
|
|
2272
2273
|
reported: z.ZodBoolean;
|
|
2273
2274
|
processId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>>;
|
|
2274
2275
|
actionId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`action_${string}`>>>;
|
|
2276
|
+
standing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
2275
2277
|
outside: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2276
2278
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
2277
2279
|
use: z.ZodEnum<{
|
|
@@ -2453,6 +2455,7 @@ export declare const RunCompleteAnswer: z.ZodObject<{
|
|
|
2453
2455
|
reported: z.ZodBoolean;
|
|
2454
2456
|
processId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>>;
|
|
2455
2457
|
actionId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`action_${string}`>>>;
|
|
2458
|
+
standing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
2456
2459
|
outside: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2457
2460
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
2458
2461
|
use: z.ZodEnum<{
|
|
@@ -2838,6 +2841,7 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
2838
2841
|
reported: z.ZodBoolean;
|
|
2839
2842
|
processId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>>;
|
|
2840
2843
|
actionId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`action_${string}`>>>;
|
|
2844
|
+
standing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
2841
2845
|
outside: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2842
2846
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
2843
2847
|
use: z.ZodEnum<{
|
|
@@ -1048,6 +1048,10 @@ export const ClosureLine = z.object({
|
|
|
1048
1048
|
// or null where it carried none.
|
|
1049
1049
|
processId: NodeId.nullable().optional(),
|
|
1050
1050
|
actionId: idSchema("action").nullable().optional(),
|
|
1051
|
+
// A card that stood in the Operator's Actions already when its run before started (#1338): it did
|
|
1052
|
+
// not wake this run, so the closure asks for it only once the run wrote it or reported a line for
|
|
1053
|
+
// it. Absent on every other line.
|
|
1054
|
+
standing: z.literal(true).optional(),
|
|
1051
1055
|
// "Außerdem angefasst" (#1261, E288): the nodes the run read or wrote outside the micros of the
|
|
1052
1056
|
// actions it worked on. Only `operator_run_get` names it, only on a line with a process; never
|
|
1053
1057
|
// stored in the closure.
|
package/dist/sdk.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export { rhythms, Schedule, WhileOpen, weekdays, weeksOfMonth, whileOpenModes, }
|
|
|
53
53
|
export { NodeSecret, NodeSecretCreateInput, NodeSecretDetail, NodeSecretGetInput, NodeSecretRemoveInput, NodeSecretUpdateInput, NodeUnlocked, NodeUnlockInput, unlockMinutes, } from "./secrets/secrets.js";
|
|
54
54
|
export { type Authorized, type AuthorizeResult, createServiceClient, type InterfaceDeclaredResult, type InterfaceRemovedResult, type ServiceClient, type ServiceClientDeps, type ServiceClientFailure, } from "./service-client/service-client.js";
|
|
55
55
|
export { ConsentResource, FunctionId, InterfaceId, RightWord, Service, ServiceArchiveInput, ServiceCreateInput, ServiceFunction, ServiceId, ServiceInterface, ServiceKeyIssued, ServiceList, ServiceListInput, ServiceName, ServicePurged, ServicePurgeInput, ServiceRestoreInput, ServiceRotateInput, ServiceUpdateInput, } from "./services/services.js";
|
|
56
|
-
export { callNameForm, SkillCallName, SkillCaseCalls, SkillCaseResult, SkillCreateInput, SkillDetail, SkillFields, SkillFile, SkillFilePath, SkillGetInput, SkillId, SkillOffer, SkillPoint, SkillRunCall, SkillRunDetail, SkillRunGetInput, SkillRunItem, SkillRunList, SkillRunListInput, SkillTestInput, SkillTestReport, SkillToken, SkillTokenCreateInput, SkillTokens, SkillTriggerHit, SkillUpdateInput, SkillWriteName, skillCaseStatuses, skillFilePattern, skillRunKinds, skillRunStatuses, } from "./skills/skills.js";
|
|
56
|
+
export { callNameForm, isMockAnswerList, SkillCallName, SkillCaseCalls, SkillCaseResult, SkillCreateInput, SkillDetail, SkillFields, SkillFile, SkillFilePath, SkillGetInput, SkillId, SkillMockAnswer, SkillMockAnswers, SkillOffer, SkillPoint, SkillRunCall, SkillRunDetail, SkillRunGetInput, SkillRunItem, SkillRunList, SkillRunListInput, SkillTestInput, SkillTestReport, SkillToken, SkillTokenCreateInput, SkillTokens, SkillTriggerHit, SkillUpdateInput, SkillWriteName, skillCaseStatuses, skillFilePattern, skillRunKinds, skillRunStatuses, } from "./skills/skills.js";
|
|
57
57
|
export { ItemId, QueryId, SourceAccess, SourceCreateInput, SourceDetail, SourceField, SourceFieldType, SourceGetInput, SourceItem, SourceItemList, SourceItemListInput, SourceManifest, SourcePaging, SourceParam, SourcePath, SourceProbe, SourcePublishInput, SourceQuery, SourceQueryArchiveInput, SourceQueryCreateInput, SourceQueryList, SourceQueryListInput, SourceQueryRestoreInput, SourceQueryUpdateInput, SourceRun, SourceRunCounts, SourceRunCreateInput, SourceRunFailure, SourceRunFailureRead, SourceRunGetInput, SourceRunList, SourceRunListInput, SourceSchedule, SourceSecretsInput, SourceStep, SourceTestInput, SourceUpdateInput, SourceVersionRef, SourceWhere, sourceCleans, sourceCodePath, sourceEvery, sourceFieldTypes, sourceFormHeaders, sourceKeepDays, sourceLimits, sourceManifestPath, sourceSchema, } from "./sources/sources.js";
|
|
58
58
|
export { maxDatabaseRows, maxTableColumns, maxTableGroups, maxTableRows, RowLimit, TableAggregate, TableColumn, TableColumnChange, TableColumnType, TableCondition, TableCreateInput, TableDetail, TableExcerpt, TableFilter, TableGetInput, TableGroup, TableId, TableSaved, TableSort, TableStorage, TableUpdateInput, tableAggregateFunctions, tableColumnTypes, tableFormats, tableStorages, } from "./tables/tables.js";
|
|
59
59
|
export { companyTeamId, MemberId, Team, TeamArchiveInput, TeamCreateInput, TeamId, TeamList, TeamListInput, TeamMember, TeamMemberCreateInput, TeamMemberRemoveInput, TeamRestoreInput, TeamRole, TeamUpdateInput, } from "./teams/teams.js";
|
package/dist/sdk.js
CHANGED
|
@@ -56,7 +56,7 @@ export { rhythms, Schedule, WhileOpen, weekdays, weeksOfMonth, whileOpenModes, }
|
|
|
56
56
|
export { NodeSecret, NodeSecretCreateInput, NodeSecretDetail, NodeSecretGetInput, NodeSecretRemoveInput, NodeSecretUpdateInput, NodeUnlocked, NodeUnlockInput, unlockMinutes, } from "./secrets/secrets.js";
|
|
57
57
|
export { createServiceClient, } from "./service-client/service-client.js";
|
|
58
58
|
export { ConsentResource, FunctionId, InterfaceId, RightWord, Service, ServiceArchiveInput, ServiceCreateInput, ServiceFunction, ServiceId, ServiceInterface, ServiceKeyIssued, ServiceList, ServiceListInput, ServiceName, ServicePurged, ServicePurgeInput, ServiceRestoreInput, ServiceRotateInput, ServiceUpdateInput, } from "./services/services.js";
|
|
59
|
-
export { callNameForm, SkillCallName, SkillCaseCalls, SkillCaseResult, SkillCreateInput, SkillDetail, SkillFields, SkillFile, SkillFilePath, SkillGetInput, SkillId, SkillOffer, SkillPoint, SkillRunCall, SkillRunDetail, SkillRunGetInput, SkillRunItem, SkillRunList, SkillRunListInput, SkillTestInput, SkillTestReport, SkillToken, SkillTokenCreateInput, SkillTokens, SkillTriggerHit, SkillUpdateInput, SkillWriteName, skillCaseStatuses, skillFilePattern, skillRunKinds, skillRunStatuses, } from "./skills/skills.js";
|
|
59
|
+
export { callNameForm, isMockAnswerList, SkillCallName, SkillCaseCalls, SkillCaseResult, SkillCreateInput, SkillDetail, SkillFields, SkillFile, SkillFilePath, SkillGetInput, SkillId, SkillMockAnswer, SkillMockAnswers, SkillOffer, SkillPoint, SkillRunCall, SkillRunDetail, SkillRunGetInput, SkillRunItem, SkillRunList, SkillRunListInput, SkillTestInput, SkillTestReport, SkillToken, SkillTokenCreateInput, SkillTokens, SkillTriggerHit, SkillUpdateInput, SkillWriteName, skillCaseStatuses, skillFilePattern, skillRunKinds, skillRunStatuses, } from "./skills/skills.js";
|
|
60
60
|
export { ItemId, QueryId, SourceAccess, SourceCreateInput, SourceDetail, SourceField, SourceFieldType, SourceGetInput, SourceItem, SourceItemList, SourceItemListInput, SourceManifest, SourcePaging, SourceParam, SourcePath, SourceProbe, SourcePublishInput, SourceQuery, SourceQueryArchiveInput, SourceQueryCreateInput, SourceQueryList, SourceQueryListInput, SourceQueryRestoreInput, SourceQueryUpdateInput, SourceRun, SourceRunCounts, SourceRunCreateInput, SourceRunFailure, SourceRunFailureRead, SourceRunGetInput, SourceRunList, SourceRunListInput, SourceSchedule, SourceSecretsInput, SourceStep, SourceTestInput, SourceUpdateInput, SourceVersionRef, SourceWhere, sourceCleans, sourceCodePath, sourceEvery, sourceFieldTypes, sourceFormHeaders, sourceKeepDays, sourceLimits, sourceManifestPath, sourceSchema, } from "./sources/sources.js";
|
|
61
61
|
export { maxDatabaseRows, maxTableColumns, maxTableGroups, maxTableRows, RowLimit, TableAggregate, TableColumn, TableColumnChange, TableColumnType, TableCondition, TableCreateInput, TableDetail, TableExcerpt, TableFilter, TableGetInput, TableGroup, TableId, TableSaved, TableSort, TableStorage, TableUpdateInput, tableAggregateFunctions, tableColumnTypes, tableFormats, tableStorages, } from "./tables/tables.js";
|
|
62
62
|
export { companyTeamId, MemberId, Team, TeamArchiveInput, TeamCreateInput, TeamId, TeamList, TeamListInput, TeamMember, TeamMemberCreateInput, TeamMemberRemoveInput, TeamRestoreInput, TeamRole, TeamUpdateInput, } from "./teams/teams.js";
|
package/dist/skills/skills.d.ts
CHANGED
|
@@ -64,6 +64,16 @@ export declare const SkillCaseCalls: z.ZodObject<{
|
|
|
64
64
|
}, z.core.$strict>;
|
|
65
65
|
export type SkillCaseCalls = z.infer<typeof SkillCaseCalls>;
|
|
66
66
|
export type SkillFile = z.infer<typeof SkillFile>;
|
|
67
|
+
export declare const SkillMockAnswer: z.ZodObject<{
|
|
68
|
+
wenn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
69
|
+
antwort: z.ZodUnknown & z.ZodType<{}, unknown, z.core.$ZodTypeInternals<{}, unknown>>;
|
|
70
|
+
}, z.core.$strict>;
|
|
71
|
+
export declare const SkillMockAnswers: z.ZodArray<z.ZodObject<{
|
|
72
|
+
wenn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
73
|
+
antwort: z.ZodUnknown & z.ZodType<{}, unknown, z.core.$ZodTypeInternals<{}, unknown>>;
|
|
74
|
+
}, z.core.$strict>>;
|
|
75
|
+
export type SkillMockAnswers = z.infer<typeof SkillMockAnswers>;
|
|
76
|
+
export declare function isMockAnswerList(value: unknown): value is unknown[];
|
|
67
77
|
export declare const SkillPoint: z.ZodObject<{
|
|
68
78
|
text: z.ZodString;
|
|
69
79
|
kind: z.ZodEnum<{
|
package/dist/skills/skills.js
CHANGED
|
@@ -111,6 +111,37 @@ export const SkillCaseCalls = z.strictObject({
|
|
|
111
111
|
mock: z.record(SkillCallName, z.unknown()).optional(),
|
|
112
112
|
schreibt: z.array(SkillWriteName).max(100).optional(),
|
|
113
113
|
});
|
|
114
|
+
// A mock with an answer per input (#1334): a list of answers, each under `wenn:` with the fields
|
|
115
|
+
// its call's input has to hold (`url: https://…`); the first that fits answers, one without `wenn:`
|
|
116
|
+
// answers any other call. Strict, so a misspelt `wen:` is refused rather than read as no condition.
|
|
117
|
+
export const SkillMockAnswer = z.strictObject({
|
|
118
|
+
wenn: z
|
|
119
|
+
.record(z.string().min(1), z.unknown())
|
|
120
|
+
.refine((fields) => Object.keys(fields).length > 0, {
|
|
121
|
+
error: "wenn names at least one field of the input, like { url: https://example.org }.",
|
|
122
|
+
})
|
|
123
|
+
.optional(),
|
|
124
|
+
antwort: z.unknown().refine((value) => value != null, {
|
|
125
|
+
error: "Each answer needs an antwort, like { ok: true }.",
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
export const SkillMockAnswers = z
|
|
129
|
+
.array(SkillMockAnswer)
|
|
130
|
+
.min(1)
|
|
131
|
+
.max(100)
|
|
132
|
+
.refine((answers) => answers.filter((each) => each.wenn === undefined).length <= 1, {
|
|
133
|
+
error: "At most one answer stands without wenn.",
|
|
134
|
+
});
|
|
135
|
+
// Whether a mock's value is a list of answers by input rather than one answer: a list with an entry
|
|
136
|
+
// that is a map with `wenn` or `antwort`; the strict read then refuses any other entry (a typo). A
|
|
137
|
+
// plain list answer (`[1, 2]`, `[{ id: 1 }]`) stays one.
|
|
138
|
+
export function isMockAnswerList(value) {
|
|
139
|
+
return (Array.isArray(value) &&
|
|
140
|
+
value.some((entry) => entry !== null &&
|
|
141
|
+
typeof entry === "object" &&
|
|
142
|
+
!Array.isArray(entry) &&
|
|
143
|
+
("wenn" in entry || "antwort" in entry)));
|
|
144
|
+
}
|
|
114
145
|
// One point a case is checked against: a line of the result, or one it expects in addition.
|
|
115
146
|
export const SkillPoint = z.object({
|
|
116
147
|
text: z.string(),
|
package/package.json
CHANGED