var models = require('./models'); function AlphaApi(apiClient) { this.apiClient = apiClient; } /* Create a new changelist that can affect multiple files using different kinds of actions. If you require the ability to integrate or move, for example, you can use this method. */ AlphaApi.prototype.serverChangesPost = function serverChangesPost(server, changelistRequest, callback) { var query = null; var pathParams = {"server": server}; var body = changelistRequest; this.apiClient.executeMethod('post', '/p4d/v16.1/{server}/changes', pathParams, query, body, function(err, response){ if (err) { callback(err); return; } var data = new models.CommandResponse(response.body); callback(null, data); }); }; /* Lists all configured repositories readable by the current user. */ AlphaApi.prototype.serverGitFusionReposGet = function serverGitFusionReposGet(server, callback) { var query = null; var pathParams = {"server": server}; var body = null; this.apiClient.executeMethod('get', '/p4d/v16.1/{server}/git-fusion-repos', pathParams, query, body, function(err, response){ if (err) { callback(err); return; } var data = null; if (Array.isArray(response.body)) { data = response.body.map(function(cur) { return new models.GitFusionRepoId(cur); }); } else { throw "Expected an array, got " + (typeof response.body); } callback(null, data); }); }; /* Submits a [p4gf_config](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j) file to create or update a repository configuration. If the repository does not exist or has been previously deleted, this method saves contents of the config file to a new `p4gf_config` file. If the repository has already been initialised, this method replaces all of the file contents of the specified repository's `p4gf_config` file. */ AlphaApi.prototype.serverGitFusionReposPost = function serverGitFusionReposPost(server, body, callback) { var query = null; var pathParams = {"server": server}; var body = body; this.apiClient.executeMethod('post', '/p4d/v16.1/{server}/git-fusion-repos', pathParams, query, body, function(err, response){ if (err) { callback(err); return; } var data = new models.CommandResponse(response.body); callback(null, data); }); }; /* Return configuration for the specified repository. Grabs and returns contents of the [p4gf_config](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j) file for given repository. */ AlphaApi.prototype.serverGitFusionReposRepoGet = function serverGitFusionReposRepoGet(server, repo, callback) { var query = null; var pathParams = {"server": server, "repo": repo}; var body = null; this.apiClient.executeMethod('get', '/p4d/v16.1/{server}/git-fusion-repos/{repo}', pathParams, query, body, function(err, response){ if (err) { callback(err); return; } var data = new models.GitFusionRepoConfig(response.body); callback(null, data); }); }; /* Updates values in the repository configuration. This method will find all specified parameters and update each value for the specified repository's configuration file. */ AlphaApi.prototype.serverGitFusionReposRepoPatch = function serverGitFusionReposRepoPatch(server, repo, body, callback) { var query = null; var pathParams = {"server": server, "repo": repo}; var body = body; this.apiClient.executeMethod('patch', '/p4d/v16.1/{server}/git-fusion-repos/{repo}', pathParams, query, body, function(err, response){ if (err) { callback(err); return; } var data = new models.CommandResponse(response.body); callback(null, data); }); }; /* Deletes the repository configuration (The [p4gf_config file](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j)). Contents of the repository are not deleted from Perforce. */ AlphaApi.prototype.serverGitFusionReposRepoDelete = function serverGitFusionReposRepoDelete(server, repo, callback) { var query = null; var pathParams = {"server": server, "repo": repo}; var body = null; this.apiClient.executeMethod('delete', '/p4d/v16.1/{server}/git-fusion-repos/{repo}', pathParams, query, body, function(err, response){ if (err) { callback(err); return; } var data = new models.CommandResponse(response.body); callback(null, data); }); }; module.exports = AlphaApi;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 19597 | swellard | Refactor REST path | ||
#1 | 19553 | swellard | Move and rename clients | ||
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/javascript/lib/alpha_api.js | |||||
#4 | 19202 | tjuricek | Revised documentation for the Ruby Client SDK; removed obsolete methods and definitions, and restyled a lot of the tables. | ||
#3 | 19095 | tjuricek |
JS Client SDK branch spec CRUD test Added URL component encoding on path parameters. |
||
#2 | 19065 | tjuricek |
Revised Javascript Client SDK documentation to meet the new API, with fixes. Added a couple of basic tests, and added archival of the different testng XML output. The main major fix is to handle array output better. |
||
#1 | 19053 | tjuricek |
Rebuild JavaScript Client SDK. The JavaScript client now is a "typed" approach that tends to be similar in approach to the other clients, based on the swagger definition for the platform version. Importantly, client SDK tests are individual scripts (that run under node) that are actually controlled via TestNG. This approach now lets us use a consistent test reporting format so we can at least collect reports from each of the jobs. The documentation is still in progress, that I want to validate as the tests are generated. |