@ocxp/client 0.2.5 → 0.2.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.cjs +68 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +334 -1
- package/dist/index.d.ts +334 -1
- package/dist/index.js +66 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1187,6 +1187,29 @@ var deleteRepo = (options) => (options.client ?? client).delete({
|
|
|
1187
1187
|
url: "/ocxp/repo/{repo_id}",
|
|
1188
1188
|
...options
|
|
1189
1189
|
});
|
|
1190
|
+
var syncAllRepos = (options) => (options?.client ?? client).post({
|
|
1191
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1192
|
+
url: "/ocxp/repo/sync-all",
|
|
1193
|
+
...options,
|
|
1194
|
+
headers: {
|
|
1195
|
+
"Content-Type": "application/json",
|
|
1196
|
+
...options?.headers
|
|
1197
|
+
}
|
|
1198
|
+
});
|
|
1199
|
+
var getRepoCommits = (options) => (options.client ?? client).get({
|
|
1200
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1201
|
+
url: "/ocxp/repo/{repo_id}/commits",
|
|
1202
|
+
...options
|
|
1203
|
+
});
|
|
1204
|
+
var syncRepo = (options) => (options.client ?? client).post({
|
|
1205
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1206
|
+
url: "/ocxp/repo/{repo_id}/sync",
|
|
1207
|
+
...options,
|
|
1208
|
+
headers: {
|
|
1209
|
+
"Content-Type": "application/json",
|
|
1210
|
+
...options.headers
|
|
1211
|
+
}
|
|
1212
|
+
});
|
|
1190
1213
|
var githubCheckAccess = (options) => (options.client ?? client).post({
|
|
1191
1214
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1192
1215
|
url: "/ocxp/github/check-access",
|
|
@@ -1999,6 +2022,48 @@ var OCXPClient = class {
|
|
|
1999
2022
|
});
|
|
2000
2023
|
return extractData(response);
|
|
2001
2024
|
}
|
|
2025
|
+
/**
|
|
2026
|
+
* Sync a repository with its remote GitHub branch
|
|
2027
|
+
* @param repoId - Repository ID (owner/repo format)
|
|
2028
|
+
* @param force - Force sync even if no changes detected
|
|
2029
|
+
*/
|
|
2030
|
+
async syncRepo(repoId, force = false) {
|
|
2031
|
+
const headers = await this.getHeaders();
|
|
2032
|
+
const response = await syncRepo({
|
|
2033
|
+
client: this.client,
|
|
2034
|
+
path: { repo_id: repoId },
|
|
2035
|
+
body: { force },
|
|
2036
|
+
headers
|
|
2037
|
+
});
|
|
2038
|
+
return extractData(response);
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* Sync all repositories with their remote GitHub branches
|
|
2042
|
+
* @param force - Force sync all repos even if no changes
|
|
2043
|
+
*/
|
|
2044
|
+
async syncAllRepos(force = false) {
|
|
2045
|
+
const headers = await this.getHeaders();
|
|
2046
|
+
const response = await syncAllRepos({
|
|
2047
|
+
client: this.client,
|
|
2048
|
+
body: { force },
|
|
2049
|
+
headers
|
|
2050
|
+
});
|
|
2051
|
+
return extractData(response);
|
|
2052
|
+
}
|
|
2053
|
+
/**
|
|
2054
|
+
* Get commit status for a repository
|
|
2055
|
+
* Shows how many commits behind and lists missing commits
|
|
2056
|
+
* @param repoId - Repository ID (owner/repo format)
|
|
2057
|
+
*/
|
|
2058
|
+
async getRepoCommitStatus(repoId) {
|
|
2059
|
+
const headers = await this.getHeaders();
|
|
2060
|
+
const response = await getRepoCommits({
|
|
2061
|
+
client: this.client,
|
|
2062
|
+
path: { repo_id: repoId },
|
|
2063
|
+
headers
|
|
2064
|
+
});
|
|
2065
|
+
return extractData(response);
|
|
2066
|
+
}
|
|
2002
2067
|
// ============== Database Operations ==============
|
|
2003
2068
|
/**
|
|
2004
2069
|
* List all database configurations in workspace
|
|
@@ -4351,6 +4416,7 @@ exports.getMissionContext = getMissionContext;
|
|
|
4351
4416
|
exports.getProject = getProject;
|
|
4352
4417
|
exports.getProjectDatabases = getProjectDatabases;
|
|
4353
4418
|
exports.getPrototypeChat = getPrototypeChat;
|
|
4419
|
+
exports.getRepoCommits = getRepoCommits;
|
|
4354
4420
|
exports.getRepoDownloadStatus = getRepoDownloadStatus;
|
|
4355
4421
|
exports.getSample = getSample;
|
|
4356
4422
|
exports.getSchema = getSchema;
|
|
@@ -4404,8 +4470,10 @@ exports.safeParseWSMessage = safeParseWSMessage;
|
|
|
4404
4470
|
exports.searchContent = searchContent;
|
|
4405
4471
|
exports.setDefaultDatabase = setDefaultDatabase;
|
|
4406
4472
|
exports.setDefaultRepo = setDefaultRepo;
|
|
4473
|
+
exports.syncAllRepos = syncAllRepos;
|
|
4407
4474
|
exports.syncPrototypeChat = syncPrototypeChat;
|
|
4408
4475
|
exports.syncPrototypeChatAsync = syncPrototypeChatAsync;
|
|
4476
|
+
exports.syncRepo = syncRepo;
|
|
4409
4477
|
exports.testDatabaseConnection = testDatabaseConnection;
|
|
4410
4478
|
exports.toolCreateMission = toolCreateMission;
|
|
4411
4479
|
exports.toolUpdateMission = toolUpdateMission;
|