Skip to content

Commit

Permalink
Merge pull request #246 from Asana/openapi-sync
Browse files Browse the repository at this point in the history
Generated from OpenAPI
  • Loading branch information
aw-asana authored Oct 20, 2021
2 parents e07c833 + 52d20bc commit 6bf00fb
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.18.10
0.18.11
45 changes: 45 additions & 0 deletions lib/resources/gen/audit_log_api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* This file is auto-generated by our openapi spec.
* We try to keep the generated code pretty clean but there will be lint
* errors that are just not worth fixing (like unused requires).
* TODO: maybe we can just disable those specifically and keep this code
* pretty lint-free too!
*/
/* jshint ignore:start */
var Resource = require('../resource');
var util = require('util');
var _ = require('lodash');

function AuditLogAPI(dispatcher) {
Resource.call(this, dispatcher);
}
util.inherits(AuditLogAPI, Resource);


/**
* Get audit log events
* @param {String} workspaceGid: (required) Globally unique identifier for the workspace or organization.
* @param {Object} params: Parameters for the request
- startAt {Date}: Filter to events created after this time (inclusive).
- endAt {Date}: Filter to events created before this time (exclusive).
- eventType {String}: Filter to events of this type. Refer to the [Supported AuditLogEvents](/docs/supported-auditlogevents) for a full list of values.
- actorType {String}: Filter to events with an actor of this type. This only needs to be included if querying for actor types without an ID. If `actor_gid` is included, this should be excluded.
- actorGid {String}: Filter to events triggered by the actor with this ID.
- resourceGid {String}: Filter to events with this resource ID.
- offset {String}: Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
- limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
* @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
AuditLogAPI.prototype.getAuditLogEvents = function(
workspaceGid,
params,
dispatchOptions
) {
var path = "/workspaces/{workspace_gid}/audit_log_events".replace("{workspace_gid}", workspaceGid);

return this.dispatchGetCollection(path, params, dispatchOptions)
};

module.exports = AuditLogAPI;
/* jshint ignore:end */
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "asana",
"version": "0.18.10",
"version": "0.18.11",
"description": "Official NodeJS and BrowserJS client for the Asana API",
"main": "index.js",
"scripts": {
Expand Down
12 changes: 12 additions & 0 deletions samples/audit_log_api_sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
auditlogapi:
getAuditLogEvents: >-
const asana = require('asana');
const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
client.auditlogapi.getAuditLogEvents(workspaceGid, {param: "value", param: "value", opt_pretty: true})
.then((result) => {
console.log(result);
});

0 comments on commit 6bf00fb

Please sign in to comment.