zaun

2.7.1 • Public • Published

zaun

Zaun - JavaScript client for zaun Zaun service - Q2 This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.7.0
  • Package version: 2.7.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install zaun --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your zaun from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('zaun') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var Zaun = require('zaun');

var api = new Zaun.AuthApi()

var body = new Zaun.CLILogin(); // {CLILogin} CLI Login payload


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.cliLoginPost(body, callback);

Documentation for API Endpoints

All URIs are relative to https://virtserver.swaggerhub.com/kata.ai/zaun-q2/1.0.0

Class Method HTTP request Description
Zaun.AuthApi cliLoginPost POST /cli-login Login for KataCLI, bypass the captcha verification
Zaun.AuthApi forgotPost POST /forgot Forgot password
Zaun.AuthApi impersonatePost POST /impersonate impersonate login
Zaun.AuthApi loginPost POST /login Login
Zaun.AuthApi tokensPost POST /tokens Create token
Zaun.AuthApi tokensTokenIdGet GET /tokens/{tokenId} Read token by ID
Zaun.BotApi projectsProjectIdBotConversePost POST /projects/{projectId}/bot/converse Bot converse
Zaun.BotApi projectsProjectIdBotExecObjectPost POST /projects/{projectId}/bot/exec/{object} Execute intent, state mapper, action, or flow
Zaun.BotApi projectsProjectIdBotRevisionsGet GET /projects/{projectId}/bot/revisions Get bot
Zaun.BotApi projectsProjectIdBotRevisionsPost POST /projects/{projectId}/bot/revisions Create Revisions
Zaun.BotApi projectsProjectIdBotRevisionsRevisionGet GET /projects/{projectId}/bot/revisions/{revision} Get bot
Zaun.BotApi projectsProjectIdBotRevisionsRevisionPut PUT /projects/{projectId}/bot/revisions/{revision} Update bot by ID
Zaun.CacheApi cachesDelete DELETE /caches Clear diaenne's caches
Zaun.DeploymentApi deploymentsDeploymentIdRollbackPost POST /deployments/{deploymentId}/rollback rollback deployment
Zaun.DeploymentApi projectsProjectIdDeploymentVersionsGet GET /projects/{projectId}/deployment/versions Get all deployment versions
Zaun.DeploymentApi projectsProjectIdDeploymentVersionsPost POST /projects/{projectId}/deployment/versions Create a deployment
Zaun.DeploymentApi projectsProjectIdDeploymentsVersionsVersionGet GET /projects/{projectId}/deployments/versions/{version} Get all deployment versions
Zaun.DeploymentApi projectsProjectIdEnvironmentsEnvironmentIdChannelsChannelIdDelete DELETE /projects/{projectId}/environments/{environmentId}/channels/{channelId} Delete an EnvironmentChannel
Zaun.DeploymentApi projectsProjectIdEnvironmentsEnvironmentIdChannelsChannelIdGet GET /projects/{projectId}/environments/{environmentId}/channels/{channelId} Get single EnvironmentChannel by ID
Zaun.DeploymentApi projectsProjectIdEnvironmentsEnvironmentIdChannelsChannelIdPut PUT /projects/{projectId}/environments/{environmentId}/channels/{channelId} Update the EnvironmentChannel
Zaun.DeploymentApi projectsProjectIdEnvironmentsEnvironmentIdChannelsGet GET /projects/{projectId}/environments/{environmentId}/channels Get all EnvironmentChannels
Zaun.DeploymentApi projectsProjectIdEnvironmentsEnvironmentIdChannelsPost POST /projects/{projectId}/environments/{environmentId}/channels create an EnvironmentChannel
Zaun.DeploymentApi projectsProjectIdEnvironmentsEnvironmentIdDelete DELETE /projects/{projectId}/environments/{environmentId} Delete an environment
Zaun.DeploymentApi projectsProjectIdEnvironmentsEnvironmentIdGet GET /projects/{projectId}/environments/{environmentId} Get single environment by ID
Zaun.DeploymentApi projectsProjectIdEnvironmentsEnvironmentIdPut PUT /projects/{projectId}/environments/{environmentId} Update the environment
Zaun.DeploymentApi projectsProjectIdEnvironmentsGet GET /projects/{projectId}/environments Get all environments
Zaun.DeploymentApi projectsProjectIdEnvironmentsPost POST /projects/{projectId}/environments create an environment
Zaun.ModuleApi modulesGet GET /modules Get all module
Zaun.ModuleApi modulesModuleIdDelete DELETE /modules/{moduleId} Delete module by ID
Zaun.ModuleApi modulesModuleIdGet GET /modules/{moduleId} Find module by ID
Zaun.ModuleApi modulesModuleIdPut PUT /modules/{moduleId} Update module by ID
Zaun.ModuleApi modulesModuleIdVersionsGet GET /modules/{moduleId}/versions Get all module versions
Zaun.ModuleApi modulesModuleIdVersionsVersionIdBotDelete DELETE /modules/{moduleId}/versions/{versionId}/bot Delete bot
Zaun.ModuleApi modulesModuleIdVersionsVersionIdBotGet GET /modules/{moduleId}/versions/{versionId}/bot Get bots by module versions
Zaun.ModuleApi modulesModuleIdVersionsVersionIdBotPost POST /modules/{moduleId}/versions/{versionId}/bot Create a Bot
Zaun.ModuleApi modulesModuleIdVersionsVersionIdBotPut PUT /modules/{moduleId}/versions/{versionId}/bot Update a bot
Zaun.ModuleApi modulesModuleIdVersionsVersionIdCmsDelete DELETE /modules/{moduleId}/versions/{versionId}/cms Delete Cms
Zaun.ModuleApi modulesModuleIdVersionsVersionIdCmsGet GET /modules/{moduleId}/versions/{versionId}/cms Get Cmss by module versions
Zaun.ModuleApi modulesModuleIdVersionsVersionIdCmsPost POST /modules/{moduleId}/versions/{versionId}/cms Create a Cms
Zaun.ModuleApi modulesModuleIdVersionsVersionIdCmsPut PUT /modules/{moduleId}/versions/{versionId}/cms Update a Cms
Zaun.ModuleApi modulesPost POST /modules Create Module
Zaun.NluApi nlusProfilesGet GET /nlus/profiles Get list profile NLU
Zaun.NluApi nlusPublicGet GET /nlus/public Get list public NLU
Zaun.NluApi projectsProjectIdNluGet GET /projects/{projectId}/nlu Get detail nlu
Zaun.NluApi projectsProjectIdNlusNluNameDebugPost POST /projects/{projectId}/nlus/{nluName}/debug Train NLU
Zaun.NluApi projectsProjectIdNlusNluNameEntitiesEntityNameDelete DELETE /projects/{projectId}/nlus/{nluName}/entities/{entityName} Delete entity by name
Zaun.NluApi projectsProjectIdNlusNluNameEntitiesEntityNameGet GET /projects/{projectId}/nlus/{nluName}/entities/{entityName} Get Entity of nlu
Zaun.NluApi projectsProjectIdNlusNluNameEntitiesEntityNamePut PUT /projects/{projectId}/nlus/{nluName}/entities/{entityName} Update entity by name
Zaun.NluApi projectsProjectIdNlusNluNameEntitiesGet GET /projects/{projectId}/nlus/{nluName}/entities Get list Entity of nlu
Zaun.NluApi projectsProjectIdNlusNluNameEntitiesPost POST /projects/{projectId}/nlus/{nluName}/entities Create entity
Zaun.NluApi projectsProjectIdNlusNluNameHasActiveJobGet GET /projects/{projectId}/nlus/{nluName}/has_active_job Check NLU has active training job
Zaun.NluApi projectsProjectIdNlusNluNameIssueTokenGet GET /projects/{projectId}/nlus/{nluName}/issue_token Get token
Zaun.NluApi projectsProjectIdNlusNluNameLogGet GET /projects/{projectId}/nlus/{nluName}/log Get analytic data
Zaun.NluApi projectsProjectIdNlusNluNamePredictPost POST /projects/{projectId}/nlus/{nluName}/predict Train NLU
Zaun.NluApi projectsProjectIdNlusNluNameSnapshotGet GET /projects/{projectId}/nlus/{nluName}/snapshot Snapshot NLU
Zaun.NluApi projectsProjectIdNlusNluNameTrainPost POST /projects/{projectId}/nlus/{nluName}/train Train NLU
Zaun.NluApi projectsProjectIdNlusNluNameTrainingDataGet GET /projects/{projectId}/nlus/{nluName}/training_data Get analytic data
Zaun.ProjectApi projectsGet GET /projects Get all projects
Zaun.ProjectApi projectsGetProjectByNameGet GET /projects/getProjectByName Find project by Name
Zaun.ProjectApi projectsPost POST /projects Create project
Zaun.ProjectApi projectsProjectIdBotGet GET /projects/{projectId}/bot/ Get latest bot revision
Zaun.ProjectApi projectsProjectIdCmsGet GET /projects/{projectId}/cms/ Get latest CMS revision
Zaun.ProjectApi projectsProjectIdCmsRevisionsGet GET /projects/{projectId}/cms/revisions Get cms revisions list
Zaun.ProjectApi projectsProjectIdCmsRevisionsPost POST /projects/{projectId}/cms/revisions Create cms
Zaun.ProjectApi projectsProjectIdCmsRevisionsRevisionGet GET /projects/{projectId}/cms/revisions/{revision} Get Cms
Zaun.ProjectApi projectsProjectIdCmsRevisionsRevisionPut PUT /projects/{projectId}/cms/revisions/{revision} Update cms by ID
Zaun.ProjectApi projectsProjectIdDelete DELETE /projects/{projectId} Delete project by ID
Zaun.ProjectApi projectsProjectIdDeploymentGet GET /projects/{projectId}/deployment/ Get Lastest Deployment
Zaun.ProjectApi projectsProjectIdErrorsGet GET /projects/{projectId}/errors Get list error log
Zaun.ProjectApi projectsProjectIdGet GET /projects/{projectId} Find project by ID
Zaun.ProjectApi projectsProjectIdNluGet GET /projects/{projectId}/nlu/ Get Nlu
Zaun.ProjectApi projectsProjectIdNluRevisionsGet GET /projects/{projectId}/nlu/revisions Get nlu
Zaun.ProjectApi projectsProjectIdNluRevisionsPost POST /projects/{projectId}/nlu/revisions Create nlu
Zaun.ProjectApi projectsProjectIdNluRevisionsRevisionGet GET /projects/{projectId}/nlu/revisions/{revision} Get Nlu
Zaun.ProjectApi projectsProjectIdNluRevisionsRevisionPut PUT /projects/{projectId}/nlu/revisions/{revision} Update nlu by ID
Zaun.ProjectApi projectsProjectIdPut PUT /projects/{projectId} Update project by ID
Zaun.SessionApi projectsProjectIdEnvironmentsEnvironmentIdSessionsPost POST /projects/{projectId}/environments/{environmentId}/sessions Create session for current environment
Zaun.SessionApi projectsProjectIdEnvironmentsEnvironmentIdSessionsSessionIdDelete DELETE /projects/{projectId}/environments/{environmentId}/sessions/{sessionId} Delete session by ID
Zaun.SessionApi projectsProjectIdEnvironmentsEnvironmentIdSessionsSessionIdGet GET /projects/{projectId}/environments/{environmentId}/sessions/{sessionId} Find session by ID
Zaun.SessionApi projectsProjectIdEnvironmentsEnvironmentIdSessionsSessionIdPut PUT /projects/{projectId}/environments/{environmentId}/sessions/{sessionId} Update session by ID
Zaun.TeamApi teamsPost POST /teams Create a team
Zaun.TeamApi teamsTeamIdUsersGet GET /teams/{teamId}/users Find users in a team
Zaun.TeamApi teamsTeamIdUsersUserIdDelete DELETE /teams/{teamId}/users/{userId} Delete user from team
Zaun.TeamApi teamsTeamIdUsersUserIdPost POST /teams/{teamId}/users/{userId} Add user to team
Zaun.UserApi usersGet GET /users Get all users
Zaun.UserApi usersGetInfoKeyGet GET /users/getInfo/{key} Find user's info based on either username or email
Zaun.UserApi usersPost POST /users Create a user
Zaun.UserApi usersUserIdDelete DELETE /users/{userId} Delete user by ID
Zaun.UserApi usersUserIdGet GET /users/{userId} Find user by ID
Zaun.UserApi usersUserIdPut PUT /users/{userId} Update user by ID
Zaun.UserApi usersUserIdTeamsGet GET /users/{userId}/teams Find user's teams
Zaun.UserApi usersUserIdTokensGet GET /users/{userId}/tokens Find user's tokens
Zaun.UtilApi timestampGet GET /timestamp Get current timestamp

Documentation for Models

Documentation for Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Readme

Keywords

none

Package Sidebar

Install

npm i zaun

Weekly Downloads

2

Version

2.7.1

License

Unlicense

Unpacked Size

1.07 MB

Total Files

253

Last publish

Collaborators

  • rizqme
  • ybdev