@cat-factory/contracts 0.34.0 → 0.36.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/api-keys.d.ts +17 -0
- package/dist/api-keys.d.ts.map +1 -1
- package/dist/api-keys.js +2 -0
- package/dist/api-keys.js.map +1 -1
- package/dist/github.d.ts +14 -0
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +13 -0
- package/dist/github.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/observability.d.ts +63 -0
- package/dist/observability.d.ts.map +1 -1
- package/dist/observability.js +57 -0
- package/dist/observability.js.map +1 -1
- package/dist/requests.d.ts +7 -0
- package/dist/requests.d.ts.map +1 -1
- package/dist/requests.js +2 -0
- package/dist/requests.js.map +1 -1
- package/dist/routes/_shared.d.ts +58 -0
- package/dist/routes/_shared.d.ts.map +1 -0
- package/dist/routes/_shared.js +46 -0
- package/dist/routes/_shared.js.map +1 -0
- package/dist/routes/accounts.d.ts +775 -0
- package/dist/routes/accounts.d.ts.map +1 -0
- package/dist/routes/accounts.js +145 -0
- package/dist/routes/accounts.js.map +1 -0
- package/dist/routes/agent-runs.d.ts +659 -0
- package/dist/routes/agent-runs.d.ts.map +1 -0
- package/dist/routes/agent-runs.js +33 -0
- package/dist/routes/agent-runs.js.map +1 -0
- package/dist/routes/api-keys.d.ts +244 -0
- package/dist/routes/api-keys.d.ts.map +1 -0
- package/dist/routes/api-keys.js +48 -0
- package/dist/routes/api-keys.js.map +1 -0
- package/dist/routes/auth.d.ts +411 -0
- package/dist/routes/auth.d.ts.map +1 -0
- package/dist/routes/auth.js +129 -0
- package/dist/routes/auth.js.map +1 -0
- package/dist/routes/board.d.ts +1259 -0
- package/dist/routes/board.d.ts.map +1 -0
- package/dist/routes/board.js +84 -0
- package/dist/routes/board.js.map +1 -0
- package/dist/routes/bootstrap.d.ts +395 -0
- package/dist/routes/bootstrap.d.ts.map +1 -0
- package/dist/routes/bootstrap.js +56 -0
- package/dist/routes/bootstrap.js.map +1 -0
- package/dist/routes/brainstorm.d.ts +482 -0
- package/dist/routes/brainstorm.d.ts.map +1 -0
- package/dist/routes/brainstorm.js +69 -0
- package/dist/routes/brainstorm.js.map +1 -0
- package/dist/routes/clarity.d.ts +462 -0
- package/dist/routes/clarity.d.ts.map +1 -0
- package/dist/routes/clarity.js +67 -0
- package/dist/routes/clarity.js.map +1 -0
- package/dist/routes/consensus.d.ts +71 -0
- package/dist/routes/consensus.d.ts.map +1 -0
- package/dist/routes/consensus.js +23 -0
- package/dist/routes/consensus.js.map +1 -0
- package/dist/routes/documents.d.ts +449 -0
- package/dist/routes/documents.d.ts.map +1 -0
- package/dist/routes/documents.js +89 -0
- package/dist/routes/documents.js.map +1 -0
- package/dist/routes/environments.d.ts +715 -0
- package/dist/routes/environments.d.ts.map +1 -0
- package/dist/routes/environments.js +82 -0
- package/dist/routes/environments.js.map +1 -0
- package/dist/routes/execution.d.ts +2768 -0
- package/dist/routes/execution.d.ts.map +1 -0
- package/dist/routes/execution.js +119 -0
- package/dist/routes/execution.js.map +1 -0
- package/dist/routes/followUp.d.ts +277 -0
- package/dist/routes/followUp.d.ts.map +1 -0
- package/dist/routes/followUp.js +47 -0
- package/dist/routes/followUp.js.map +1 -0
- package/dist/routes/fragment-library.d.ts +594 -0
- package/dist/routes/fragment-library.d.ts.map +1 -0
- package/dist/routes/fragment-library.js +102 -0
- package/dist/routes/fragment-library.js.map +1 -0
- package/dist/routes/github.d.ts +807 -0
- package/dist/routes/github.d.ts.map +1 -0
- package/dist/routes/github.js +157 -0
- package/dist/routes/github.js.map +1 -0
- package/dist/routes/human-review.d.ts +289 -0
- package/dist/routes/human-review.d.ts.map +1 -0
- package/dist/routes/human-review.js +19 -0
- package/dist/routes/human-review.js.map +1 -0
- package/dist/routes/human-test.d.ts +1434 -0
- package/dist/routes/human-test.d.ts.map +1 -0
- package/dist/routes/human-test.js +47 -0
- package/dist/routes/human-test.js.map +1 -0
- package/dist/routes/incident-enrichment.d.ts +110 -0
- package/dist/routes/incident-enrichment.d.ts.map +1 -0
- package/dist/routes/incident-enrichment.js +26 -0
- package/dist/routes/incident-enrichment.js.map +1 -0
- package/dist/routes/index.d.ts +47 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +50 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/kaizen.d.ts +112 -0
- package/dist/routes/kaizen.d.ts.map +1 -0
- package/dist/routes/kaizen.js +21 -0
- package/dist/routes/kaizen.js.map +1 -0
- package/dist/routes/localModels.d.ts +163 -0
- package/dist/routes/localModels.d.ts.map +1 -0
- package/dist/routes/localModels.js +41 -0
- package/dist/routes/localModels.js.map +1 -0
- package/dist/routes/localSettings.d.ts +93 -0
- package/dist/routes/localSettings.d.ts.map +1 -0
- package/dist/routes/localSettings.js +22 -0
- package/dist/routes/localSettings.js.map +1 -0
- package/dist/routes/merge.d.ts +197 -0
- package/dist/routes/merge.d.ts.map +1 -0
- package/dist/routes/merge.js +36 -0
- package/dist/routes/merge.js.map +1 -0
- package/dist/routes/model-presets.d.ts +162 -0
- package/dist/routes/model-presets.d.ts.map +1 -0
- package/dist/routes/model-presets.js +36 -0
- package/dist/routes/model-presets.js.map +1 -0
- package/dist/routes/models.d.ts +122 -0
- package/dist/routes/models.d.ts.map +1 -0
- package/dist/routes/models.js +24 -0
- package/dist/routes/models.js.map +1 -0
- package/dist/routes/notifications.d.ts +213 -0
- package/dist/routes/notifications.d.ts.map +1 -0
- package/dist/routes/notifications.js +31 -0
- package/dist/routes/notifications.js.map +1 -0
- package/dist/routes/openrouter.d.ts +144 -0
- package/dist/routes/openrouter.d.ts.map +1 -0
- package/dist/routes/openrouter.js +31 -0
- package/dist/routes/openrouter.js.map +1 -0
- package/dist/routes/personal-subscriptions.d.ts +124 -0
- package/dist/routes/personal-subscriptions.d.ts.map +1 -0
- package/dist/routes/personal-subscriptions.js +32 -0
- package/dist/routes/personal-subscriptions.js.map +1 -0
- package/dist/routes/pipelines.d.ts +457 -0
- package/dist/routes/pipelines.d.ts.map +1 -0
- package/dist/routes/pipelines.js +51 -0
- package/dist/routes/pipelines.js.map +1 -0
- package/dist/routes/prompt-fragments.d.ts +52 -0
- package/dist/routes/prompt-fragments.d.ts.map +1 -0
- package/dist/routes/prompt-fragments.js +14 -0
- package/dist/routes/prompt-fragments.js.map +1 -0
- package/dist/routes/provisioning-logs.d.ts +45 -0
- package/dist/routes/provisioning-logs.d.ts.map +1 -0
- package/dist/routes/provisioning-logs.js +14 -0
- package/dist/routes/provisioning-logs.js.map +1 -0
- package/dist/routes/recurring.d.ts +309 -0
- package/dist/routes/recurring.d.ts.map +1 -0
- package/dist/routes/recurring.js +50 -0
- package/dist/routes/recurring.js.map +1 -0
- package/dist/routes/release.d.ts +218 -0
- package/dist/routes/release.d.ts.map +1 -0
- package/dist/routes/release.js +47 -0
- package/dist/routes/release.js.map +1 -0
- package/dist/routes/requirements.d.ts +901 -0
- package/dist/routes/requirements.d.ts.map +1 -0
- package/dist/routes/requirements.js +96 -0
- package/dist/routes/requirements.js.map +1 -0
- package/dist/routes/runners.d.ts +442 -0
- package/dist/routes/runners.d.ts.map +1 -0
- package/dist/routes/runners.js +47 -0
- package/dist/routes/runners.js.map +1 -0
- package/dist/routes/sandbox.d.ts +898 -0
- package/dist/routes/sandbox.d.ts.map +1 -0
- package/dist/routes/sandbox.js +119 -0
- package/dist/routes/sandbox.js.map +1 -0
- package/dist/routes/service-fragment-defaults.d.ts +66 -0
- package/dist/routes/service-fragment-defaults.d.ts.map +1 -0
- package/dist/routes/service-fragment-defaults.js +20 -0
- package/dist/routes/service-fragment-defaults.js.map +1 -0
- package/dist/routes/services.d.ts +224 -0
- package/dist/routes/services.d.ts.map +1 -0
- package/dist/routes/services.js +44 -0
- package/dist/routes/services.js.map +1 -0
- package/dist/routes/slack.d.ts +332 -0
- package/dist/routes/slack.d.ts.map +1 -0
- package/dist/routes/slack.js +72 -0
- package/dist/routes/slack.js.map +1 -0
- package/dist/routes/spec.d.ts +75 -0
- package/dist/routes/spec.d.ts.map +1 -0
- package/dist/routes/spec.js +16 -0
- package/dist/routes/spec.js.map +1 -0
- package/dist/routes/tasks.d.ts +723 -0
- package/dist/routes/tasks.d.ts.map +1 -0
- package/dist/routes/tasks.js +108 -0
- package/dist/routes/tasks.js.map +1 -0
- package/dist/routes/tracker.d.ts +77 -0
- package/dist/routes/tracker.d.ts.map +1 -0
- package/dist/routes/tracker.js +20 -0
- package/dist/routes/tracker.js.map +1 -0
- package/dist/routes/user-secret.d.ts +231 -0
- package/dist/routes/user-secret.d.ts.map +1 -0
- package/dist/routes/user-secret.js +49 -0
- package/dist/routes/user-secret.js.map +1 -0
- package/dist/routes/vendor-credentials.d.ts +120 -0
- package/dist/routes/vendor-credentials.d.ts.map +1 -0
- package/dist/routes/vendor-credentials.js +33 -0
- package/dist/routes/vendor-credentials.js.map +1 -0
- package/dist/routes/workspace-settings.d.ts +93 -0
- package/dist/routes/workspace-settings.d.ts.map +1 -0
- package/dist/routes/workspace-settings.js +20 -0
- package/dist/routes/workspace-settings.js.map +1 -0
- package/dist/routes/workspaces.d.ts +1309 -0
- package/dist/routes/workspaces.d.ts.map +1 -0
- package/dist/routes/workspaces.js +45 -0
- package/dist/routes/workspaces.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const listProvisioningLogsContract: {
|
|
2
|
+
readonly method: "get";
|
|
3
|
+
readonly pathResolver: () => string;
|
|
4
|
+
readonly responsesByStatusCode: {
|
|
5
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
6
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
7
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
8
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
9
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
10
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
11
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
12
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
13
|
+
}, undefined>, undefined>, undefined>;
|
|
14
|
+
}, undefined>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
17
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
18
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
19
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
20
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
21
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
22
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
23
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
24
|
+
}, undefined>, undefined>, undefined>;
|
|
25
|
+
}, undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
28
|
+
readonly entries: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
29
|
+
readonly id: import("valibot").StringSchema<undefined>;
|
|
30
|
+
readonly workspaceId: import("valibot").StringSchema<undefined>;
|
|
31
|
+
readonly subsystem: import("valibot").PicklistSchema<["environment", "runner-pool", "container"], undefined>;
|
|
32
|
+
readonly operation: import("valibot").PicklistSchema<["provision", "teardown", "status", "dispatch", "release", "poll-failure"], undefined>;
|
|
33
|
+
readonly targetId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
34
|
+
readonly providerId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
35
|
+
readonly blockId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
36
|
+
readonly executionId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
37
|
+
readonly outcome: import("valibot").PicklistSchema<["success", "failure"], undefined>;
|
|
38
|
+
readonly error: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
39
|
+
readonly detail: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
40
|
+
readonly createdAt: import("valibot").NumberSchema<undefined>;
|
|
41
|
+
}, undefined>, undefined>;
|
|
42
|
+
}, undefined>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=provisioning-logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provisioning-logs.d.ts","sourceRoot":"","sources":["../../src/routes/provisioning-logs.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIvC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineApiContract } from '@toad-contracts/valibot';
|
|
2
|
+
import { provisioningLogsResponseSchema } from '../provisioning-logs.js';
|
|
3
|
+
import { errorResponses } from './_shared.js';
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Provisioning event-log route contract. Mounted under `/workspaces/:workspaceId`,
|
|
6
|
+
// so the path here is relative to that prefix. The query params are read off the
|
|
7
|
+
// raw request in the controller (the contract describes path + method + response).
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
export const listProvisioningLogsContract = defineApiContract({
|
|
10
|
+
method: 'get',
|
|
11
|
+
pathResolver: () => '/provisioning-logs',
|
|
12
|
+
responsesByStatusCode: { 200: provisioningLogsResponseSchema, ...errorResponses },
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=provisioning-logs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provisioning-logs.js","sourceRoot":"","sources":["../../src/routes/provisioning-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,8EAA8E;AAC9E,mFAAmF;AACnF,iFAAiF;AACjF,mFAAmF;AACnF,8EAA8E;AAE9E,MAAM,CAAC,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC5D,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,oBAAoB;IACxC,qBAAqB,EAAE,EAAE,GAAG,EAAE,8BAA8B,EAAE,GAAG,cAAc,EAAE;CAClF,CAAC,CAAA"}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { ContractNoBody } from '@toad-contracts/valibot';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
export declare const listSchedulesContract: {
|
|
4
|
+
readonly method: "get";
|
|
5
|
+
readonly pathResolver: () => string;
|
|
6
|
+
readonly responsesByStatusCode: {
|
|
7
|
+
readonly '4xx': v.ObjectSchema<{
|
|
8
|
+
readonly error: v.ObjectSchema<{
|
|
9
|
+
readonly code: v.StringSchema<undefined>;
|
|
10
|
+
readonly message: v.StringSchema<undefined>;
|
|
11
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
12
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
13
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
14
|
+
readonly message: v.StringSchema<undefined>;
|
|
15
|
+
}, undefined>, undefined>, undefined>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
}, undefined>;
|
|
18
|
+
readonly '5xx': v.ObjectSchema<{
|
|
19
|
+
readonly error: v.ObjectSchema<{
|
|
20
|
+
readonly code: v.StringSchema<undefined>;
|
|
21
|
+
readonly message: v.StringSchema<undefined>;
|
|
22
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
23
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
24
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
25
|
+
readonly message: v.StringSchema<undefined>;
|
|
26
|
+
}, undefined>, undefined>, undefined>;
|
|
27
|
+
}, undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
readonly 200: v.ArraySchema<v.ObjectSchema<{
|
|
30
|
+
readonly id: v.StringSchema<undefined>;
|
|
31
|
+
readonly serviceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
32
|
+
readonly blockId: v.StringSchema<undefined>;
|
|
33
|
+
readonly frameId: v.StringSchema<undefined>;
|
|
34
|
+
readonly pipelineId: v.StringSchema<undefined>;
|
|
35
|
+
readonly template: v.PicklistSchema<["dep-update", "tech-debt", "custom"], undefined>;
|
|
36
|
+
readonly name: v.StringSchema<undefined>;
|
|
37
|
+
readonly recurrence: v.ObjectSchema<{
|
|
38
|
+
readonly intervalHours: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>;
|
|
39
|
+
readonly weekdays: v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 6, undefined>]>, undefined>;
|
|
40
|
+
readonly windowStartHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
41
|
+
readonly windowEndHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
42
|
+
readonly timezone: v.StringSchema<undefined>;
|
|
43
|
+
}, undefined>;
|
|
44
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
45
|
+
readonly lastRunAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
46
|
+
readonly nextRunAt: v.NumberSchema<undefined>;
|
|
47
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
48
|
+
}, undefined>, undefined>;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export declare const createScheduleContract: {
|
|
52
|
+
readonly method: "post";
|
|
53
|
+
readonly pathResolver: () => string;
|
|
54
|
+
readonly requestBodySchema: v.ObjectSchema<{
|
|
55
|
+
readonly frameId: v.StringSchema<undefined>;
|
|
56
|
+
readonly pipelineId: v.StringSchema<undefined>;
|
|
57
|
+
readonly template: v.OptionalSchema<v.PicklistSchema<["dep-update", "tech-debt", "custom"], undefined>, "custom">;
|
|
58
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
|
|
59
|
+
readonly recurrence: v.ObjectSchema<{
|
|
60
|
+
readonly intervalHours: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>;
|
|
61
|
+
readonly weekdays: v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 6, undefined>]>, undefined>;
|
|
62
|
+
readonly windowStartHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
63
|
+
readonly windowEndHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
64
|
+
readonly timezone: v.StringSchema<undefined>;
|
|
65
|
+
}, undefined>;
|
|
66
|
+
readonly enabled: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
67
|
+
readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
68
|
+
}, undefined>;
|
|
69
|
+
readonly responsesByStatusCode: {
|
|
70
|
+
readonly '4xx': v.ObjectSchema<{
|
|
71
|
+
readonly error: v.ObjectSchema<{
|
|
72
|
+
readonly code: v.StringSchema<undefined>;
|
|
73
|
+
readonly message: v.StringSchema<undefined>;
|
|
74
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
75
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
76
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
77
|
+
readonly message: v.StringSchema<undefined>;
|
|
78
|
+
}, undefined>, undefined>, undefined>;
|
|
79
|
+
}, undefined>;
|
|
80
|
+
}, undefined>;
|
|
81
|
+
readonly '5xx': v.ObjectSchema<{
|
|
82
|
+
readonly error: v.ObjectSchema<{
|
|
83
|
+
readonly code: v.StringSchema<undefined>;
|
|
84
|
+
readonly message: v.StringSchema<undefined>;
|
|
85
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
86
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
87
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
88
|
+
readonly message: v.StringSchema<undefined>;
|
|
89
|
+
}, undefined>, undefined>, undefined>;
|
|
90
|
+
}, undefined>;
|
|
91
|
+
}, undefined>;
|
|
92
|
+
readonly 201: v.ObjectSchema<{
|
|
93
|
+
readonly id: v.StringSchema<undefined>;
|
|
94
|
+
readonly serviceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
95
|
+
readonly blockId: v.StringSchema<undefined>;
|
|
96
|
+
readonly frameId: v.StringSchema<undefined>;
|
|
97
|
+
readonly pipelineId: v.StringSchema<undefined>;
|
|
98
|
+
readonly template: v.PicklistSchema<["dep-update", "tech-debt", "custom"], undefined>;
|
|
99
|
+
readonly name: v.StringSchema<undefined>;
|
|
100
|
+
readonly recurrence: v.ObjectSchema<{
|
|
101
|
+
readonly intervalHours: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>;
|
|
102
|
+
readonly weekdays: v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 6, undefined>]>, undefined>;
|
|
103
|
+
readonly windowStartHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
104
|
+
readonly windowEndHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
105
|
+
readonly timezone: v.StringSchema<undefined>;
|
|
106
|
+
}, undefined>;
|
|
107
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
108
|
+
readonly lastRunAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
109
|
+
readonly nextRunAt: v.NumberSchema<undefined>;
|
|
110
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
111
|
+
}, undefined>;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export declare const updateScheduleContract: {
|
|
115
|
+
readonly method: "patch";
|
|
116
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
117
|
+
scheduleId: v.StringSchema<undefined>;
|
|
118
|
+
}, undefined> & import("@toad-contracts/core").ObjectKeysCarrier;
|
|
119
|
+
readonly pathResolver: ({ scheduleId }: {
|
|
120
|
+
scheduleId: string;
|
|
121
|
+
}) => string;
|
|
122
|
+
readonly requestBodySchema: v.ObjectSchema<{
|
|
123
|
+
readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
|
|
124
|
+
readonly pipelineId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
125
|
+
readonly recurrence: v.OptionalSchema<v.ObjectSchema<{
|
|
126
|
+
readonly intervalHours: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>;
|
|
127
|
+
readonly weekdays: v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 6, undefined>]>, undefined>;
|
|
128
|
+
readonly windowStartHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
129
|
+
readonly windowEndHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
130
|
+
readonly timezone: v.StringSchema<undefined>;
|
|
131
|
+
}, undefined>, undefined>;
|
|
132
|
+
readonly enabled: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
133
|
+
}, undefined>;
|
|
134
|
+
readonly responsesByStatusCode: {
|
|
135
|
+
readonly '4xx': v.ObjectSchema<{
|
|
136
|
+
readonly error: v.ObjectSchema<{
|
|
137
|
+
readonly code: v.StringSchema<undefined>;
|
|
138
|
+
readonly message: v.StringSchema<undefined>;
|
|
139
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
140
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
141
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
142
|
+
readonly message: v.StringSchema<undefined>;
|
|
143
|
+
}, undefined>, undefined>, undefined>;
|
|
144
|
+
}, undefined>;
|
|
145
|
+
}, undefined>;
|
|
146
|
+
readonly '5xx': v.ObjectSchema<{
|
|
147
|
+
readonly error: v.ObjectSchema<{
|
|
148
|
+
readonly code: v.StringSchema<undefined>;
|
|
149
|
+
readonly message: v.StringSchema<undefined>;
|
|
150
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
151
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
152
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
153
|
+
readonly message: v.StringSchema<undefined>;
|
|
154
|
+
}, undefined>, undefined>, undefined>;
|
|
155
|
+
}, undefined>;
|
|
156
|
+
}, undefined>;
|
|
157
|
+
readonly 200: v.ObjectSchema<{
|
|
158
|
+
readonly id: v.StringSchema<undefined>;
|
|
159
|
+
readonly serviceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
160
|
+
readonly blockId: v.StringSchema<undefined>;
|
|
161
|
+
readonly frameId: v.StringSchema<undefined>;
|
|
162
|
+
readonly pipelineId: v.StringSchema<undefined>;
|
|
163
|
+
readonly template: v.PicklistSchema<["dep-update", "tech-debt", "custom"], undefined>;
|
|
164
|
+
readonly name: v.StringSchema<undefined>;
|
|
165
|
+
readonly recurrence: v.ObjectSchema<{
|
|
166
|
+
readonly intervalHours: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>;
|
|
167
|
+
readonly weekdays: v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 6, undefined>]>, undefined>;
|
|
168
|
+
readonly windowStartHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
169
|
+
readonly windowEndHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
170
|
+
readonly timezone: v.StringSchema<undefined>;
|
|
171
|
+
}, undefined>;
|
|
172
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
173
|
+
readonly lastRunAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
174
|
+
readonly nextRunAt: v.NumberSchema<undefined>;
|
|
175
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
176
|
+
}, undefined>;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
export declare const deleteScheduleContract: {
|
|
180
|
+
readonly method: "delete";
|
|
181
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
182
|
+
scheduleId: v.StringSchema<undefined>;
|
|
183
|
+
}, undefined> & import("@toad-contracts/core").ObjectKeysCarrier;
|
|
184
|
+
readonly pathResolver: ({ scheduleId }: {
|
|
185
|
+
scheduleId: string;
|
|
186
|
+
}) => string;
|
|
187
|
+
readonly responsesByStatusCode: {
|
|
188
|
+
readonly '4xx': v.ObjectSchema<{
|
|
189
|
+
readonly error: v.ObjectSchema<{
|
|
190
|
+
readonly code: v.StringSchema<undefined>;
|
|
191
|
+
readonly message: v.StringSchema<undefined>;
|
|
192
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
193
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
194
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
195
|
+
readonly message: v.StringSchema<undefined>;
|
|
196
|
+
}, undefined>, undefined>, undefined>;
|
|
197
|
+
}, undefined>;
|
|
198
|
+
}, undefined>;
|
|
199
|
+
readonly '5xx': v.ObjectSchema<{
|
|
200
|
+
readonly error: v.ObjectSchema<{
|
|
201
|
+
readonly code: v.StringSchema<undefined>;
|
|
202
|
+
readonly message: v.StringSchema<undefined>;
|
|
203
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
204
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
205
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
206
|
+
readonly message: v.StringSchema<undefined>;
|
|
207
|
+
}, undefined>, undefined>, undefined>;
|
|
208
|
+
}, undefined>;
|
|
209
|
+
}, undefined>;
|
|
210
|
+
readonly 204: typeof ContractNoBody;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
export declare const listScheduleRunsContract: {
|
|
214
|
+
readonly method: "get";
|
|
215
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
216
|
+
scheduleId: v.StringSchema<undefined>;
|
|
217
|
+
}, undefined> & import("@toad-contracts/core").ObjectKeysCarrier;
|
|
218
|
+
readonly pathResolver: ({ scheduleId }: {
|
|
219
|
+
scheduleId: string;
|
|
220
|
+
}) => string;
|
|
221
|
+
readonly responsesByStatusCode: {
|
|
222
|
+
readonly '4xx': v.ObjectSchema<{
|
|
223
|
+
readonly error: v.ObjectSchema<{
|
|
224
|
+
readonly code: v.StringSchema<undefined>;
|
|
225
|
+
readonly message: v.StringSchema<undefined>;
|
|
226
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
227
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
228
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
229
|
+
readonly message: v.StringSchema<undefined>;
|
|
230
|
+
}, undefined>, undefined>, undefined>;
|
|
231
|
+
}, undefined>;
|
|
232
|
+
}, undefined>;
|
|
233
|
+
readonly '5xx': v.ObjectSchema<{
|
|
234
|
+
readonly error: v.ObjectSchema<{
|
|
235
|
+
readonly code: v.StringSchema<undefined>;
|
|
236
|
+
readonly message: v.StringSchema<undefined>;
|
|
237
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
238
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
239
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
240
|
+
readonly message: v.StringSchema<undefined>;
|
|
241
|
+
}, undefined>, undefined>, undefined>;
|
|
242
|
+
}, undefined>;
|
|
243
|
+
}, undefined>;
|
|
244
|
+
readonly 200: v.ArraySchema<v.ObjectSchema<{
|
|
245
|
+
readonly id: v.StringSchema<undefined>;
|
|
246
|
+
readonly scheduleId: v.StringSchema<undefined>;
|
|
247
|
+
readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
248
|
+
readonly status: v.PicklistSchema<["running", "done", "failed", "skipped"], undefined>;
|
|
249
|
+
readonly startedAt: v.NumberSchema<undefined>;
|
|
250
|
+
readonly finishedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
251
|
+
readonly outcome: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
252
|
+
}, undefined>, undefined>;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
export declare const runScheduleNowContract: {
|
|
256
|
+
readonly method: "post";
|
|
257
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
258
|
+
scheduleId: v.StringSchema<undefined>;
|
|
259
|
+
}, undefined> & import("@toad-contracts/core").ObjectKeysCarrier;
|
|
260
|
+
readonly pathResolver: ({ scheduleId }: {
|
|
261
|
+
scheduleId: string;
|
|
262
|
+
}) => string;
|
|
263
|
+
readonly requestBodySchema: typeof ContractNoBody;
|
|
264
|
+
readonly responsesByStatusCode: {
|
|
265
|
+
readonly '4xx': v.ObjectSchema<{
|
|
266
|
+
readonly error: v.ObjectSchema<{
|
|
267
|
+
readonly code: v.StringSchema<undefined>;
|
|
268
|
+
readonly message: v.StringSchema<undefined>;
|
|
269
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
270
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
271
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
272
|
+
readonly message: v.StringSchema<undefined>;
|
|
273
|
+
}, undefined>, undefined>, undefined>;
|
|
274
|
+
}, undefined>;
|
|
275
|
+
}, undefined>;
|
|
276
|
+
readonly '5xx': v.ObjectSchema<{
|
|
277
|
+
readonly error: v.ObjectSchema<{
|
|
278
|
+
readonly code: v.StringSchema<undefined>;
|
|
279
|
+
readonly message: v.StringSchema<undefined>;
|
|
280
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
281
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
282
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
283
|
+
readonly message: v.StringSchema<undefined>;
|
|
284
|
+
}, undefined>, undefined>, undefined>;
|
|
285
|
+
}, undefined>;
|
|
286
|
+
}, undefined>;
|
|
287
|
+
readonly 200: v.ObjectSchema<{
|
|
288
|
+
readonly id: v.StringSchema<undefined>;
|
|
289
|
+
readonly serviceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
290
|
+
readonly blockId: v.StringSchema<undefined>;
|
|
291
|
+
readonly frameId: v.StringSchema<undefined>;
|
|
292
|
+
readonly pipelineId: v.StringSchema<undefined>;
|
|
293
|
+
readonly template: v.PicklistSchema<["dep-update", "tech-debt", "custom"], undefined>;
|
|
294
|
+
readonly name: v.StringSchema<undefined>;
|
|
295
|
+
readonly recurrence: v.ObjectSchema<{
|
|
296
|
+
readonly intervalHours: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>;
|
|
297
|
+
readonly weekdays: v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 6, undefined>]>, undefined>;
|
|
298
|
+
readonly windowStartHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
299
|
+
readonly windowEndHour: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
|
|
300
|
+
readonly timezone: v.StringSchema<undefined>;
|
|
301
|
+
}, undefined>;
|
|
302
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
303
|
+
readonly lastRunAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
304
|
+
readonly nextRunAt: v.NumberSchema<undefined>;
|
|
305
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
306
|
+
}, undefined>;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
//# sourceMappingURL=recurring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurring.d.ts","sourceRoot":"","sources":["../../src/routes/recurring.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAC3E,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAmB5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMjC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKnC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMjC,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { createScheduleSchema, pipelineScheduleSchema, scheduleRunSchema, updateScheduleSchema, } from '../recurring.js';
|
|
4
|
+
import { errorResponses, singleStringParam } from './_shared.js';
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Recurring pipeline route contracts. Mounted under `/workspaces/:workspaceId`, so
|
|
7
|
+
// the paths here are relative to that prefix. See RecurringPipelineController in
|
|
8
|
+
// @cat-factory/server.
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
const scheduleListSchema = v.array(pipelineScheduleSchema);
|
|
11
|
+
const scheduleRunListSchema = v.array(scheduleRunSchema);
|
|
12
|
+
const scheduleIdParams = singleStringParam('scheduleId');
|
|
13
|
+
export const listSchedulesContract = defineApiContract({
|
|
14
|
+
method: 'get',
|
|
15
|
+
pathResolver: () => '/recurring-pipelines',
|
|
16
|
+
responsesByStatusCode: { 200: scheduleListSchema, ...errorResponses },
|
|
17
|
+
});
|
|
18
|
+
export const createScheduleContract = defineApiContract({
|
|
19
|
+
method: 'post',
|
|
20
|
+
pathResolver: () => '/recurring-pipelines',
|
|
21
|
+
requestBodySchema: createScheduleSchema,
|
|
22
|
+
responsesByStatusCode: { 201: pipelineScheduleSchema, ...errorResponses },
|
|
23
|
+
});
|
|
24
|
+
export const updateScheduleContract = defineApiContract({
|
|
25
|
+
method: 'patch',
|
|
26
|
+
requestPathParamsSchema: scheduleIdParams,
|
|
27
|
+
pathResolver: ({ scheduleId }) => `/recurring-pipelines/${scheduleId}`,
|
|
28
|
+
requestBodySchema: updateScheduleSchema,
|
|
29
|
+
responsesByStatusCode: { 200: pipelineScheduleSchema, ...errorResponses },
|
|
30
|
+
});
|
|
31
|
+
export const deleteScheduleContract = defineApiContract({
|
|
32
|
+
method: 'delete',
|
|
33
|
+
requestPathParamsSchema: scheduleIdParams,
|
|
34
|
+
pathResolver: ({ scheduleId }) => `/recurring-pipelines/${scheduleId}`,
|
|
35
|
+
responsesByStatusCode: { 204: ContractNoBody, ...errorResponses },
|
|
36
|
+
});
|
|
37
|
+
export const listScheduleRunsContract = defineApiContract({
|
|
38
|
+
method: 'get',
|
|
39
|
+
requestPathParamsSchema: scheduleIdParams,
|
|
40
|
+
pathResolver: ({ scheduleId }) => `/recurring-pipelines/${scheduleId}/runs`,
|
|
41
|
+
responsesByStatusCode: { 200: scheduleRunListSchema, ...errorResponses },
|
|
42
|
+
});
|
|
43
|
+
export const runScheduleNowContract = defineApiContract({
|
|
44
|
+
method: 'post',
|
|
45
|
+
requestPathParamsSchema: scheduleIdParams,
|
|
46
|
+
pathResolver: ({ scheduleId }) => `/recurring-pipelines/${scheduleId}/run-now`,
|
|
47
|
+
requestBodySchema: ContractNoBody,
|
|
48
|
+
responsesByStatusCode: { 200: pipelineScheduleSchema, ...errorResponses },
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=recurring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurring.js","sourceRoot":"","sources":["../../src/routes/recurring.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhE,8EAA8E;AAC9E,mFAAmF;AACnF,iFAAiF;AACjF,uBAAuB;AACvB,8EAA8E;AAE9E,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAA;AAC1D,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;AACxD,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAA;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;IACrD,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,sBAAsB;IAC1C,qBAAqB,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE;CACtE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;IACtD,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,sBAAsB;IAC1C,iBAAiB,EAAE,oBAAoB;IACvC,qBAAqB,EAAE,EAAE,GAAG,EAAE,sBAAsB,EAAE,GAAG,cAAc,EAAE;CAC1E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;IACtD,MAAM,EAAE,OAAO;IACf,uBAAuB,EAAE,gBAAgB;IACzC,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,wBAAwB,UAAU,EAAE;IACtE,iBAAiB,EAAE,oBAAoB;IACvC,qBAAqB,EAAE,EAAE,GAAG,EAAE,sBAAsB,EAAE,GAAG,cAAc,EAAE;CAC1E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;IACtD,MAAM,EAAE,QAAQ;IAChB,uBAAuB,EAAE,gBAAgB;IACzC,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,wBAAwB,UAAU,EAAE;IACtE,qBAAqB,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE;CAClE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,gBAAgB;IACzC,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,wBAAwB,UAAU,OAAO;IAC3E,qBAAqB,EAAE,EAAE,GAAG,EAAE,qBAAqB,EAAE,GAAG,cAAc,EAAE;CACzE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;IACtD,MAAM,EAAE,MAAM;IACd,uBAAuB,EAAE,gBAAgB;IACzC,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,wBAAwB,UAAU,UAAU;IAC9E,iBAAiB,EAAE,cAAc;IACjC,qBAAqB,EAAE,EAAE,GAAG,EAAE,sBAAsB,EAAE,GAAG,cAAc,EAAE;CAC1E,CAAC,CAAA"}
|