0.1.7 • Published 6 years ago

smcp_cs_api v0.1.7

Weekly downloads
29
License
-
Repository
-
Last release
6 years ago

smcp_cs_api

SmcpCsApi - JavaScript client for smcp_cs_api SMCP customer service backend This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.1.7
  • Package version: 0.1.7
  • 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 smcp_cs_api --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 smcp_cs_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('smcp_cs_api') 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 SmcpCsApi = require('smcp_cs_api');

var api = new SmcpCsApi.BrandsApi()

var createBrandDto = new SmcpCsApi.CreateBrandDto(); // {CreateBrandDto} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.create(createBrandDto, callback);

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
SmcpCsApi.BrandsApicreatePOST /brandsBrands.create
SmcpCsApi.BrandsApifindGET /brandsBrands.find
SmcpCsApi.BrandsApiupdatePUT /brands/{brandId}Brands.update
SmcpCsApi.CitiesApifindGET /brand/{brandId}/citiesCities.find
SmcpCsApi.CustomersApifindBySalespersonGET /salespeople/{salespersonId}/customersCustomers.findBySalesperson
SmcpCsApi.CustomersApigetMineGET /salespeople/me/customersCustomers.getMine
SmcpCsApi.CustomersApireassignMineToAnotherShopPOST /salespeople/me/customers/{customerId}/re-assign-to-shop/{shopId}Customers.reassignMineToAnotherShop
SmcpCsApi.CustomersApisearchMineGET /salespeople/me/customers/search-by-nameCustomers.searchMine
SmcpCsApi.CustomersApisearchRelevantToMeByMessageGET /salespeople/me/customers/search-by-messageCustomers.searchRelevantToMeByMessage
SmcpCsApi.CustomersApisearchRelevantToSalespersonByMessageGET /salespeople/{salespersonId}/customers/search-by-messageCustomers.searchRelevantToSalespersonByMessage
SmcpCsApi.CustomersApisearchUnderSalespersonGET /salespeople/{salespersonId}/customers/search-by-nameCustomers.searchUnderSalesperson
SmcpCsApi.MessagesApifindByBrandSessionGET /brands/{brandId}/sessions/{sessionId}/messagesMessage.findByBrandSession
SmcpCsApi.MessagesApisendToBrandSessionPOST /brands/{brandId}/sessions/{sessionId}/messagesMessage.sendToBrandSession
SmcpCsApi.SalespeopleApicreateOrUpdatePOST /brands/{brandId}/shops/{shopId}/salespeople/create-or-updateSalespeople.createOrUpdate
SmcpCsApi.SalespeopleApidepriveManagerPOST /brands/{brandId}/shops/{shopId}/salespeople/{salespersonId}/deprive-managerSalespeople.depriveManager
SmcpCsApi.SalespeopleApifindGET /brands/{brandId}/shops/{shopId}/salespeopleSalespeople.find
SmcpCsApi.SalespeopleApifindByIdGET /brands/{brandId}/shops/{shopId}/salespeople/{salespersonId}Salespeople.findById
SmcpCsApi.SalespeopleApigetMyBrandGET /salespeople/me/brandSalespeople.getMyBrand
SmcpCsApi.SalespeopleApigrantManagerPOST /brands/{brandId}/shops/{shopId}/salespeople/{salespersonId}/grant-managerSalespeople.grantManager
SmcpCsApi.SalespeopleApilockPOST /brands/{brandId}/shops/{shopId}/salespeople/{salespersonId}/lockSalespeople.lock
SmcpCsApi.SalespeopleApimeGET /salespeople/meSalespeople.me
SmcpCsApi.SalespeopleApiupdateMyInfoPUT /salespeople/meSalespeople.updateMyInfo
SmcpCsApi.SessionsApiclosePOST /sessions/{sessionId}/closeSessions.close
SmcpCsApi.SessionsApicloseBySalespersonPOST /sessions/{sessionId}/close-by-salespersonSessions.closeBySalesperson
SmcpCsApi.SessionsApifindGET /brands/{brandId}/sessionsSessions.find
SmcpCsApi.SessionsApifindMineDetailedGET /salespeople/me/sessions/all-in-one-detailedSessions.findMineDetailed
SmcpCsApi.SessionsApifindMineToBeTransferredGET /salespeople/me/sessions/to-be-transferredSessions.findMineToBeTransferred
SmcpCsApi.SessionsApifindToBeTransferredOfSalespersonGET /salespeople/{salespersonId}/sessions/to-be-transferredSessions.findToBeTransferredOfSalesperson
SmcpCsApi.SessionsApisessionsFindDetailedOfSalespersonGET /salespeople/{salespersonId}/sessions/all-in-one-detailedSalesperson
SmcpCsApi.SessionsApistartPOST /sessions/startSessions.start
SmcpCsApi.SessionsApistartBySalespersonPOST /sessions/start-by-salespersonSessions.startBySalesperson
SmcpCsApi.SessionsApitransferMinePOST /salespeople/me/sessions/{sessionId}/transfer-to/{salespersonId}Sessions.transferMine
SmcpCsApi.ShopsApifindGET /brands/{brandId}/shopsShops.find
SmcpCsApi.ShopsApifindByIdGET /brands/{brandId}/shops/{shopId}Shops.findById
SmcpCsApi.ShopsApisyncFromWcn2POST /brands/{brandId}/shops/sync-from-wcn2Shops.syncFromWcn2
SmcpCsApi.ShopsApiupdatePUT /brands/{brandId}/shops/{shopId}Shops.update
SmcpCsApi.SystemApienvGetGET /env
SmcpCsApi.SystemApigetApiDocumentGET /api-doc.jsonSystem.getApiDocument
SmcpCsApi.SystemApiuploadFilePOST /uploadSystem.uploadFile
SmcpCsApi.WechatOfficialAccountsApinotifyPOST /wechat-official-accounts/{appId}/notifyWechatOfficialAccounts.notify
SmcpCsApi.WorkWechatAppsApigetSignatureGET /work-wechat-apps/signatureWorkWechatApps.getSignature
SmcpCsApi.WorkWechatAppsApijumpBridgeGET /work-wechat-apps/{agentId}/bridgeWorkWechatApps.jumpBridge

Documentation for Models

Documentation for Authorization

bearer

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

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago