Skip to content

Commit

Permalink
Added farm vendor sync logs routes
Browse files Browse the repository at this point in the history
  • Loading branch information
kfitzgerald committed Jun 12, 2020
1 parent 17e7cbc commit 2bef455
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 6 deletions.
81 changes: 80 additions & 1 deletion dist/client.js
Expand Up @@ -82,7 +82,7 @@ function Client(config) {
/**
* SDK Version
*/
Client.Version = '3.8.0';
Client.Version = '3.9.0';

/**
* Expose the Provider base class
Expand Down Expand Up @@ -2729,6 +2729,29 @@ Client.resourceBinders.push(function(Client) {
path: '/api/reporting/links/top-n',
query: query
}, callback);
},

/**
* Returns a histogram of vendor sync metrics for time-series visualizations
* @param {object} [query] - Filter arguments
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.reportings#
*/
vendor_sync_histogram: function(query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'reporting.vendor_sync_histogram',
method: 'GET',
path: '/api/reporting/vendor-syncs/date-histogram',
query: query
}, callback);
}

};
Expand Down Expand Up @@ -2833,6 +2856,62 @@ Client.resourceBinders.push(function(Client) {

};

/**
* Vendors
* @namespace Client.farm.vendor_syncs
*/
Client.farm.vendor_syncs = {

/**
* Returns detailed information about a vendor sync.
* @param {string} instance_id – Instance Id
* @param {string} sync_id – Vendor Sync Id
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.vendor_syncs#
*/
retrieve: function(instance_id, sync_id, callback) {
return Client._makeRequest({
api: 'farm',
action: 'vendor_sync.retrieve',
method: 'GET',
path: '/api/{instance_id}/vendors/syncs/{sync_id}',
pathParams: {
instance_id: instance_id,
sync_id: sync_id
}
}, callback);
},

/**
* Returns a list of vendor sync logs.
* @param {string} instance_id – Instance Id
* @param {object} [query] - Filter arguments
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.vendor_syncs#
*/
list: function(instance_id, query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'vendor_sync.list',
method: 'GET',
path: '/api/{instance_id}/vendors/syncs',
pathParams: {
instance_id: instance_id
},
query: query
}, callback);
}

};


});
/* istanbul ignore next: generated code */
Expand Down
81 changes: 80 additions & 1 deletion dist/okanjo-sdk.js
Expand Up @@ -1904,7 +1904,7 @@ function Client(config) {
/**
* SDK Version
*/
Client.Version = '3.8.0';
Client.Version = '3.9.0';

/**
* Expose the Provider base class
Expand Down Expand Up @@ -4551,6 +4551,29 @@ Client.resourceBinders.push(function(Client) {
path: '/api/reporting/links/top-n',
query: query
}, callback);
},

/**
* Returns a histogram of vendor sync metrics for time-series visualizations
* @param {object} [query] - Filter arguments
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.reportings#
*/
vendor_sync_histogram: function(query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'reporting.vendor_sync_histogram',
method: 'GET',
path: '/api/reporting/vendor-syncs/date-histogram',
query: query
}, callback);
}

};
Expand Down Expand Up @@ -4655,6 +4678,62 @@ Client.resourceBinders.push(function(Client) {

};

/**
* Vendors
* @namespace Client.farm.vendor_syncs
*/
Client.farm.vendor_syncs = {

/**
* Returns detailed information about a vendor sync.
* @param {string} instance_id – Instance Id
* @param {string} sync_id – Vendor Sync Id
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.vendor_syncs#
*/
retrieve: function(instance_id, sync_id, callback) {
return Client._makeRequest({
api: 'farm',
action: 'vendor_sync.retrieve',
method: 'GET',
path: '/api/{instance_id}/vendors/syncs/{sync_id}',
pathParams: {
instance_id: instance_id,
sync_id: sync_id
}
}, callback);
},

/**
* Returns a list of vendor sync logs.
* @param {string} instance_id – Instance Id
* @param {object} [query] - Filter arguments
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.vendor_syncs#
*/
list: function(instance_id, query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'vendor_sync.list',
method: 'GET',
path: '/api/{instance_id}/vendors/syncs',
pathParams: {
instance_id: instance_id
},
query: query
}, callback);
}

};


});
/* istanbul ignore next: generated code */
Expand Down
4 changes: 2 additions & 2 deletions dist/okanjo-sdk.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/okanjo-sdk.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "okanjo",
"version": "3.8.0",
"version": "3.9.0",
"description": "Integrate your application with the Okanjo API.",
"main": "dist/client.js",
"scripts": {
Expand Down

0 comments on commit 2bef455

Please sign in to comment.