@miosa/sdk 2.0.5 → 2.0.6
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/index.d.ts +255 -70
- package/dist/index.js +385 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -168,7 +168,7 @@ var TokenRefreshFailedError = class extends MiosaError {
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
// src/version.ts
|
|
171
|
-
var SDK_VERSION = "2.0.
|
|
171
|
+
var SDK_VERSION = "2.0.6";
|
|
172
172
|
var SDK_USER_AGENT = `@miosa/sdk/${SDK_VERSION}`;
|
|
173
173
|
|
|
174
174
|
// src/http.ts
|
|
@@ -302,8 +302,9 @@ var HttpClient = class {
|
|
|
302
302
|
return new Uint8Array(buffer);
|
|
303
303
|
}
|
|
304
304
|
if (response.status === 204) {
|
|
305
|
-
return void 0;
|
|
305
|
+
return options.rawResponse ? response : void 0;
|
|
306
306
|
}
|
|
307
|
+
if (options.rawResponse) return response;
|
|
307
308
|
return await response.json();
|
|
308
309
|
} catch (err) {
|
|
309
310
|
clearTimeout(timer);
|
|
@@ -6799,6 +6800,385 @@ var Functions = class {
|
|
|
6799
6800
|
return data ?? {};
|
|
6800
6801
|
}
|
|
6801
6802
|
};
|
|
6803
|
+
|
|
6804
|
+
// src/resources/forge.ts
|
|
6805
|
+
var REPOSITORY_VISIBILITIES = /* @__PURE__ */ new Set([
|
|
6806
|
+
"public",
|
|
6807
|
+
"private",
|
|
6808
|
+
"internal"
|
|
6809
|
+
]);
|
|
6810
|
+
var REPOSITORY_STATES = /* @__PURE__ */ new Set([
|
|
6811
|
+
"provisioning",
|
|
6812
|
+
"active",
|
|
6813
|
+
"error",
|
|
6814
|
+
"deletion_pending",
|
|
6815
|
+
"deleted"
|
|
6816
|
+
]);
|
|
6817
|
+
var ForgeContractError = class extends MiosaError {
|
|
6818
|
+
constructor(message, details) {
|
|
6819
|
+
super(message, 502, "FORGE_CONTRACT_ERROR", details);
|
|
6820
|
+
this.name = "ForgeContractError";
|
|
6821
|
+
}
|
|
6822
|
+
};
|
|
6823
|
+
var ForgeUnavailableError = class extends MiosaError {
|
|
6824
|
+
constructor(message, cause) {
|
|
6825
|
+
super(message, cause.status, "FORGE_DISABLED", cause.details, cause.requestId);
|
|
6826
|
+
this.name = "ForgeUnavailableError";
|
|
6827
|
+
}
|
|
6828
|
+
};
|
|
6829
|
+
var ForgeStorageError = class extends MiosaError {
|
|
6830
|
+
constructor(message, cause) {
|
|
6831
|
+
super(message, cause.status, cause.code, cause.details, cause.requestId);
|
|
6832
|
+
this.name = "ForgeStorageError";
|
|
6833
|
+
}
|
|
6834
|
+
};
|
|
6835
|
+
var ForgePolicyViolationError = class extends MiosaError {
|
|
6836
|
+
constructor(message, cause) {
|
|
6837
|
+
super(message, cause.status, cause.code, cause.details, cause.requestId);
|
|
6838
|
+
this.name = "ForgePolicyViolationError";
|
|
6839
|
+
}
|
|
6840
|
+
};
|
|
6841
|
+
function translateError(error) {
|
|
6842
|
+
if (!(error instanceof MiosaError)) throw error;
|
|
6843
|
+
if (error.code === "FORGE_DISABLED") {
|
|
6844
|
+
throw new ForgeUnavailableError("Forge is not enabled for this organization", error);
|
|
6845
|
+
}
|
|
6846
|
+
if (error.code === "FORGE_STORAGE_UNAVAILABLE" || error.code === "FORGE_OPERATION_FAILED") {
|
|
6847
|
+
throw new ForgeStorageError("Forge repository storage is unavailable", error);
|
|
6848
|
+
}
|
|
6849
|
+
if (error.code === "INVALID_PROJECT_ATTACHMENT") {
|
|
6850
|
+
throw new ForgePolicyViolationError("Forge repository policy rejected the operation", error);
|
|
6851
|
+
}
|
|
6852
|
+
throw error;
|
|
6853
|
+
}
|
|
6854
|
+
function repositoryPath(id) {
|
|
6855
|
+
return `/forge/repositories/${encodeURIComponent(id)}`;
|
|
6856
|
+
}
|
|
6857
|
+
function compact(value) {
|
|
6858
|
+
return Object.fromEntries(
|
|
6859
|
+
Object.entries(value).filter(([, item]) => item !== void 0)
|
|
6860
|
+
);
|
|
6861
|
+
}
|
|
6862
|
+
function object(payload, label) {
|
|
6863
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
|
|
6864
|
+
throw new ForgeContractError(`Forge returned invalid ${label}`, { payload });
|
|
6865
|
+
}
|
|
6866
|
+
return payload;
|
|
6867
|
+
}
|
|
6868
|
+
function string(value, field, payload) {
|
|
6869
|
+
if (typeof value !== "string") {
|
|
6870
|
+
throw new ForgeContractError(`Forge content is missing ${field}`, { field, payload });
|
|
6871
|
+
}
|
|
6872
|
+
return value;
|
|
6873
|
+
}
|
|
6874
|
+
function nullableString(value, field, payload) {
|
|
6875
|
+
if (value !== null && typeof value !== "string") {
|
|
6876
|
+
throw new ForgeContractError(`Forge content has invalid ${field}`, { field, payload });
|
|
6877
|
+
}
|
|
6878
|
+
return value;
|
|
6879
|
+
}
|
|
6880
|
+
function queryPath(path, params) {
|
|
6881
|
+
const query3 = new URLSearchParams();
|
|
6882
|
+
for (const [key, value] of Object.entries(params)) {
|
|
6883
|
+
if (value !== void 0) query3.set(key, String(value));
|
|
6884
|
+
}
|
|
6885
|
+
const encoded = query3.toString();
|
|
6886
|
+
return encoded ? `${path}?${encoded}` : path;
|
|
6887
|
+
}
|
|
6888
|
+
function parseNamedRef(payload) {
|
|
6889
|
+
const value = object(payload, "repository ref");
|
|
6890
|
+
return { name: string(value.name, "name", payload), oid: string(value.oid, "oid", payload) };
|
|
6891
|
+
}
|
|
6892
|
+
function parseRefs(payload) {
|
|
6893
|
+
const value = object(payload, "repository refs");
|
|
6894
|
+
if (!Array.isArray(value.branches) || !Array.isArray(value.tags)) {
|
|
6895
|
+
throw new ForgeContractError("Forge repository refs have invalid collections", { payload });
|
|
6896
|
+
}
|
|
6897
|
+
const branches = value.branches.map((item) => {
|
|
6898
|
+
const branch = object(item, "branch");
|
|
6899
|
+
if (typeof branch.is_default !== "boolean") {
|
|
6900
|
+
throw new ForgeContractError("Forge branch is missing is_default", { payload: item });
|
|
6901
|
+
}
|
|
6902
|
+
return { ...parseNamedRef(item), is_default: branch.is_default };
|
|
6903
|
+
});
|
|
6904
|
+
return {
|
|
6905
|
+
default_branch: string(value.default_branch, "default_branch", payload),
|
|
6906
|
+
head_oid: nullableString(value.head_oid, "head_oid", payload),
|
|
6907
|
+
branches,
|
|
6908
|
+
tags: value.tags.map(parseNamedRef)
|
|
6909
|
+
};
|
|
6910
|
+
}
|
|
6911
|
+
function parseTree(payload) {
|
|
6912
|
+
const value = object(payload, "repository tree");
|
|
6913
|
+
if (!Array.isArray(value.entries) || typeof value.truncated !== "boolean") {
|
|
6914
|
+
throw new ForgeContractError("Forge repository tree has invalid entries", { payload });
|
|
6915
|
+
}
|
|
6916
|
+
const entries = value.entries.map((item) => {
|
|
6917
|
+
const entry = object(item, "tree entry");
|
|
6918
|
+
if (entry.type !== "blob" && entry.type !== "tree") {
|
|
6919
|
+
throw new ForgeContractError("Forge tree entry has invalid type", { payload: item });
|
|
6920
|
+
}
|
|
6921
|
+
if (entry.size !== null && (typeof entry.size !== "number" || !Number.isSafeInteger(entry.size) || entry.size < 0)) {
|
|
6922
|
+
throw new ForgeContractError("Forge tree entry has invalid size", { payload: item });
|
|
6923
|
+
}
|
|
6924
|
+
return {
|
|
6925
|
+
name: string(entry.name, "name", item),
|
|
6926
|
+
path: string(entry.path, "path", item),
|
|
6927
|
+
type: entry.type,
|
|
6928
|
+
oid: string(entry.oid, "oid", item),
|
|
6929
|
+
size: entry.size
|
|
6930
|
+
};
|
|
6931
|
+
});
|
|
6932
|
+
return {
|
|
6933
|
+
ref: string(value.ref, "ref", payload),
|
|
6934
|
+
commit_oid: string(value.commit_oid, "commit_oid", payload),
|
|
6935
|
+
path: string(value.path, "path", payload),
|
|
6936
|
+
entries,
|
|
6937
|
+
truncated: value.truncated
|
|
6938
|
+
};
|
|
6939
|
+
}
|
|
6940
|
+
function parseBlob(payload) {
|
|
6941
|
+
const value = object(payload, "repository blob");
|
|
6942
|
+
if (value.encoding !== "utf-8" && value.encoding !== "base64") {
|
|
6943
|
+
throw new ForgeContractError("Forge blob has invalid encoding", { payload });
|
|
6944
|
+
}
|
|
6945
|
+
if (typeof value.size !== "number" || !Number.isSafeInteger(value.size) || value.size < 0) {
|
|
6946
|
+
throw new ForgeContractError("Forge blob has invalid size", { payload });
|
|
6947
|
+
}
|
|
6948
|
+
return {
|
|
6949
|
+
ref: string(value.ref, "ref", payload),
|
|
6950
|
+
commit_oid: string(value.commit_oid, "commit_oid", payload),
|
|
6951
|
+
path: string(value.path, "path", payload),
|
|
6952
|
+
oid: string(value.oid, "oid", payload),
|
|
6953
|
+
size: value.size,
|
|
6954
|
+
encoding: value.encoding,
|
|
6955
|
+
content: string(value.content, "content", payload)
|
|
6956
|
+
};
|
|
6957
|
+
}
|
|
6958
|
+
function parseHistory(payload) {
|
|
6959
|
+
const value = object(payload, "commit history");
|
|
6960
|
+
const page = object(value.page, "commit page");
|
|
6961
|
+
if (!Array.isArray(value.commits) || typeof page.has_more !== "boolean") {
|
|
6962
|
+
throw new ForgeContractError("Forge commit history has invalid pagination", { payload });
|
|
6963
|
+
}
|
|
6964
|
+
const commits = value.commits.map((item) => {
|
|
6965
|
+
const commit = object(item, "commit");
|
|
6966
|
+
if (!Array.isArray(commit.parents) || !commit.parents.every((parent) => typeof parent === "string")) {
|
|
6967
|
+
throw new ForgeContractError("Forge commit has invalid parents", { payload: item });
|
|
6968
|
+
}
|
|
6969
|
+
return {
|
|
6970
|
+
oid: string(commit.oid, "oid", item),
|
|
6971
|
+
short_oid: string(commit.short_oid, "short_oid", item),
|
|
6972
|
+
subject: string(commit.subject, "subject", item),
|
|
6973
|
+
author_name: string(commit.author_name, "author_name", item),
|
|
6974
|
+
author_email: string(commit.author_email, "author_email", item),
|
|
6975
|
+
authored_at: string(commit.authored_at, "authored_at", item),
|
|
6976
|
+
committer_name: string(commit.committer_name, "committer_name", item),
|
|
6977
|
+
committed_at: string(commit.committed_at, "committed_at", item),
|
|
6978
|
+
parents: commit.parents
|
|
6979
|
+
};
|
|
6980
|
+
});
|
|
6981
|
+
return {
|
|
6982
|
+
ref: string(value.ref, "ref", payload),
|
|
6983
|
+
path: string(value.path, "path", payload),
|
|
6984
|
+
commits,
|
|
6985
|
+
page: { has_more: page.has_more, next_cursor: nullableString(page.next_cursor, "next_cursor", page) }
|
|
6986
|
+
};
|
|
6987
|
+
}
|
|
6988
|
+
function parseFileReceipt(payload, replayed) {
|
|
6989
|
+
const value = object(payload, "file operation receipt");
|
|
6990
|
+
const commit = object(value.commit, "file operation commit");
|
|
6991
|
+
const policy = object(value.policy, "file operation policy");
|
|
6992
|
+
const stringFields = ["operation_id", "repository_id", "branch", "path", "previous_head", "new_head"];
|
|
6993
|
+
if (stringFields.some((field) => typeof value[field] !== "string") || !["create", "update", "delete"].includes(String(value.action)) || policy.decision !== "allowed" || !Array.isArray(policy.receipt_ids) || !policy.receipt_ids.every((id) => typeof id === "string") || typeof commit.oid !== "string" || typeof commit.committed_at !== "string") {
|
|
6994
|
+
throw new ForgeContractError("Forge returned invalid file operation receipt", { payload });
|
|
6995
|
+
}
|
|
6996
|
+
return { ...value, replayed };
|
|
6997
|
+
}
|
|
6998
|
+
function parseRepository(payload) {
|
|
6999
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
|
|
7000
|
+
throw new ForgeContractError("Forge returned an invalid repository", {
|
|
7001
|
+
payload
|
|
7002
|
+
});
|
|
7003
|
+
}
|
|
7004
|
+
const value = payload;
|
|
7005
|
+
const requiredStrings = [
|
|
7006
|
+
"id",
|
|
7007
|
+
"name",
|
|
7008
|
+
"slug",
|
|
7009
|
+
"default_branch",
|
|
7010
|
+
"visibility",
|
|
7011
|
+
"state",
|
|
7012
|
+
"created_at",
|
|
7013
|
+
"updated_at"
|
|
7014
|
+
];
|
|
7015
|
+
for (const field of requiredStrings) {
|
|
7016
|
+
if (typeof value[field] !== "string" || value[field].length === 0) {
|
|
7017
|
+
throw new ForgeContractError(`Forge repository is missing ${field}`, {
|
|
7018
|
+
field,
|
|
7019
|
+
payload
|
|
7020
|
+
});
|
|
7021
|
+
}
|
|
7022
|
+
}
|
|
7023
|
+
if (!REPOSITORY_VISIBILITIES.has(value.visibility)) {
|
|
7024
|
+
throw new ForgeContractError("Forge repository has an invalid visibility", {
|
|
7025
|
+
payload
|
|
7026
|
+
});
|
|
7027
|
+
}
|
|
7028
|
+
if (!REPOSITORY_STATES.has(value.state)) {
|
|
7029
|
+
throw new ForgeContractError("Forge repository has an invalid state", {
|
|
7030
|
+
payload
|
|
7031
|
+
});
|
|
7032
|
+
}
|
|
7033
|
+
if (typeof value.clone_ready !== "boolean" || value.clone_url !== null && typeof value.clone_url !== "string" || !Array.isArray(value.project_ids) || !value.project_ids.every((id) => typeof id === "string"))
|
|
7034
|
+
throw new ForgeContractError("Forge repository has invalid clone or project metadata", { payload });
|
|
7035
|
+
if (value.clone_ready !== (value.state === "active") || value.clone_ready && !value.clone_url || !value.clone_ready && value.clone_url !== null)
|
|
7036
|
+
throw new ForgeContractError("Forge repository clone readiness is inconsistent", { payload });
|
|
7037
|
+
return {
|
|
7038
|
+
id: value.id,
|
|
7039
|
+
name: value.name,
|
|
7040
|
+
slug: value.slug,
|
|
7041
|
+
default_branch: value.default_branch,
|
|
7042
|
+
visibility: value.visibility,
|
|
7043
|
+
state: value.state,
|
|
7044
|
+
clone_ready: value.clone_ready,
|
|
7045
|
+
clone_url: value.clone_url,
|
|
7046
|
+
project_ids: value.project_ids,
|
|
7047
|
+
created_at: value.created_at,
|
|
7048
|
+
updated_at: value.updated_at
|
|
7049
|
+
};
|
|
7050
|
+
}
|
|
7051
|
+
function parseCapabilities(payload) {
|
|
7052
|
+
const value = object(payload, "capabilities");
|
|
7053
|
+
const valid = value.api_version === "v1" && value.ownership === "organization" && value.detail_locator === "repository_id" && typeof value.base_url === "string" && Array.isArray(value.lifecycle_states) && Array.isArray(value.visibility_values) && Array.isArray(value.clone_ready_states) && value.clone_ready_states.length === 1 && value.clone_ready_states[0] === "active" && value.features && typeof value.features === "object";
|
|
7054
|
+
if (!valid) throw new ForgeContractError("Forge returned invalid capabilities", { payload });
|
|
7055
|
+
return value;
|
|
7056
|
+
}
|
|
7057
|
+
var ForgeRepositories = class {
|
|
7058
|
+
constructor(http) {
|
|
7059
|
+
this.http = http;
|
|
7060
|
+
}
|
|
7061
|
+
http;
|
|
7062
|
+
async create(params) {
|
|
7063
|
+
try {
|
|
7064
|
+
const payload = await this.http.request("/forge/repositories", {
|
|
7065
|
+
method: "POST",
|
|
7066
|
+
headers: { "Idempotency-Key": params.idempotencyKey ?? crypto.randomUUID() },
|
|
7067
|
+
body: compact({
|
|
7068
|
+
name: params.name,
|
|
7069
|
+
slug: params.slug,
|
|
7070
|
+
default_branch: params.defaultBranch,
|
|
7071
|
+
visibility: params.visibility,
|
|
7072
|
+
project_ids: params.projectIds
|
|
7073
|
+
})
|
|
7074
|
+
});
|
|
7075
|
+
return parseRepository(unwrapData2(payload));
|
|
7076
|
+
} catch (error) {
|
|
7077
|
+
translateError(error);
|
|
7078
|
+
}
|
|
7079
|
+
}
|
|
7080
|
+
async list() {
|
|
7081
|
+
const payload = await this.http.get("/forge/repositories");
|
|
7082
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload) || !Array.isArray(payload.data)) {
|
|
7083
|
+
throw new ForgeContractError("Forge returned an invalid repository list", {
|
|
7084
|
+
payload
|
|
7085
|
+
});
|
|
7086
|
+
}
|
|
7087
|
+
return payload.data.map(
|
|
7088
|
+
parseRepository
|
|
7089
|
+
);
|
|
7090
|
+
}
|
|
7091
|
+
async get(id) {
|
|
7092
|
+
return parseRepository(unwrapData2(await this.http.get(repositoryPath(id))));
|
|
7093
|
+
}
|
|
7094
|
+
async refs(id) {
|
|
7095
|
+
return parseRefs(unwrapData2(await this.http.get(`${repositoryPath(id)}/refs`)));
|
|
7096
|
+
}
|
|
7097
|
+
async tree(id, location = {}) {
|
|
7098
|
+
const path = queryPath(`${repositoryPath(id)}/tree`, { ref: location.ref, path: location.path });
|
|
7099
|
+
return parseTree(unwrapData2(await this.http.get(path)));
|
|
7100
|
+
}
|
|
7101
|
+
async blob(id, location) {
|
|
7102
|
+
const path = queryPath(`${repositoryPath(id)}/blob`, { ref: location.ref, path: location.path });
|
|
7103
|
+
return parseBlob(unwrapData2(await this.http.get(path)));
|
|
7104
|
+
}
|
|
7105
|
+
async readme(id, location = {}) {
|
|
7106
|
+
const path = queryPath(`${repositoryPath(id)}/readme`, { ref: location.ref, path: location.path });
|
|
7107
|
+
return parseBlob(unwrapData2(await this.http.get(path)));
|
|
7108
|
+
}
|
|
7109
|
+
async commits(id, query3 = {}) {
|
|
7110
|
+
const path = queryPath(`${repositoryPath(id)}/commits`, {
|
|
7111
|
+
ref: query3.ref,
|
|
7112
|
+
path: query3.path,
|
|
7113
|
+
limit: query3.limit,
|
|
7114
|
+
cursor: query3.cursor
|
|
7115
|
+
});
|
|
7116
|
+
return parseHistory(unwrapData2(await this.http.get(path)));
|
|
7117
|
+
}
|
|
7118
|
+
async putFile(id, path, params) {
|
|
7119
|
+
return this.authorFile(id, path, "PUT", params);
|
|
7120
|
+
}
|
|
7121
|
+
async deleteFile(id, path, params) {
|
|
7122
|
+
return this.authorFile(id, path, "DELETE", params);
|
|
7123
|
+
}
|
|
7124
|
+
async authorFile(id, path, method, params) {
|
|
7125
|
+
const response = await this.http.request(`${repositoryPath(id)}/files/${path.split("/").map(encodeURIComponent).join("/")}`, {
|
|
7126
|
+
method,
|
|
7127
|
+
rawResponse: true,
|
|
7128
|
+
headers: { "Idempotency-Key": params.idempotencyKey ?? crypto.randomUUID() },
|
|
7129
|
+
body: compact({ branch: params.branch, expected_head: params.expectedHead, message: params.message, content: params.content })
|
|
7130
|
+
});
|
|
7131
|
+
let payload;
|
|
7132
|
+
try {
|
|
7133
|
+
payload = await response.json();
|
|
7134
|
+
} catch {
|
|
7135
|
+
throw new ForgeContractError("Forge returned invalid file operation JSON");
|
|
7136
|
+
}
|
|
7137
|
+
return parseFileReceipt(unwrapData2(payload), response.headers.get("idempotency-replayed") === "true");
|
|
7138
|
+
}
|
|
7139
|
+
async update(id, params) {
|
|
7140
|
+
try {
|
|
7141
|
+
const payload = await this.http.request(repositoryPath(id), { method: "PATCH", body: compact({
|
|
7142
|
+
name: params.name,
|
|
7143
|
+
slug: params.slug,
|
|
7144
|
+
visibility: params.visibility,
|
|
7145
|
+
project_ids: params.projectIds
|
|
7146
|
+
}) });
|
|
7147
|
+
return parseRepository(unwrapData2(payload));
|
|
7148
|
+
} catch (error) {
|
|
7149
|
+
translateError(error);
|
|
7150
|
+
}
|
|
7151
|
+
}
|
|
7152
|
+
async delete(id, _options = {}) {
|
|
7153
|
+
try {
|
|
7154
|
+
const response = await this.http.request(repositoryPath(id), {
|
|
7155
|
+
method: "DELETE",
|
|
7156
|
+
rawResponse: true
|
|
7157
|
+
});
|
|
7158
|
+
const operationId = response.headers.get("x-forge-operation-id");
|
|
7159
|
+
if (!operationId) throw new ForgeContractError("Forge delete omitted its operation receipt");
|
|
7160
|
+
return { operation_id: operationId, replayed: response.headers.get("idempotency-replayed") === "true" };
|
|
7161
|
+
} catch (error) {
|
|
7162
|
+
translateError(error);
|
|
7163
|
+
}
|
|
7164
|
+
}
|
|
7165
|
+
};
|
|
7166
|
+
function unwrapData2(payload) {
|
|
7167
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload) || !("data" in payload))
|
|
7168
|
+
throw new ForgeContractError("Forge returned an invalid success envelope", { payload });
|
|
7169
|
+
return payload.data;
|
|
7170
|
+
}
|
|
7171
|
+
var Forge = class {
|
|
7172
|
+
repositories;
|
|
7173
|
+
constructor(http) {
|
|
7174
|
+
this.repositories = new ForgeRepositories(http);
|
|
7175
|
+
this.http = http;
|
|
7176
|
+
}
|
|
7177
|
+
http;
|
|
7178
|
+
async capabilities() {
|
|
7179
|
+
return parseCapabilities(unwrapData2(await this.http.get("/forge/capabilities")));
|
|
7180
|
+
}
|
|
7181
|
+
};
|
|
6802
7182
|
function unwrap38(payload) {
|
|
6803
7183
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6804
7184
|
return payload.data;
|
|
@@ -10342,6 +10722,7 @@ var Miosa = class {
|
|
|
10342
10722
|
orgInvites;
|
|
10343
10723
|
/** Organizations available to the user session, membership, invites, and switching. */
|
|
10344
10724
|
organizations;
|
|
10725
|
+
forge;
|
|
10345
10726
|
/** Current tenant plan, limits, and live usage counters. */
|
|
10346
10727
|
tenant;
|
|
10347
10728
|
/** Datacenter regions, compute sizes, pricing, community templates. */
|
|
@@ -10489,6 +10870,7 @@ var Miosa = class {
|
|
|
10489
10870
|
this.workspaceInvites = new WorkspaceInvites(this.http);
|
|
10490
10871
|
this.orgInvites = new OrgInvites(this.http);
|
|
10491
10872
|
this.organizations = new Organizations(this.http);
|
|
10873
|
+
this.forge = new Forge(this.http);
|
|
10492
10874
|
this.tenant = new Tenant(this.http);
|
|
10493
10875
|
this.regions = new Regions(this.http);
|
|
10494
10876
|
this.settings = new Settings(this.http);
|
|
@@ -11036,6 +11418,6 @@ var AppAuth = class {
|
|
|
11036
11418
|
}
|
|
11037
11419
|
};
|
|
11038
11420
|
|
|
11039
|
-
export { AGENT_BUILD_KIND_SPECS, Admin, AgentDefinitions, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AppDocuments, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
|
|
11421
|
+
export { AGENT_BUILD_KIND_SPECS, Admin, AgentDefinitions, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AppDocuments, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Forge, ForgeContractError, ForgePolicyViolationError, ForgeRepositories, ForgeStorageError, ForgeUnavailableError, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
|
|
11040
11422
|
//# sourceMappingURL=index.js.map
|
|
11041
11423
|
//# sourceMappingURL=index.js.map
|