terse-types 0.0.12 → 0.0.14
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/ApiRouteBuilder.d.ts +6 -0
- package/dist/ApiRoutes.json +6 -0
- package/dist/Configs.d.ts +101 -1
- package/dist/Configs.js +105 -4
- package/dist/FrontendRoutes.json +3 -0
- package/dist/FrontendRoutesBuilder.d.ts +3 -0
- package/dist/Integrations.d.ts +10 -1
- package/dist/Integrations.js +10 -1
- package/dist/SandboxTypes.d.ts +15 -0
- package/dist/SandboxTypes.js +1 -0
- package/dist/TriggerEventPresenters.d.ts +3 -0
- package/dist/TriggerEventPresenters.js +238 -0
- package/dist/TriggerEvents.d.ts +4054 -0
- package/dist/TriggerEvents.js +437 -0
- package/dist/TriggerPresenters.js +23 -0
- package/dist/Triggers.d.ts +146 -3
- package/dist/Triggers.js +49 -1
- package/dist/json-schema/terse-types.schema.json +66 -234
- package/dist/types.d.ts +592 -12
- package/dist/types.js +43 -5
- package/package.json +1 -1
package/dist/types.js
CHANGED
|
@@ -145,8 +145,7 @@ export const agentOutputSchema = z.object({
|
|
|
145
145
|
config: configInstanceDataSchema
|
|
146
146
|
});
|
|
147
147
|
export const agentPromptSchema = z.object({
|
|
148
|
-
text: z.string()
|
|
149
|
-
remoteServerUrl: z.string().optional().nullable()
|
|
148
|
+
text: z.string()
|
|
150
149
|
});
|
|
151
150
|
export const transientAgentTriggerSchema = z.object({
|
|
152
151
|
id: z.string(),
|
|
@@ -211,6 +210,11 @@ export const agentNotificationSettingsSchema = z.object({
|
|
|
211
210
|
enabled: z.boolean(),
|
|
212
211
|
actionTypes: z.array(runHistoryActionTypeSchema)
|
|
213
212
|
});
|
|
213
|
+
export const jobMetadataSchema = z.object({
|
|
214
|
+
remoteServerUrl: z.string().nullable(),
|
|
215
|
+
projectId: z.string().nullable(),
|
|
216
|
+
projectName: z.string().nullable()
|
|
217
|
+
});
|
|
214
218
|
export const agentSchema = z.object({
|
|
215
219
|
id: z.string(),
|
|
216
220
|
name: z.string(),
|
|
@@ -223,7 +227,8 @@ export const agentSchema = z.object({
|
|
|
223
227
|
notificationSettings: agentNotificationSettingsSchema.nullable(),
|
|
224
228
|
toolApprovals: z.array(z.string()).nullable(),
|
|
225
229
|
updatedAt: z.string().nullable(),
|
|
226
|
-
source: z.enum(["WEB_UI", "SDK"]).nullable()
|
|
230
|
+
source: z.enum(["WEB_UI", "SDK"]).nullable(),
|
|
231
|
+
metadata: jobMetadataSchema.nullable()
|
|
227
232
|
});
|
|
228
233
|
export const agentUpdateSchema = z.object({
|
|
229
234
|
name: z.string().optional(),
|
|
@@ -441,6 +446,8 @@ export const toolApprovalRequestedSchema = z.object({
|
|
|
441
446
|
export const actionSchema = z.object({ type: z.literal("action"), action: runHistoryActionBaseSchema });
|
|
442
447
|
export const errorSchema = z.object({ type: z.literal("error"), message: z.string() });
|
|
443
448
|
export const doneSchema = z.object({ type: z.literal("done") });
|
|
449
|
+
export const sdkDeployStageEnum = z.enum(["UPLOADING_SOURCE", "BUILDING_DEPENDENCY_IMAGE", "BUILDING_SOURCE_IMAGE", "CONFIGURING_AUTOMATIONS"]);
|
|
450
|
+
export const deployStageSchema = z.object({ type: z.literal("deploy_stage"), stage: sdkDeployStageEnum });
|
|
444
451
|
export const sdkAgentStreamEventSchema = z.discriminatedUnion("type", [
|
|
445
452
|
runStartedSchema,
|
|
446
453
|
textSchema,
|
|
@@ -451,19 +458,48 @@ export const sdkAgentStreamEventSchema = z.discriminatedUnion("type", [
|
|
|
451
458
|
toolApprovalRequestedSchema,
|
|
452
459
|
actionSchema,
|
|
453
460
|
errorSchema,
|
|
454
|
-
doneSchema
|
|
461
|
+
doneSchema,
|
|
462
|
+
deployStageSchema
|
|
455
463
|
]);
|
|
456
464
|
export const sdkApprovalDecisionRequestBodySchema = z.object({
|
|
457
465
|
runId: z.string(),
|
|
458
466
|
stepId: z.string(),
|
|
459
467
|
approved: z.boolean()
|
|
460
468
|
});
|
|
469
|
+
export const sdkCreateProjectRequestBodySchema = z.object({
|
|
470
|
+
name: z.string().min(1)
|
|
471
|
+
});
|
|
472
|
+
export const sdkCreateProjectResponseBodySchema = z.object({
|
|
473
|
+
projectId: z.string(),
|
|
474
|
+
name: z.string()
|
|
475
|
+
});
|
|
476
|
+
export const projectDetailResponseSchema = z.object({
|
|
477
|
+
id: z.string(),
|
|
478
|
+
name: z.string(),
|
|
479
|
+
createdAt: z.string(),
|
|
480
|
+
remoteServerUrl: z.string().nullable(),
|
|
481
|
+
isSelfHosted: z.boolean(),
|
|
482
|
+
hasSigningSecret: z.boolean(),
|
|
483
|
+
hasProjectApiKey: z.boolean(),
|
|
484
|
+
jobs: z.array(z.object({
|
|
485
|
+
id: z.string(),
|
|
486
|
+
name: z.string(),
|
|
487
|
+
isActive: z.boolean()
|
|
488
|
+
}))
|
|
489
|
+
});
|
|
490
|
+
export const terseProjectConfigSchema = z.object({
|
|
491
|
+
projectId: z.string().min(1),
|
|
492
|
+
name: z.string().min(1),
|
|
493
|
+
selfHosted: z.boolean().optional(),
|
|
494
|
+
remoteServerUrl: z.string().optional()
|
|
495
|
+
});
|
|
461
496
|
export const sdkDeployJobSchema = z.object({
|
|
462
497
|
jobName: z.string(),
|
|
463
498
|
triggers: z.array(triggerConfigDataSchema)
|
|
464
499
|
});
|
|
465
500
|
export const sdkDeployRequestBodySchema = z
|
|
466
501
|
.object({
|
|
502
|
+
projectId: z.string(),
|
|
467
503
|
jobs: z.array(sdkDeployJobSchema),
|
|
468
504
|
remoteServerUrl: z.string().optional(),
|
|
469
505
|
sourceZipBase64: z.string().optional()
|
|
@@ -480,7 +516,6 @@ export const sdkDeployResultSchema = z.object({
|
|
|
480
516
|
jobName: z.string(),
|
|
481
517
|
automationId: z.string(),
|
|
482
518
|
isUpdate: z.boolean(),
|
|
483
|
-
signingSecret: z.string().optional(),
|
|
484
519
|
triggers: z
|
|
485
520
|
.array(z.object({
|
|
486
521
|
id: z.string(),
|
|
@@ -494,6 +529,8 @@ export const sdkDeployRemovedSchema = z.object({
|
|
|
494
529
|
});
|
|
495
530
|
export const sdkDeployResponseBodySchema = z.object({
|
|
496
531
|
success: z.boolean(),
|
|
532
|
+
signingSecret: z.string().optional(),
|
|
533
|
+
projectApiKey: z.string().optional(),
|
|
497
534
|
results: z.array(sdkDeployResultSchema),
|
|
498
535
|
removed: z.array(sdkDeployRemovedSchema),
|
|
499
536
|
error: z.string().optional(),
|
|
@@ -571,6 +608,7 @@ export const workosWebhookSecretUpdateRequestSchema = z.object({
|
|
|
571
608
|
export const sdkSampleEventsRequestSchema = z.object({
|
|
572
609
|
triggers: z
|
|
573
610
|
.array(z.object({
|
|
611
|
+
triggerId: z.string().optional(),
|
|
574
612
|
integrationId: z.string(),
|
|
575
613
|
integrationType: integrationTypeEnum,
|
|
576
614
|
config: configDataSchema
|