@truefoundry/trueforge-sdk 0.2.0-rc.3 → 0.2.0-rc.4
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/internal/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/internal/client/Client.js +7 -2
- package/dist/cjs/api/resources/internal/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/internal/resources/index.js +3 -1
- package/dist/cjs/api/resources/internal/resources/schedules/client/Client.d.ts +32 -0
- package/dist/cjs/api/resources/internal/resources/schedules/client/Client.js +144 -0
- package/dist/cjs/api/resources/internal/resources/schedules/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/internal/resources/schedules/client/index.js +17 -0
- package/dist/cjs/api/resources/internal/resources/schedules/client/requests/ExecuteScheduleRunRequest.d.ts +10 -0
- package/dist/cjs/api/resources/internal/resources/schedules/client/requests/ExecuteScheduleRunRequest.js +3 -0
- package/dist/cjs/api/resources/internal/resources/schedules/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/internal/resources/schedules/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/internal/resources/schedules/exports.d.ts +2 -0
- package/dist/cjs/api/resources/internal/resources/schedules/exports.js +21 -0
- package/dist/cjs/api/resources/internal/resources/schedules/index.d.ts +1 -0
- package/dist/cjs/api/resources/internal/resources/schedules/index.js +17 -0
- package/dist/cjs/serialization/resources/internal/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/internal/resources/index.js +3 -1
- package/dist/cjs/serialization/resources/internal/resources/schedules/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/internal/resources/schedules/client/index.js +17 -0
- package/dist/cjs/serialization/resources/internal/resources/schedules/client/requests/ExecuteScheduleRunRequest.d.ts +9 -0
- package/dist/cjs/serialization/resources/internal/resources/schedules/client/requests/ExecuteScheduleRunRequest.js +41 -0
- package/dist/cjs/serialization/resources/internal/resources/schedules/client/requests/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/internal/resources/schedules/client/requests/index.js +5 -0
- package/dist/cjs/serialization/resources/internal/resources/schedules/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/internal/resources/schedules/index.js +17 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/internal/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/internal/client/Client.mjs +5 -0
- package/dist/esm/api/resources/internal/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/internal/resources/index.mjs +2 -0
- package/dist/esm/api/resources/internal/resources/schedules/client/Client.d.mts +32 -0
- package/dist/esm/api/resources/internal/resources/schedules/client/Client.mjs +107 -0
- package/dist/esm/api/resources/internal/resources/schedules/client/index.d.mts +1 -0
- package/dist/esm/api/resources/internal/resources/schedules/client/index.mjs +1 -0
- package/dist/esm/api/resources/internal/resources/schedules/client/requests/ExecuteScheduleRunRequest.d.mts +10 -0
- package/dist/esm/api/resources/internal/resources/schedules/client/requests/ExecuteScheduleRunRequest.mjs +2 -0
- package/dist/esm/api/resources/internal/resources/schedules/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/internal/resources/schedules/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/internal/resources/schedules/exports.d.mts +2 -0
- package/dist/esm/api/resources/internal/resources/schedules/exports.mjs +3 -0
- package/dist/esm/api/resources/internal/resources/schedules/index.d.mts +1 -0
- package/dist/esm/api/resources/internal/resources/schedules/index.mjs +1 -0
- package/dist/esm/serialization/resources/internal/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/internal/resources/index.mjs +2 -0
- package/dist/esm/serialization/resources/internal/resources/schedules/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/internal/resources/schedules/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/internal/resources/schedules/client/requests/ExecuteScheduleRunRequest.d.mts +9 -0
- package/dist/esm/serialization/resources/internal/resources/schedules/client/requests/ExecuteScheduleRunRequest.mjs +5 -0
- package/dist/esm/serialization/resources/internal/resources/schedules/client/requests/index.d.mts +1 -0
- package/dist/esm/serialization/resources/internal/resources/schedules/client/requests/index.mjs +1 -0
- package/dist/esm/serialization/resources/internal/resources/schedules/index.d.mts +1 -0
- package/dist/esm/serialization/resources/internal/resources/schedules/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +66 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@truefoundry/trueforge-sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "0.2.0-rc.
|
|
47
|
-
"User-Agent": "@truefoundry/trueforge-sdk/0.2.0-rc.
|
|
46
|
+
"X-Fern-SDK-Version": "0.2.0-rc.4",
|
|
47
|
+
"User-Agent": "@truefoundry/trueforge-sdk/0.2.0-rc.4",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -4,6 +4,7 @@ import * as core from "../../../../core/index.js";
|
|
|
4
4
|
import * as TrueForge from "../../../index.js";
|
|
5
5
|
import { AgentsClient } from "../resources/agents/client/Client.js";
|
|
6
6
|
import { MetricsClient } from "../resources/metrics/client/Client.js";
|
|
7
|
+
import { SchedulesClient } from "../resources/schedules/client/Client.js";
|
|
7
8
|
import { SessionsClient } from "../resources/sessions/client/Client.js";
|
|
8
9
|
export declare namespace InternalClient {
|
|
9
10
|
type Options = BaseClientOptions;
|
|
@@ -13,10 +14,12 @@ export declare namespace InternalClient {
|
|
|
13
14
|
export declare class InternalClient {
|
|
14
15
|
protected readonly _options: NormalizedClientOptionsWithAuth<InternalClient.Options>;
|
|
15
16
|
protected _metrics: MetricsClient | undefined;
|
|
17
|
+
protected _schedules: SchedulesClient | undefined;
|
|
16
18
|
protected _sessions: SessionsClient | undefined;
|
|
17
19
|
protected _agents: AgentsClient | undefined;
|
|
18
20
|
constructor(options: InternalClient.Options);
|
|
19
21
|
get metrics(): MetricsClient;
|
|
22
|
+
get schedules(): SchedulesClient;
|
|
20
23
|
get sessions(): SessionsClient;
|
|
21
24
|
get agents(): AgentsClient;
|
|
22
25
|
/**
|
|
@@ -54,7 +54,8 @@ const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
|
54
54
|
const TrueForge = __importStar(require("../../../index.js"));
|
|
55
55
|
const Client_js_1 = require("../resources/agents/client/Client.js");
|
|
56
56
|
const Client_js_2 = require("../resources/metrics/client/Client.js");
|
|
57
|
-
const Client_js_3 = require("../resources/
|
|
57
|
+
const Client_js_3 = require("../resources/schedules/client/Client.js");
|
|
58
|
+
const Client_js_4 = require("../resources/sessions/client/Client.js");
|
|
58
59
|
class InternalClient {
|
|
59
60
|
constructor(options) {
|
|
60
61
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
@@ -63,9 +64,13 @@ class InternalClient {
|
|
|
63
64
|
var _a;
|
|
64
65
|
return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new Client_js_2.MetricsClient(this._options)));
|
|
65
66
|
}
|
|
67
|
+
get schedules() {
|
|
68
|
+
var _a;
|
|
69
|
+
return ((_a = this._schedules) !== null && _a !== void 0 ? _a : (this._schedules = new Client_js_3.SchedulesClient(this._options)));
|
|
70
|
+
}
|
|
66
71
|
get sessions() {
|
|
67
72
|
var _a;
|
|
68
|
-
return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new
|
|
73
|
+
return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new Client_js_4.SessionsClient(this._options)));
|
|
69
74
|
}
|
|
70
75
|
get agents() {
|
|
71
76
|
var _a;
|
|
@@ -2,5 +2,7 @@ export * from "./agents/client/requests/index.js";
|
|
|
2
2
|
export * as agents from "./agents/index.js";
|
|
3
3
|
export * from "./metrics/client/requests/index.js";
|
|
4
4
|
export * as metrics from "./metrics/index.js";
|
|
5
|
+
export * from "./schedules/client/requests/index.js";
|
|
6
|
+
export * as schedules from "./schedules/index.js";
|
|
5
7
|
export * from "./sessions/client/requests/index.js";
|
|
6
8
|
export * as sessions from "./sessions/index.js";
|
|
@@ -36,10 +36,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.sessions = exports.metrics = exports.agents = void 0;
|
|
39
|
+
exports.sessions = exports.schedules = exports.metrics = exports.agents = void 0;
|
|
40
40
|
__exportStar(require("./agents/client/requests/index.js"), exports);
|
|
41
41
|
exports.agents = __importStar(require("./agents/index.js"));
|
|
42
42
|
__exportStar(require("./metrics/client/requests/index.js"), exports);
|
|
43
43
|
exports.metrics = __importStar(require("./metrics/index.js"));
|
|
44
|
+
__exportStar(require("./schedules/client/requests/index.js"), exports);
|
|
45
|
+
exports.schedules = __importStar(require("./schedules/index.js"));
|
|
44
46
|
__exportStar(require("./sessions/client/requests/index.js"), exports);
|
|
45
47
|
exports.sessions = __importStar(require("./sessions/index.js"));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as TrueForge from "../../../../../index.js";
|
|
5
|
+
export declare namespace SchedulesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class SchedulesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<SchedulesClient.Options>;
|
|
12
|
+
constructor(options: SchedulesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Execute a persisted schedule run using its saved schedule and agent.
|
|
15
|
+
*
|
|
16
|
+
* @param {TrueForge.internal.ExecuteScheduleRunRequest} request
|
|
17
|
+
* @param {SchedulesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link TrueForge.UnauthorizedError}
|
|
20
|
+
* @throws {@link TrueForge.NotFoundError}
|
|
21
|
+
* @throws {@link TrueForge.UnprocessableEntityError}
|
|
22
|
+
* @throws {@link errors.TrueForgeError}
|
|
23
|
+
* @throws {@link errors.TrueForgeTimeoutError}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.internal.schedules.executeRun({
|
|
27
|
+
* scheduleRunId: "schedule_run_id"
|
|
28
|
+
* })
|
|
29
|
+
*/
|
|
30
|
+
executeRun(request: TrueForge.internal.ExecuteScheduleRunRequest, requestOptions?: SchedulesClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
31
|
+
private __executeRun;
|
|
32
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.SchedulesClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
50
|
+
const requestBody_js_1 = require("../../../../../../core/requestBody.js");
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
|
+
const serializers = __importStar(require("../../../../../../serialization/index.js"));
|
|
54
|
+
const TrueForge = __importStar(require("../../../../../index.js"));
|
|
55
|
+
class SchedulesClient {
|
|
56
|
+
constructor(options) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Execute a persisted schedule run using its saved schedule and agent.
|
|
61
|
+
*
|
|
62
|
+
* @param {TrueForge.internal.ExecuteScheduleRunRequest} request
|
|
63
|
+
* @param {SchedulesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link TrueForge.UnauthorizedError}
|
|
66
|
+
* @throws {@link TrueForge.NotFoundError}
|
|
67
|
+
* @throws {@link TrueForge.UnprocessableEntityError}
|
|
68
|
+
* @throws {@link errors.TrueForgeError}
|
|
69
|
+
* @throws {@link errors.TrueForgeTimeoutError}
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* await client.internal.schedules.executeRun({
|
|
73
|
+
* scheduleRunId: "schedule_run_id"
|
|
74
|
+
* })
|
|
75
|
+
*/
|
|
76
|
+
executeRun(request, requestOptions) {
|
|
77
|
+
return core.HttpResponsePromise.fromPromise(this.__executeRun(request, requestOptions));
|
|
78
|
+
}
|
|
79
|
+
__executeRun(request, requestOptions) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
82
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
83
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
84
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
85
|
+
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment)), "api/internal/schedules/runs/execute"),
|
|
86
|
+
method: "POST",
|
|
87
|
+
headers: _headers,
|
|
88
|
+
contentType: "application/json",
|
|
89
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
90
|
+
requestType: "json",
|
|
91
|
+
body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(serializers.internal.ExecuteScheduleRunRequest.jsonOrThrow(request, {
|
|
92
|
+
unrecognizedObjectKeys: "passthrough",
|
|
93
|
+
allowUnrecognizedUnionMembers: true,
|
|
94
|
+
allowUnrecognizedEnumValues: true,
|
|
95
|
+
omitUndefined: true,
|
|
96
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
97
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
98
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
99
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
100
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
101
|
+
logging: this._options.logging,
|
|
102
|
+
});
|
|
103
|
+
if (_response.ok) {
|
|
104
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
105
|
+
}
|
|
106
|
+
if (_response.error.reason === "status-code") {
|
|
107
|
+
switch (_response.error.statusCode) {
|
|
108
|
+
case 401:
|
|
109
|
+
throw new TrueForge.UnauthorizedError(serializers.RequestErrorResponse.parseOrThrow(_response.error.body, {
|
|
110
|
+
unrecognizedObjectKeys: "passthrough",
|
|
111
|
+
allowUnrecognizedUnionMembers: true,
|
|
112
|
+
allowUnrecognizedEnumValues: true,
|
|
113
|
+
skipValidation: true,
|
|
114
|
+
breadcrumbsPrefix: ["response"],
|
|
115
|
+
}), _response.rawResponse);
|
|
116
|
+
case 404:
|
|
117
|
+
throw new TrueForge.NotFoundError(serializers.RequestErrorResponse.parseOrThrow(_response.error.body, {
|
|
118
|
+
unrecognizedObjectKeys: "passthrough",
|
|
119
|
+
allowUnrecognizedUnionMembers: true,
|
|
120
|
+
allowUnrecognizedEnumValues: true,
|
|
121
|
+
skipValidation: true,
|
|
122
|
+
breadcrumbsPrefix: ["response"],
|
|
123
|
+
}), _response.rawResponse);
|
|
124
|
+
case 422:
|
|
125
|
+
throw new TrueForge.UnprocessableEntityError(serializers.RequestErrorResponse.parseOrThrow(_response.error.body, {
|
|
126
|
+
unrecognizedObjectKeys: "passthrough",
|
|
127
|
+
allowUnrecognizedUnionMembers: true,
|
|
128
|
+
allowUnrecognizedEnumValues: true,
|
|
129
|
+
skipValidation: true,
|
|
130
|
+
breadcrumbsPrefix: ["response"],
|
|
131
|
+
}), _response.rawResponse);
|
|
132
|
+
default:
|
|
133
|
+
throw new errors.TrueForgeError({
|
|
134
|
+
statusCode: _response.error.statusCode,
|
|
135
|
+
body: _response.error.body,
|
|
136
|
+
rawResponse: _response.rawResponse,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/internal/schedules/runs/execute");
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exports.SchedulesClient = SchedulesClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ExecuteScheduleRunRequest } from "./ExecuteScheduleRunRequest.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SchedulesClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "SchedulesClient", { enumerable: true, get: function () { return Client_js_1.SchedulesClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -36,6 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.sessions = void 0;
|
|
39
|
+
exports.sessions = exports.schedules = void 0;
|
|
40
|
+
__exportStar(require("./schedules/client/requests/index.js"), exports);
|
|
41
|
+
exports.schedules = __importStar(require("./schedules/index.js"));
|
|
40
42
|
__exportStar(require("./sessions/client/requests/index.js"), exports);
|
|
41
43
|
exports.sessions = __importStar(require("./sessions/index.js"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as TrueForge from "../../../../../../../api/index.js";
|
|
2
|
+
import * as core from "../../../../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../../../../index.js";
|
|
4
|
+
export declare const ExecuteScheduleRunRequest: core.serialization.Schema<serializers.internal.ExecuteScheduleRunRequest.Raw, TrueForge.internal.ExecuteScheduleRunRequest>;
|
|
5
|
+
export declare namespace ExecuteScheduleRunRequest {
|
|
6
|
+
interface Raw {
|
|
7
|
+
schedule_run_id: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ExecuteScheduleRunRequest = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../../../../core/index.js"));
|
|
39
|
+
exports.ExecuteScheduleRunRequest = core.serialization.object({
|
|
40
|
+
scheduleRunId: core.serialization.property("schedule_run_id", core.serialization.string()),
|
|
41
|
+
});
|
package/dist/cjs/serialization/resources/internal/resources/schedules/client/requests/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExecuteScheduleRunRequest } from "./ExecuteScheduleRunRequest.js";
|
package/dist/cjs/serialization/resources/internal/resources/schedules/client/requests/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExecuteScheduleRunRequest = void 0;
|
|
4
|
+
var ExecuteScheduleRunRequest_js_1 = require("./ExecuteScheduleRunRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "ExecuteScheduleRunRequest", { enumerable: true, get: function () { return ExecuteScheduleRunRequest_js_1.ExecuteScheduleRunRequest; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.0-rc.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.0-rc.4";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@truefoundry/trueforge-sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "0.2.0-rc.
|
|
10
|
-
"User-Agent": "@truefoundry/trueforge-sdk/0.2.0-rc.
|
|
9
|
+
"X-Fern-SDK-Version": "0.2.0-rc.4",
|
|
10
|
+
"User-Agent": "@truefoundry/trueforge-sdk/0.2.0-rc.4",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -4,6 +4,7 @@ import * as core from "../../../../core/index.mjs";
|
|
|
4
4
|
import * as TrueForge from "../../../index.mjs";
|
|
5
5
|
import { AgentsClient } from "../resources/agents/client/Client.mjs";
|
|
6
6
|
import { MetricsClient } from "../resources/metrics/client/Client.mjs";
|
|
7
|
+
import { SchedulesClient } from "../resources/schedules/client/Client.mjs";
|
|
7
8
|
import { SessionsClient } from "../resources/sessions/client/Client.mjs";
|
|
8
9
|
export declare namespace InternalClient {
|
|
9
10
|
type Options = BaseClientOptions;
|
|
@@ -13,10 +14,12 @@ export declare namespace InternalClient {
|
|
|
13
14
|
export declare class InternalClient {
|
|
14
15
|
protected readonly _options: NormalizedClientOptionsWithAuth<InternalClient.Options>;
|
|
15
16
|
protected _metrics: MetricsClient | undefined;
|
|
17
|
+
protected _schedules: SchedulesClient | undefined;
|
|
16
18
|
protected _sessions: SessionsClient | undefined;
|
|
17
19
|
protected _agents: AgentsClient | undefined;
|
|
18
20
|
constructor(options: InternalClient.Options);
|
|
19
21
|
get metrics(): MetricsClient;
|
|
22
|
+
get schedules(): SchedulesClient;
|
|
20
23
|
get sessions(): SessionsClient;
|
|
21
24
|
get agents(): AgentsClient;
|
|
22
25
|
/**
|
|
@@ -18,6 +18,7 @@ import * as serializers from "../../../../serialization/index.mjs";
|
|
|
18
18
|
import * as TrueForge from "../../../index.mjs";
|
|
19
19
|
import { AgentsClient } from "../resources/agents/client/Client.mjs";
|
|
20
20
|
import { MetricsClient } from "../resources/metrics/client/Client.mjs";
|
|
21
|
+
import { SchedulesClient } from "../resources/schedules/client/Client.mjs";
|
|
21
22
|
import { SessionsClient } from "../resources/sessions/client/Client.mjs";
|
|
22
23
|
export class InternalClient {
|
|
23
24
|
constructor(options) {
|
|
@@ -27,6 +28,10 @@ export class InternalClient {
|
|
|
27
28
|
var _a;
|
|
28
29
|
return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new MetricsClient(this._options)));
|
|
29
30
|
}
|
|
31
|
+
get schedules() {
|
|
32
|
+
var _a;
|
|
33
|
+
return ((_a = this._schedules) !== null && _a !== void 0 ? _a : (this._schedules = new SchedulesClient(this._options)));
|
|
34
|
+
}
|
|
30
35
|
get sessions() {
|
|
31
36
|
var _a;
|
|
32
37
|
return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new SessionsClient(this._options)));
|
|
@@ -2,5 +2,7 @@ export * from "./agents/client/requests/index.mjs";
|
|
|
2
2
|
export * as agents from "./agents/index.mjs";
|
|
3
3
|
export * from "./metrics/client/requests/index.mjs";
|
|
4
4
|
export * as metrics from "./metrics/index.mjs";
|
|
5
|
+
export * from "./schedules/client/requests/index.mjs";
|
|
6
|
+
export * as schedules from "./schedules/index.mjs";
|
|
5
7
|
export * from "./sessions/client/requests/index.mjs";
|
|
6
8
|
export * as sessions from "./sessions/index.mjs";
|
|
@@ -2,5 +2,7 @@ export * from "./agents/client/requests/index.mjs";
|
|
|
2
2
|
export * as agents from "./agents/index.mjs";
|
|
3
3
|
export * from "./metrics/client/requests/index.mjs";
|
|
4
4
|
export * as metrics from "./metrics/index.mjs";
|
|
5
|
+
export * from "./schedules/client/requests/index.mjs";
|
|
6
|
+
export * as schedules from "./schedules/index.mjs";
|
|
5
7
|
export * from "./sessions/client/requests/index.mjs";
|
|
6
8
|
export * as sessions from "./sessions/index.mjs";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
+
import * as TrueForge from "../../../../../index.mjs";
|
|
5
|
+
export declare namespace SchedulesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class SchedulesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<SchedulesClient.Options>;
|
|
12
|
+
constructor(options: SchedulesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Execute a persisted schedule run using its saved schedule and agent.
|
|
15
|
+
*
|
|
16
|
+
* @param {TrueForge.internal.ExecuteScheduleRunRequest} request
|
|
17
|
+
* @param {SchedulesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link TrueForge.UnauthorizedError}
|
|
20
|
+
* @throws {@link TrueForge.NotFoundError}
|
|
21
|
+
* @throws {@link TrueForge.UnprocessableEntityError}
|
|
22
|
+
* @throws {@link errors.TrueForgeError}
|
|
23
|
+
* @throws {@link errors.TrueForgeTimeoutError}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.internal.schedules.executeRun({
|
|
27
|
+
* scheduleRunId: "schedule_run_id"
|
|
28
|
+
* })
|
|
29
|
+
*/
|
|
30
|
+
executeRun(request: TrueForge.internal.ExecuteScheduleRunRequest, requestOptions?: SchedulesClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
31
|
+
private __executeRun;
|
|
32
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
14
|
+
import { mergeAdditionalBodyParameters } from "../../../../../../core/requestBody.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as serializers from "../../../../../../serialization/index.mjs";
|
|
18
|
+
import * as TrueForge from "../../../../../index.mjs";
|
|
19
|
+
export class SchedulesClient {
|
|
20
|
+
constructor(options) {
|
|
21
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Execute a persisted schedule run using its saved schedule and agent.
|
|
25
|
+
*
|
|
26
|
+
* @param {TrueForge.internal.ExecuteScheduleRunRequest} request
|
|
27
|
+
* @param {SchedulesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link TrueForge.UnauthorizedError}
|
|
30
|
+
* @throws {@link TrueForge.NotFoundError}
|
|
31
|
+
* @throws {@link TrueForge.UnprocessableEntityError}
|
|
32
|
+
* @throws {@link errors.TrueForgeError}
|
|
33
|
+
* @throws {@link errors.TrueForgeTimeoutError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.internal.schedules.executeRun({
|
|
37
|
+
* scheduleRunId: "schedule_run_id"
|
|
38
|
+
* })
|
|
39
|
+
*/
|
|
40
|
+
executeRun(request, requestOptions) {
|
|
41
|
+
return core.HttpResponsePromise.fromPromise(this.__executeRun(request, requestOptions));
|
|
42
|
+
}
|
|
43
|
+
__executeRun(request, requestOptions) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
46
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
47
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
49
|
+
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment)), "api/internal/schedules/runs/execute"),
|
|
50
|
+
method: "POST",
|
|
51
|
+
headers: _headers,
|
|
52
|
+
contentType: "application/json",
|
|
53
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
54
|
+
requestType: "json",
|
|
55
|
+
body: mergeAdditionalBodyParameters(serializers.internal.ExecuteScheduleRunRequest.jsonOrThrow(request, {
|
|
56
|
+
unrecognizedObjectKeys: "passthrough",
|
|
57
|
+
allowUnrecognizedUnionMembers: true,
|
|
58
|
+
allowUnrecognizedEnumValues: true,
|
|
59
|
+
omitUndefined: true,
|
|
60
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
61
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
62
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
63
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
64
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
65
|
+
logging: this._options.logging,
|
|
66
|
+
});
|
|
67
|
+
if (_response.ok) {
|
|
68
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
69
|
+
}
|
|
70
|
+
if (_response.error.reason === "status-code") {
|
|
71
|
+
switch (_response.error.statusCode) {
|
|
72
|
+
case 401:
|
|
73
|
+
throw new TrueForge.UnauthorizedError(serializers.RequestErrorResponse.parseOrThrow(_response.error.body, {
|
|
74
|
+
unrecognizedObjectKeys: "passthrough",
|
|
75
|
+
allowUnrecognizedUnionMembers: true,
|
|
76
|
+
allowUnrecognizedEnumValues: true,
|
|
77
|
+
skipValidation: true,
|
|
78
|
+
breadcrumbsPrefix: ["response"],
|
|
79
|
+
}), _response.rawResponse);
|
|
80
|
+
case 404:
|
|
81
|
+
throw new TrueForge.NotFoundError(serializers.RequestErrorResponse.parseOrThrow(_response.error.body, {
|
|
82
|
+
unrecognizedObjectKeys: "passthrough",
|
|
83
|
+
allowUnrecognizedUnionMembers: true,
|
|
84
|
+
allowUnrecognizedEnumValues: true,
|
|
85
|
+
skipValidation: true,
|
|
86
|
+
breadcrumbsPrefix: ["response"],
|
|
87
|
+
}), _response.rawResponse);
|
|
88
|
+
case 422:
|
|
89
|
+
throw new TrueForge.UnprocessableEntityError(serializers.RequestErrorResponse.parseOrThrow(_response.error.body, {
|
|
90
|
+
unrecognizedObjectKeys: "passthrough",
|
|
91
|
+
allowUnrecognizedUnionMembers: true,
|
|
92
|
+
allowUnrecognizedEnumValues: true,
|
|
93
|
+
skipValidation: true,
|
|
94
|
+
breadcrumbsPrefix: ["response"],
|
|
95
|
+
}), _response.rawResponse);
|
|
96
|
+
default:
|
|
97
|
+
throw new errors.TrueForgeError({
|
|
98
|
+
statusCode: _response.error.statusCode,
|
|
99
|
+
body: _response.error.body,
|
|
100
|
+
rawResponse: _response.rawResponse,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/internal/schedules/runs/execute");
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ExecuteScheduleRunRequest } from "./ExecuteScheduleRunRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as TrueForge from "../../../../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../../../../index.mjs";
|
|
4
|
+
export declare const ExecuteScheduleRunRequest: core.serialization.Schema<serializers.internal.ExecuteScheduleRunRequest.Raw, TrueForge.internal.ExecuteScheduleRunRequest>;
|
|
5
|
+
export declare namespace ExecuteScheduleRunRequest {
|
|
6
|
+
interface Raw {
|
|
7
|
+
schedule_run_id: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../../../../core/index.mjs";
|
|
3
|
+
export const ExecuteScheduleRunRequest = core.serialization.object({
|
|
4
|
+
scheduleRunId: core.serialization.property("schedule_run_id", core.serialization.string()),
|
|
5
|
+
});
|
package/dist/esm/serialization/resources/internal/resources/schedules/client/requests/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExecuteScheduleRunRequest } from "./ExecuteScheduleRunRequest.mjs";
|
package/dist/esm/serialization/resources/internal/resources/schedules/client/requests/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExecuteScheduleRunRequest } from "./ExecuteScheduleRunRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.0-rc.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.0-rc.4";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.2.0-rc.
|
|
1
|
+
export const SDK_VERSION = "0.2.0-rc.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truefoundry/trueforge-sdk",
|
|
3
|
-
"version": "0.2.0-rc.
|
|
3
|
+
"version": "0.2.0-rc.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -198,6 +198,17 @@
|
|
|
198
198
|
},
|
|
199
199
|
"default": "./dist/cjs/api/resources/internal/resources/metrics/exports.js"
|
|
200
200
|
},
|
|
201
|
+
"./internal/schedules": {
|
|
202
|
+
"import": {
|
|
203
|
+
"types": "./dist/esm/api/resources/internal/resources/schedules/exports.d.mts",
|
|
204
|
+
"default": "./dist/esm/api/resources/internal/resources/schedules/exports.mjs"
|
|
205
|
+
},
|
|
206
|
+
"require": {
|
|
207
|
+
"types": "./dist/cjs/api/resources/internal/resources/schedules/exports.d.ts",
|
|
208
|
+
"default": "./dist/cjs/api/resources/internal/resources/schedules/exports.js"
|
|
209
|
+
},
|
|
210
|
+
"default": "./dist/cjs/api/resources/internal/resources/schedules/exports.js"
|
|
211
|
+
},
|
|
201
212
|
"./internal/sessions": {
|
|
202
213
|
"import": {
|
|
203
214
|
"types": "./dist/esm/api/resources/internal/resources/sessions/exports.d.mts",
|
package/reference.md
CHANGED
|
@@ -2891,6 +2891,72 @@ await client.internal.metrics.getMeters({
|
|
|
2891
2891
|
</dl>
|
|
2892
2892
|
|
|
2893
2893
|
|
|
2894
|
+
</dd>
|
|
2895
|
+
</dl>
|
|
2896
|
+
</details>
|
|
2897
|
+
|
|
2898
|
+
## Internal Schedules
|
|
2899
|
+
<details><summary><code>client.internal.schedules.<a href="/src/api/resources/internal/resources/schedules/client/Client.ts">executeRun</a>({ ...params }) -> void</code></summary>
|
|
2900
|
+
<dl>
|
|
2901
|
+
<dd>
|
|
2902
|
+
|
|
2903
|
+
#### 📝 Description
|
|
2904
|
+
|
|
2905
|
+
<dl>
|
|
2906
|
+
<dd>
|
|
2907
|
+
|
|
2908
|
+
<dl>
|
|
2909
|
+
<dd>
|
|
2910
|
+
|
|
2911
|
+
Execute a persisted schedule run using its saved schedule and agent.
|
|
2912
|
+
</dd>
|
|
2913
|
+
</dl>
|
|
2914
|
+
</dd>
|
|
2915
|
+
</dl>
|
|
2916
|
+
|
|
2917
|
+
#### 🔌 Usage
|
|
2918
|
+
|
|
2919
|
+
<dl>
|
|
2920
|
+
<dd>
|
|
2921
|
+
|
|
2922
|
+
<dl>
|
|
2923
|
+
<dd>
|
|
2924
|
+
|
|
2925
|
+
```typescript
|
|
2926
|
+
await client.internal.schedules.executeRun({
|
|
2927
|
+
scheduleRunId: "schedule_run_id"
|
|
2928
|
+
});
|
|
2929
|
+
|
|
2930
|
+
```
|
|
2931
|
+
</dd>
|
|
2932
|
+
</dl>
|
|
2933
|
+
</dd>
|
|
2934
|
+
</dl>
|
|
2935
|
+
|
|
2936
|
+
#### ⚙️ Parameters
|
|
2937
|
+
|
|
2938
|
+
<dl>
|
|
2939
|
+
<dd>
|
|
2940
|
+
|
|
2941
|
+
<dl>
|
|
2942
|
+
<dd>
|
|
2943
|
+
|
|
2944
|
+
**request:** `TrueForge.internal.ExecuteScheduleRunRequest`
|
|
2945
|
+
|
|
2946
|
+
</dd>
|
|
2947
|
+
</dl>
|
|
2948
|
+
|
|
2949
|
+
<dl>
|
|
2950
|
+
<dd>
|
|
2951
|
+
|
|
2952
|
+
**requestOptions:** `SchedulesClient.RequestOptions`
|
|
2953
|
+
|
|
2954
|
+
</dd>
|
|
2955
|
+
</dl>
|
|
2956
|
+
</dd>
|
|
2957
|
+
</dl>
|
|
2958
|
+
|
|
2959
|
+
|
|
2894
2960
|
</dd>
|
|
2895
2961
|
</dl>
|
|
2896
2962
|
</details>
|