terse-types 0.0.62 → 0.0.64
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 +4 -0
- package/dist/ApiRoutes.json +4 -0
- package/dist/Triggers.d.ts +2009 -0
- package/dist/Triggers.js +24 -0
- package/dist/types.d.ts +29 -0
- package/dist/types.js +10 -1
- package/package.json +1 -1
package/dist/Triggers.js
CHANGED
|
@@ -749,3 +749,27 @@ export const serializedEventSchema = z.object({
|
|
|
749
749
|
display: serializedEventDisplaySchema.optional(),
|
|
750
750
|
data: TriggerSchema
|
|
751
751
|
});
|
|
752
|
+
export const eventFixtureOverridesSchema = z.object({
|
|
753
|
+
formattedContent: z.string().optional(),
|
|
754
|
+
debugLog: z.string().optional()
|
|
755
|
+
});
|
|
756
|
+
export const eventFixtureSchema = z.intersection(TriggerSchema, eventFixtureOverridesSchema);
|
|
757
|
+
export function hydrateSerializedEvent(fixture) {
|
|
758
|
+
// re-parse through TriggerSchema so override keys are stripped from data
|
|
759
|
+
const trigger = TriggerSchema.parse(fixture);
|
|
760
|
+
return {
|
|
761
|
+
integrationType: trigger.integrationType,
|
|
762
|
+
eventType: trigger.eventType,
|
|
763
|
+
formattedContent: fixture.formattedContent ?? formatTriggerForAgent(trigger),
|
|
764
|
+
debugLog: fixture.debugLog ?? debugTrigger(trigger),
|
|
765
|
+
display: displayTrigger(trigger),
|
|
766
|
+
data: trigger
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
export function toEventFixture(event) {
|
|
770
|
+
return {
|
|
771
|
+
...event.data,
|
|
772
|
+
formattedContent: event.formattedContent,
|
|
773
|
+
debugLog: event.debugLog
|
|
774
|
+
};
|
|
775
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -9086,6 +9086,34 @@ export declare const sdkStateGetResponseSchema: z.ZodObject<{
|
|
|
9086
9086
|
content: z.ZodNullable<z.ZodString>;
|
|
9087
9087
|
}, z.core.$strip>;
|
|
9088
9088
|
export type SdkStateGetResponse = z.infer<typeof sdkStateGetResponseSchema>;
|
|
9089
|
+
export declare const sdkStateScopeRequestSchema: z.ZodObject<{
|
|
9090
|
+
projectId: z.ZodString;
|
|
9091
|
+
jobName: z.ZodString;
|
|
9092
|
+
test: z.ZodOptional<z.ZodBoolean>;
|
|
9093
|
+
}, z.core.$strip>;
|
|
9094
|
+
export type SdkStateScopeRequest = z.infer<typeof sdkStateScopeRequestSchema>;
|
|
9095
|
+
export declare const sdkStateKeyRequestSchema: z.ZodObject<{
|
|
9096
|
+
projectId: z.ZodString;
|
|
9097
|
+
jobName: z.ZodString;
|
|
9098
|
+
test: z.ZodOptional<z.ZodBoolean>;
|
|
9099
|
+
key: z.ZodString;
|
|
9100
|
+
}, z.core.$strip>;
|
|
9101
|
+
export type SdkStateKeyRequest = z.infer<typeof sdkStateKeyRequestSchema>;
|
|
9102
|
+
export type SdkStateKeyEntry = {
|
|
9103
|
+
key: string;
|
|
9104
|
+
sizeBytes: number;
|
|
9105
|
+
};
|
|
9106
|
+
export type SdkStateListResponse = {
|
|
9107
|
+
job: string;
|
|
9108
|
+
keys: SdkStateKeyEntry[];
|
|
9109
|
+
};
|
|
9110
|
+
export type SdkStateReadResponse = {
|
|
9111
|
+
key: string;
|
|
9112
|
+
content: string;
|
|
9113
|
+
};
|
|
9114
|
+
export type SdkStateResetResponse = {
|
|
9115
|
+
deleted: number;
|
|
9116
|
+
};
|
|
9089
9117
|
export declare const sdkTestRunStartRequestSchema: z.ZodObject<{
|
|
9090
9118
|
projectId: z.ZodString;
|
|
9091
9119
|
jobName: z.ZodString;
|
|
@@ -11170,6 +11198,7 @@ export declare const sdkTestRunStartRequestSchema: z.ZodObject<{
|
|
|
11170
11198
|
forceLocal: z.ZodOptional<z.ZodBoolean>;
|
|
11171
11199
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
11172
11200
|
replayOfRunId: z.ZodOptional<z.ZodString>;
|
|
11201
|
+
freshState: z.ZodOptional<z.ZodBoolean>;
|
|
11173
11202
|
}, z.core.$strip>;
|
|
11174
11203
|
export type SdkTestRunStartRequest = z.infer<typeof sdkTestRunStartRequestSchema>;
|
|
11175
11204
|
export declare const sdkTestRunStartResponseSchema: z.ZodObject<{
|
package/dist/types.js
CHANGED
|
@@ -746,13 +746,22 @@ export const sdkStatePutRequestSchema = z.object({
|
|
|
746
746
|
export const sdkStateGetResponseSchema = z.object({
|
|
747
747
|
content: z.string().nullable()
|
|
748
748
|
});
|
|
749
|
+
export const sdkStateScopeRequestSchema = z.object({
|
|
750
|
+
projectId: z.string().min(1),
|
|
751
|
+
jobName: z.string().min(1),
|
|
752
|
+
test: z.boolean().optional()
|
|
753
|
+
});
|
|
754
|
+
export const sdkStateKeyRequestSchema = sdkStateScopeRequestSchema.extend({
|
|
755
|
+
key: z.string().min(1)
|
|
756
|
+
});
|
|
749
757
|
export const sdkTestRunStartRequestSchema = z.object({
|
|
750
758
|
projectId: z.string().min(1),
|
|
751
759
|
jobName: z.string().min(1),
|
|
752
760
|
event: serializedEventSchema,
|
|
753
761
|
forceLocal: z.boolean().optional(),
|
|
754
762
|
isTest: z.boolean().optional(),
|
|
755
|
-
replayOfRunId: z.string().optional()
|
|
763
|
+
replayOfRunId: z.string().optional(),
|
|
764
|
+
freshState: z.boolean().optional()
|
|
756
765
|
});
|
|
757
766
|
export const sdkTestRunStartResponseSchema = z.object({
|
|
758
767
|
runId: z.string(),
|